Fix being able to pay mana for Hogaak

This commit is contained in:
tool4EvEr
2022-11-15 21:36:32 +01:00
parent e88b8735b9
commit 5e1af59453
25 changed files with 49 additions and 39 deletions

View File

@@ -376,7 +376,7 @@ public class ComputerUtilMana {
} }
final String typeRes = cost.getSourceRestriction(); final String typeRes = cost.getSourceRestriction();
if (StringUtils.isNotBlank(typeRes) && !paymentChoice.getHostCard().getType().hasStringType(typeRes)) { if (StringUtils.isNotBlank(typeRes) && !paymentChoice.getHostCard().isValid(typeRes, null, null, null)) {
continue; continue;
} }

View File

@@ -2,6 +2,7 @@ package forge.game.ability;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
@@ -2381,7 +2382,14 @@ public class AbilityUtils {
if (sq[0].contains("CombatDamage")) { if (sq[0].contains("CombatDamage")) {
isCombat = true; isCombat = true;
} }
return doXMath(game.getDamageDoneThisTurn(isCombat, false, props[1], props[2], c, player, ctb).size(), expr, c, ctb); int num;
List<Integer> dmgInstances = game.getDamageDoneThisTurn(isCombat, false, props[1], props[2], c, player, ctb);
if (sq[0].contains("Max")) {
num = Collections.max(dmgInstances);
} else {
num = dmgInstances.size();
}
return doXMath(num, expr, c, ctb);
} }
if (sq[0].equals("YourTurns")) { if (sq[0].equals("YourTurns")) {

View File

@@ -923,7 +923,7 @@ public class CardFactoryUtil {
StringBuilder trigReturn = new StringBuilder(); StringBuilder trigReturn = new StringBuilder();
trigReturn.append("Mode$ ChangesZone | Origin$ Battlefield | ValidCard$ Card.Self"); trigReturn.append("Mode$ ChangesZone | Origin$ Battlefield | ValidCard$ Card.Self");
trigReturn.append(" | Secondary$ True | TriggerDescription$ When this permanent leaves the battlefield, return the exiled card to the battlefield under its owners control."); trigReturn.append(" | Secondary$ True | TriggerDescription$ When this permanent leaves the battlefield, return the exiled card to the battlefield under its owner's control.");
StringBuilder ab = new StringBuilder(); StringBuilder ab = new StringBuilder();
ab.append("DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True "); ab.append("DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True ");

View File

@@ -313,7 +313,7 @@ public class CostPayment extends ManaConversionMatrix {
continue; continue;
} }
if (StringUtils.isNotBlank(restriction) && !thisMana.getSourceCard().getType().hasStringType(restriction)) { if (StringUtils.isNotBlank(restriction) && !thisMana.getSourceCard().isValid(restriction, null, null, null)) {
continue; continue;
} }

View File

@@ -218,7 +218,7 @@ public class ManaPool extends ManaConversionMatrix implements Iterable<Mana> {
continue; continue;
} }
if (StringUtils.isNotBlank(restriction) && !mana.getSourceCard().getType().hasStringType(restriction)) { if (StringUtils.isNotBlank(restriction) && !mana.getSourceCard().isValid(restriction, null, null, null)) {
continue; continue;
} }

View File

@@ -2,8 +2,8 @@ Name:Ancestral Katana
ManaCost:1 W ManaCost:1 W
Types:Artifact Equipment Types:Artifact Equipment
T:Mode$ Attacks | ValidCard$ Samurai.YouCtrl,Warrior.YouCtrl | Alone$ True | TriggerZones$ Battlefield | Execute$ TrigImmediateTrig | TriggerDescription$ Whenever a Samurai or Warrior you control attacks alone, you may pay {1}. When you do, attach CARDNAME to it. T:Mode$ Attacks | ValidCard$ Samurai.YouCtrl,Warrior.YouCtrl | Alone$ True | TriggerZones$ Battlefield | Execute$ TrigImmediateTrig | TriggerDescription$ Whenever a Samurai or Warrior you control attacks alone, you may pay {1}. When you do, attach CARDNAME to it.
SVar:TrigImmediateTrig:AB$ ImmediateTrigger | Cost$ 1 | Execute$ TrigAttach | RememberObjects$ TriggeredAttacker | TriggerDescription$ When you do, attach CARDNAME to it. SVar:TrigImmediateTrig:AB$ ImmediateTrigger | Cost$ 1 | Execute$ TrigAttach | RememberObjects$ TriggeredAttackerLKICopy | TriggerDescription$ When you do, attach CARDNAME to it.
SVar:TrigAttach:DB$ Attach | Defined$ DelayTriggerRemembered SVar:TrigAttach:DB$ Attach | Defined$ DelayTriggerRememberedLKI
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 2 | AddToughness$ 1 | Description$ Equipped creature gets +2/+1. S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 2 | AddToughness$ 1 | Description$ Equipped creature gets +2/+1.
K:Equip:3 K:Equip:3
DeckHints:Type$Samurai|Warrior DeckHints:Type$Samurai|Warrior

View File

@@ -4,7 +4,7 @@ Types:Creature Angel
PT:3/5 PT:3/5
K:Flying K:Flying
T:Mode$ Attacks | ValidCard$ Creature | TriggerZones$ Battlefield | Execute$ TrigImmediateTrig | TriggerDescription$ Whenever a creature attacks, you may pay {3}. When you do, put a +1/+1 counter on that creature. T:Mode$ Attacks | ValidCard$ Creature | TriggerZones$ Battlefield | Execute$ TrigImmediateTrig | TriggerDescription$ Whenever a creature attacks, you may pay {3}. When you do, put a +1/+1 counter on that creature.
SVar:TrigImmediateTrig:AB$ ImmediateTrigger | Cost$ 3 | Execute$ TrigCounter | RememberObjects$ TriggeredAttacker | SpellDescription$ Whenever a creature attacks, you may pay {3}. When you do, put a +1/+1 counter on that creature. SVar:TrigImmediateTrig:AB$ ImmediateTrigger | Cost$ 3 | Execute$ TrigCounter | RememberObjects$ TriggeredAttackerLKICopy | SpellDescription$ Whenever a creature attacks, you may pay {3}. When you do, put a +1/+1 counter on that creature.
SVar:TrigCounter:DB$ PutCounter | CounterType$ P1P1 | CounterNum$ 1 | Defined$ DelayTriggerRememberedLKI SVar:TrigCounter:DB$ PutCounter | CounterType$ P1P1 | CounterNum$ 1 | Defined$ DelayTriggerRememberedLKI
DeckHas:Ability$Counters DeckHas:Ability$Counters
Oracle:Flying\nWhenever a creature attacks, you may pay {3}. When you do, put a +1/+1 counter on that creature. Oracle:Flying\nWhenever a creature attacks, you may pay {3}. When you do, put a +1/+1 counter on that creature.

View File

@@ -4,6 +4,6 @@ Types:Enchantment
S:Mode$ Continuous | Affected$ Creature.Black | AddPower$ 1 | AddToughness$ 1 | Description$ Black creatures get +1/+1. S:Mode$ Continuous | Affected$ Creature.Black | AddPower$ 1 | AddToughness$ 1 | Description$ Black creatures get +1/+1.
SVar:PlayMain1:TRUE SVar:PlayMain1:TRUE
SVar:NeedsToPlayVar:CountOpps LTCountMe SVar:NeedsToPlayVar:CountOpps LTCountMe
SVar:CountOpp:Count$Valid Creature.OppCtrl+Black/LimitMax.5 SVar:CountOpps:Count$Valid Creature.OppCtrl+Black/LimitMax.5
SVar:CountMe:Count$Valid Creature.YouCtrl+Black SVar:CountMe:Count$Valid Creature.YouCtrl+Black
Oracle:Black creatures get +1/+1. Oracle:Black creatures get +1/+1.

View File

@@ -4,6 +4,6 @@ Types:Enchantment
S:Mode$ Continuous | Affected$ Creature.White | AddPower$ 1 | AddToughness$ 1 | Description$ White creatures get +1/+1. S:Mode$ Continuous | Affected$ Creature.White | AddPower$ 1 | AddToughness$ 1 | Description$ White creatures get +1/+1.
SVar:PlayMain1:TRUE SVar:PlayMain1:TRUE
SVar:NeedsToPlayVar:CountOpps LTCountMe SVar:NeedsToPlayVar:CountOpps LTCountMe
SVar:CountOpp:Count$Valid Creature.OppCtrl+White/LimitMax.5 SVar:CountOpps:Count$Valid Creature.OppCtrl+White/LimitMax.5
SVar:CountMe:Count$Valid Creature.YouCtrl+White SVar:CountMe:Count$Valid Creature.YouCtrl+White
Oracle:White creatures get +1/+1. Oracle:White creatures get +1/+1.

View File

@@ -3,5 +3,5 @@ ManaCost:1 G G
Types:Enchantment Types:Enchantment
A:AB$ Animate | Cost$ Return<1/CARDNAME> | ValidTgts$ Creature.wasCastByYou+ThisTurnCast | TgtPrompt$ Select target creature you cast this turn | Power$ 0 | Toughness$ 1 | Duration$ UntilYourNextUpkeep | SubAbility$ DelTrig | SpellDescription$ Target creature you cast this turn has base power and toughness 0/1 until your next upkeep. At the beginning of your next upkeep, put a +1/+1 counter on that creature. A:AB$ Animate | Cost$ Return<1/CARDNAME> | ValidTgts$ Creature.wasCastByYou+ThisTurnCast | TgtPrompt$ Select target creature you cast this turn | Power$ 0 | Toughness$ 1 | Duration$ UntilYourNextUpkeep | SubAbility$ DelTrig | SpellDescription$ Target creature you cast this turn has base power and toughness 0/1 until your next upkeep. At the beginning of your next upkeep, put a +1/+1 counter on that creature.
SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | RememberObjects$ Targeted | Execute$ TrigGrowth | TriggerDescription$ Put a +1/+1 counter on that creature. SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | RememberObjects$ Targeted | Execute$ TrigGrowth | TriggerDescription$ Put a +1/+1 counter on that creature.
SVar:TrigGrowth:DB$ PutCounter | Defined$ DelayTriggerRemembered | CounterType$ P1P1 | CounterNum$ 1 SVar:TrigGrowth:DB$ PutCounter | Defined$ DelayTriggerRememberedLKI | CounterType$ P1P1 | CounterNum$ 1
Oracle:Return Cycle of Life to its owner's hand: Target creature you cast this turn has base power and toughness 0/1 until your next upkeep. At the beginning of your next upkeep, put a +1/+1 counter on that creature. Oracle:Return Cycle of Life to its owner's hand: Target creature you cast this turn has base power and toughness 0/1 until your next upkeep. At the beginning of your next upkeep, put a +1/+1 counter on that creature.

View File

@@ -5,6 +5,7 @@ PT:8/8
K:Convoke K:Convoke
K:Delve K:Delve
K:Trample K:Trample
Text:You can't spend mana to cast this spell.
A:SP$ PermanentCreature | Cost$ Mana<5 BG BG\Delve,Convoke> A:SP$ PermanentCreature | Cost$ Mana<5 BG BG\Delve,Convoke>
SVar:AltCost:Cost$ Mana<5 BG BG\Delve,Convoke> | ActivationZone$ Graveyard | Description$ You may cast CARDNAME from your graveyard. SVar:AltCost:Cost$ Mana<5 BG BG\Delve,Convoke> | ActivationZone$ Graveyard | Description$ You may cast CARDNAME from your graveyard.
Oracle:You can't spend mana to cast this spell.\nConvoke, delve (Each creature you tap while casting this spell pays for {1} or one mana of that creature's color. Each card you exile from your graveyard pays for {1}.)\nYou may cast Hogaak, Arisen Necropolis from your graveyard.\nTrample Oracle:You can't spend mana to cast this spell.\nConvoke, delve (Each creature you tap while casting this spell pays for {1} or one mana of that creature's color. Each card you exile from your graveyard pays for {1}.)\nYou may cast Hogaak, Arisen Necropolis from your graveyard.\nTrample

