mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
- Added AI for Pongify and Rapid Hybridization that compares the token's value to the destroyed target
This commit is contained in:
@@ -14,6 +14,7 @@ import forge.game.card.CounterType;
|
||||
import forge.game.cost.Cost;
|
||||
import forge.game.cost.CostPart;
|
||||
import forge.game.cost.CostSacrifice;
|
||||
import forge.game.phase.PhaseType;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.game.spellability.TargetRestrictions;
|
||||
@@ -143,6 +144,13 @@ public class DestroyAi extends SpellAbilityAi {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if ("Pongify".equals(logic)) {
|
||||
Card token = TokenAi.spawnToken(ai.getOpponent(), sa.getSubAbility());
|
||||
if (source.getGame().getPhaseHandler().getPhase().isBefore(PhaseType.COMBAT_DECLARE_BLOCKERS) || //prevent surprise combatant
|
||||
ComputerUtilCard.evaluateCreature(choice) < 1.5 * ComputerUtilCard.evaluateCreature(token)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else if (CardLists.getNotType(list, "Land").isEmpty()) {
|
||||
choice = ComputerUtilCard.getBestLandAI(list);
|
||||
} else {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
Name:Pongify
|
||||
ManaCost:U
|
||||
Types:Instant
|
||||
A:SP$ Destroy | Cost$ U | ValidTgts$ Creature | TgtPrompt$ Select a creature | SubAbility$ DBToken | NoRegen$ True | SpellDescription$ Destroy target creature. It can't be regenerated. That creature's controller puts a 3/3 green Ape creature token into play.
|
||||
A:SP$ Destroy | Cost$ U | ValidTgts$ Creature | TgtPrompt$ Select a creature | AILogic$ Pongify | SubAbility$ DBToken | NoRegen$ True | SpellDescription$ Destroy target creature. It can't be regenerated. That creature's controller puts a 3/3 green Ape creature token into play.
|
||||
SVar:DBToken:DB$Token | TokenAmount$ 1 | TokenName$ Ape | TokenTypes$ Creature,Ape | TokenOwner$ TargetedController | TokenColors$ Green | TokenPower$ 3 | TokenToughness$ 3
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/pongify.jpg
|
||||
Oracle:Destroy target creature. It can't be regenerated. That creature's controller puts a 3/3 green Ape creature token onto the battlefield.
|
||||
@@ -1,8 +1,7 @@
|
||||
Name:Rapid Hybridization
|
||||
ManaCost:U
|
||||
Types:Instant
|
||||
A:SP$ Destroy | Cost$ U | ValidTgts$ Creature | TgtPrompt$ Select a creature | SubAbility$ DBToken | NoRegen$ True | SpellDescription$ Destroy target creature. It can't be regenerated. That creature's controller puts a 3/3 green Frog Lizard creature token onto the battlefield.
|
||||
A:SP$ Destroy | Cost$ U | ValidTgts$ Creature | TgtPrompt$ Select a creature | AILogic$ Pongify | SubAbility$ DBToken | NoRegen$ True | SpellDescription$ Destroy target creature. It can't be regenerated. That creature's controller puts a 3/3 green Frog Lizard creature token onto the battlefield.
|
||||
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Frog Lizard | TokenTypes$ Creature,Frog,Lizard | TokenOwner$ TargetedController | TokenColors$ Green | TokenPower$ 3 | TokenToughness$ 3
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/rapid_hybridization.jpg
|
||||
Oracle:Destroy target creature. It can't be regenerated. That creature's controller puts a 3/3 green Frog Lizard creature token onto the battlefield.
|
||||
Reference in New Issue
Block a user