- Attempting to implement a more concise and correct code for Sisters of Stone Death which would also work for the AI.

This commit is contained in:
Agetian
2018-11-30 09:10:55 +03:00
parent d5d08b2443
commit 6da3fd898f
3 changed files with 8 additions and 5 deletions

View File

@@ -314,7 +314,11 @@ public class ChangeZoneAi extends SpellAbilityAi {
}
for (final Player p : pDefined) {
CardCollectionView list = p.getCardsIn(origin);
// TODO: figure out how to make the AI properly establish which zones to look in for cards like Sisters of Stone Death
// without needing a separate AI logic for it (the issue is that there's no Defined/DefinedPlayer in cards like that, and
// the AI normally defaults to its own zone in these cases)
CardCollectionView list = "CheckAllPlayerZones".equals(sa.getParam("AILogic")) ? p.getGame().getCardsIn(origin)
: p.getCardsIn(origin);
if (type != null && p == ai) {
// AI only "knows" about his information

View File

@@ -13,7 +13,7 @@ Name:Tomb of the Dusk Rose
ManaCost:no cost
Types:Legendary Land
A:AB$ Mana | Cost$ T | Produced$ Any | Amount$ 1 | SpellDescription$ Add one mana of any color.
A:AB$ ChooseCard | Cost$ 2 W B T | Choices$ Creature.IsRemembered+ExiledWithSource | ChoiceZone$ Exile | SubAbility$ DBChangeZone | AILogic$ AtLeast1 | Mandatory$ True | SpellDescription$ Put a creature card exiled with this permanent onto the battlefield under your control.
SVar:DBChangeZone:DB$ ChangeZone | Defined$ ChosenCard | Origin$ Exile | Destination$ Battlefield | ChangeType$ Creature.IsRemembered+ExiledWithSource | ChangeNum$ 1 | GainControl$ True
A:AB$ ChangeZone | Cost$ 2 W B T | Origin$ Exile | Destination$ Battlefield | ChangeType$ Creature.IsRemembered+ExiledWithSource | Hidden$ True | Mandatory$ True | GainControl$ True | AILogic$ CheckAllPlayerZones | SpellDescription$ Put a creature card exiled with this permanent onto the battlefield under your control. | StackDescription$ SpellDescription
SVar:Picture:http://www.wizards.com/global/images/magic/general/tomb_of_the_dusk_rose.jpg
Oracle:(Transforms from Profane Procession.)\n{T}: Add one mana of any color.\n{2}{W}{B}{T}: Put a creature card exiled with this permanent onto the battlefield under your control.

View File

@@ -4,8 +4,7 @@ Types:Legendary Creature Gorgon
PT:7/5
A:AB$ MustBlock | Cost$ G | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Target creature blocks CARDNAME this turn if able.
A:AB$ ChangeZone | Cost$ B G | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Creature.blockingSource,Creature.blockedBySource | TgtPrompt$ Select target creature blocking Sisters of Stone Death | RememberTargets$ True | SpellDescription$ Exile target creature blocking or blocked by CARDNAME.
A:AB$ ChooseCard | Cost$ 2 B | Choices$ Creature.IsRemembered+ExiledWithSource | ChoiceZone$ Exile | AILogic$ AtLeast1 | Mandatory$ True | SubAbility$ DBChangeZone | SpellDescription$ Put a creature card exiled with CARDNAME onto the battlefield under your control.
SVar:DBChangeZone:DB$ ChangeZone | Defined$ ChosenCard | Origin$ Exile | Destination$ Battlefield | ChangeType$ Creature.IsRemembered+ExiledWithSource | ChangeNum$ 1 | GainControl$ True
A:AB$ ChangeZone | Cost$ 2 B | Origin$ Exile | Destination$ Battlefield | ChangeType$ Creature.IsRemembered+ExiledWithSource | Hidden$ True | Mandatory$ True | GainControl$ True | AILogic$ CheckAllPlayerZones | SpellDescription$ Put a creature card exiled with CARDNAME onto the battlefield under your control. | StackDescription$ SpellDescription
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsRemembered+ExiledWithSource | Execute$ DBForget
SVar:DBForget:DB$ Pump | ForgetImprinted$ TriggeredCard
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Battlefield | Destination$ Any | Execute$ DBCleanup | Static$ True | Secondary$ True | TriggerDescription$ Forget all remembered cards.