- The AI will now use the ability of Shirei, Shizo's Caretaker.

This commit is contained in:
Sloth
2013-03-16 08:04:20 +00:00
parent 9749394426
commit 23fb1054ba
4 changed files with 23 additions and 17 deletions

View File

@@ -5,8 +5,8 @@ PT:4/4
K:Flying K:Flying
T:Mode$ SpellCast | ValidCard$ Spirit,Arcane | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigExile | TriggerDescription$ Whenever you cast a Spirit or Arcane spell, you may exile CARDNAME. If you do, return it to the battlefield under its owner's control at the beginning of the next end step. T:Mode$ SpellCast | ValidCard$ Spirit,Arcane | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigExile | TriggerDescription$ Whenever you cast a Spirit or Arcane spell, you may exile CARDNAME. If you do, return it to the battlefield under its owner's control at the beginning of the next end step.
SVar:TrigExile:AB$ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Battlefield | Destination$ Exile | SubAbility$ DelTrig SVar:TrigExile:AB$ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Battlefield | Destination$ Exile | SubAbility$ DelTrig
SVar:DelTrig:DB$DelayedTrigger | Mode$ Phase | Phase$ End of Turn | Execute$ TrigReturn | TriggerDescription$ Return CARDNAME to the battlefield. SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | Execute$ TrigReturn | TriggerDescription$ Return CARDNAME to the battlefield.
SVar:TrigReturn:AB$ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Exile | Destination$ Battlefield SVar:TrigReturn:AB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Exile | Destination$ Battlefield
SVar:RemAIDeck:True SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/hikari_twilight_guardian.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/hikari_twilight_guardian.jpg
Oracle:Flying\nWhenever you cast a Spirit or Arcane spell, you may exile Hikari, Twilight Guardian. If you do, return it to the battlefield under its owner's control at the beginning of the next end step. Oracle:Flying\nWhenever you cast a Spirit or Arcane spell, you may exile Hikari, Twilight Guardian. If you do, return it to the battlefield under its owner's control at the beginning of the next end step.

View File

@@ -4,7 +4,7 @@ Types:Legendary Creature Spirit
PT:2/2 PT:2/2
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | TriggerZones$ Battlefield | ValidCard$ Creature.powerLE1+YouOwn | OptionalDecider$ You | DelayedTrigger$ DelTrig | TriggerDescription$ Whenever a creature with power 1 or less is put into your graveyard from the battlefield, you may return that card to the battlefield under your control at the beginning of the next end step if CARDNAME is still on the battlefield. T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | TriggerZones$ Battlefield | ValidCard$ Creature.powerLE1+YouOwn | OptionalDecider$ You | DelayedTrigger$ DelTrig | TriggerDescription$ Whenever a creature with power 1 or less is put into your graveyard from the battlefield, you may return that card to the battlefield under your control at the beginning of the next end step if CARDNAME is still on the battlefield.
SVar:DelTrig:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Player | Execute$ TrigReturn | IsPresent$ Card.Self | PresentZone$ Battlefield | TriggerDescription$ Return creature to the battlefield. SVar:DelTrig:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Player | Execute$ TrigReturn | IsPresent$ Card.Self | PresentZone$ Battlefield | TriggerDescription$ Return creature to the battlefield.
SVar:TrigReturn:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Battlefield | Defined$ TriggeredCard SVar:TrigReturn:AB$ ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Battlefield | Defined$ TriggeredCard
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Static$ True | Execute$ DBCleanup T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Static$ True | Execute$ DBCleanup
SVar:DBCleanup:DB$Cleanup | ClearTriggered$ True SVar:DBCleanup:DB$Cleanup | ClearTriggered$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/shirei_shizos_caretaker.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/shirei_shizos_caretaker.jpg

View File

