Esempio n. 1
0
        public board_state(board_state cloned_board)
        {
            //pass in a board_state to a new object, and it will create a copy of it
            this.my_turn = cloned_board.my_turn;
            this.max_mana = cloned_board.max_mana;
            this.cur_mana = cloned_board.cur_mana;
            this.mana_used = cloned_board.mana_used;

            this.my_health = cloned_board.my_health;
            this.enemy_health = cloned_board.enemy_health;

            this.my_name = cloned_board.my_name;
            this.enemy_name = cloned_board.enemy_name;

            this.my_hero_id = cloned_board.my_hero_id;
            this.enemy_hero_id = cloned_board.enemy_hero_id;

            this.hero_power_id = cloned_board.hero_power_id;
            this.weapon_id = cloned_board.weapon_id;

            this.game_active = cloned_board.game_active;

            this.game_state = cloned_board.game_state;
            this.mulligan_complete = cloned_board.mulligan_complete;
            this.wait_for_mulligan = cloned_board.wait_for_mulligan;

            this.cards_board = new List<string>(cloned_board.cards_board);
            this.cards_hand = new List<string>(cloned_board.cards_hand);
            this.cards_minions = new List<string>(cloned_board.cards_minions);
            this.cards_friendly = new List<string>(cloned_board.cards_friendly);
            this.cards_opposing = new List<string>(cloned_board.cards_opposing);
            this.cards_friendly_minions = new List<string>(cloned_board.cards_friendly_minions);
            this.cards_opposing_minions = new List<string>(cloned_board.cards_opposing_minions);
            this.cards_secrets = new List<string>(cloned_board.cards_secrets);

            foreach (KeyValuePair<string, card> entry in cloned_board.cards)
            {
                this.cards[entry.Key] = new card(entry.Value);
            }
        }
Esempio n. 2
0
        public void silence(board_state board_state)
        {
            this.tags.taunt = false;
            this.tags.stealth = false;
            this.tags.cant_be_targeted_by_abilities = false;
            this.tags.charge = false;
            this.tags.divine_shield = false;
            this.tags.frozen = false;
            this.tags.immune = false;
            this.tags.windfury = false;
            this.tags.silenced = true;
            this.tags.cant_attack = false;

            this.max_health = this.base_health;
            this.atk = this.base_atk;

            Dictionary<string, deck_card> herby_deck = build_herby_deck.herby_deck();
            if (herby_deck.ContainsKey(this.name))
            {
                if (herby_deck[this.name].lose_aura != null)
                {
                    herby_deck[this.name].lose_aura(this, board_state);
                }
            }
        }