mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -147,12 +146,12 @@ public abstract class DamageAiBase extends SpellAbilityAi {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (value > 0) { //more likely to burn with larger hand
|
||||
if (value > 0) { //more likely to burn with larger hand
|
||||
for (int i = 3; i < hand.size(); i++) {
|
||||
value *= 1.1f;
|
||||
}
|
||||
}
|
||||
if (value < 0.2f) { //hard floor to reduce ridiculous odds for instants over time
|
||||
if (value < 0.2f) { //hard floor to reduce ridiculous odds for instants over time
|
||||
return false;
|
||||
} else {
|
||||
final float chance = MyRandom.getRandom().nextFloat();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -340,7 +340,7 @@ public abstract class Trigger extends TriggerReplacementBase {
|
||||
}
|
||||
}
|
||||
|
||||
if ( !meetsCommonRequirements(this.mapParams))
|
||||
if (!meetsCommonRequirements(this.mapParams))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user