View File

@@ -1,13 +1,8 @@
Name:Impact Resonance Name:Impact Resonance
ManaCost:1 R ManaCost:1 R
Types:Instant Types:Instant
T:Mode$ TurnBegin | Execute$ ResetDamage | Static$ True
SVar:ResetDamage:DB$ StoreSVar | SVar$ X | Type$ Number | Expression$ 0
T:Mode$ DamageDone | ValidTarget$ Player,Permanent | Execute$ StoreDamage | Static$ True
SVar:StoreDamage:DB$ StoreSVar | SVar$ X | Type$ Calculate | Expression$ Y | ConditionCheckSVar$ Y | ConditionSVarCompare$ GTX
A:SP$ DealDamage | Cost$ 1 R | ValidTgts$ Creature | TargetMin$ MinTgts | TargetMax$ MaxTgts | NumDmg$ X | DividedAsYouChoose$ X | SpellDescription$ CARDNAME deals X damage divided as you choose among any number of target creatures, where X is the greatest amount of damage dealt by a source to a permanent or player this turn. A:SP$ DealDamage | Cost$ 1 R | ValidTgts$ Creature | TargetMin$ MinTgts | TargetMax$ MaxTgts | NumDmg$ X | DividedAsYouChoose$ X | SpellDescription$ CARDNAME deals X damage divided as you choose among any number of target creatures, where X is the greatest amount of damage dealt by a source to a permanent or player this turn.
SVar:X:Number$0 SVar:X:Count$MaxDamageThisTurn Card Permanent,Player
SVar:Y:TriggerCount$DamageAmount
SVar:MinTgts:SVar$X/LimitMax.1 SVar:MinTgts:SVar$X/LimitMax.1
SVar:MaxTgts:Count$Valid Creature SVar:MaxTgts:Count$Valid Creature
Oracle:Impact Resonance deals X damage divided as you choose among any number of target creatures, where X is the greatest amount of damage dealt by a source to a permanent or player this turn. Oracle:Impact Resonance deals X damage divided as you choose among any number of target creatures, where X is the greatest amount of damage dealt by a source to a permanent or player this turn.

