Beispiel #1
0
 public GameHandler()
 {
     this.players = new List <Player>();
     this.pool    = new MinionPool();
     this.pool.FillGenericMinionPool();
     this.setHandler            = new SetHandler();
     this.pairsHandler          = new PairsHandler();
     this.combatOutputCollector = new CombatOutputCollector();
     this.shopRarities          = new RarityBreakdown(4, 3, 2, 1);
 }
Beispiel #2
0
        public MinionPool(MinionPool x)
        {
            this.upgrades   = new List <Upgrade>();
            this.spareparts = new List <Spell>();
            this.tokens     = new List <Card>();

            foreach (var card in x.upgrades)
            {
                this.upgrades.Add((Upgrade)card.DeepCopy());
            }

            foreach (var card in x.spareparts)
            {
                this.spareparts.Add((Spell)card.DeepCopy());
            }

            foreach (var card in x.tokens)
            {
                this.tokens.Add((Card)card.DeepCopy());
            }
        }
Beispiel #3
0
        public void StartNewGame(MinionPool pool)
        {
            this.maxMana = 10;
            //this.pool = new MinionPool();
            //this.pool.FillGenericMinionPool();

            for (int i = 0; i < this.players.Count(); i++)
            {
                this.players[i] = new Player(this.players[i].name);

                this.players[i].pool    = new MinionPool(pool);
                this.players[i].maxMana = this.maxMana;
                this.players[i].shop.Refresh(this, this.players[i].pool, this.players[i].maxMana);
                this.players[i].curMana = this.maxMana;
                this.players[i].lives   = this.startingLives;

                this.players[i].ready = false;
            }

            //do other stuff like matching later
        }
Beispiel #4
0
 public Player()
 {
     this.creatureData      = new CreatureData();
     this.shop              = new Shop();
     this.hand              = new Hand();
     this.name              = "No name";
     this.attachedMechs     = new List <Upgrade>();
     this.curMana           = 10;
     this.destroyed         = false;
     this.aftermathMessages = new List <string>();
     this.overloaded        = 0;
     this.ready             = false;
     this.lives             = 0;
     this.playHistory       = new List <List <Card> >();
     this.playHistory.Add(new List <Card>());
     this.boughtThisTurn      = new List <Upgrade>();
     this.specificEffects     = new SpecificEffects();
     this.extraUpgradeEffects = new List <Upgrade>();
     this.nextRoundEffects    = new List <Upgrade>();
     this.pool    = new MinionPool();
     this.maxMana = 10;
 }