What's the targetting priority of fire/ice bolts and drain life? What about rage potions and reverse time?
What do you mean? I can't list every creature in order of priority. Here's an overview of how creature targeting works:
Each spell is given an estimate, usually the damage it will do. For example, Lightning is given -5. Bolts are given -1*the damage they will do (for example, if the enemy has 10
the estimate for Fire Bolt will be -6).
It then runs through all the creatures and assigns them a score. For pure damage spells the score is calculated with this formula:
Score = (current ATK + 1 + skillscore) / -estimate / 20Where skillscore is 3 if the creature has a skill and 0 if it doesn't.
For example, let's consider a basic Shrieker targeted with Lightning:
Score = (8 + 1 + 3) / 5 / 20 = 0.12
It then picks the creature with the highest score and decides whether to use the spell or not based on this:
Ranscore = ((random number between 0 and 1) + 0.1) / (number of cards in hand + 2)If maxscore > ranscore, cast the spell.
Imagining a classic case of the random number being 0.5 and the AI having 4 cards in hand:
Ranscore = (0.5 + 0.1) / 6 = 0.1
So, the Shrieker would be brutally and violently murdered.
So, the creature with the highest ATK + skillscore will be targeted. Also note that creatures that are frozen or delayed will not be targeted by damage spells. Also, this is assuming it didn't decide to target your own HP.
As for Reverse Time, it is interesting because the AI may target its own creatures if its deck size is less than 5 or if it has a Mummy or Skeleton. Apart from that, it has the same targeting as damage spells except that it will never target the enemy's Mummy or Skeleton. Its estimate is -1.
Finally, Rage Potion and Rage Elixir.
On enemy creatures, this is the formula for the score (where definevalue is 5 for Potion, 6 for Elixir and estimate is 1):
Score = -estimate * 0.1 * (cost + current ATK) * (current def - definevalue - 1) / (absolute(current def - definevalue - 1) + 0.001))So, imagine a Shrieker targeted with Rage Potion:
Score = -1 * 0.1 * (8 + 8 ) * (3 - 5 - 1) / (absolute(3 - 5 - 1) + 0.001) = 4.8 / 3.001 = 1.6 (roughly).
It's somewhat complex but basically it won't target a creature with more HP than the potion deals damage, and takes both cost and ATK into account when deciding what to cast it on.
Hopefully that answered your question.