View File

@@ -3,5 +3,5 @@ ManaCost:2 G G
Types:Creature Dinosaur Types:Creature Dinosaur
PT:5/5 PT:5/5
Text:Spend only mana produced by basic lands to cast this spell. Text:Spend only mana produced by basic lands to cast this spell.
A:SP$ PermanentCreature | Cost$ Mana<2 G G\Basic> A:SP$ PermanentCreature | Cost$ Mana<2 G G\Land.Basic>
Oracle:Spend only mana produced by basic lands to cast this spell. Oracle:Spend only mana produced by basic lands to cast this spell.

View File

@@ -21,8 +21,8 @@ Types:Enchantment Creature Dragon Spirit
PT:2/2 PT:2/2
K:Flying K:Flying
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Creature.Other+YouCtrl | TriggerZones$ Battlefield | Execute$ TrigImmediateTrig | TriggerDescription$ Whenever another creature enters the battlefield under your control, you may pay {X}. When you do, put X +1/+1 counters on that creature. T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Creature.Other+YouCtrl | TriggerZones$ Battlefield | Execute$ TrigImmediateTrig | TriggerDescription$ Whenever another creature enters the battlefield under your control, you may pay {X}. When you do, put X +1/+1 counters on that creature.
SVar:TrigImmediateTrig:AB$ ImmediateTrigger | Cost$ X | Execute$ TrigPutCounter | RememberObjects$ TriggeredCard | AILogic$ MaxX | TriggerDescription$ When you do, put X +1/+1 counters on that creature. SVar:TrigImmediateTrig:AB$ ImmediateTrigger | Cost$ X | Execute$ TrigPutCounter | RememberObjects$ TriggeredCardLKICopy | AILogic$ MaxX | TriggerDescription$ When you do, put X +1/+1 counters on that creature.
SVar:TrigPutCounter:DB$ PutCounter | Defined$ DelayTriggerRemembered | CounterType$ P1P1 | CounterNum$ X SVar:TrigPutCounter:DB$ PutCounter | Defined$ DelayTriggerRememberedLKI | CounterType$ P1P1 | CounterNum$ X
S:Mode$ Continuous | IsPresent$ Creature.modified+YouCtrl | PresentCompare$ GE5 | Affected$ Card.Self | AddPower$ 5 | AddToughness$ 5 | AddKeyword$ Trample | Description$ As long as you control five or more modified creatures, CARDNAME gets +5/+5 and has trample. S:Mode$ Continuous | IsPresent$ Creature.modified+YouCtrl | PresentCompare$ GE5 | Affected$ Card.Self | AddPower$ 5 | AddToughness$ 5 | AddKeyword$ Trample | Description$ As long as you control five or more modified creatures, CARDNAME gets +5/+5 and has trample.
SVar:X:Count$xPaid SVar:X:Count$xPaid
Oracle:Flying\nWhenever another creature enters the battlefield under your control, you may pay {X}. When you do, put X +1/+1 counters on that creature.\nAs long as you control five or more modified creatures, Remnant of the Rising Star gets +5/+5 and has trample. (Equipment, Auras you control, and counters are modifications.) Oracle:Flying\nWhenever another creature enters the battlefield under your control, you may pay {X}. When you do, put X +1/+1 counters on that creature.\nAs long as you control five or more modified creatures, Remnant of the Rising Star gets +5/+5 and has trample. (Equipment, Auras you control, and counters are modifications.)

