Fixed primitives, added new ability "hasaftermath" to implement Aftermath cost with Flashback and refactored all cards with Aftermath cost (now they use a special version of Flashback but they don't count as flashback spell), added a new ability "spellmover" to implement all cards that have to target a spell on stack to move to some other zone (they are not real counters so they don't care about "nofizzle" or "nofizzlealternative" abilites of their target), fixed all primitives with "spellmover" ability, added a new keyword "storedname" to target card with a specifc previously stored name, improved "fizzleto" ability in order to allow to move the fizzled card on second place from the top or to exile and imprint the target name.

This commit is contained in:
Vittorio Alfieri
2021-10-13 23:42:45 +02:00
parent fbcb1feb88
commit 9c2eee7d7e
13 changed files with 246 additions and 120 deletions

View File

@@ -3,7 +3,9 @@
## [master] (https://github.com/WagicProject/wagic/tree/master)
### 13/10/21
- *Committed:* Fixed primitives, fixed "proliferate" target chooser, improved "cycled" and "discarded" triggers, added new keywords "pcycledcount" and "ocycledcount" to calculate how may cards have been cycled this turn from a specific player, added new menu choices to instantly select/deselect and confirm all the possible targets (in any zone) during the target selection of an ability (e.g. Proliferation ability can target a lot of permanents and players so using that menu choice all the targets will be instantly chosen and then the current player will be able to remove any of them or confirm the entire selection). ([Vitty85](https://github.com/Vitty85))
- *Committed:* Fixed primitives, added new ability "hasaftermath" to implement Aftermath cost with Flashback and refactored all cards with Aftermath cost (now they use a special version of Flashback but they don't count as flashback spell), added a new ability "spellmover" to implement all cards that have to target a spell on stack to move to some other zone (they are not real counters so they don't care about "nofizzle" or "nofizzlealternative" abilites of their target), fixed all primitives with "spellmover" ability, added a new keyword "storedname" to target card with a specifc previously stored name, improved "fizzleto" ability in order to allow to move the fizzled card on second place from the top or to exile and imprint the target name. ([Vitty85](https://github.com/Vitty85))
- *Committed:* Fixed primitives, fixed "proliferate" target chooser, improved "cycled" and "discarded" triggers, added new keywords "pcycledcount" and "ocycledcount" to calculate how may cards have been cycled this turn from a specific player, added new menu choices to instantly select/deselect and confirm all the possible targets (in any zone) during the target selection of an ability (e.g. Proliferation ability can target a lot of permanents and players so using that menu choice all the targets will be instantly chosen and then the current player will be able to remove any of them or confirm the entire selection). https://github.com/WagicProject/wagic/commit/fbcb1feb88072988dfe81b33d4e88e1e0f54563c ([Vitty85](https://github.com/Vitty85))
### 12/10/21
- *Committed:* Fixed and improved the Deck Importer (from MTGO) in Android application. https://github.com/WagicProject/wagic/commit/371d4c9f857f39b3998872dc2de99c9a3ad52a56 ([Vitty85](https://github.com/Vitty85))

View File

@@ -1404,16 +1404,7 @@ subtype=Lhurgoyf
[card]
name=Altar of the Lost
auto=tap(noevent)
auto=this(variable{type:*[hasflashback]:mygraveyard}>0) {T}:add{W}{B}
auto=this(variable{type:*[hasflashback]:mygraveyard}>0) {T}:add{W}{R}
auto=this(variable{type:*[hasflashback]:mygraveyard}>0) {T}:add{W}{G}
auto=this(variable{type:*[hasflashback]:mygraveyard}>0) {T}:add{W}{U}
auto=this(variable{type:*[hasflashback]:mygraveyard}>0) {T}:add{B}{R}
auto=this(variable{type:*[hasflashback]:mygraveyard}>0) {T}:add{B}{G}
auto=this(variable{type:*[hasflashback]:mygraveyard}>0) {T}:add{B}{U}
auto=this(variable{type:*[hasflashback]:mygraveyard}>0) {T}:add{R}{G}
auto=this(variable{type:*[hasflashback]:mygraveyard}>0) {T}:add{R}{U}
auto=this(variable{type:*[hasflashback]:mygraveyard}>0) {T}:add{U}{G}
auto=this(variable{type:*[hasflashback]:mygraveyard}>0) {T}:name(Add 2 mana) thisforeach(variable{2}) ability$!name(Choose one) choice name(Add white) add{W} _ choice name(Add black) add{B} _ choice name(Add green) add{G} _ choice name(Add blue) add{U} _ choice name(Add red) add{R}!$ controller
text=Altar of the Lost enters the battlefield tapped. -- {T}: Add two mana in any combination of colors to your mana pool. Spend this mana only to cast spells with flashback from a graveyard.
mana={3}
type=Artifact
@@ -2263,10 +2254,13 @@ toughness=1
[/card]
[card]
name=Appeal // Authority
target=creature
auto=foreach(creature|mybattlefield) 1/1
auto=trample
autograveyard={1}{W}{E}:all(creature|mybattlefield) vigilance ueot && target(<upto:2>creature|opponentbattlefield) tap asSorcery
abilities=hasaftermath
restriction=type(creature|battlefield)~morethan~0
flashback={1}{W} name(Authority)
auto=ifnot paid(flashback) then if type(creature|myBattlefield)~morethan~0 then choice name(Choose your creature) name(Choose your creature) name(Choose your creature) target(creature|myBattlefield) transforms((,newability[type:creature:mybattlefield/type:creature:mybattlefield],newability[trample])) ueot
auto=ifnot paid(flashback) then if type(creature|opponentBattlefield)~morethan~0 then choice name(Choose opponent creature) name(Choose opponent creature) name(Choose opponent creature) target(creature|opponentBattlefield) transforms((,newability[type:creature:opponentBattlefield/type:creature:opponentBattlefield],newability[trample])) ueot
auto=if paid(flashback) then all(creature|mybattlefield) transforms((,newability[vigilance])) ueot
auto=if paid(flashback) then target(<upto:2>creature|opponentbattlefield) tap
text=Until end of turn, target creature gains trample and gets +X/+X, where X is the number of creatures you control. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Tap up to two target creatures your opponents control. Creatures you control gain vigilance until end of turn.
mana={G}
type=Sorcery
@@ -3429,9 +3423,8 @@ type=Enchantment
[card]
name=Ashiok's Erasure
abilities=flash
auto=Moveto(exile) target(*|opponentcastingzone)
auto=aslongas(exile[share!name!]):maxCast(share!name!)0 opponent
auto=@movedto(this|nonbattlezone):moveto(ownerhand) exiledcard
auto=name(Exile spell) target(*|stack) spellmover(exileimp)
auto=this(variable{hasevict}>=1) transforms((,newability[maxCast(*[evictname])0 opponent],newability[@movedto(this|nonbattlezone):name(Return exiled card) target(*[evictname]|opponentExile) moveto(ownerhand)]))
text=Flash -- When Ashiok's Erasure enters the battlefield, exile target spell. -- Your opponents can't cast spells with the same name as the exiled card. -- When Ashiok's Erasure leaves the battlefield, return the exiled card to its owner's hand.
mana={2}{U}{U}
type=Enchantment
@@ -8693,8 +8686,8 @@ name=Brutal Expulsion
abilities=devoid
restriction=compare(type:*[creature;planeswalker]:battlefieldplustype:*:stackplusend)~morethan~0
auto=if type(creature|battlefield)~morethan~0 then choice name(Return creature) name(Return creature) target(creature) moveto(ownerhand) and!( ability$!may name(Deal 2 damage) name(Deal 2 damage) target(*[creature;planeswalker]|battlefield) transforms((,newability[exiledeath],newability[damage:2])) ueot!$ controller )!
auto=if type(*|opponentstack)~morethan~0 then choice name(Return opponent spell) name(Return opponent spell) target(*|opponentstack) transforms((,newability[-nofizzle],newability[-nofizzlealternative],newability[fizzleto(hand)],newability[ability$!may name(Deal 2 damage) name(Deal 2 damage) target(*[creature;planeswalker]|battlefield) transforms((,newability[exiledeath],newability[damage:2])) ueot!$ opponent])) oneshot
auto=if type(*|mystack)~morethan~1 then choice name(Return your spell) name(Return your spell) target(*|mystack) transforms((,newability[-nofizzle],newability[-nofizzlealternative],newability[fizzleto(hand)],newability[ability$!may name(Deal 2 damage) name(Deal 2 damage) target(*[creature;planeswalker]|battlefield) transforms((,newability[exiledeath],newability[damage:2])) ueot!$ controller])) oneshot
auto=if type(*|opponentstack)~morethan~0 then choice name(Return opponent spell) name(Return opponent spell) target(*|opponentstack) transforms((,newability[spellmover(hand)],newability[ability$!may name(Deal 2 damage) name(Deal 2 damage) target(*[creature;planeswalker]|battlefield) transforms((,newability[exiledeath],newability[damage:2])) ueot!$ opponent])) oneshot
auto=if type(*|mystack)~morethan~1 then choice name(Return your spell) name(Return your spell) target(*|mystack) transforms((,newability[spellmover(hand)],newability[ability$!may name(Deal 2 damage) name(Deal 2 damage) target(*[creature;planeswalker]|battlefield) transforms((,newability[exiledeath],newability[damage:2])) ueot!$ controller])) oneshot
auto=if type(*[creature;planeswalker]|battlefield)~morethan~0 then choice name(Don't return and deal 2 damage) name(Don't return and deal 2 damage) target(*[creature;planeswalker]|battlefield) transforms((,newability[exiledeath])) ueot && damage:2
text=Devoid (This card has no color.) -- Choose one or both -- Return target spell or creature to its owner's hand. -- Brutal Expulsion deals 2 damage to target creature or planeswalker. If that permanent would be put into a graveyard this turn, exile it instead.
mana={2}{U}{R}
@@ -11698,9 +11691,12 @@ toughness=8
[/card]
[card]
name=Claim // Fame
target=creature[manacost<=2]|mygraveyard
auto=moveto(mybattlefield)
autograveyard={1}{R}{E}:target(creature) 2/0 ueot && haste ueot assorcery
abilities=hasaftermath
restriction=type(creature[manacost<=2]|mygraveyard)~morethan~0
otherrestriction=type(creature|battlefield)~morethan~0
flashback={1}{R} name(Fame)
auto=ifnot paid(flashback) then target(creature[manacost<=2]|mygraveyard) moveto(mybattlefield)
auto=if paid(flashback) then target(creature|battlefield) transforms((,newability[2/0],newability[haste])) ueot
text=Return target creature card with converted mana cost 2 or less from your graveyard to the battlefield. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Target creature gets +2/+0 and gains haste until end of turn.
mana={B}
type=Sorcery
@@ -12730,9 +12726,13 @@ type=Instant
[/card]
[card]
name=Commit // Memory
target=*[-land]
auto=placefromthetop(2)
autograveyard={4}{U}{U}{E}:moveto(opponentgraveyard) all(*|opponenthand) && moveto(opponentlibrary) all(*|opponentgraveyard) && shuffle && draw:7 opponent && moveto(mygraveyard) all(*|myhand) && moveto(mylibrary) all(*|mygraveyard) && shuffle && draw:7 controller asSorcery
abilities=hasaftermath
restriction=compare(type:*[-land]:battlefieldplustype:*:stackplusend)~morethan~0
flashback={4}{U}{U} name(Memory)
auto=ifnot paid(flashback) then if type(*[-land]|battlefield)~morethan~0 then choice name(Target non-land permanent) name(Target non-land permanent) name(Target non-land permanent) target(*[-land]|battlefield) placefromthetop(2)
auto=ifnot paid(flashback) then if type(*|opponentstack)~morethan~0 then choice name(Target opponent spell) name(Target opponent spell) name(Target opponent spell) target(*|opponentstack) spellmover(librarysecond)
auto=ifnot paid(flashback) then if type(*|mystack)~morethan~1 then choice name(Target your spell) name(Target your spell) name(Target your spell) target(*|mystack) spellmover(librarysecond)
auto=if paid(flashback) then moveto(opponentgraveyard) all(*|opponenthand) && moveto(opponentlibrary) all(*|opponentgraveyard) && shuffle && draw:7 opponent && moveto(mygraveyard) all(*|myhand) && moveto(mylibrary) all(*|mygraveyard) && shuffle && draw:7 controller asSorcery
text=Put target spell or nonland permanent into its owner's library second from the top. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) each player shuffles their hand and graveyard into their library and draws seven cards
mana={3}{U}
type=Instant
@@ -13090,9 +13090,12 @@ type=Instant
[/card]
[card]
name=Consign // Oblivion
target=*[-land]
auto=moveto(ownerhand)
autograveyard={4}{B}{E}:ability$!reject(<2>*|myhand)!$ opponent assorcery
abilities=hasaftermath
restriction=type(*[-land]|battlefield)~morethan~0
otherrestriction=can play sorcery
flashback={4}{B} name(Oblivion)
auto=ifnot paid(flashback) then target(*[-land]|battlefield) moveto(ownerhand)
auto=if paid(flashback) then ability$!name(Discard 2 cards) name(Discard 2 cards) notatarget(<2>*|myhand) reject!$ opponent
text=Return target nonland permanent to its owner's hand. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Target opponent discards two cards.
mana={1}{U}
type=Instant
@@ -14949,9 +14952,11 @@ toughness=2
[/card]
[card]
name=Cut // Ribbons
target=creature
auto=damage:4
autograveyard={X}{B}{B}{E}:life:-X opponent asSorcery
abilities=hasaftermath
restriction=type(creature|battlefield)~morethan~0
flashback={X}{B}{B} name(Ribbons)
auto=ifnot paid(flashback) then target(creature|battlefield) damage:4
auto=if paid(flashback) then life:-X opponent
text=Cut deals 4 damage to target creature. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Each opponent loses X life.
mana={1}{R}
type=Sorcery
@@ -16969,10 +16974,12 @@ toughness=1
[/card]
[card]
name=Destined // Lead
target=creature
auto=1/0
auto=indestructible
autograveyard={3}{G}{E}:target(creature) lure asSorcery
abilities=hasaftermath
restriction=type(creature|battlefield)~morethan~0
otherrestriction=can play sorcery,type(creature|battlefield)~morethan~0
flashback={3}{G} name(Lead)
auto=ifnot paid(flashback) then target(creature|battlefield) transforms((,newability[1/0],newability[indestructible])) ueot
auto=if paid(flashback) then target(creature|battlefield) lure ueot
text=Target creature gets +1/+0 and gains indestructible until end of turn. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) All creatures able to block target creature this turn do so.
mana={1}{B}
type=Instant
@@ -17886,8 +17893,8 @@ type=Sorcery
name=Divide by Zero
restriction=compare(type:*:battlefieldplustype:*:stackplusend)~morethan~0
auto=if type(*[manacost>=1]|battlefield)~morethan~0 then choice name(Return permanent) name(Return permanent) target(*[manacost>=1]|battlefield) moveto(ownerhand) and!( ability$!name(Learn) name(Learn) transforms((,newability[if type(*[lesson]|mysideboard)~morethan~0 then choice name(Put lesson in hand) name(Put lesson in hand) target(*[lesson]|mysideboard) moveto(myhand)],newability[if type(*|myhand)~morethan~0 then choice name(Discard and draw) name(Discard and draw) target(*|myhand) reject and!(draw:1)!],newability[if type(Retriever Phoenix|mygraveyard)~morethan~0 then choice name(Return a Retriever Phoenix) name(Return a Retriever Phoenix) target(Retriever Phoenix|mygraveyard) moveto(myBattlefield)],newability[choice name(Don't learn) donothing])) oneshot!$ controller )!
auto=if type(*|opponentstack)~morethan~0 then choice name(Return opponent spell) name(Return opponent spell) target(*|opponentstack) transforms((,newability[-nofizzle],newability[-nofizzlealternative],newability[fizzleto(hand)],newability[ability$!name(Learn) name(Learn) transforms((,newability[if type(*[lesson]|mysideboard)~morethan~0 then choice name(Put lesson in hand) name(Put lesson in hand) target(*[lesson]|mysideboard) moveto(myhand)],newability[if type(*|myhand)~morethan~0 then choice name(Discard and draw) name(Discard and draw) target(*|myhand) reject and!(draw:1)!],newability[if type(Retriever Phoenix|mygraveyard)~morethan~0 then choice name(Return a Retriever Phoenix) name(Return a Retriever Phoenix) target(Retriever Phoenix|mygraveyard) moveto(myBattlefield)],newability[choice name(Don't learn) donothing])) oneshot!$ opponent])) oneshot
auto=if type(*|mystack)~morethan~1 then choice name(Return your spell) name(Return your spell) target(*|mystack) transforms((,newability[-nofizzle],newability[-nofizzlealternative],newability[fizzleto(hand)],newability[ability$!name(Learn) name(Learn) transforms((,newability[if type(*[lesson]|mysideboard)~morethan~0 then choice name(Put lesson in hand) name(Put lesson in hand) target(*[lesson]|mysideboard) moveto(myhand)],newability[if type(*|myhand)~morethan~0 then choice name(Discard and draw) name(Discard and draw) target(*|myhand) reject and!(draw:1)!],newability[if type(Retriever Phoenix|mygraveyard)~morethan~0 then choice name(Return a Retriever Phoenix) name(Return a Retriever Phoenix) target(Retriever Phoenix|mygraveyard) moveto(myBattlefield)],newability[choice name(Don't learn) donothing])) oneshot!$ controller])) oneshot
auto=if type(*|opponentstack)~morethan~0 then choice name(Return opponent spell) name(Return opponent spell) target(*|opponentstack) transforms((,newability[spellmover(hand)],newability[ability$!name(Learn) name(Learn) transforms((,newability[if type(*[lesson]|mysideboard)~morethan~0 then choice name(Put lesson in hand) name(Put lesson in hand) target(*[lesson]|mysideboard) moveto(myhand)],newability[if type(*|myhand)~morethan~0 then choice name(Discard and draw) name(Discard and draw) target(*|myhand) reject and!(draw:1)!],newability[if type(Retriever Phoenix|mygraveyard)~morethan~0 then choice name(Return a Retriever Phoenix) name(Return a Retriever Phoenix) target(Retriever Phoenix|mygraveyard) moveto(myBattlefield)],newability[choice name(Don't learn) donothing])) oneshot!$ opponent])) oneshot
auto=if type(*|mystack)~morethan~1 then choice name(Return your spell) name(Return your spell) target(*|mystack) transforms((,newability[spellmover(hand)],newability[ability$!name(Learn) name(Learn) transforms((,newability[if type(*[lesson]|mysideboard)~morethan~0 then choice name(Put lesson in hand) name(Put lesson in hand) target(*[lesson]|mysideboard) moveto(myhand)],newability[if type(*|myhand)~morethan~0 then choice name(Discard and draw) name(Discard and draw) target(*|myhand) reject and!(draw:1)!],newability[if type(Retriever Phoenix|mygraveyard)~morethan~0 then choice name(Return a Retriever Phoenix) name(Return a Retriever Phoenix) target(Retriever Phoenix|mygraveyard) moveto(myBattlefield)],newability[choice name(Don't learn) donothing])) oneshot!$ controller])) oneshot
text=Return target spell or permanent with mana value 1 or greater to its owner's hand. -- Learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
mana={2}{U}
type=Instant
@@ -19151,9 +19158,10 @@ type=Sorcery
[/card]
[card]
name=Driven // Despair
auto=all(creature|mybattlefield) trample
auto=all(creature|mybattlefield) transforms((,newability[@combatdamaged(player) from(this):draw:1])) ueot
autograveyard={1}{B}{E}:all(creature|mybattlefield) menace && transforms((,newability[@combatdamaged(player) from(this):ability$!target(*|myhand) reject!$ opponent])) ueot assorcery
abilities=hasaftermath
flashback={1}{B} name(Despair)
auto=ifnot paid(flashback) then all(creature|mybattlefield) transforms((,newability[trample],newability[@combatdamaged(player) from(this):draw:1])) ueot
auto=if paid(flashback) then all(creature|mybattlefield) transforms((,newability[menace],newability[@combatdamageof(player)(player) from(this):ability$!name(Discard a card) name(Discard a card) notatarget(*|myhand) reject!$ controller],newability[@combatdamagefoeof(player)(player) from(this):ability$!name(Discard a card) name(Discard a card) notatarget(*|myhand) reject!$ opponent])) ueot
text=Until end of turn, creatures you control gain trample and "Whenever this creature deals combat damage to a player, draw a card." -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Until end of turn, creatures you control gain menace and "Whenever this creature deals combat damage to a player, that player discards a card."
mana={1}{G}
type=Sorcery
@@ -19518,8 +19526,10 @@ toughness=2
[/card]
[card]
name=Dusk // Dawn
auto=destroy all(creature[power>=3])
autograveyard={3}{W}{W}{E}:moveto(myhand) all(creature[power<=2]|mygraveyard) asSorcery
abilities=hasaftermath
flashback={3}{W}{W} name(Dawn)
auto=ifnot paid(flashback) then all(creature[power>=3]) destroy
auto=if paid(flashback) then all(creature[power<=2]|mygraveyard) moveto(myhand)
text=Destroy all creatures with power 3 or greater. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Return all creature cards with power 2 or less from your graveyard to your hand.
mana={2}{W}{W}
type=Sorcery
@@ -22617,9 +22627,11 @@ toughness=2
[/card]
[card]
name=Failure // Comply
auto=ifnot paid(alternative) then target(*|stack) transforms((,newability[-nofizzle],newability[-nofizzlealternative],newability[fizzleto(hand)])) oneshot
auto=if paid(alternative) then chooseanameopp maxcast(*[chosenname])0 opponent ueot && phaseaction[upkeep once] maxcast(*[lastnamechosen])0 opponent ueot chooseend nonland
autograveyard={W}{E}:name(Comply) activate castcard(alternative) asSorcery
abilities=hasaftermath
flashback={W} name(Comply)
otherrestriction=can play sorcery
auto=ifnot paid(flashback) then target(*|stack) spellmover(hand)
auto=if paid(flashback) then chooseanameopp maxcast(*[chosenname])0 opponent ueot && phaseaction[upkeep once] maxcast(*[lastnamechosen])0 opponent ueot chooseend nonland
text=Return target spell to its owner's hand. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Choose a card name. Until your next turn, your opponents can't cast spells with the chosen name.
mana={1}{U}
type=Instant
@@ -22943,9 +22955,12 @@ toughness=3
[/card]
[card]
name=Farm // Market
target=creature[attacking;blocking]
auto=destroy
autograveyard={3}{E}:draw:2 && transforms((,newability[target(<2>*|myhand) reject])) forever asSorcery
abilities=hasaftermath
flashback={3} name(Market)
restriction=type(creature[attacking;blocking])~morethan~0
otherrestriction=can play sorcery
auto=ifnot paid(flashback) then target(creature[attacking;blocking]) destroy
auto=if paid(flashback) then draw:2 && transforms((,newability[target(<2>*|myhand) reject])) forever
text=Destroy target attacking or blocking creature. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Draw two cards, then discard two cards.
mana={2}{W}
type=Instant
@@ -29729,9 +29744,11 @@ toughness=8
[/card]
[card]
name=Grind // Dust
target=<upto:2>creature
auto=counter(-1/-1,1)
autograveyard={3}{W}{E}:target(<anyamount>creature[counter{-1/-1}]) moveto(exile) assorcery
abilities=hasaftermath
flashback={3}{W} name(Dust)
otherrestriction=can play sorcery
auto=ifnot paid(flashback) then name(Put -1/-1 counter) target(<upto:2>creature) counter(-1/-1)
auto=if paid(flashback) then target(<anyamount>creature[counter{-1/-1}]) moveto(exile)
text=Put a -1/-1 counter on each of up to two target creatures. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Exile any number of target creatures that have -1/-1 counters on them.
mana={1}{B}
type=Sorcery
@@ -31403,8 +31420,11 @@ type=Instant
[/card]
[card]
name=Heaven // Earth
auto=damage:X all(creature[flying])
autograveyard={X}{R}{R}{E}:damage:X all(creature[-flying]) asSorcery
abilities=hasaftermath
otherrestriction=can play sorcery
flashback={X}{R}{R} name(Earth)
auto=ifnot paid(flashback) then damage:X all(creature[flying])
auto=if paid(flashback) then damage:X all(creature[-flying])
text=Heaven deals X damage to each creature with flying. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Earth deals X damage to each creature without flying.
mana={X}{G}
type=Instant
@@ -34972,17 +34992,21 @@ subtype=Aura
[/card]
[card]
name=Insult // Injury
auto=emblem transforms((,newability[@damaged(creature) from(*[creature;artifact;enchantment;land;planeswalker]|mybattlefield):damage:thatmuch all(trigger[to])])) ueot
auto=emblem transforms((,newability[@damaged(creature) from(*[creature;artifact;enchantment;land;planeswalker]|mygraveyard):damage:thatmuch all(trigger[to])])) ueot
auto=emblem transforms((,newability[@damaged(creature) from(*[instant;sorcery]|myStack):damage:thatmuch all(trigger[to])])) ueot
auto=emblem transforms((,newability[@damaged(creature) from(*[instant;sorcery]|mygraveyard):damage:thatmuch all(trigger[to])])) ueot
auto=emblem transforms((,newability[@damaged(player) from(*[instant;sorcery]|myStack):damage:thatmuch all(trigger[to])])) ueot
auto=emblem transforms((,newability[@damaged(player) from(*[instant;sorcery]|mygraveyard):damage:thatmuch all(trigger[to])])) ueot
auto=emblem transforms((,newability[@damaged(player) from(*[creature;artifact;enchantment;land;planeswalker]|mybattlefield):damage:thatmuch all(trigger[to])])) ueot
auto=emblem transforms((,newability[@damaged(player) from(*[creature;artifact;enchantment;land;planeswalker]|mygraveyard):damage:thatmuch all(trigger[to])])) ueot
auto=emblem transforms((,newability[@counterremoved(duplicateAll) from(planeswalker|opponentBattlefield) restriction{myTurnOnly}:donothing])) ueot
autograveyard={2}{R}{E}:name(Damage yourself and target creature) damage:2 controller && damage:2 target(creature) restriction{type(creature|battlefield)~morethan~0,myTurnOnly} asSorcery
autograveyard={2}{R}{E}:name(Damage opponent and target creature) damage:2 opponent && damage:2 target(creature) restriction{type(creature|battlefield)~morethan~0,myTurnOnly} asSorcery
#MISSING: damage can't be prevented
abilities=hasaftermath
otherrestriction=type(creature|battlefield)~morethan~0
flashback={2}{R} name(Injury)
auto=ifnot paid(flashback) then emblem transforms((,newability[@damaged(creature) from(*[creature;artifact;enchantment;land;planeswalker]|mybattlefield):damage:thatmuch all(trigger[to])])) ueot
auto=ifnot paid(flashback) then emblem transforms((,newability[@damaged(creature) from(*[creature;artifact;enchantment;land;planeswalker]|mygraveyard):damage:thatmuch all(trigger[to])])) ueot
auto=ifnot paid(flashback) then emblem transforms((,newability[@damaged(creature) from(*[instant;sorcery]|myStack):damage:thatmuch all(trigger[to])])) ueot
auto=ifnot paid(flashback) then emblem transforms((,newability[@damaged(creature) from(*[instant;sorcery]|mygraveyard):damage:thatmuch all(trigger[to])])) ueot
auto=ifnot paid(flashback) then emblem transforms((,newability[@damaged(player) from(*[instant;sorcery]|myStack):damage:thatmuch all(trigger[to])])) ueot
auto=ifnot paid(flashback) then emblem transforms((,newability[@damaged(player) from(*[instant;sorcery]|mygraveyard):damage:thatmuch all(trigger[to])])) ueot
auto=ifnot paid(flashback) then emblem transforms((,newability[@damaged(player) from(*[creature;artifact;enchantment;land;planeswalker]|mybattlefield):damage:thatmuch all(trigger[to])])) ueot
auto=ifnot paid(flashback) then emblem transforms((,newability[@damaged(player) from(*[creature;artifact;enchantment;land;planeswalker]|mygraveyard):damage:thatmuch all(trigger[to])])) ueot
auto=ifnot paid(flashback) then emblem transforms((,newability[@counterremoved(duplicateAll) from(planeswalker|opponentBattlefield) restriction{myTurnOnly}:donothing])) ueot
auto=if paid(flashback) then choice name(Damage opponent and target creature) name(Damage opponent and target creature) damage:2 opponent && damage:2 target(creature)
auto=if paid(flashback) then choice name(Damage yourself and target creature) name(Damage yourself and target creature) damage:2 controller && damage:2 target(creature)
text=Damage can't be prevented this turn. If a source you control would deal damage this turn, it deals double that damage instead. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Injury deals 2 damage to target creature and 2 damage to target player.
mana={2}{R}
type=Sorcery
@@ -39171,9 +39195,11 @@ subtype=Equipment
[/card]
[card]
name=Leave // Chance
target=<anyamount>*|mybattlefield
auto=moveto(myhand)
autograveyard={3}{R}{E}:target(<anyamount>*|myhand) reject && teach(*) draw:1 controller assorcery
abilities=hasaftermath
otherrestriction=can play sorcery
flashback={3}{R} name(Chance)
auto=ifnot paid(flashback) then target(<anyamount>*|mybattlefield) moveto(myhand)
auto=if paid(flashback) then target(<anyamount>*|myhand) reject and!(draw:1)!
text=Return any number of target permanents you own to your hand. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Discard any number of cards, then draw that many cards.
mana={1}{W}
type=Instant
@@ -44498,8 +44524,10 @@ toughness=3
[/card]
[card]
name=Mouth // Feed
auto=token(Hippo,creature Hippo,3/3,green)
autograveyard={3}{G}{E}:foreach(creature[power>=3]|mybattlefield) draw:1 controller asSorcery
abilities=hasaftermath
flashback={3}{G} name(Feed)
auto=ifnot paid(flashback) then token(Hippo,creature Hippo,3/3,green)
auto=if paid(flashback) then draw:type:creature[power>=3]:mybattlefield controller
text=Create a 3/3 green Hippo creature token. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Draw a card for each creature you control with power 3 or greater.
mana={2}{G}
type=Sorcery
@@ -45836,9 +45864,12 @@ type=Instant
[/card]
[card]
name=Never // Return
target=creature,planeswalker
auto=destroy
autograveyard={3}{B}{E}:moveto(exile) target(*|graveyard) && token(Zombie,creature Zombie,2/2,black) asSorcery
abilities=hasaftermath
restriction=type(*[creature;planeswalker]|battlefield)~morethan~0
otherrestriction=type(*|graveyard)~morethan~0
flashback={3}{B} name(Return)
auto=ifnot paid(flashback) then target(*[creature;planeswalker]|battlefield) destroy
auto=if paid(flashback) then target(*|graveyard) moveto(exile) && token(Zombie,creature Zombie,2/2,black)
text=Destroy target creature or planeswalker. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Exile target card from a graveyard. Create a 2/2 black Zombie creature token.
mana={1}{B}{B}
type=Sorcery
@@ -47653,9 +47684,12 @@ toughness=2
[/card]
[card]
name=Onward // Victory
target=creature
auto=power/0
autograveyard={2}{W}{E}:target(creature) double strike asSorcery
abilities=hasaftermath
restriction=type(creature|battlefield)~morethan~0
otherrestriction=can play sorcery,type(creature|battlefield)~morethan~0
flashback={2}{W} name(Victory)
auto=ifnot paid(flashback) then target(creature|battlefield) transforms((,newability[p/0])) ueot
auto=if paid(flashback) then target(creature|battlefield) transforms((,newability[double strike])) ueot
text=Target creature gets +X/+0 until end of turn, where X is its power. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Target creature gains double strike until end of turn.
mana={2}{R}
type=Instant
@@ -51081,11 +51115,12 @@ type=Sorcery
[/card]
[card]
name=Prepare // Fight
target=creature
auto=untap
auto=lifelink
auto=2/2
autograveyard={3}{G}{E}:target(creature) transforms((,newability[target(creature|opponentbattlefield) dynamicability<!powerstrike eachother!>])) ueot asSorcery
abilities=hasaftermath
restriction=type(creature|battlefield)~morethan~0
otherrestriction=can play sorcery,type(creature|mybattlefield)~morethan~0,type(creature|opponentbattlefield)~morethan~0
flashback={3}{G} name(Fight)
auto=ifnot paid(flashback) then target(creature) transforms((,newability[untap],newability[lifelink],newability[2/2])) ueot
auto=if paid(flashback) then target(creature|mybattlefield) transforms((,newability[name(Fight opponent creature) target(creature|opponentbattlefield) dynamicability<!powerstrike eachother!>])) ueot
text=Untap target creature. It gets +2/+2 and gains lifelink until end of turn. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Target creature you control fights target creature an opponent controls.
mana={1}{W}
type=Instant
@@ -52856,8 +52891,10 @@ toughness=5
[/card]
[card]
name=Rags // Riches
auto=all(creature) -2/-2 ueot
autograveyard={5}{U}{U}{E}:ability$!moveto(opponentbattlefield) target(creature|mybattlefield)!$ opponent asSorcery
abilities=hasaftermath
flashback={5}{U}{U} name(Riches)
auto=ifnot paid(flashback) then all(creature) -2/-2 ueot
auto=if paid(flashback) then ability$!name(Give creature to opponent) name(Give creature to opponent) moveto(opponentbattlefield) target(creature|mybattlefield)!$ opponent
text=All creatures get -2/-2 until end of turn. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Each opponent chooses a creature he or she controls. You gain control of those creatures.
mana={2}{B}{B}
type=Sorcery
@@ -53902,10 +53939,11 @@ subtype=Equipment
[/card]
[card]
name=Reason // Believe
abilities=hasaftermath
flashback={4}{G} name(Believe)
aicode=activate transforms((,newability[all(*[zpos<=3]|mylibrary) transforms((,newability[may name(Put on bottom of library) moveto(myreveal) and!( bottomoflibrary )!])) oneshot])) oneshot
auto=scry:3 scrycore delayed dontshow donothing scrycoreend scryend
autograveyard={4}{G}{E} restriction{type(creature[zpos=1]|mylibrary)~morethan~0}:name(Look top card) all(creature[zpos=1]|mylibrary) moveTo(myhand) and!( transforms((,newability[may name(Put on battlefield) moveto(myBattlefield)])) oneshot )!
autograveyard={4}{G}{E} restriction{type(creature[zpos=1]|mylibrary)~equalto~0}:name(Look top card) all(*[zpos=1]|mylibrary) moveTo(myhand)
auto=ifnot paid(flashback) then scry:3 scrycore delayed dontshow donothing scrycoreend scryend
auto=if paid(flashback) then all(*[zpos=1]|mylibrary) moveTo(myhand) and!( if cantargetcard(*[creature]|*) then transforms((,newability[may name(Put on battlefield) moveto(myBattlefield)])) oneshot )!
text=Scry 3. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Look at the top card of your library. You may put it onto the battlefield if it's a creature card. If you don't, put it into your hand.
mana={U}
type=Sorcery
@@ -54162,9 +54200,12 @@ type=Instant
[/card]
[card]
name=Reduce // Rubble
target=*|stack
auto=transforms((,newability[pay[[{3}]] name(pay 3 mana) donothing?fizzle])) forever restriction{type(*|stack)~morethan~0}
autograveyard={2}{R}{E}:target(<upto:3>land) freeze asSorcery
abilities=hasaftermath
flashback={2}{R} name(Rubble)
restriction=type(*|stack)~morethan~0
otherrestriction=can play sorcery
auto=ifnot paid(flashback) then target(*|stack) transforms((,newability[pay[[{3}]] name(pay 3 mana) donothing?fizzle])) forever
auto=if paid(flashback) then target(<upto:3>land) freeze
text=Counter target spell unless its controller pays {3}. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Up to three target lands don't untap during their controller's next untap step.
mana={2}{U}
type=Instant
@@ -54207,9 +54248,12 @@ toughness=3
[/card]
[card]
name=Refuse // Cooperate
target=*|stack
auto=damage:manacost
autograveyard={2}{U}{E}:castcard(noevent) target(*|stack)
abilities=hasaftermath
flashback={2}{U} name(Cooperate)
restriction=type(*|stack)~morethan~0
otherrestriction=type(*[instant;sorcery]|stack)~morethan~0
auto=ifnot paid(flashback) then target(*|stack) transforms((.newability[damage:manacost])) oneshot
auto=if paid(flashback) then target(*[instant;sorcery]|stack) castcard(copied noevent)
text=Refuse deals damage to target spell's controller equal to that spell's converted mana cost. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Copy target instant or sorcery spell. You may choose new targets for the copy.
mana={3}{R}
type=Instant
@@ -56071,8 +56115,11 @@ toughness=2
[/card]
[card]
name=Road // Ruin
auto=name(Search basic land) target(land[basic]|myLibrary) moveTo(myBattlefield) and!( transforms((,newability[tap(noevent)],newability[shuffle])) oneshot )!
autograveyard={1}{R}{R}:damage:type:land:myBattlefield target(creature) asSorcery
abilities=hasaftermath
flashback={1}{R}{R} name(Ruin)
otherrestriction=can play sorcery,type(creature|battlefield)~morethan~0
auto=ifnot paid(flashback) then name(Search basic land) target(land[basic]|myLibrary) moveTo(myBattlefield) and!( transforms((,newability[tap(noevent)],newability[shuffle])) oneshot )!
auto=if paid(flashback) then target(creature|battlefield) damage:type:land:mybattlefield
text=Search your library for a basic land card, put it onto the battlefield tapped, then shuffle. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Ruin deals damage to target creature equal to the number of lands you control.
mana={2}{G}
type=Instant
@@ -65247,9 +65294,10 @@ type=Sorcery
[/card]
[card]
name=Spring // Mind
aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary)
auto=name(search card) reveal:plibrarycount optionone name(choose card) target(<1>land[basic]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend
autograveyard={4}{U}{U}{E}:draw:2 controller
abilities=hasaftermath
flashback={4}{U}{U} name(Mind)
auto=ifnot paid(flashback) then target(land[basic]|myLibrary) moveTo(myBattlefield) and!( transforms((,newability[tap(noevent)],newability[shuffle])) oneshot )!
auto=if paid(flashback) then draw:2 controller
text=Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Draw two cards.
mana={2}{G}
type=Sorcery
@@ -65762,8 +65810,11 @@ type=Sorcery
[/card]
[card]
name=Start // Finish
auto=token(Warrior,creature Warrior,1/1,white,vigilance)*2
autograveyard={2}{B}{E}{S(creature|mybattlefield)}:destroy target(creature) asSorcery
abilities=hasaftermath
flashback={2}{B}{S(creature|mybattlefield)} name(Finish)
otherrestriction=can play sorcery,type(creature|myBattlefield)~morethan~0
auto=ifnot paid(flashback) then token(Warrior,creature Warrior,1/1,white,vigilance)*2
auto=if paid(flashback) then destroy target(creature)
text=Create two 1/1 white Warrior creature tokens with vigilance. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) As an additional cost to cast Finish, sacrifice a creature. -- Destroy target creature.
mana={2}{W}
type=Instant
@@ -66822,9 +66873,13 @@ type=Sorcery
[/card]
[card]
name=Struggle // Survive
target=creature
auto=foreach(land|mybattlefield) damage:1
autograveyard={1}{G}{E}:moveTo(mylibrary) all(*|mygraveyard) && shuffle && transforms((,newability[moveTo(opponentlibrary) all(*|opponentgraveyard)],newability[ability$!shuffle!$ opponent])) ueot assorcery
abilities=hasaftermath
flashback={1}{G} name(Survive)
restriction=type(creature|battlefield)~morethan~0
otherrestriction=can play sorcery
auto=ifnot paid(flashback) then target(creature|battlefield) damage:type:land:myBattlefield
auto=if paid(flashback) then all(*|mygraveyard) moveto(mylibrary) && shuffle
auto=if paid(flashback) then all(*|opponentgraveyard) moveto(opponentlibrary) && shuffle opponent
text=Struggle deals damage to target creature equal to the number of lands you control. -- Aftermath (Cast this spell only from your graveyard. Then exile it.) Each player shuffles his or her graveyard into his or her library.
mana={2}{R}
type=Instant
@@ -73810,7 +73865,7 @@ type=Instant
name=Unsubstantiate
restriction=compare(type:creature:battlefieldplustype:*:stackplusend)~morethan~0
auto=if type(creature|battlefield)~morethan~0 then choice name(Return target creature) name(Return target creature) target(creature|battlefield) moveTo(ownerHand)
auto=if type(*|stack)~morethan~1 then choice name(Return target spell) name(Return target spell) target(*|stack) transforms((,newability[-nofizzle],newability[-nofizzlealternative],newability[fizzleto(hand)])) oneshot
auto=if type(*|stack)~morethan~1 then choice name(Return target spell) name(Return target spell) target(*|stack) spellmover(hand)
text=Return target spell or creature to its owner's hand.
mana={1}{U}
type=Instant
@@ -75020,7 +75075,7 @@ type=Instant
name=Venser, Shaper Savant
abilities=flash
auto=if type(*|battlefield)~morethan~0 then choice name(Return target permanent) name(Return target permanent) target(*|battlefield) moveTo(ownerHand)
auto=if type(*|stack)~morethan~0 then choice name(Return target spell) name(Return target spell) target(*|stack) transforms((,newability[-nofizzle],newability[-nofizzlealternative],newability[fizzleto(hand)])) oneshot
auto=if type(*|stack)~morethan~0 then choice name(Return target spell) name(Return target spell) target(*|stack) spellmover(hand)
text=Flash (You may cast this spell any time you could cast an instant.) -- When Venser, Shaper Savant enters the battlefield, return target spell or permanent to its owner's hand.
mana={2}{U}{U}
type=Legendary Creature

View File

@@ -198,7 +198,9 @@ public:
PUT_IN_HAND,
PUT_IN_LIBRARY_TOP,
PUT_IN_EXILE,
PUT_IN_LIBRARY_BOTTOM
PUT_IN_LIBRARY_BOTTOM,
PUT_IN_LIBRARY_SECOND,
PUT_IN_EXILE_IMPRINT
} FizzleMode;
protected:
@@ -223,7 +225,7 @@ public:
int getPreviousIndex(Interruptible * next, int type = 0, int state = 0 , int display = -1);
Interruptible * getNext(Interruptible * previous, int type = 0, int state = 0 , int display = -1);
int getNextIndex(Interruptible * previous, int type = 0, int state = 0 , int display = -1);
void Fizzle(Interruptible * action, FizzleMode fizzleMode = PUT_IN_GRAVEARD);
void Fizzle(Interruptible * action, MTGCardInstance* fizzler = NULL, FizzleMode fizzleMode = PUT_IN_GRAVEARD);
Interruptible * getAt(int id);
void cancelInterruptOffer(InterruptDecision cancelMode = DONT_INTERRUPT, bool log = true);
void endOfInterruption(bool log = true);

View File

@@ -1335,7 +1335,7 @@ class AAFizzler: public ActivatedAbility
{
public:
ActionStack::FizzleMode fizzleMode; // action to do after fizzling
bool spellMover; // use fizzle to move spell to exile or hand (is not a real counter so nofizzle ability is not considerated).
AAFizzler(GameObserver* observer, int _id, MTGCardInstance * card, Spell * _target, ManaCost * _cost = NULL);
int resolve();
const string getMenuText();

View File

@@ -329,7 +329,8 @@ class Constants
DECAYED = 202,
HASSTRIVE = 203,
ISCONSPIRACY = 204,
NB_BASIC_ABILITIES = 205,
HASAFTERMATH = 205,
NB_BASIC_ABILITIES = 206,
RARITY_S = 'S', //Special Rarity
RARITY_M = 'M', //Mythics

View File

@@ -1356,7 +1356,7 @@ int ActionStack::garbageCollect()
}
// Fizzle action and put it in targetZone
void ActionStack::Fizzle(Interruptible * action, FizzleMode fizzleMode)
void ActionStack::Fizzle(Interruptible * action, MTGCardInstance * fizzler, FizzleMode fizzleMode)
{
if (!action)
{
@@ -1366,6 +1366,8 @@ void ActionStack::Fizzle(Interruptible * action, FizzleMode fizzleMode)
if (action->type == ACTION_SPELL)
{
Spell * spell = (Spell *) action;
MTGCardInstance * _target = NULL;
unsigned int position = 0;
switch (fizzleMode) {
case PUT_IN_GRAVEARD:
spell->source->controller()->game->putInGraveyard(spell->source);
@@ -1374,17 +1376,49 @@ void ActionStack::Fizzle(Interruptible * action, FizzleMode fizzleMode)
spell->source->controller()->game->putInHand(spell->source);
break;
case PUT_IN_EXILE:
spell->source->controller()->game->putInExile(spell->source);
case PUT_IN_EXILE_IMPRINT:
_target = spell->source->controller()->game->putInExile(spell->source);
if (_target && fizzler && fizzleMode == PUT_IN_EXILE_IMPRINT){
fizzler->imprintedCards.push_back(_target);
if (fizzler->imprintedCards.size()){
if (fizzler->imprintedCards.back()->getName().size()){
fizzler->currentimprintName = fizzler->imprintedCards.back()->getName();
fizzler->imprintedNames.push_back(fizzler->imprintedCards.back()->getName());
}
}
}
break;
case PUT_IN_LIBRARY_TOP:
case PUT_IN_LIBRARY_SECOND:
case PUT_IN_LIBRARY_BOTTOM:
MTGCardInstance * _target = spell->source->controller()->game->putInLibrary(spell->source);
_target = spell->source->controller()->game->putInLibrary(spell->source);
if (_target && fizzleMode == PUT_IN_LIBRARY_BOTTOM){
MTGLibrary * library = _target->owner->game->library;
vector<MTGCardInstance *>oldOrder = library->cards;
vector<MTGCardInstance *>newOrder;
newOrder.push_back(_target);
for(unsigned int k = 0;k < oldOrder.size();++k)
for(unsigned int k = 0 ;k < oldOrder.size(); ++k)
{
MTGCardInstance * rearranged = oldOrder[k];
if(rearranged != _target)
newOrder.push_back(rearranged);
}
library->cards = newOrder;
} else if (_target && fizzleMode == PUT_IN_LIBRARY_SECOND){
position = 2;
MTGLibrary * library = _target->owner->game->library;
vector<MTGCardInstance *>oldOrder = library->cards;
vector<MTGCardInstance *>newOrder;
if(position > oldOrder.size())
position = oldOrder.size(); //Avoid to exceed the library dimension.
for(unsigned int k = 0; k < oldOrder.size() - position; ++k)
{
MTGCardInstance * rearranged = oldOrder[k];
if(rearranged != _target)
newOrder.push_back(rearranged);
}
newOrder.push_back(_target);
for(unsigned int k = oldOrder.size() - position ; k < oldOrder.size(); ++k)
{
MTGCardInstance * rearranged = oldOrder[k];
if(rearranged != _target)

View File

@@ -3890,6 +3890,8 @@ ActivatedAbility(observer, _id, card, _cost, 0)
// by default we put the spell to graveyard after fizzling
fizzleMode = ActionStack::PUT_IN_GRAVEARD;
// by default fizzle is not used to put spell somewhere
spellMover = false;
}
int AAFizzler::resolve()
@@ -3910,9 +3912,9 @@ int AAFizzler::resolve()
MTGCardInstance* sCard = NULL;
if (sTarget)
sCard = sTarget->source;
if (!sCard || !sTarget || sCard->has(Constants::NOFIZZLE))
if (!sCard || !sTarget || (sCard->has(Constants::NOFIZZLE) && !spellMover))
return 0;
if (sCard->has(Constants::NOFIZZLEALTERNATIVE) && sCard->alternateCostPaid[ManaCost::MANA_PAID_WITH_ALTERNATIVE]) // No fizzle if card has been paid with alternative cost.
if (sCard->has(Constants::NOFIZZLEALTERNATIVE) && (sCard->alternateCostPaid[ManaCost::MANA_PAID_WITH_ALTERNATIVE] && !spellMover)) // No fizzle if card has been paid with alternative cost.
return 0;
if (source->alias == 111057 && sTarget)//Draining Whelk
{
@@ -3921,7 +3923,7 @@ int AAFizzler::resolve()
source->counters->addCounter(1,1);
}
}
stack->Fizzle(sTarget, fizzleMode);
stack->Fizzle(sTarget, source, fizzleMode);
if(!source->storedCard)
source->storedCard = sCard; // Store the fizzled card to retrive target information later (e.g. manacost for Reinterpret)
return 1;

View File

@@ -277,7 +277,7 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
match = NULL; //Some kicker costs are not a real kicker (e.g. Fuse cost).
}
if ((hasFlashbackCost == -1 && card->getManaCost()->getFlashback()) || (hasFlashbackCost == 1 && !card->getManaCost()->getFlashback()))
if ((hasFlashbackCost == -1 && (card->getManaCost()->getFlashback() && !card->has(Constants::HASAFTERMATH))) || (hasFlashbackCost == 1 && (!card->getManaCost()->getFlashback() || (card->getManaCost()->getFlashback() && card->has(Constants::HASAFTERMATH)))))
{
match = NULL;
}

View File

@@ -963,7 +963,7 @@ void GameStateDuel::Update(float dt)
if(game->getCurrentTargetChooser()->getNbTargets() < 1)
menu->Add(MENUITEM_TOGGLE_SELECT_ALL, "Select all Targets");
else {
menu->Add(MENUITEM_TOGGLE_SELECT_ALL, "Remove Selection");
menu->Add(MENUITEM_TOGGLE_SELECT_ALL, "Clear Selection");
menu->Add(MENUITEM_CONFIRM_SELECT_ALL, "Confirm Selection");
}
}

View File

@@ -2968,9 +2968,11 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return a;
}
// Fizzle (counterspell...) and put to zone
// Fizzle (counterspell...) and put to zone or Move spell to zone
// This should always be above "fizzle" section
vector<string> splitFizzle = parseBetween(s, "fizzleto(", ")");
vector<string> splitFizzle = parseBetween(s, "spellmover(", ")");
if (!splitFizzle.size())
splitFizzle = parseBetween(s, "fizzleto(", ")");
if (splitFizzle.size())
{
// currently only hand, exile and library are supported
@@ -2982,9 +2984,15 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
} else if (zone == "exile")
{
fizzleMode = ActionStack::PUT_IN_EXILE;
} else if (zone == "exileimp")
{
fizzleMode = ActionStack::PUT_IN_EXILE_IMPRINT;
} else if (zone == "librarytop")
{
fizzleMode = ActionStack::PUT_IN_LIBRARY_TOP;
} else if (zone == "librarysecond")
{
fizzleMode = ActionStack::PUT_IN_LIBRARY_SECOND;
} else if (zone == "librarybottom")
{
fizzleMode = ActionStack::PUT_IN_LIBRARY_BOTTOM;
@@ -2994,6 +3002,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
starget = spell->getNextSpellTarget();
AAFizzler * a = NEW AAFizzler(observer, id, card, starget);
a->fizzleMode = fizzleMode;
a->spellMover = (s.find("spellmover(") != string::npos);
a->oneShot = 1;
return a;
}

View File

@@ -197,6 +197,16 @@ int MTGAllCards::processConfLine(string &s, MTGCard *card, CardPrimitive * primi
string value = val;
std::transform(value.begin(), value.end(), value.begin(), ::tolower);
cost->setFlashback(ManaCost::parseManaCost(value));
size_t name = value.find("name(");
string theName = "";
if(name != string::npos)
{
size_t endName = value.find(")",name);
theName = value.substr(name + 5,endName - name - 5);
value.erase(name, endName - name + 1);
}
if(theName.size())
cost->getFlashback()->alternativeName.append(theName);
}
}
break;

View File

@@ -235,7 +235,8 @@ const char* Constants::MTGBasicAbilities[] = {
"nightbound", //Card has nightbound (e.g. "Moonrage Brute")
"decayed", //Card has decayed.
"hasstrive", //Kicker cost is a strive cost (e.g. "Aerial Formation")
"isconspiracy" //The card is a conspiracy (e.g. "Double Stroke")
"isconspiracy", //The card is a conspiracy (e.g. "Double Stroke")
"hasaftermath" //Flashback cost is an aftemath cost (e.g. "Claim // Fame")
};
map<string,int> Constants::MTGBasicAbilitiesMap;

View File

@@ -1076,6 +1076,16 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
cd->nameComparisonMode = COMPARISON_EQUAL;
}
if (attribute.find("storedname") != string::npos && card->storedCard)
{
attributefound = 1;
cd->compareName = card->storedCard->getName();
if (minus)
cd->nameComparisonMode = COMPARISON_UNEQUAL;
else
cd->nameComparisonMode = COMPARISON_EQUAL;
}
if (attribute.find("preyname") != string::npos && card->hauntedCard)
{
attributefound = 1;