@@ -6,7 +6,7 @@ K:etbCounter:P1P1:1
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigPutCounter | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ At the beginning of your upkeep, you may put a +1/+1 counter on CARDNAME. T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigPutCounter | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ At the beginning of your upkeep, you may put a +1/+1 counter on CARDNAME.
T:Mode$ Attacks | ValidCard$ Card.Self | DelayedTrigger$ DelTrigDestroy | TriggerDescription$ When CARDNAME attacks or blocks, destroy it at end of combat. T:Mode$ Attacks | ValidCard$ Card.Self | DelayedTrigger$ DelTrigDestroy | TriggerDescription$ When CARDNAME attacks or blocks, destroy it at end of combat.
T:Mode$ Blocks | ValidCard$ Card.Self | DelayedTrigger$ DelTrigDestroy | Secondary$ True | TriggerDescription$ When CARDNAME attacks or blocks, destroy it at end of combat. T:Mode$ Blocks | ValidCard$ Card.Self | DelayedTrigger$ DelTrigDestroy | Secondary$ True | TriggerDescription$ When CARDNAME attacks or blocks, destroy it at end of combat.
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterNum$ 1 | CounterType$ P1P1 SVar:TrigPutCounter:AB$ PutCounter | Cost$ 0 | Defined$ Self | CounterNum$ 1 | CounterType$ P1P1
SVar:DelTrigDestroy:Mode$ Phase | Phase$ EndCombat | Execute$ TrigDestroy | TriggerDescription$ Destroy CARDNAME at end of combat. SVar:DelTrigDestroy:Mode$ Phase | Phase$ EndCombat | Execute$ TrigDestroy | TriggerDescription$ Destroy CARDNAME at end of combat.
SVar:TrigDestroy:AB$Destroy | Cost$ 0 | Defined$ Self SVar:TrigDestroy:AB$Destroy | Cost$ 0 | Defined$ Self
SVar:Picture:http://www.wizards.com/global/images/magic/general/vebulid.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/vebulid.jpg

View File

@@ -7,6 +7,7 @@ import java.util.Map;
import forge.Card; import forge.Card;
import forge.Singletons; import forge.Singletons;
import forge.card.ability.AbilityFactory;
import forge.card.ability.ApiType; import forge.card.ability.ApiType;
import forge.card.cost.Cost; import forge.card.cost.Cost;
import forge.card.mana.ManaCost; import forge.card.mana.ManaCost;
@@ -405,6 +406,10 @@ public class WrappedAbility extends Ability implements ISpellAbility {
return; return;
} }
} }
} else {
if (triggerParams.containsKey("DelayedTrigger")) {
//TODO: The only card with an optional delayed trigger is Shirei, Shizo's Caretaker,
// needs to be expanded when a more difficult cards comes up
} else { } else {
ArrayList<Object> tgts = null; ArrayList<Object> tgts = null;
// make sure the targets won't change // make sure the targets won't change
@@ -412,7 +417,7 @@ public class WrappedAbility extends Ability implements ISpellAbility {
tgts = new ArrayList<Object>(sa.getTarget().getTargetChoices().getTargets()); tgts = new ArrayList<Object>(sa.getTarget().getTargetChoices().getTargets());
} }
// This isn't quite right, but better than canPlayAI // This isn't quite right, but better than canPlayAI
if (!sa.doTrigger(this.isMandatory(), (AIPlayer)decider)) { if (!sa.doTrigger(this.isMandatory(), (AIPlayer) decider)) {
return; return;
} }
if (sa.getTarget() != null && sa.getTarget().getTargetChoices() != null) { if (sa.getTarget() != null && sa.getTarget().getTargetChoices() != null) {
@@ -423,6 +428,7 @@ public class WrappedAbility extends Ability implements ISpellAbility {
} }
} }
} }
}
if (getActivatingPlayer().isHuman()) { if (getActivatingPlayer().isHuman()) {
game.getActionPlay().playSpellAbilityNoStack(getActivatingPlayer(), sa, true); game.getActionPlay().playSpellAbilityNoStack(getActivatingPlayer(), sa, true);