View File

@@ -6,6 +6,6 @@ SVar:TrigDamage:DB$ DealDamage | Defined$ TriggeredPlayer | NumDmg$ X
SVar:X:Count$Valid Swamp.ActivePlayerCtrl SVar:X:Count$Valid Swamp.ActivePlayerCtrl
AI:RemoveDeck:Random AI:RemoveDeck:Random
SVar:NeedsToPlayVar:CountOpps GTCountMe SVar:NeedsToPlayVar:CountOpps GTCountMe
SVar:CountOpp:Count$Valid Swamp.OppCtrl/LimitMax.5 SVar:CountOpps:Count$Valid Swamp.OppCtrl/LimitMax.5
SVar:CountMe:Count$Valid Swamp.YouCtrl SVar:CountMe:Count$Valid Swamp.YouCtrl
Oracle:At the beginning of each player's upkeep, Karma deals damage to that player equal to the number of Swamps they control. Oracle:At the beginning of each player's upkeep, Karma deals damage to that player equal to the number of Swamps they control.

View File

@@ -5,7 +5,7 @@ S:Mode$ Continuous | Affected$ Creature.powerGE3 | AddHiddenKeyword$ CARDNAME do
SVar:NonStackingEffect:True SVar:NonStackingEffect:True
AI:RemoveDeck:Random AI:RemoveDeck:Random
SVar:NeedsToPlayVar:CountOpps GTCountMe SVar:NeedsToPlayVar:CountOpps GTCountMe
SVar:CountOpp:Count$Valid Creature.OppCtrl+PowerGE3/LimitMax.5 SVar:CountOpps:Count$Valid Creature.OppCtrl+PowerGE3/LimitMax.5
SVar:CountMe:Count$Valid Creature.YouCtrl+PowerGE3 SVar:CountMe:Count$Valid Creature.YouCtrl+PowerGE3
DeckHints:Type$Enchantment|Artifact|Planeswalker & Type$Wall & Keyword$Defender DeckHints:Type$Enchantment|Artifact|Planeswalker & Type$Wall & Keyword$Defender
Oracle:Creatures with power 3 or greater don't untap during their controllers' untap steps. Oracle:Creatures with power 3 or greater don't untap during their controllers' untap steps.

