//After your opponent plays a minion, summon a copy of it. private static void MirrorEntity(TyState playerState, TyState opponentState, Controller player, Controller opponent, Spell secret) { var mana = opponent.GetAvailableMana(); var minion = TyMinionUtil.EstimatedValueFromMana(mana); playerState.BiasValue += TyStateUtility.LateReward(mana, 4, 5.0f); playerState.MinionValues += minion; }
//After your opponent plays a minion, add two copies of it to_your hand. private static void FrozenClone(TyState playerState, TyState opponentState, Controller player, Controller opponent, Spell secret) { var mana = opponent.GetAvailableMana(); var minion = TyMinionUtil.EstimatedValueFromMana(mana); //dont multiply by 2, because player still has to play the minions: playerState.BiasValue += minion * 1.75f + TyStateUtility.LateReward(mana, 4, 4.0f); }
//When an enemy casts a spell on a minion, summon a 1/3 as the new target. private static void Spellbender(TyState playerState, TyState opponentState, Controller player, Controller opponent, Spell secret) { var myMana = player.GetAvailableMana(); var possibleAverageMinion = TyMinionUtil.EstimatedValueFromMana(myMana); var myAverageMinion = playerState.GetAverageMinionValue(); //dont play if my minions are weaker than a "good" minion at that point in game, also punish when played early: playerState.BiasValue += (myAverageMinion - possibleAverageMinion) + TyStateUtility.LateReward(myMana, 4, 2.0f); }
//When a minion attacks your hero, destroy it. private static void Vaporize(TyState playerState, TyState opponentState, Controller player, Controller opponent, Spell secret) { var opponentMana = opponent.GetAvailableMana(); //punish playing early: playerState.BiasValue += TyStateUtility.LateReward(opponentMana, 5, 5.0f); //estimate destroying an enemy minion: float avgMinionValue = TyMinionUtil.EstimatedValueFromMana(opponentMana); opponentState.MinionValues -= avgMinionValue; }
//After your opponent plays a minion, transform it into a 1/1 Sheep. private static void PotionOfPolymorph(TyState playerState, TyState opponentState, Controller player, Controller opponent, Spell secret) { int opponentMana = opponent.GetAvailableMana(); //punish playing early: playerState.BiasValue += TyStateUtility.LateReward(opponentMana, 5, 5.0f); //value is the difference between an average minion and the sheep: float sheepValue = TyMinionUtil.ComputeMinionValue(1, 1, 1); float averageMinionValue = TyMinionUtil.EstimatedValueFromMana(opponentMana); float polymorphedValue = (sheepValue - averageMinionValue); opponentState.MinionValues += polymorphedValue; }