mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
Merge pull request #1266 from tool4ever/fewfixes
Fix PT update before turning into creature
This commit is contained in:
@@ -778,9 +778,12 @@ public class ComputerUtilCost {
|
|||||||
// Check if the AI intends to play the card and if it can pay for it with the mana it has
|
// Check if the AI intends to play the card and if it can pay for it with the mana it has
|
||||||
boolean willPlay = ComputerUtil.hasReasonToPlayCardThisTurn(payer, c);
|
boolean willPlay = ComputerUtil.hasReasonToPlayCardThisTurn(payer, c);
|
||||||
boolean canPay = c.getManaCost().canBePaidWithAvailable(ColorSet.fromNames(getAvailableManaColors(payer, source)).getColor());
|
boolean canPay = c.getManaCost().canBePaidWithAvailable(ColorSet.fromNames(getAvailableManaColors(payer, source)).getColor());
|
||||||
return canPay && willPlay;
|
if (canPay && willPlay) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,10 +65,6 @@ public abstract class AnimateEffectBase extends SpellAbilityEffect {
|
|||||||
source.addRemembered(c);
|
source.addRemembered(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((power != null) || (toughness != null)) {
|
|
||||||
c.addNewPT(power, toughness, timestamp, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!addType.isEmpty() || !removeType.isEmpty() || addAllCreatureTypes || removeSuperTypes
|
if (!addType.isEmpty() || !removeType.isEmpty() || addAllCreatureTypes || removeSuperTypes
|
||||||
|| removeCardTypes || removeSubTypes || removeLandTypes || removeCreatureTypes || removeArtifactTypes || removeEnchantmentTypes) {
|
|| removeCardTypes || removeSubTypes || removeLandTypes || removeCreatureTypes || removeArtifactTypes || removeEnchantmentTypes) {
|
||||||
c.addChangedCardTypes(addType, removeType, addAllCreatureTypes, removeSuperTypes, removeCardTypes, removeSubTypes,
|
c.addChangedCardTypes(addType, removeType, addAllCreatureTypes, removeSuperTypes, removeCardTypes, removeSubTypes,
|
||||||
@@ -77,6 +73,11 @@ public abstract class AnimateEffectBase extends SpellAbilityEffect {
|
|||||||
|
|
||||||
c.addChangedCardKeywords(keywords, removeKeywords, removeAll, timestamp, 0);
|
c.addChangedCardKeywords(keywords, removeKeywords, removeAll, timestamp, 0);
|
||||||
|
|
||||||
|
// do this after changing types in case it wasn't a creature before
|
||||||
|
if (power != null || toughness != null) {
|
||||||
|
c.addNewPT(power, toughness, timestamp, 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (sa.hasParam("CantHaveKeyword")) {
|
if (sa.hasParam("CantHaveKeyword")) {
|
||||||
c.addCantHaveKeyword(timestamp, Keyword.setValueOf(sa.getParam("CantHaveKeyword")));
|
c.addCantHaveKeyword(timestamp, Keyword.setValueOf(sa.getParam("CantHaveKeyword")));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1131,7 +1131,7 @@ public class CardFactoryUtil {
|
|||||||
SpellAbility loseLifeSA = AbilityFactory.getAbility(loseLifeStr, card);
|
SpellAbility loseLifeSA = AbilityFactory.getAbility(loseLifeStr, card);
|
||||||
|
|
||||||
AbilitySub gainLifeSA = (AbilitySub) AbilityFactory.getAbility(gainLifeStr, card);
|
AbilitySub gainLifeSA = (AbilitySub) AbilityFactory.getAbility(gainLifeStr, card);
|
||||||
gainLifeSA.setSVar("AFLifeLost", "Number$0");
|
loseLifeSA.setSVar("AFLifeLost", "Number$0");
|
||||||
loseLifeSA.setSubAbility(gainLifeSA);
|
loseLifeSA.setSubAbility(gainLifeSA);
|
||||||
loseLifeSA.setIntrinsic(intrinsic);
|
loseLifeSA.setIntrinsic(intrinsic);
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Ersatz Gnomes
|
|||||||
ManaCost:3
|
ManaCost:3
|
||||||
Types:Artifact Creature Gnome
|
Types:Artifact Creature Gnome
|
||||||
PT:1/1
|
PT:1/1
|
||||||
A:AB$ Animate | Cost$ T | Colors$ Colorless | OverwriteColors$ True | ValidTgts$ Card | TgtZone$ Stack | TgtPrompt$ Select target spell to make colorless | Duration$ Permanent | SpellDescription$ Target spell becomes colorless.
|
A:AB$ Animate | Cost$ T | Colors$ Colorless | OverwriteColors$ True | ValidTgts$ Card | TargetType$ Spell | TgtZone$ Stack | TgtPrompt$ Select target spell to make colorless | Duration$ Permanent | SpellDescription$ Target spell becomes colorless.
|
||||||
A:AB$ Animate | Cost$ T | Colors$ Colorless | OverwriteColors$ True | ValidTgts$ Permanent | TgtPrompt$ Select target permanent to make colorless | SpellDescription$ Target permanent becomes colorless until end of turn.
|
A:AB$ Animate | Cost$ T | Colors$ Colorless | OverwriteColors$ True | ValidTgts$ Permanent | TgtPrompt$ Select target permanent to make colorless | SpellDescription$ Target permanent becomes colorless until end of turn.
|
||||||
AI:RemoveDeck:Random
|
AI:RemoveDeck:Random
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Name:Failure
|
Name:Failure
|
||||||
ManaCost:1 U
|
ManaCost:1 U
|
||||||
Types:Instant
|
Types:Instant
|
||||||
A:SP$ ChangeZone | Cost$ 1 U | ValidTgts$ Card | TgtZone$ Stack | Origin$ Stack | Fizzle$ True | Destination$ Hand | SpellDescription$ Return target spell to its owner's hand.
|
A:SP$ ChangeZone | Cost$ 1 U | ValidTgts$ Card | TargetType$ Spell | TgtZone$ Stack | Origin$ Stack | Fizzle$ True | Destination$ Hand | SpellDescription$ Return target spell to its owner's hand.
|
||||||
AlternateMode:Split
|
AlternateMode:Split
|
||||||
Oracle:Return target spell to its owner's hand.
|
Oracle:Return target spell to its owner's hand.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Name:Gale's Redirection
|
Name:Gale's Redirection
|
||||||
ManaCost:3 U U
|
ManaCost:3 U U
|
||||||
Types:Instant
|
Types:Instant
|
||||||
A:SP$ ChangeZone | ValidTgts$ Card | TgtZone$ Stack | Origin$ Stack | Fizzle$ True | Destination$ Exile | TgtPrompt$ Choose target spell to exile | RememberChanged$ True | SubAbility$ DBRoll | SpellDescription$ Exile target spell.
|
A:SP$ ChangeZone | ValidTgts$ Card | TargetType$ Spell | TgtZone$ Stack | Origin$ Stack | Fizzle$ True | Destination$ Exile | TgtPrompt$ Choose target spell to exile | RememberChanged$ True | SubAbility$ DBRoll | SpellDescription$ Exile target spell.
|
||||||
SVar:DBRoll:DB$ RollDice | Sides$ 20 | Modifier$ Y | ResultSubAbilities$ 1-14:DBMayPlay,Else:DBMayPlayWithoutCost | StackDescription$ SpellDescription | SpellDescription$ Roll a d20 and add that spell's mana value.
|
SVar:DBRoll:DB$ RollDice | Sides$ 20 | Modifier$ Y | ResultSubAbilities$ 1-14:DBMayPlay,Else:DBMayPlayWithoutCost | StackDescription$ SpellDescription | SpellDescription$ Roll a d20 and add that spell's mana value.
|
||||||
SVar:DBMayPlay:DB$ Effect | StaticAbilities$ STPlay | RememberObjects$ Remembered | Duration$ Permanent | ExileOnMoved$ Exile | SubAbility$ DBCleanup | SpellDescription$ 1—14 VERT You may cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any color to cast it.
|
SVar:DBMayPlay:DB$ Effect | StaticAbilities$ STPlay | RememberObjects$ Remembered | Duration$ Permanent | ExileOnMoved$ Exile | SubAbility$ DBCleanup | SpellDescription$ 1—14 VERT You may cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any color to cast it.
|
||||||
SVar:DBMayPlayWithoutCost:DB$ Effect | StaticAbilities$ STPlayWithoutCost | RememberObjects$ Remembered | Duration$ Permanent | ExileOnMoved$ Exile | SubAbility$ DBCleanup | SpellDescription$ 15+ VERT You may cast that card without paying its mana cost for as long as it remains exiled.
|
SVar:DBMayPlayWithoutCost:DB$ Effect | StaticAbilities$ STPlayWithoutCost | RememberObjects$ Remembered | Duration$ Permanent | ExileOnMoved$ Exile | SubAbility$ DBCleanup | SpellDescription$ 15+ VERT You may cast that card without paying its mana cost for as long as it remains exiled.
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ K:Flash
|
|||||||
K:This spell can't be countered.
|
K:This spell can't be countered.
|
||||||
T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ You | Execute$ TrigCharm | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast a spell, ABILITY
|
T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ You | Execute$ TrigCharm | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast a spell, ABILITY
|
||||||
SVar:TrigCharm:DB$ Charm | Choices$ ControlReturn,ControlBounce | MinCharmNum$ 0 | CharmNum$ 1
|
SVar:TrigCharm:DB$ Charm | Choices$ ControlReturn,ControlBounce | MinCharmNum$ 0 | CharmNum$ 1
|
||||||
SVar:ControlReturn:DB$ ChangeZone | ValidTgts$ Card.YouDontCtrl | TgtPrompt$ Select target spell you don't control | TgtZone$ Stack | Origin$ Stack | Fizzle$ True | Destination$ Hand | SpellDescription$ Return target spell you don't control to its owner's hand.
|
SVar:ControlReturn:DB$ ChangeZone | ValidTgts$ Card.YouDontCtrl | TargetType$ Spell | TgtPrompt$ Select target spell you don't control | TgtZone$ Stack | Origin$ Stack | Fizzle$ True | Destination$ Hand | SpellDescription$ Return target spell you don't control to its owner's hand.
|
||||||
SVar:ControlBounce:DB$ ChangeZone | ValidTgts$ Permanent.nonLand | TgtPrompt$ Select target nonland permanent | TgtZone$ Battlefield | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return target nonland permanent to its owner's hand.
|
SVar:ControlBounce:DB$ ChangeZone | ValidTgts$ Permanent.nonLand | TgtPrompt$ Select target nonland permanent | TgtZone$ Battlefield | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return target nonland permanent to its owner's hand.
|
||||||
Oracle:Flash\nThis spell can't be countered.\nWhenever you cast a spell, choose up to one —\n• Return target spell you don't control to its owner's hand.\n• Return target nonland permanent to its owner's hand.
|
Oracle:Flash\nThis spell can't be countered.\nWhenever you cast a spell, choose up to one —\n• Return target spell you don't control to its owner's hand.\n• Return target nonland permanent to its owner's hand.
|
||||||
|
|||||||
@@ -7,6 +7,6 @@ K:Lifelink
|
|||||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigConnive | TriggerDescription$ When CARDNAME enters the battlefield, it connives. When it connives this way, return up to one target spell to its owner's hand. (To have a creature connive, draw a card, then discard a card. If you discarded a nonland card, put a +1/+1 counter on that creature.)
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigConnive | TriggerDescription$ When CARDNAME enters the battlefield, it connives. When it connives this way, return up to one target spell to its owner's hand. (To have a creature connive, draw a card, then discard a card. If you discarded a nonland card, put a +1/+1 counter on that creature.)
|
||||||
SVar:TrigConnive:DB$ Connive | SubAbility$ DBImmediateTrigger
|
SVar:TrigConnive:DB$ Connive | SubAbility$ DBImmediateTrigger
|
||||||
SVar:DBImmediateTrigger:DB$ ImmediateTrigger | Execute$ TrigReturn | TriggerDescription$ When it connives this way, return up to one target spell to its owner's hand.
|
SVar:DBImmediateTrigger:DB$ ImmediateTrigger | Execute$ TrigReturn | TriggerDescription$ When it connives this way, return up to one target spell to its owner's hand.
|
||||||
SVar:TrigReturn:DB$ ChangeZone | ValidTgts$ Card | TgtPrompt$ Select target spell | TargetMax$ 1 | TargetMin$ 0 | TgtZone$ Stack | Origin$ Stack | Fizzle$ True | Destination$ Hand
|
SVar:TrigReturn:DB$ ChangeZone | ValidTgts$ Card | TgtPrompt$ Select target spell | TargetMax$ 1 | TargetMin$ 0 | TgtZone$ Stack | TargetType$ Spell | Origin$ Stack | Fizzle$ True | Destination$ Hand
|
||||||
DeckHas:Ability$LifeGain|Discard|Counters
|
DeckHas:Ability$LifeGain|Discard|Counters
|
||||||
Oracle:Flash\nLifelink\nWhen Obscura Interceptor enters the battlefield, it connives. When it connives this way, return up to one target spell to its owner's hand. (To have a creature connive, draw a card, then discard a card. If you discarded a nonland card, put a +1/+1 counter on that creature.)
|
Oracle:Flash\nLifelink\nWhen Obscura Interceptor enters the battlefield, it connives. When it connives this way, return up to one target spell to its owner's hand. (To have a creature connive, draw a card, then discard a card. If you discarded a nonland card, put a +1/+1 counter on that creature.)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Name:Parallectric Feedback
|
Name:Parallectric Feedback
|
||||||
ManaCost:3 R
|
ManaCost:3 R
|
||||||
Types:Instant
|
Types:Instant
|
||||||
A:SP$ Pump | Cost$ 3 R | ValidTgts$ Card | TgtZone$ Stack | TgtPrompt$ Select target spell | PumpZone$ Stack | StackDescription$ None | SubAbility$ DBDmg | SpellDescription$ CARDNAME deals damage to target spell's controller equal to that spell's mana value.
|
A:SP$ Pump | Cost$ 3 R | ValidTgts$ Card | TargetType$ Spell | TgtZone$ Stack | TgtPrompt$ Select target spell | PumpZone$ Stack | StackDescription$ None | SubAbility$ DBDmg | SpellDescription$ CARDNAME deals damage to target spell's controller equal to that spell's mana value.
|
||||||
SVar:DBDmg:DB$ DealDamage | Defined$ TargetedController | NumDmg$ X
|
SVar:DBDmg:DB$ DealDamage | Defined$ TargetedController | NumDmg$ X
|
||||||
SVar:X:Targeted$CardManaCost
|
SVar:X:Targeted$CardManaCost
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Name:Refuse
|
Name:Refuse
|
||||||
ManaCost:3 R
|
ManaCost:3 R
|
||||||
Types:Instant
|
Types:Instant
|
||||||
A:SP$ Pump | Cost$ 3 R | ValidTgts$ Card | TgtZone$ Stack | TgtPrompt$ Select target spell | PumpZone$ Stack | StackDescription$ None | SubAbility$ DBDmg | SpellDescription$ CARDNAME deals damage to target spell's controller equal to that spell's mana value.
|
A:SP$ Pump | Cost$ 3 R | ValidTgts$ Card | TargetType$ Spell | TgtZone$ Stack | TgtPrompt$ Select target spell | PumpZone$ Stack | StackDescription$ None | SubAbility$ DBDmg | SpellDescription$ CARDNAME deals damage to target spell's controller equal to that spell's mana value.
|
||||||
SVar:DBDmg:DB$ DealDamage | Defined$ TargetedController | NumDmg$ X
|
SVar:DBDmg:DB$ DealDamage | Defined$ TargetedController | NumDmg$ X
|
||||||
SVar:X:Targeted$CardManaCost
|
SVar:X:Targeted$CardManaCost
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
|
|||||||
Reference in New Issue
Block a user