View File

@@ -4,7 +4,7 @@ Types:Creature Ogre
PT:3/3 PT:3/3
T:Mode$ AttackerBlockedByCreature | ValidCard$ Creature | ValidBlocker$ Card.Self | Execute$ DelTrigBlocked | TriggerDescription$ Whenever CARDNAME blocks or becomes blocked by a creature, Sawtooth Ogre deals 1 damage to that creature at end of combat. T:Mode$ AttackerBlockedByCreature | ValidCard$ Creature | ValidBlocker$ Card.Self | Execute$ DelTrigBlocked | TriggerDescription$ Whenever CARDNAME blocks or becomes blocked by a creature, Sawtooth Ogre deals 1 damage to that creature at end of combat.
T:Mode$ AttackerBlockedByCreature | ValidCard$ Card.Self | ValidBlocker$ Creature | Execute$ DelTrigBlocker | Secondary$ True | TriggerDescription$ Whenever CARDNAME blocks or becomes blocked by a creature, Sawtooth Ogre deals 1 damage to that creature at end of combat. T:Mode$ AttackerBlockedByCreature | ValidCard$ Card.Self | ValidBlocker$ Creature | Execute$ DelTrigBlocker | Secondary$ True | TriggerDescription$ Whenever CARDNAME blocks or becomes blocked by a creature, Sawtooth Ogre deals 1 damage to that creature at end of combat.
SVar:DelTrigBlocked:DB$ DelayedTrigger | Mode$ Phase | Phase$ EndCombat | ValidPlayer$ Player | Execute$ TrigDamage | RememberObjects$ TriggeredAttacker | TriggerDescription$ CARDNAME deals 1 damage to blocked creature at end of combat. SVar:DelTrigBlocked:DB$ DelayedTrigger | Mode$ Phase | Phase$ EndCombat | ValidPlayer$ Player | Execute$ TrigDamage | RememberObjects$ TriggeredAttackerLKICopy | TriggerDescription$ CARDNAME deals 1 damage to blocked creature at end of combat.
SVar:DelTrigBlocker:DB$ DelayedTrigger | Mode$ Phase | Phase$ EndCombat | ValidPlayer$ Player | Execute$ TrigDamage | RememberObjects$ TriggeredBlocker | TriggerDescription$ CARDNAME deals 1 damage to blocking creature at end of combat. SVar:DelTrigBlocker:DB$ DelayedTrigger | Mode$ Phase | Phase$ EndCombat | ValidPlayer$ Player | Execute$ TrigDamage | RememberObjects$ TriggeredBlockerLKICopy | TriggerDescription$ CARDNAME deals 1 damage to blocking creature at end of combat.
SVar:TrigDamage:DB$ DealDamage | Defined$ DelayTriggerRemembered | NumDmg$ 1 SVar:TrigDamage:DB$ DealDamage | Defined$ DelayTriggerRememberedLKI | NumDmg$ 1
Oracle:Whenever Sawtooth Ogre blocks or becomes blocked by a creature, Sawtooth Ogre deals 1 damage to that creature at end of combat. Oracle:Whenever Sawtooth Ogre blocks or becomes blocked by a creature, Sawtooth Ogre deals 1 damage to that creature at end of combat.

