Merge branch 'AISpiritMirror' into 'master'

Ai spirit mirror

See merge request core-developers/forge!223
This commit is contained in:
Michael Kamensky
2018-02-18 08:57:23 +00:00
3 changed files with 27 additions and 3 deletions

View File

@@ -71,6 +71,28 @@ public class DestroyAi extends SpellAbilityAi {
return false; return false;
} }
// Ability that's intended to destroy own useless token to trigger Grave Pacts
// should be fired at end of turn or when under attack after blocking to make opponent sac something
boolean havepact = false;
for (Card cardInPlay : ai.getGame().getCardsIn(ZoneType.Battlefield)) {
if ((cardInPlay.getController().equals(ai))
&& ("Grave Pact".equals(cardInPlay.getName()))) {
havepact = true;
}
}
if (("Pactivator".equals(logic)) && (havepact)) {
if (
(!ai.getGame().getPhaseHandler().isPlayerTurn(ai)) &&
((ai.getGame().getPhaseHandler().is(PhaseType.END_OF_TURN))
|| (ai.getGame().getPhaseHandler().is(PhaseType.COMBAT_DECLARE_BLOCKERS)))
&&
(ai.getOpponents().get(0).getCreaturesInPlay().size() > 0)
) {
ai.getController().chooseTargetsFor(sa);
return true;
}
}
// Targeting // Targeting
if (abTgt != null) { if (abTgt != null) {
sa.resetTargets(); sa.resetTargets();

View File

@@ -3,6 +3,7 @@ ManaCost:3 B
Types:Enchantment Types:Enchantment
K:UpkeepCost:B B K:UpkeepCost:B B
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ At the beginning of your end step, create a 0/1 black Thrull creature token. T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ At the beginning of your end step, create a 0/1 black Thrull creature token.
SVar:TrigToken:DB$Token | TokenImage$ b 0 1 thrull | TokenName$ Thrull | TokenColors$ Black | TokenTypes$ Creature,Thrull | TokenPower$ 0 | TokenToughness$ 1 | TokenOwner$ You | TokenAmount$ 1 SVar:TrigToken:DB$Token | TokenImage$ b 0 1 thrull | TokenName$ Thrull | TokenColors$ Black | TokenTypes$ Creature,Thrull | TokenPower$ 0 | TokenToughness$ 1 | TokenOwner$ You | TokenAmount$ 1 | TokenSVars$ PitSac
SVar:PitSac:SVar:SacMe:1
SVar:Picture:http://www.wizards.com/global/images/magic/general/breeding_pit.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/breeding_pit.jpg
Oracle:At the beginning of your upkeep, sacrifice Breeding Pit unless you pay {B}{B}.\nAt the beginning of your end step, create a 0/1 black Thrull creature token. Oracle:At the beginning of your upkeep, sacrifice Breeding Pit unless you pay {B}{B}.\nAt the beginning of your end step, create a 0/1 black Thrull creature token.

View File

@@ -2,7 +2,8 @@ Name:Spirit Mirror
ManaCost:2 W W ManaCost:2 W W
Types:Enchantment Types:Enchantment
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Reflection.token | PresentCompare$ EQ0 | Execute$ TrigToken | TriggerDescription$ At the beginning of your upkeep, if there are no Reflection tokens on the battlefield, create a 2/2 white Reflection creature token. T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Reflection.token | PresentCompare$ EQ0 | Execute$ TrigToken | TriggerDescription$ At the beginning of your upkeep, if there are no Reflection tokens on the battlefield, create a 2/2 white Reflection creature token.
SVar:TrigToken:DB$Token | TokenAmount$ 1 | TokenName$ Reflection | TokenTypes$ Creature,Reflection | TokenOwner$ You | TokenColors$ White | TokenPower$ 2 | TokenToughness$ 2 SVar:TrigToken:DB$Token | TokenAmount$ 1 | TokenName$ Reflection | TokenTypes$ Creature,Reflection | TokenOwner$ You | TokenColors$ White | TokenPower$ 2 | TokenToughness$ 2 | TokenSVars$ ReflectionSac
A:AB$ Destroy | Cost$ 0 | ValidTgts$ Reflection | TgtPrompt$ Select target Reflection | SpellDescription$ Destroy target Reflection. A:AB$ Destroy | Cost$ 0 | ValidTgts$ Reflection | TgtPrompt$ Select target Reflection | AILogic$ Pactivator| SpellDescription$ Destroy target Reflection.
SVar:ReflectionSac:SVar:SacMe:2
SVar:Picture:http://www.wizards.com/global/images/magic/general/spirit_mirror.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/spirit_mirror.jpg
Oracle:At the beginning of your upkeep, if there are no Reflection tokens on the battlefield, create a 2/2 white Reflection creature token.\n{0}: Destroy target Reflection. Oracle:At the beginning of your upkeep, if there are no Reflection tokens on the battlefield, create a 2/2 white Reflection creature token.\n{0}: Destroy target Reflection.