public Minion(Minion m) { //dont silence---------------------------- this.anzGotDmg = m.anzGotDmg; this.isHero = m.isHero; this.own = m.own; this.name = m.name; this.cardClass = m.cardClass; this.handcard = m.handcard;//new? this.entitiyID = m.entitiyID; this.zonepos = m.zonepos; this.allreadyAttacked = m.allreadyAttacked; this.playedThisTurn = m.playedThisTurn; this.numAttacksThisTurn = m.numAttacksThisTurn; this.immuneWhileAttacking = m.immuneWhileAttacking; //--------------------------------------- this.shadowmadnessed = m.shadowmadnessed; this.ancestralspirit = m.ancestralspirit; this.destroyOnOwnTurnStart = m.destroyOnOwnTurnStart; // depends on own! this.destroyOnEnemyTurnStart = m.destroyOnEnemyTurnStart; // depends on own! this.destroyOnOwnTurnEnd = m.destroyOnOwnTurnEnd; // depends on own! this.destroyOnEnemyTurnEnd = m.destroyOnEnemyTurnEnd; // depends on own! this.concedal = m.concedal; this.souloftheforest = m.souloftheforest; this.ownBlessingOfWisdom = m.ownBlessingOfWisdom; this.enemyBlessingOfWisdom = m.enemyBlessingOfWisdom; this.spellpower = m.spellpower; this.Hp = m.Hp; this.maxHp = m.maxHp; this.armor = m.armor; this.Angr = m.Angr; this.AdjacentAngr = m.AdjacentAngr; this.tempAttack = m.tempAttack; this.Ready = m.Ready; this.taunt = m.taunt; this.wounded = m.wounded; this.divineshild = m.divineshild; this.windfury = m.windfury; this.frozen = m.frozen; this.stealth = m.stealth; this.immune = m.immune; this.exhausted = m.exhausted; this.charge = m.charge; this.poisonous = m.poisonous; this.cantLowerHPbelowONE = m.cantLowerHPbelowONE; this.silenced = m.silenced; // Drew: fixed this.cantBeTargetedBySpellsOrHeroPowers = m.cantBeTargetedBySpellsOrHeroPowers; }
public Action(string s, Playfield p) //TODO: mana cost implementation { if (s.StartsWith("play ")) { this.actionType = actionEnum.playcard; int cardEnt = Convert.ToInt32(s.Split(new string[] { "id " }, StringSplitOptions.RemoveEmptyEntries)[1].Split(' ')[0]); int targetEnt = -1; if (s.Contains("target ")) { targetEnt = Convert.ToInt32(s.Split(new string[] { "target " }, StringSplitOptions.RemoveEmptyEntries)[1].Split(' ')[0]); } int place = 0; if (s.Contains("pos ")) { place = Convert.ToInt32(s.Split(new string[] { "pos " }, StringSplitOptions.RemoveEmptyEntries)[1].Split(' ')[0]); } int choice = 0; if (s.Contains("choice ")) { choice = Convert.ToInt32(s.Split(new string[] { "choice " }, StringSplitOptions.RemoveEmptyEntries)[1].Split(' ')[0]); } this.own = null; this.card = new Handmanager.Handcard { entity = cardEnt }; if (targetEnt >= 0) { Minion m = new Minion { entitiyID = targetEnt }; this.target = m; } else { this.target = null; } this.place = place; this.druidchoice = choice; } if (s.StartsWith("attack ")) { this.actionType = actionEnum.attackWithMinion; int ownEnt = Convert.ToInt32(s.Split(' ')[1].Split(' ')[0]); int targetEnt = Convert.ToInt32(s.Split(' ')[3].Split(' ')[0]); this.place = 0; this.druidchoice = 0; this.card = null; Minion m = new Minion { entitiyID = targetEnt }; this.target = m; Minion o = new Minion(); o.entitiyID = ownEnt; this.own = o; } if (s.StartsWith("heroattack ")) { this.actionType = actionEnum.attackWithHero; int targetEnt = Convert.ToInt32(s.Split(' ')[1].Split(' ')[0]); this.place = 0; this.druidchoice = 0; this.card = null; Minion m = new Minion { entitiyID = targetEnt }; this.target = m; this.own = p.playerFirst.ownHero; } if (s.StartsWith("useability on target ")) { this.actionType = actionEnum.useHeroPower; int targetEnt = Convert.ToInt32(s.Split(' ')[3].Split(' ')[0]); this.place = 0; this.druidchoice = 0; this.card = null; Minion m = new Minion { entitiyID = targetEnt }; this.target = m; this.own = null; } if (s == "useability") { this.actionType = actionEnum.useHeroPower; this.place = 0; this.druidchoice = 0; this.card = null; this.own = null; this.target = null; } }
public Minion() { this.handcard = new Handmanager.Handcard(); }
public void minionTransform(Minion m, CardDB.Card c) { m.handcard.card.sim_card.onAuraEnds(this, m);//end aura of the minion Handmanager.Handcard hc = new Handmanager.Handcard(c) { entity = m.entitiyID }; int ancestral = m.ancestralspirit; if (m.handcard.card.name == CardDB.cardName.cairnebloodhoof || m.handcard.card.name == CardDB.cardName.harvestgolem || ancestral >= 1) { //this.evaluatePenality -= Ai.Instance.botBase.getplayerSecond.ownMinionValue(m, this) - 1; } //necessary??? /*Minion tranform = createNewMinion(hc, m.zonepos, m.own); Minion temp = new Minion(); temp.setMinionTominion(m); m.setMinionTominion(tranform);*/ m.setMinionTominion(createNewMinion(hc, m.zonepos, m.own)); m.handcard.card.sim_card.onAuraStarts(this, m); this.minionGetOrEraseAllAreaBuffs(m, true); if (m.own) { this.tempTrigger.ownMinionsChanged = true; } else { this.tempTrigger.enemyMininsChanged = true; } if (logging) Helpfunctions.Instance.logg("minion got sheep" + m.name + " " + m.Angr); }
private List <Action> getBestPlayfield(bool lethalCheck) { this.currentRandom = (GameManager.getRNG().NextDouble() > this.randomCut) ? true : false; this.currentRandom = false; this.turnPlayed += 1; bool turn = this.board.isOwnTurn; List <Action> actionList = new List <Action>(); List <Playfield> temp = new List <Playfield>(7000); bool havedonesomething = true; Playfield currentState = new Playfield(this.board); double probCut = this.useNNEval ? 1.0 : 0.0; //if (this.playerSide == false) //{ // for (int i = 0; i < currentState.getCurrentPlayer(true).owncards.Count; i++) // { // Console.WriteLine("idx:" + i); // Console.WriteLine(currentState.getCurrentPlayer(true).owncards[i].card.name); // } // string s = Console.ReadLine(); // if (s.Length != 0) // { // string[] sList = s.Split(','); // foreach (string idxStr in sList) // { // int idx = int.Parse(idxStr); // currentState.getCurrentPlayer(true).owncards[idx].playProb = 0.0; // } // } //} List <Playfield> posmoves = new List <Playfield>(); posmoves.Add(currentState); if (this.useNNEval) { DNNEval.Instance.getNNActionPolicy(currentState, this.playerSide); Player mPlayer = currentState.getCurrentPlayer(true); foreach (Handmanager.Handcard hc in mPlayer.owncards) { Console.WriteLine(hc.card.name + ":" + hc.playProb); } } int boardcount = 0; int deep = 0; //float bestoldval = float.MinValue; Dictionary <int, Playfield> seenStates = new Dictionary <int, Playfield>(); List <int> levelCount = new List <int>(); //List<Playfield> candidateStates = new List<Playfield>(); Dictionary <int, List <Playfield> > candidateStates = new Dictionary <int, List <Playfield> >(); while (havedonesomething) { debug = 0; temp.Clear(); levelCount.Add(posmoves.Count); temp.AddRange(posmoves); havedonesomething = false; int count = temp.Count; for (int i = 0; i < count; i++) { Playfield p = temp[i]; if (turn != p.isOwnTurn) { continue; } List <Action> actions = new List <Action>(Movegenerator.Instance.getMoveList(p, false, true, true, probCut)); foreach (Action a in actions) { havedonesomething = true; Playfield pf = new Playfield(p); pf.doAction(a); if (!seenStates.ContainsKey(pf.GetHashCode())) { seenStates[pf.GetHashCode()] = pf; posmoves.Add(pf); } else { continue; } } int actionHash = BoardHash.Instance.getActionHash(p); bool followPolicy = true; if (this.useNNEval) { int violated = 0; for (int j = 0; j < p.getCurrentPlayer(true).owncards.Count; j++) { Handmanager.Handcard hc = p.getCurrentPlayer(true).owncards[j]; //Helpfunctions.Instance.logg(hc.card.name + ":" + hc.playProb); //Helpfunctions.Instance.logg("Entity:" + hc.entity); violated = hc.entity; if (p.getCurrentPlayer(true).owncards[j].playProb > 0) { followPolicy = false; break; } } //if (p.getCurrentPlayer(true).playactions.Count > 0 && violated != 1041) //{ // int ddbug = 1; //} } p.endTurn(false, false); p.drawTurnStartCard(); //float value; //if (lethalCheck) //{ // Player ePlayer; // ePlayer = playerSide ? p.playerSecond : p.playerFirst; // if (ePlayer.ownHero.Hp < 0) // { // value = 1.0f; // } // else // { // value = 0.0f; // } //} //else //{ // value = getValue(p); //} //if (value > bestoldval) // want the best enemy-play-> worst for us //{ // bestoldval = value; // bestold = p; //} if (followPolicy) { if (!candidateStates.ContainsKey(actionHash)) { candidateStates[actionHash] = new List <Playfield>(); } float stateValue = getStateValue(p); p.value = stateValue; candidateStates[actionHash].Add(p); boardcount++; //candidateStates.Add(p); posmoves.Remove(p); if (boardcount >= maxWide) { break; } } } //if (bestoldval <= 10000 && bestold != null) //{ // posmoves.Add(bestold); //} deep++; if (boardcount >= maxWide) { Helpfunctions.Instance.logg("reach maxwide"); break; } } List <Playfield> statesList = new List <Playfield>(); Helpfunctions.Instance.logg("Diff card play policy: " + candidateStates.Count); foreach (List <Playfield> value in candidateStates.Values) { if (value.Count > 0) { //Helpfunctions.Instance.logg("Actions:" + lethalCheck); //value[0].printLastTurnActions(); //Helpfunctions.Instance.logg("Has " + value.Count + " children"); //if (value.Count > 100) //{ // this.board.printBoard(); // debug = 1; //} //Helpfunctions.Instance.logg("Count: " + value.Count); //Helpfunctions.Instance.logg("Top 10: "); var mySortedList = value.OrderByDescending(l => l.value) .Take(10); //foreach (Playfield pf in mySortedList) //{ // Helpfunctions.Instance.logg("state value:" + pf.value); // pf.printLastTurnActions(); //} statesList.AddRange(value); } } if (statesList.Count > 10000) { debug = 1; } //Playfield bestState = getBestCandidate(candidateStates, lethalCheck); Playfield bestState = null; if (!lethalCheck && this.currentRandom) { bestState = statesList[GameManager.getRNG().Next(statesList.Count)]; } else { bestState = getBestCandidate(statesList, lethalCheck); } if (lethalCheck) { if (bestState != null) { actionList.AddRange(bestState.getLastTurnAction()); } else { actionList.Add(null); } } else { if (bestState != null) { bestState.printLastTurnMacros(); actionList.AddRange(bestState.getLastTurnAction()); //Helpfunctions.Instance.logg("value = " + bestoldval); } actionList.Add(null); } this.avgBoardCount = (this.avgBoardCount + boardcount) / this.turnPlayed; Helpfunctions.Instance.logg("Use DNN:" + this.useNNEval + ", BC = " + boardcount); Helpfunctions.Instance.logg("Use DNN:" + this.useNNEval + ", avgBoardCount = " + this.avgBoardCount); return(actionList); }
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); }
public void minionReturnToHand(Minion m, bool own, int manachange) { List<Minion> temp = (own) ? this.playerFirst.ownMinions : this.playerSecond.ownMinions; m.handcard.card.sim_card.onAuraEnds(this, m); temp.Remove(m); if (own) { CardDB.Card c = m.handcard.card; Handmanager.Handcard hc = new Handmanager.Handcard { card = c, position = this.playerFirst.owncards.Count + 1, entity = m.entitiyID, manacost = c.cost + manachange, permCostChange = manachange }; if (this.playerFirst.owncards.Count < 10) { this.playerFirst.owncards.Add(hc); this.triggerCardsChanged(true); } this.tempTrigger.ownMinionsChanged = true; } else { CardDB.Card c = m.handcard.card; Handmanager.Handcard hc = new Handmanager.Handcard { card = c, position = this.playerSecond.owncards.Count + 1, entity = m.entitiyID, manacost = c.cost + manachange, permCostChange = manachange }; if (this.playerSecond.owncards.Count < 10) { this.playerSecond.owncards.Add(hc); this.triggerCardsChanged(false); } this.tempTrigger.enemyMininsChanged = true; } }
//todo 4th param public void callKid(CardDB.Card c, int zonepos, bool own, bool spawnKid = false, bool oneMoreIsAllowed = false) { //spawnKid = true if its a minion spawned with another one (battlecry) int allowed = 7; allowed += (oneMoreIsAllowed) ? 1 : 0; allowed -= (spawnKid) ? 1 : 0; if (own) { if (this.playerFirst.ownMinions.Count >= allowed) { //if (spawnKid) this.evaluatePenality += 20; return; } } else { if (this.playerSecond.ownMinions.Count >= allowed) { //if (spawnKid) this.evaluatePenality -= 20; return; } } int mobplace = zonepos + 1;//todo check this? //create minion (+triggers) Handmanager.Handcard hc = new Handmanager.Handcard(c) { entity = this.getNextEntity() }; Minion m = createNewMinion(hc, mobplace, own); //put it on battle field (+triggers) addMinionToBattlefield(m); }
public Minion createNewMinion(Handmanager.Handcard hc, int zonepos, bool own) { Minion m = new Minion(); Handmanager.Handcard handc = new Handmanager.Handcard(hc); //Handmanager.Handcard handc = hc; // new Handcard(hc)? m.handcard = handc; m.own = own; m.isHero = false; m.entitiyID = hc.entity; m.Angr = hc.card.Attack + hc.addattack; m.Hp = hc.card.Health + hc.addHp; hc.addattack = 0; hc.addHp = 0; m.maxHp = hc.card.Health; m.name = hc.card.name; m.playedThisTurn = true; m.numAttacksThisTurn = 0; m.zonepos = zonepos; m.windfury = hc.card.windfury; m.taunt = hc.card.tank; m.charge = (hc.card.Charge) ? 1 : 0; m.divineshild = hc.card.Shield; m.poisonous = hc.card.poisionous; m.stealth = hc.card.Stealth; m.updateReadyness(); if (m.name == CardDB.cardName.lightspawn) { m.Angr = m.Hp; } //trigger on summon effect! this.triggerAMinionIsSummoned(m); //activate onAura effect m.handcard.card.sim_card.onAuraStarts(this, m); //buffs minion this.minionGetOrEraseAllAreaBuffs(m, true); return m; }
public void triggerStartTurn(bool ownturn) { List<Minion> ownm = (ownturn) ? this.playerFirst.ownMinions : this.playerSecond.ownMinions; foreach (Minion m in ownm.ToArray()) { m.playedThisTurn = false; m.numAttacksThisTurn = 0; m.updateReadyness(); if (!m.silenced) { m.handcard.card.sim_card.onTurnStartTrigger(this, m, ownturn); } if (ownturn && m.destroyOnOwnTurnStart) this.minionGetDestroyed(m); if (!ownturn && m.destroyOnEnemyTurnStart) this.minionGetDestroyed(m); } List<Minion> enemm = (ownturn) ? this.playerSecond.ownMinions : this.playerFirst.ownMinions; foreach (Minion m in enemm.ToArray()) { if (!m.silenced) { if (m.name == CardDB.cardName.micromachine) m.handcard.card.sim_card.onTurnStartTrigger(this, m, ownturn); } if (ownturn && m.destroyOnOwnTurnStart) this.minionGetDestroyed(m); if (!ownturn && m.destroyOnEnemyTurnStart) this.minionGetDestroyed(m); } this.doDmgTriggers(); Handmanager.Handcard card = new Handmanager.Handcard(); this.drawACard(getArandomCardFromDeck(ownturn), ownturn); this.doDmgTriggers(); foreach (int m in moveTrigger.minionDiedList) { if (m == 1008) { int debug = 1; } } //action debug this.moveList.Clear(); this.moveTrigger.Clear(); this.playerFirst.lastTurnActions.Clear(); this.playerFirst.lastTurnActions.AddRange(this.playerFirst.playactions); this.playerFirst.playactions.Clear(); this.playerSecond.lastTurnActions.Clear(); this.playerSecond.lastTurnActions.AddRange(this.playerSecond.playactions); this.playerSecond.playactions.Clear(); this.rngIndex = 0; GameManager.Instance.randomList.Clear(); }
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; }
public Player(int player) { this.ownController = player; this.mana = (player == 0)? 1: 0; this.manaTurnEnd = this.mana; this.ownMaxMana = mana; this.evaluatePenality = 0; this.attackFaceHP = 15; //this.complete = false; this.ownHero = new Minion(); this.ownHero.cardClass = TAG_CLASS.MAGE; //implementation this.ownHero.isHero = true; this.ownHero.own = (player == 0) ? true : false; this.ownHero.maxHp = 30; this.ownHero.entitiyID = player; this.ownHero.Angr = 0; this.ownHero.Hp = 30; this.ownHero.armor = 0; this.ownHero.frozen = false; this.ownHero.immuneWhileAttacking = false; this.ownHero.immune = false; this.ownHero.numAttacksThisTurn = 0; this.ownHero.windfury = false; //end of implementation //addCardsReal(homeHandManager.handCards); this.ownHeroName = HeroEnum.mage; this.ownHeroStartClass = TAG_CLASS.MAGE; /* this.enemyHeroHp = hrtprozis.enemyHp; this.ownHeroHp = hrtprozis.heroHp; this.ownHeroReady = hrtprozis.ownheroisread; this.ownHeroWindfury = hrtprozis.ownHeroWindfury; this.ownHeroNumAttackThisTurn = hrtprozis.ownHeroNumAttacksThisTurn; this.ownHeroFrozen = hrtprozis.herofrozen; this.enemyHeroFrozen = hrtprozis.enemyfrozen; this.ownheroAngr = hrtprozis.heroAtk; this.heroImmuneWhileAttacking = hrtprozis.heroImmuneToDamageWhileAttacking; this.ownHeroDefence = hrtprozis.heroDefence; this.enemyHeroDefence = hrtprozis.enemyDefence; */ //####buffs############################# this.anzOwnRaidleader = 0; this.anzOwnStormwindChamps = 0; this.anzOwnTundrarhino = 0; this.anzOwnTimberWolfs = 0; this.anzMurlocWarleader = 0; this.anzGrimscaleOracle = 0; this.anzOwnAuchenaiSoulpriest = 0; this.anzOwnsorcerersapprentice = 0; //this.anzOwnsorcerersapprenticeStarted = 0; this.anzOwnSouthseacaptain = 0; //this.anzOwnDragonConsortStarted = 0; this.ownMinionsDiedTurn = 0; //this.feugenDead = false; //this.stalaggDead = false; this.doublepriest = 0; this.ownBaronRivendare = 0; //######################################### this.ownWeaponDurability = 0; this.ownWeaponAttack = 0; this.ownWeaponName = CardDB.cardName.unknown; this.owncarddraw = 0; this.ownAbilityReady = true; this.ownHeroAblility = new Handmanager.Handcard(CardDB.Instance.getCardData(CardDB.Instance.cardNamestringToEnum("fireblast"))); this.mobsplayedThisTurn = 0; //this.startedWithMobsPlayedThisTurn = 0;// only change mobsplayedthisturm this.cardsPlayedThisTurn = 0; //todo: this.optionsPlayedThisTurn = 0; this.ueberladung = 0; this.ownHeroFatigue = 0; this.ownDeckSize = 30; //need the following for manacost-calculation //this.ownHeroHpStarted = this.ownHero.Hp; //this.ownWeaponAttackStarted = this.ownWeaponAttack; //this.ownCardsCountStarted = this.owncards.Count; //this.ownMobsCountStarted = this.ownMinions.Count + this.enemyMinions.Count; this.playedmagierinderkirintor = false; this.playedPreparation = false; this.winzigebeschwoererin = 0; this.managespenst = 0; this.soeldnerDerVenture = 0; this.beschwoerungsportal = 0; this.nerubarweblord = 0; //this.startedWithnerubarweblord = 0; //this.startedWithbeschwoerungsportal = 0; //this.startedWithManagespenst = 0; //this.startedWithWinzigebeschwoererin = 0; //this.startedWithsoeldnerDerVenture = 0; this.ownBaronRivendare = 0; //this.loatheb = false; this.spellpower = 0; //this.startedWithDamagedMinions = false; foreach (Minion m in this.ownMinions) { //if (m.Hp < m.maxHp && m.Hp >= 1) this.startedWithDamagedMinions = true; //if (m.playedThisTurn && m.name == CardDB.cardName.loatheb) this.loatheb = true; spellpower = spellpower + m.spellpower; if (m.silenced) continue; spellpower += m.handcard.card.spellpowervalue; if (m.name == CardDB.cardName.prophetvelen) this.doublepriest++; if (m.name == CardDB.cardName.pintsizedsummoner) { this.winzigebeschwoererin++; //this.startedWithWinzigebeschwoererin++; } if (m.name == CardDB.cardName.manawraith) { this.managespenst++; //this.startedWithManagespenst++; } if (m.name == CardDB.cardName.nerubarweblord) { this.nerubarweblord++; //this.startedWithnerubarweblord++; } if (m.name == CardDB.cardName.venturecomercenary) { this.soeldnerDerVenture++; //this.startedWithsoeldnerDerVenture++; } if (m.name == CardDB.cardName.summoningportal) { this.beschwoerungsportal++; //this.startedWithbeschwoerungsportal++; } if (m.handcard.card.name == CardDB.cardName.baronrivendare) { this.ownBaronRivendare++; } if (m.handcard.card.name == CardDB.cardName.kelthuzad) { //this.needGraveyard = true; } if (m.name == CardDB.cardName.raidleader) this.anzOwnRaidleader++; if (m.name == CardDB.cardName.malganis) this.anzOwnMalGanis++; if (m.name == CardDB.cardName.stormwindchampion) this.anzOwnStormwindChamps++; if (m.name == CardDB.cardName.tundrarhino) this.anzOwnTundrarhino++; if (m.name == CardDB.cardName.timberwolf) this.anzOwnTimberWolfs++; if (m.name == CardDB.cardName.murlocwarleader) this.anzMurlocWarleader++; if (m.name == CardDB.cardName.grimscaleoracle) this.anzGrimscaleOracle++; if (m.name == CardDB.cardName.auchenaisoulpriest) this.anzOwnAuchenaiSoulpriest++; if (m.name == CardDB.cardName.sorcerersapprentice) { this.anzOwnsorcerersapprentice++; //this.anzOwnsorcerersapprenticeStarted++; } if (m.name == CardDB.cardName.southseacaptain) this.anzOwnSouthseacaptain++; if (m.name == CardDB.cardName.chromaggus) this.anzOwnChromaggus++; //if (m.name == CardDB.cardName.dragonconsort && anzOwnDragonConsort > 0) this.anzOwnDragonConsortStarted++; if (m.name == CardDB.cardName.mechwarper) { this.anzOwnMechwarper++; //this.anzOwnMechwarperStarted++; } if (m.name == CardDB.cardName.steamwheedlesniper && this.ownHeroName == HeroEnum.hunter) { this.weHaveSteamwheedleSniper = true; } } foreach (Handmanager.Handcard hc in this.owncards) { if (hc.card.name == CardDB.cardName.kelthuzad) { //this.needGraveyard = true; } } }