View File

@@ -3,8 +3,8 @@ ManaCost:4 B
Types:Legendary Creature Spirit 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 | Execute$ 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 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 | Execute$ 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 at the beginning of the next end step if CARDNAME is still on the battlefield.
SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Player | Execute$ TrigReturn | IsPresent$ Card.Self+StrictlySelf | PresentZone$ Battlefield | RememberObjects$ TriggeredNewCardLKICopy | TriggerDescription$ Return creature to the battlefield. SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Player | Execute$ TrigReturn | IsPresent$ Card.StrictlySelf | PresentZone$ Battlefield | RememberObjects$ TriggeredNewCardLKICopy | TriggerDescription$ Return creature to the battlefield.
SVar:TrigReturn:DB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | Defined$ DelayTriggerRememberedLKI | IsPresent$ Card.Self+StrictlySelf | PresentZone$ Battlefield SVar:TrigReturn:DB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | Defined$ DelayTriggerRememberedLKI | IsPresent$ Card.StrictlySelf | PresentZone$ Battlefield
S:Mode$ Continuous | Affected$ Creature.YouCtrl+powerLE1+YouOwn | AddSVar$ Sac S:Mode$ Continuous | Affected$ Creature.YouCtrl+powerLE1+YouOwn | AddSVar$ Sac
SVar:Sac:SVar:SacMe:3 SVar:Sac:SVar:SacMe:3
Oracle:Whenever a creature with power 1 or less is put into your graveyard from the battlefield, you may return that card to the battlefield at the beginning of the next end step if Shirei, Shizo's Caretaker is still on the battlefield. Oracle:Whenever a creature with power 1 or less is put into your graveyard from the battlefield, you may return that card to the battlefield at the beginning of the next end step if Shirei, Shizo's Caretaker is still on the battlefield.

View File

@@ -5,7 +5,7 @@ S:Mode$ Continuous | Affected$ Player | AddKeyword$ UntapAdjust:Creature:1 | Des
SVar:NonStackingEffect:True SVar:NonStackingEffect:True
DeckHints:Type$Planeswalker|Artifact|Enchantment DeckHints:Type$Planeswalker|Artifact|Enchantment
SVar:NeedsToPlayVar:CountOpps GTCountMe SVar:NeedsToPlayVar:CountOpps GTCountMe
SVar:CountOpp:Count$Valid Creature.OppCtrl/LimitMax.5 SVar:CountOpps:Count$Valid Creature.OppCtrl/LimitMax.5
SVar:CountMe:Count$Valid Creature.YouCtrl SVar:CountMe:Count$Valid Creature.YouCtrl
AI:RemoveDeck:Random AI:RemoveDeck:Random
Oracle:Players can't untap more than one creature during their untap steps. Oracle:Players can't untap more than one creature during their untap steps.

View File

