Merge branch 'mimicvat' into 'master'

Mimic Vat: Update trigger so it doesn't resolve when card moved

See merge request core-developers/forge!4741
This commit is contained in:
Michael Kamensky
2021-05-26 04:34:55 +00:00
5 changed files with 8 additions and 13 deletions

View File

@@ -111,8 +111,7 @@ public abstract class DamageAiBase extends SpellAbilityAi {
final CardCollectionView hand = comp.getCardsIn(ZoneType.Hand);
if ((enemy.getLife() - restDamage) < 5) {
// drop the human to less than 5
// life
// drop the human to less than 5 life
return true;
}

View File

@@ -732,12 +732,10 @@ public class DamageDealAi extends DamageAiBase {
}
// When giving priority to targeting Creatures for mandatory
// triggers
// feel free to add the Human after we run out of good targets
// triggers feel free to add the Human after we run out of good targets
// TODO: add check here if card is about to die from something
// on the stack
// or from taking combat damage
// on the stack or from taking combat damage
final Cost abCost = sa.getPayCosts();
boolean freePing = immediately || abCost == null
@@ -982,7 +980,6 @@ public class DamageDealAi extends DamageAiBase {
@Override
protected boolean doTriggerAINoCost(Player ai, SpellAbility sa, boolean mandatory) {
final Card source = sa.getHostCard();
final String damage = sa.getParam("NumDmg");
int dmg = AbilityUtils.calculateAmount(source, damage, sa);

View File

@@ -348,7 +348,6 @@ public abstract class CardTraitBase extends GameObject implements IHasCardView,
}
list = CardLists.getValidCards(list, sIsPresent.split(","), this.getHostCard().getController(), this.getHostCard(), this);
final String rightString = presentCompare.substring(2);
int right = AbilityUtils.calculateAmount(getHostCard(), rightString, this);
final int left = list.size();

View File

@@ -2,8 +2,8 @@ Name:Mimic Vat
ManaCost:3
Types:Artifact
T:Mode$ ChangesZone | ValidCard$ Creature.nonToken | Origin$ Battlefield | Destination$ Graveyard | OptionalDecider$ You | Execute$ TrigReturn | TriggerZones$ Battlefield | TriggerDescription$ Imprint — Whenever a nontoken creature dies, you may exile that card. If you do, return each other card exiled with CARDNAME to its owner's graveyard.
SVar:TrigReturn:DB$ ChangeZone | Origin$ Exile | Destination$ Graveyard | Defined$ Imprinted | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearImprinted$ True | SubAbility$ DBExile
SVar:TrigReturn:DB$ ChangeZone | Origin$ Exile | Destination$ Graveyard | Defined$ Imprinted | SubAbility$ DBCleanup | ConditionPresent$ Card.inRealZone Graveyard | ConditionDefined$ TriggeredNewCardLKICopy | ConditionCompare$ EQ1
SVar:DBCleanup:DB$ Cleanup | ClearImprinted$ True | SubAbility$ DBExile | ConditionPresent$ Card.inRealZone Graveyard | ConditionDefined$ TriggeredNewCardLKICopy | ConditionCompare$ EQ1
SVar:DBExile:DB$ ChangeZone | Imprint$ True | Origin$ Graveyard | Destination$ Exile | Defined$ TriggeredNewCardLKICopy | AILogic$ MimicVat
A:AB$ CopyPermanent | Cost$ 3 T | Defined$ Imprinted.ExiledWithSource | Choices$ Card | PumpKeywords$ Haste | AtEOT$ Exile | AILogic$ MimicVat | SpellDescription$ Create a token that's a copy of a card exiled with CARDNAME. It gains haste. Exile it at the beginning of the next end step.
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsImprinted+ExiledWithSource | Execute$ DBForget