Map Events
[CreateAssetMenu(fileName = "Special", menuName = "TcgEngine/MapEvent/Special", order = 10)]
public class EventSpecial : EventData
{
public override bool AreEventsConditionMet(World world, Champion champion)
{
return champion.cards.Count < 10;
}
public override void DoEvent(WorldLogic logic, Champion champion)
{
int seed = logic.WorldData.GetLocationSeed(1234); //Use seed-based randomization, so the result is based on seed selected in menu
System.Random rand = new System.Random(seed);
List<CardData> cards = CardData.GetRewardCards(champion.ChampionData.team); //List of champions cards that can be unlocked
CardData card = cards[rand.Next(0, cards.Count)]; //Get Random card
champion.AddCard(card);
}
}Last updated