@@ -7,8 +7,8 @@ K:Flying
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile target spell with mana value 4 or less. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile target spell with mana value 4 or less.
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigPlay | TriggerDescription$ When Spell Queller leaves the battlefield, the exiled card's owner may cast that card without paying its mana cost. T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigPlay | TriggerDescription$ When Spell Queller leaves the battlefield, the exiled card's owner may cast that card without paying its mana cost.
SVar:TrigExile:DB$ ChangeZone | TargetType$ Spell | ValidTgts$ Card.cmcLE4 | TgtZone$ Stack | Origin$ Stack | Fizzle$ True | Mandatory$ True | Destination$ Exile | IsCurse$ True | TgtPrompt$ Choose target spell with mana value 4 or less | RememberChanged$ True SVar:TrigExile:DB$ ChangeZone | TargetType$ Spell | ValidTgts$ Card.cmcLE4 | TgtZone$ Stack | Origin$ Stack | Fizzle$ True | Mandatory$ True | Destination$ Exile | IsCurse$ True | TgtPrompt$ Choose target spell with mana value 4 or less | RememberChanged$ True
SVar:TrigPlay:DB$ Play | Defined$ Remembered.ExiledWithSource | Controller$ RememberedOwner | WithoutManaCost$ True | Optional$ True | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ1 | SubAbility$ DBCleanup SVar:TrigPlay:DB$ Play | Defined$ Remembered.ExiledWithSource | Controller$ RememberedOwner | ValidSA$ Spell | WithoutManaCost$ True | Optional$ True | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ1 | SubAbility$ DBCleanup
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsRemembered+ExiledWithSource | ValidSA$ Spell | Execute$ DBForget T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsRemembered+ExiledWithSource | Execute$ DBForget
SVar:DBForget:DB$ Pump | ForgetObjects$ TriggeredCard SVar:DBForget:DB$ Pump | ForgetObjects$ TriggeredCard
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount SVar:X:Remembered$Amount

View File

@@ -2,8 +2,8 @@ Name:Teferi's Veil
ManaCost:1 U ManaCost:1 U
Types:Enchantment Types:Enchantment
T:Mode$ Attacks | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | Execute$ DelayedTrig | TriggerDescription$ Whenever a creature you control attacks, it phases out at end of combat. (While it's phased out, it's treated as though it doesn't exist. It phases in before you untap during your next untap step.) T:Mode$ Attacks | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | Execute$ DelayedTrig | TriggerDescription$ Whenever a creature you control attacks, it phases out at end of combat. (While it's phased out, it's treated as though it doesn't exist. It phases in before you untap during your next untap step.)
SVar:DelayedTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ EndCombat | ValidPlayer$ Player | Execute$ TrigPhase | RememberObjects$ TriggeredAttacker | TriggerDescription$ Attacking creatures you control phase out at end of combat. SVar:DelayedTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ EndCombat | ValidPlayer$ Player | Execute$ TrigPhase | RememberObjects$ TriggeredAttackerLKICopy | TriggerDescription$ Attacking creatures you control phase out at end of combat.
SVar:TrigPhase:DB$ Phases | Defined$ DelayTriggerRemembered SVar:TrigPhase:DB$ Phases | Defined$ DelayTriggerRememberedLKI
AI:RemoveDeck:All AI:RemoveDeck:All
SVar:NonStackingEffect:True SVar:NonStackingEffect:True
SVar:PlayMain1:TRUE SVar:PlayMain1:TRUE

View File

@@ -3,7 +3,7 @@ ManaCost:1 U
Types:Creature Human Wizard Types:Creature Human Wizard
PT:1/1 PT:1/1
T:Mode$ AttackerBlockedByCreature | ValidCard$ Card.Self | ValidBlocker$ Creature | Execute$ DelTrig | TriggerDescription$ Whenever CARDNAME becomes blocked by a creature, gain control of that creature at end of combat. T:Mode$ AttackerBlockedByCreature | ValidCard$ Card.Self | ValidBlocker$ Creature | Execute$ DelTrig | TriggerDescription$ Whenever CARDNAME becomes blocked by a creature, gain control of that creature at end of combat.
SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ EndCombat | ValidPlayer$ Player | Execute$ TrigGainControl | RememberObjects$ TriggeredBlocker | TriggerDescription$ Gain control of blocking creature. SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ EndCombat | ValidPlayer$ Player | Execute$ TrigGainControl | RememberObjects$ TriggeredBlockerLKICopy | TriggerDescription$ Gain control of blocking creature.
SVar:TrigGainControl:DB$ GainControl | Defined$ DelayTriggerRemembered | NewController$ You SVar:TrigGainControl:DB$ GainControl | Defined$ DelayTriggerRememberedLKI | NewController$ You
SVar:HasAttackEffect:Blocked SVar:HasAttackEffect:Blocked
Oracle:Whenever Tolarian Entrancer becomes blocked by a creature, gain control of that creature at end of combat. Oracle:Whenever Tolarian Entrancer becomes blocked by a creature, gain control of that creature at end of combat.

