コード例 #1
0
ファイル: Playfield.cs プロジェクト: shuyi3/AIPJ
        public Playfield(Playfield p)
        {

            //implementation      
            this.rngIndex = p.rngIndex;
            this.moveList = new List<Action>(p.moveList);
            moveMap = new Dictionary<Tuple<int, int>, int>();
            moveTrigger = new moveChangeTrigger(p.moveTrigger);

            this.isOwnTurn = p.isOwnTurn;
            this.homeDeck = new List<CardDB.Card>(p.homeDeck);
            this.awayDeck = new List<CardDB.Card>(p.awayDeck);

            this.graveYard = new List<GraveYardItem>(p.graveYard);
            //end of implementation

            this.nextEntity = p.nextEntity;

            this.playerFirst = new Player(p.playerFirst);
            this.playerSecond = new Player(p.playerSecond);

            this.needGraveyard = p.needGraveyard;
            if (needGraveyard) this.diedMinions = new List<GraveYardItem>(p.diedMinions);

            //####buffs#############################
        }
コード例 #2
0
ファイル: Playfield.cs プロジェクト: shuyi3/AIPJ
        public void getHandCard(Player mPlayer, CardDB.cardIDEnum s, bool own)
        {
            CardDB.Card c = CardDB.Instance.getCardDataFromID(s);
            Handmanager.Handcard hc = new Handmanager.Handcard { card = c, position = mPlayer.owncards.Count + 1, manacost = c.cost, entity = this.getNextEntity() };

            if (mPlayer.enemyMillhouse > 0 && c.type == CardDB.cardtype.SPELL)
            {
                hc.manacost = 0;
            }
            if (mPlayer.enemyLoatheb > 0 && c.type == CardDB.cardtype.SPELL)
            {
                hc.manacost += 5 * mPlayer.enemyLoatheb;
            }

            mPlayer.owncarddraw++;
            mPlayer.owncards.Add(hc);
            this.triggerCardsChanged(own);
        }
コード例 #3
0
ファイル: Playfield.cs プロジェクト: shuyi3/AIPJ
        public void setPlayer()
        {

            playerFirst = new Player(0);
            playerSecond = new Player(1);

        }
コード例 #4
0
ファイル: Player.cs プロジェクト: shuyi3/AIPJ
        public Player(Player p) {

            //this.isOwnTurn = p.isOwnTurn;

            this.attacked = p.attacked;
            this.sEnemTurn = p.sEnemTurn;
            this.ownController = p.ownController;
            //this.ownHeroEntity = p.ownHeroEntity;
            //this.enemyHeroEntity = p.enemyHeroEntity;

            this.evaluatePenality = p.evaluatePenality;
            this.ownSecretsIDList.AddRange(p.ownSecretsIDList);

            this.mana = p.mana;
            this.manaTurnEnd = p.manaTurnEnd;
            this.ownMaxMana = p.ownMaxMana;
            addMinionsReal(p.ownMinions, ownMinions);
            this.ownHero = new Minion(p.ownHero);
            addCardsReal(p.owncards);

            this.ownHeroName = p.ownHeroName;

            this.playactions.AddRange(p.playactions);
            this.lastTurnActions.AddRange(p.lastTurnActions);

            this.attackFaceHP = p.attackFaceHP;

            this.owncarddraw = p.owncarddraw;

            this.ownWeaponDurability = p.ownWeaponDurability;
            this.ownWeaponAttack = p.ownWeaponAttack;
            this.ownWeaponName = p.ownWeaponName;

            this.lostDamage = p.lostDamage;
            this.lostWeaponDamage = p.lostWeaponDamage;
            this.lostHeal = p.lostHeal;

            this.ownAbilityReady = p.ownAbilityReady;
            this.ownHeroAblility = new Handmanager.Handcard(p.ownHeroAblility);

            this.spellpower = 0;
            this.mobsplayedThisTurn = p.mobsplayedThisTurn;
            this.startedWithMobsPlayedThisTurn = p.startedWithMobsPlayedThisTurn;
            this.optionsPlayedThisTurn = p.optionsPlayedThisTurn;
            this.cardsPlayedThisTurn = p.cardsPlayedThisTurn;
            this.ueberladung = p.ueberladung;

            this.ownDeckSize = p.ownDeckSize;
            this.ownHeroFatigue = p.ownHeroFatigue;

            //need the following for manacost-calculation
            this.ownHeroHpStarted = p.ownHeroHpStarted;
            this.ownWeaponAttackStarted = p.ownWeaponAttackStarted;
            this.ownCardsCountStarted = p.ownCardsCountStarted;
            this.ownMobsCountStarted = p.ownMobsCountStarted;

            //this.startedWithWinzigebeschwoererin = p.startedWithWinzigebeschwoererin;
            this.playedmagierinderkirintor = p.playedmagierinderkirintor;

            //this.startedWithWinzigebeschwoererin = p.startedWithWinzigebeschwoererin;
            //this.startedWithManagespenst = p.startedWithManagespenst;
            //this.startedWithsoeldnerDerVenture = p.startedWithsoeldnerDerVenture;
            //this.startedWithbeschwoerungsportal = p.startedWithbeschwoerungsportal;
            //this.startedWithnerubarweblord = p.startedWithnerubarweblord;

            //this.startedWithDamagedMinions = p.startedWithDamagedMinions;

            this.nerubarweblord = p.nerubarweblord;
            this.winzigebeschwoererin = p.winzigebeschwoererin;
            this.managespenst = p.managespenst;
            this.soeldnerDerVenture = p.soeldnerDerVenture;
            //this.loatheb = p.loatheb;

            this.spellpower = p.spellpower;

            this.ownLastDiedMinion = p.ownLastDiedMinion;

            //####buffs#############################

            this.anzOwnRaidleader = p.anzOwnRaidleader;
            this.anzOwnMalGanis = p.anzOwnMalGanis;
            this.anzOwnStormwindChamps = p.anzOwnStormwindChamps;
            this.anzOwnTundrarhino = p.anzOwnTundrarhino;
            this.anzOwnTimberWolfs = p.anzOwnTimberWolfs;
            this.anzMurlocWarleader = p.anzMurlocWarleader;
            this.anzGrimscaleOracle = p.anzGrimscaleOracle;
            this.anzOwnAuchenaiSoulpriest = p.anzOwnAuchenaiSoulpriest;
            this.anzOwnsorcerersapprentice = p.anzOwnsorcerersapprentice;
            //this.anzOwnsorcerersapprenticeStarted = p.anzOwnsorcerersapprenticeStarted;
            this.anzOwnSouthseacaptain = p.anzOwnSouthseacaptain;
            this.anzOwnMechwarper = p.anzOwnMechwarper;
            //this.anzOwnMechwarperStarted = p.anzOwnMechwarperStarted;
            this.anzOwnChromaggus = p.anzOwnChromaggus;
            this.anzOwnDragonConsort = p.anzOwnDragonConsort;
            //this.anzOwnDragonConsortStarted = p.anzOwnDragonConsortStarted;

            //implementation of loatheb
            this.enemyLoatheb = p.enemyLoatheb;
            this.enemyMillhouse = p.enemyMillhouse; 
            //end

            this.ownMinionsDiedTurn = p.ownMinionsDiedTurn;

            //this.feugenDead = p.feugenDead;
            //this.stalaggDead = p.stalaggDead;

            this.doublepriest = p.doublepriest;

            this.ownBaronRivendare = p.ownBaronRivendare;

            this.weHaveSteamwheedleSniper = p.weHaveSteamwheedleSniper;
            //#########################################

            this.tempanzOwnCards = this.owncards.Count;

        }