Пример #1
0
        //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)
        {
            int   mana   = opponent.GetAvailableMana();
            float minion = TyMinionUtil.EstimatedValueFromMana(mana);

            playerState.BiasValue    += TyStateUtility.LateReward(mana, 4, 5.0f);
            playerState.MinionValues += minion;
        }
Пример #2
0
        //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)
        {
            int   mana   = opponent.GetAvailableMana();
            float 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);
        }
Пример #3
0
        //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)
        {
            int   myMana = player.GetAvailableMana();
            float possibleAverageMinion = TyMinionUtil.EstimatedValueFromMana(myMana);
            float 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);
        }
Пример #4
0
        //When a minion attacks your hero, destroy it.
        private static void Vaporize(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);

            //estimate destroying an enemy minion:
            float avgMinionValue = TyMinionUtil.EstimatedValueFromMana(opponentMana);

            opponentState.MinionValues -= avgMinionValue;
        }
Пример #5
0
        //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;
        }
Пример #6
0
        //Hex: Transform a minion into a 0/1 Frog with Taunt.
        private static void Hex(TyState playerState, TyState opponentState, Controller player, Controller opponent, PlayerTask task, Spell spell)
        {
            int myMana = player.GetAvailableMana();

            playerState.BiasValue += TyStateUtility.LateReward(myMana, 3, 1.25f);
        }