View File

@@ -4,6 +4,6 @@ Types:Creature Wall
PT:1/4 PT:1/4
K:Defender K:Defender
T:Mode$ AttackerBlocked | ValidBlocker$ Card.Self | Execute$ DelTrig | TriggerDescription$ Whenever CARDNAME blocks a creature, that creature can't attack during its controller's next turn. T:Mode$ AttackerBlocked | ValidBlocker$ Card.Self | Execute$ DelTrig | TriggerDescription$ Whenever CARDNAME blocks a creature, that creature can't attack during its controller's next turn.
SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep-> | ValidPlayer$ Player.controlsCard.IsTriggerRemembered | UpcomingTurn$ True | Static$ True | Execute$ TrigPump | RememberObjects$ TriggeredAttacker | TriggerDescription$ Creatures blocked by CARDNAME can't attack this turn. SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep-> | ValidPlayer$ Player.controlsCard.IsTriggerRemembered | UpcomingTurn$ True | Static$ True | Execute$ TrigPump | RememberObjects$ TriggeredAttackerLKICopy | TriggerDescription$ Creatures blocked by CARDNAME can't attack this turn.
SVar:TrigPump:DB$ Pump | IsCurse$ True | Defined$ DelayTriggerRemembered | KW$ HIDDEN CARDNAME can't attack. SVar:TrigPump:DB$ Pump | IsCurse$ True | Defined$ DelayTriggerRememberedLKI | KW$ HIDDEN CARDNAME can't attack.
Oracle:Defender (This creature can't attack.)\nWhenever Wall of Dust blocks a creature, that creature can't attack during its controller's next turn. Oracle:Defender (This creature can't attack.)\nWhenever Wall of Dust blocks a creature, that creature can't attack during its controller's next turn.

View File

@@ -234,12 +234,13 @@ public abstract class InputPayMana extends InputSyncronizedBase {
} }
final SpellAbility chosen; final SpellAbility chosen;
final String typeRes = manaCost.getSourceRestriction();
if (chosenAbility == null) { if (chosenAbility == null) {
HashMap<SpellAbilityView, SpellAbility> abilitiesMap = new HashMap<>(); HashMap<SpellAbilityView, SpellAbility> abilitiesMap = new HashMap<>();
// you can't remove unneeded abilities inside a for (am:abilities) loop :( // you can't remove unneeded abilities inside a for (am:abilities) loop :(
final String typeRes = manaCost.getSourceRestriction(); if (StringUtils.isNotBlank(typeRes) && !card.isValid(typeRes, player, card, null)) {
if (StringUtils.isNotBlank(typeRes) && !card.getType().hasStringType(typeRes)) {
return false; return false;
} }
@@ -353,6 +354,11 @@ public abstract class InputPayMana extends InputSyncronizedBase {
restrictionsMet = false; restrictionsMet = false;
break; break;
} }
if (StringUtils.isNotBlank(typeRes) && !card.isValid(typeRes, player, card, null)) {
restrictionsMet = false;
break;
}
} }
if (restrictionsMet) { if (restrictionsMet) {

View File

@@ -92,7 +92,7 @@ public class TargetSelection {
final boolean hasEnoughTargets = minTargets == 0 || numTargeted >= minTargets; final boolean hasEnoughTargets = minTargets == 0 || numTargeted >= minTargets;
final boolean hasAllTargets = numTargeted == maxTargets && maxTargets > 0; final boolean hasAllTargets = numTargeted == maxTargets && maxTargets > 0;
if (maxTargets == 0) { return true; } if (maxTargets == 0 && minTargets == 0) { return true; }
// if not enough targets chosen, cancel Ability // if not enough targets chosen, cancel Ability
if (this.bTargetingDone && !hasEnoughTargets) { if (this.bTargetingDone && !hasEnoughTargets) {