mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Switching Pestilence AI to be more generic and use AILogic$ DmgAllCreaturesAndPlayers
This commit is contained in:
@@ -119,7 +119,7 @@ public class DamageAllAi extends SpellAbilityAi {
|
|||||||
if (ComputerUtilCombat.predictDamageTo(opp, dmg, source, false) > 0) {
|
if (ComputerUtilCombat.predictDamageTo(opp, dmg, source, false) > 0) {
|
||||||
// When using Pestilence to hurt players, do it at
|
// When using Pestilence to hurt players, do it at
|
||||||
// the end of the opponent's turn only
|
// the end of the opponent's turn only
|
||||||
if ((!source.getName().equals("Pestilence"))
|
if ((!"DmgAllCreaturesAndPlayers".equals(sa.getParam("AILogic")))
|
||||||
|| ((ai.getGame().getPhaseHandler().is(PhaseType.END_OF_TURN)
|
|| ((ai.getGame().getPhaseHandler().is(PhaseType.END_OF_TURN)
|
||||||
&& (ai.getGame().getNonactivePlayers().contains(ai)))))
|
&& (ai.getGame().getNonactivePlayers().contains(ai)))))
|
||||||
// Need further improvement : if able to kill immediately with repeated activations, do not wait
|
// Need further improvement : if able to kill immediately with repeated activations, do not wait
|
||||||
@@ -130,9 +130,7 @@ public class DamageAllAi extends SpellAbilityAi {
|
|||||||
if (ComputerUtilCombat.predictDamageTo(ai, dmg, source, false)<1) {
|
if (ComputerUtilCombat.predictDamageTo(ai, dmg, source, false)<1) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
// enemy is expected to die faster than AI from
|
// enemy is expected to die faster than AI from damage if repeated
|
||||||
// damage
|
|
||||||
// if repeated
|
|
||||||
if (ai.getLife() > ComputerUtilCombat.predictDamageTo(ai, dmg, source, false)
|
if (ai.getLife() > ComputerUtilCombat.predictDamageTo(ai, dmg, source, false)
|
||||||
* ((opp.getLife() + ComputerUtilCombat.predictDamageTo(opp, dmg, source, false) - 1)
|
* ((opp.getLife() + ComputerUtilCombat.predictDamageTo(opp, dmg, source, false) - 1)
|
||||||
/ ComputerUtilCombat.predictDamageTo(opp, dmg, source, false))) {
|
/ ComputerUtilCombat.predictDamageTo(opp, dmg, source, false))) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:2 B B
|
|||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
T:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | IsPresent$ Creature | PresentCompare$ EQ0 | Execute$ TrigSac | TriggerDescription$ At the beginning of the end step, if no creatures are on the battlefield, sacrifice CARDNAME.
|
T:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | IsPresent$ Creature | PresentCompare$ EQ0 | Execute$ TrigSac | TriggerDescription$ At the beginning of the end step, if no creatures are on the battlefield, sacrifice CARDNAME.
|
||||||
SVar:TrigSac:AB$Sacrifice | Cost$ 0 | Defined$ Self
|
SVar:TrigSac:AB$Sacrifice | Cost$ 0 | Defined$ Self
|
||||||
A:AB$ DamageAll | Cost$ B | NumDmg$ 1 | ValidCards$ Creature | ValidPlayers$ Player | ValidDescription$ each creature and each player. | SpellDescription$ CARDNAME deals 1 damage to each creature and each player.
|
A:AB$ DamageAll | Cost$ B | NumDmg$ 1 | ValidCards$ Creature | ValidPlayers$ Player | ValidDescription$ each creature and each player. | AILogic$ DmgAllCreaturesAndPlayers | SpellDescription$ CARDNAME deals 1 damage to each creature and each player.
|
||||||
SVar:NeedsToPlay:Creature
|
SVar:NeedsToPlay:Creature
|
||||||
SVar:Picture:http://resources.wizards.com/magic/cards/uz/en-us/card5619.jpg
|
SVar:Picture:http://resources.wizards.com/magic/cards/uz/en-us/card5619.jpg
|
||||||
Oracle:At the beginning of the end step, if no creatures are on the battlefield, sacrifice Pestilence.\n{B}: Pestilence deals 1 damage to each creature and each player.
|
Oracle:At the beginning of the end step, if no creatures are on the battlefield, sacrifice Pestilence.\n{B}: Pestilence deals 1 damage to each creature and each player.
|
||||||
|
|||||||
Reference in New Issue
Block a user