Added/fixed primitives, improved "TurnSide", "Morph" and "Flip" abilities when dealing with Commanders, added "fresh" attribute to cards just put in Sideboard, added a put back rule when a Commander is put in Sideboard, allowed to cast a card with kicker or alternative or morph cost from the CommandZone: in case of Morphed or DoubleFace cards (e.g. "Tergrid, God of Fright"), they will be put in play but they won't be Commander, but when they will be put elsewhere (e.g. destroyed) they may be back to the CommandZone with the usual Commander put back rule.

This commit is contained in:
Vittorio Alfieri
2021-08-24 22:43:55 +02:00
parent 6331b1daf4
commit c7c2025fc9
12 changed files with 218 additions and 113 deletions
+4 -1
View File
@@ -2,8 +2,11 @@
## [master] (https://github.com/WagicProject/wagic/tree/master) ## [master] (https://github.com/WagicProject/wagic/tree/master)
### 24/08/21
- *Committed:* Added/fixed primitives, improved "TurnSide", "Morph" and "Flip" abilities when dealing with Commanders, added "fresh" attribute to cards just put in Sideboard, added a put back rule when a Commander is put in Sideboard, allowed to cast a card with kicker or alternative or morph cost from the CommandZone: in case of Morphed or DoubleFace cards (e.g. "Tergrid, God of Fright"), they will be put in play but they won't be Commander, but when they will be put elsewhere (e.g. destroyed) they may be back to the CommandZone with the usual Commander put back rule. ([Vitty85](https://github.com/Vitty85))
### 23/08/21 ### 23/08/21
- *Committed:* Updated changelog with last 3 years of modifications (issue #1067 by @remigiusz-suwalski), added tokens in ELD set, improved Android downloader for ELD set, fixed primitives with "asflash" ability, improved all cards with adventure: now they become instants or sorceries in stack to activate the correct trigger (e.g. with Magecraft combos), added "nomovetrigger" ability for all the "fake" cards (e.g. cards which are simple abilities) in order to don't trigger any event on their cast since they are not real cards. ([Vitty85](https://github.com/Vitty85)) - *Committed:* Updated changelog with last 3 years of modifications (issue #1067 by @remigiusz-suwalski), added tokens in ELD set, improved Android downloader for ELD set, fixed primitives with "asflash" ability, improved all cards with adventure: now they become instants or sorceries in stack to activate the correct trigger (e.g. with Magecraft combos), added "nomovetrigger" ability for all the "fake" cards (e.g. cards which are simple abilities) in order to don't trigger any event on their cast since they are not real cards. (https://github.com/WagicProject/wagic/commit/6331b1daf43eb508ef1f9c54160ee5f4c4ac4ac9) ([Vitty85](https://github.com/Vitty85))
### 20/08/21 ### 20/08/21
- *Committed:* Fixed "Cunning Rhetoric". (https://github.com/WagicProject/wagic/commit/cd9e5fb2e53e82dfb128b9a6110c76567af0ba0c) ([Vitty85](https://github.com/Vitty85)) - *Committed:* Fixed "Cunning Rhetoric". (https://github.com/WagicProject/wagic/commit/cd9e5fb2e53e82dfb128b9a6110c76567af0ba0c) ([Vitty85](https://github.com/Vitty85))
+2 -1
View File
@@ -91,4 +91,5 @@ auto=@each cleanup:all(*|myBattlefield) resetDamage
auto=@movedTo(*[iscommander]|mygraveyard):may name(Put back to command zone) ability$!name(Put back to command zone) name(Put back to command zone) target(*[iscommander;fresh]|mygraveyard) moveto(mycommandzone)!$ controller auto=@movedTo(*[iscommander]|mygraveyard):may name(Put back to command zone) ability$!name(Put back to command zone) name(Put back to command zone) target(*[iscommander;fresh]|mygraveyard) moveto(mycommandzone)!$ controller
auto=@movedTo(*[iscommander]|myexile):may name(Put back to command zone) ability$!name(Put back to command zone) name(Put back to command zone) target(*[iscommander;fresh]|myexile) moveto(mycommandzone)!$ controller auto=@movedTo(*[iscommander]|myexile):may name(Put back to command zone) ability$!name(Put back to command zone) name(Put back to command zone) target(*[iscommander;fresh]|myexile) moveto(mycommandzone)!$ controller
auto=@movedTo(*[iscommander]|mylibrary):may name(Put back to command zone) ability$!name(Put back to command zone) name(Put back to command zone) target(*[iscommander;fresh]|mylibrary) moveto(mycommandzone)!$ controller auto=@movedTo(*[iscommander]|mylibrary):may name(Put back to command zone) ability$!name(Put back to command zone) name(Put back to command zone) target(*[iscommander;fresh]|mylibrary) moveto(mycommandzone)!$ controller
auto=@movedTo(*[iscommander]|myhand):may name(Put back to command zone) ability$!name(Put back to command zone) name(Put back to command zone) target(*[iscommander;fresh]|myhand) moveto(mycommandzone)!$ controller auto=@movedTo(*[iscommander]|myhand):may name(Put back to command zone) ability$!name(Put back to command zone) name(Put back to command zone) target(*[iscommander;fresh]|myhand) moveto(mycommandzone)!$ controller
auto=@movedTo(*[iscommander]|mysideboard):may name(Put back to command zone) ability$!name(Put back to command zone) name(Put back to command zone) target(*[iscommander;fresh]|mysideboard) moveto(mycommandzone)!$ controller
@@ -16819,10 +16819,9 @@ toughness=3
[/card] [/card]
[card] [card]
name=Dragon's Eye Savants name=Dragon's Eye Savants
aicode=name(look) activate name(look) target(<ohandcount>*|opponenthand) donothing
facedown={3} facedown={3}
autofacedown={Reveal(<1>*[blue]|myHand)}:morph autofacedown=aslongas(*[blue]|myhand) {0}:name(Reveal blue card and turn) morph
autofaceup=target(opponent) name(target opponent) reveal:ohandcount revealzone(opponenthand) optionone name(look) target(<1>*|reveal) moveto(ownerhand) and!(all(*|reveal) moveto(ownerhand))! optiononeend revealend autofaceup=name(Look opponent hand) target(*|opponenthand) moveto(opponentreveal) and!( moveto(opponenthand) )!
text=Morph—Reveal a blue card in your hand. (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Dragons Eye Savants is turned face up, look at target opponents hand. text=Morph—Reveal a blue card in your hand. (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Dragons Eye Savants is turned face up, look at target opponents hand.
mana={1}{U} mana={1}{U}
type=Creature type=Creature
@@ -17805,7 +17804,9 @@ type=Dungeon
[/card] [/card]
[card] [card]
name=Duplicant name=Duplicant
auto=if type(creature[-token]|battlefield)~morethan~0 then may name(Exile non-token creature) name(Exile non-token creature) imprint target(creature[-token]) && all(this) becomes(evicttypes,evictpw/evictth) forever auto=if type(creature[-token]|battlefield)~morethan~0 then may name(Exile non-token creature) name(Exile non-token creature) imprint target(creature[-token]) && all(this) transforms((,newability[evictpw/evictth cdaactive])) forever
auto=this(variable{hasevict}>=1) transforms((evicttypes))
auto=this(variable{hasevict}=0) transforms((,setpower=2,settoughness=4))
text=Imprint — When Duplicant enters the battlefield, you may exile target nontoken creature. -- As long as the exiled card is a creature card, Duplicant has that card's power, toughness, and creature types. It's still a Shapeshifter. text=Imprint — When Duplicant enters the battlefield, you may exile target nontoken creature. -- As long as the exiled card is a creature card, Duplicant has that card's power, toughness, and creature types. It's still a Shapeshifter.
mana={6} mana={6}
type=Artifact Creature type=Artifact Creature
@@ -29920,6 +29921,18 @@ power=2
toughness=2 toughness=2
[/card] [/card]
[card] [card]
name=Horde Ambusher
facedown={3}
autofacedown=aslongas(*[red]|myhand) {0}:name(Reveal red card and turn) morph
autofaceup=name(Creature can't block) target(creature) transforms((,newability[cantblock])) ueot
text=Whenever Horde Ambusher blocks, it deals 1 damage to you. -- Morph—Reveal a red card in your hand. (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Horde Ambusher is turned face up, target creature can't block this turn.
mana={1}{R}
type=Creature
subtype=Human Berserker
power=2
toughness=2
[/card]
[card]
name=Horizon Seeker name=Horizon Seeker
abilities=boast abilities=boast
auto={1}{G} restriction{didattack,compare(hascntbstreduce)~equalto~0}:doboast && target(land[basic]|mylibrary) moveto(myhand) and!( shuffle )! limit:hasabilitytwoboastplus1plusend auto={1}{G} restriction{didattack,compare(hascntbstreduce)~equalto~0}:doboast && target(land[basic]|mylibrary) moveto(myhand) and!( shuffle )! limit:hasabilitytwoboastplus1plusend
@@ -46277,6 +46290,17 @@ power=4
toughness=3 toughness=3
[/card] [/card]
[card] [card]
name=Pitchstone Wall
abilities=defender
auto=@discarded(*|myhand):may name(Sacrifice and put in hand) transforms((,newability[all(*[zpos=type:*:mygraveyard]|mygraveyard) moveto(myhand) && all(this) sacrifice])) oneshot
text=Defender (This creature can't attack.) -- Whenever you discard a card, you may sacrifice Pitchstone Wall. If you do, return the discarded card from your graveyard to your hand.
mana={2}{R}
type=Creature
subtype=Wall
power=2
toughness=5
[/card]
[card]
name=Pitiless Gorgon name=Pitiless Gorgon
abilities=deathtouch abilities=deathtouch
text=Deathtouch text=Deathtouch
@@ -46428,6 +46452,22 @@ mana={2}{R}
type=Enchantment type=Enchantment
[/card] [/card]
[card] [card]
name=Planar Overlay
auto=ability$!name(Return a swamp) name(Return a swamp) target(swamp|myBattlefield) moveto(ownerhand)!$ controller
auto=ability$!name(Return a swamp) name(Return a swamp) target(swamp|myBattlefield) moveto(ownerhand)!$ opponent
auto=ability$!name(Return a plains) name(Return a plains) target(plains|myBattlefield) moveto(ownerhand)!$ controller
auto=ability$!name(Return a plains) name(Return a plains) target(plains|myBattlefield) moveto(ownerhand)!$ opponent
auto=ability$!name(Return a forest) name(Return a forest) target(forest|myBattlefield) moveto(ownerhand)!$ controller
auto=ability$!name(Return a forest) name(Return a forest) target(forest|myBattlefield) moveto(ownerhand)!$ opponent
auto=ability$!name(Return an island) name(Return an island) target(island|myBattlefield) moveto(ownerhand)!$ controller
auto=ability$!name(Return an island) name(Return an island) target(island|myBattlefield) moveto(ownerhand)!$ opponent
auto=ability$!name(Return a mountain) name(Return a mountain) target(mountain|myBattlefield) moveto(ownerhand)!$ controller
auto=ability$!name(Return a mountain) name(Return a mountain) target(mountain|myBattlefield) moveto(ownerhand)!$ opponent
text=Each player chooses a land he or she controls of each basic land type. Return those lands to their owners' hands.
mana={2}{U}
type=Sorcery
[/card]
[card]
name=Planebound Accomplice name=Planebound Accomplice
auto={R}:may moveto(myBattlefield) target(planeswalker|myHand) && treason auto={R}:may moveto(myBattlefield) target(planeswalker|myHand) && treason
text={R}: You may put a planeswalker card from your hand onto the battlefield. Sacrifice it at the beginning of the next end step. text={R}: You may put a planeswalker card from your hand onto the battlefield. Sacrifice it at the beginning of the next end step.
@@ -46982,6 +47022,20 @@ power=1
toughness=4 toughness=4
[/card] [/card]
[card] [card]
name=Preacher
abilities=doesnotuntap
auto=@each my untap:if cantargetcard(*[tapped]|mybattlefield) then may name(Untap Preacher) name(Untap Preacher) untap
auto=@untapped(this) restriction{compare(hascntpreachereffect)~morethan~0}:name(Give back creature) transforms((,newability[removeallcounters(0/0.1.PreacherEffect)],newability[name(Give back creature) target(creature[counter{0/0.1.PreacherStolen}]|mybattlefield) moveto(opponentBattlefield) and!( counter(0/0.-1.PreacherStolen) )!])) oneshot
auto=@movedto(this|nonbattlezone) from(myBattlefield) restriction{compare(hascntpreachereffect)~morethan~0}:name(Give back creature) transforms((,newability[removeallcounters(0/0.1.PreacherEffect)],newability[name(Give back creature) target(creature[counter{0/0.1.PreacherStolen}]|mybattlefield) moveto(opponentBattlefield) and!( counter(0/0.-1.PreacherStolen) )!])) oneshot
auto=aslongas(creature|opponentBattlefield) {C(0/0,1,PreacherEffect)}{T}:name(Gain control) ability$!name(Give control) name(Give control) target(creature|mybattlefield) moveto(opponentbattlefield) and!( counter(0/0.1.PreacherStolen) )! !$ opponent
text=You may choose not to untap Preacher during your untap step. -- {T}: Gain control of target creature of an opponent's choice that he or she controls for as long as Preacher remains tapped.
mana={1}{W}{W}
type=Creature
subtype=Human Cleric
power=1
toughness=1
[/card]
[card]
name=Precipitous Drop name=Precipitous Drop
target=creature target=creature
auto=name(Venture into dungeon) all(this) transforms((,newability[if compare(type:*[nodngplr]:mybattlefieldplustype:*[nodngopp]:opponentbattlefieldplusend)~equalto~0 then name(Venture into dungeon) name(Venture into dungeon) transforms((,newability[if type(*[dungeon]|mycommandzone)~morethan~0 then name(Explore the dungeon) name(Explore the dungeon) all(*[dungeon]|mycommandzone) counter(0/0.1.Explore)],newability[if type(*[dungeon]|mycommandzone)~equalto~0 then name(Choose a new dungeon) name(Choose a new dungeon) target(*[dungeon]|mysideboard) moveTo(mycommandzone) and!( counter(0/0.1.Explore) )!])) oneshot])) oneshot auto=name(Venture into dungeon) all(this) transforms((,newability[if compare(type:*[nodngplr]:mybattlefieldplustype:*[nodngopp]:opponentbattlefieldplusend)~equalto~0 then name(Venture into dungeon) name(Venture into dungeon) transforms((,newability[if type(*[dungeon]|mycommandzone)~morethan~0 then name(Explore the dungeon) name(Explore the dungeon) all(*[dungeon]|mycommandzone) counter(0/0.1.Explore)],newability[if type(*[dungeon]|mycommandzone)~equalto~0 then name(Choose a new dungeon) name(Choose a new dungeon) target(*[dungeon]|mysideboard) moveTo(mycommandzone) and!( counter(0/0.1.Explore) )!])) oneshot])) oneshot
@@ -47046,6 +47100,13 @@ power=4
toughness=4 toughness=4
[/card] [/card]
[card] [card]
name=Predict
auto=chooseanameopp name(Mill opponent) all(*[zpos=1]|opponentLibrary) moveto(opponentGraveyard) and!( if cantargetcard(*[chosenname]|*) then draw:2 controller else draw:1 controller )! chooseend
text=Name a card, then put the top card of target player's library into his or her graveyard. If that card is the named card, you draw two cards. Otherwise, you draw a card.
mana={1}{U}
type=Instant
[/card]
[card]
name=Premature Burial name=Premature Burial
target=creature[-black] target=creature[-black]
auto=destroy auto=destroy
@@ -47268,6 +47329,18 @@ text=(Transforms from Primal Amulet.) -- {T}: Add one mana of any color to your
type=Land type=Land
[/card] [/card]
[card] [card]
name=Primal Whisperer
auto=foreach(Morph|myBattlefield) 2/2
facedown={3}
autofacedown={3}{G}:morph
text=Primal Whisperer gets +2/+2 for each face-down creature on the battlefield. -- Morph {3}{G} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)
mana={4}{G}
type=Creature
subtype=Elf Soldier
power=2
toughness=2
[/card]
[card]
name=Prime Speaker Vannifar name=Prime Speaker Vannifar
aicode=activate moveTo(myBattlefield) target(creature[manacost=storedmanacostplus1plusend]|mylibrary) aicode=activate moveTo(myBattlefield) target(creature[manacost=storedmanacostplus1plusend]|mylibrary)
auto={T}{S(creature|mybattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(creature[manacost=storedmanacostplus1plusend]|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!(activate castcard(putinplay))! afterrevealedend revealend asSorcery auto={T}{S(creature|mybattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(creature[manacost=storedmanacostplus1plusend]|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!(activate castcard(putinplay))! afterrevealedend revealend asSorcery
@@ -47287,6 +47360,42 @@ mana={5}{W}{B}
type=Legendary Sorcery type=Legendary Sorcery
[/card] [/card]
[card] [card]
name=Primitive Etchings
auto=@drawof(player) turnlimited:if type(creature[fresh]|myhand)~morethan~0 then draw:1 controller
text=Reveal the first card you draw each turn. Whenever you reveal a creature card this way, draw a card.
mana={2}{G}{G}
type=Enchantment
[/card]
[card]
name=Primitive Justice
restriction=type(artifact|battlefield)~morethan~0
kicker=multi{1}{RG}
auto=if spent({20}{R}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}) then life:19 else if spent({19}{R}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}) then life:18 else if spent({18}{R}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}) then life:17 else if spent({17}{R}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}) then life:16 else if spent({16}{R}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}) then life:15 else if spent({15}{R}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}) then life:14 else if spent({14}{R}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}) then life:13 else if spent({13}{R}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}) then life:12 else if spent({12}{R}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}) then life:11 else if spent({11}{R}{G}{G}{G}{G}{G}{G}{G}{G}{G}{G}) then life:10 else if spent({10}{R}{G}{G}{G}{G}{G}{G}{G}{G}{G}) then life:9 else if spent({9}{R}{G}{G}{G}{G}{G}{G}{G}{G}) then life:8 else if spent({8}{R}{G}{G}{G}{G}{G}{G}{G}) then life:7 else if spent({7}{R}{G}{G}{G}{G}{G}{G}) then life:6 else if spent({6}{R}{G}{G}{G}{G}{G}) then life:5 else if spent({5}{R}{G}{G}{G}{G}) then life:4 else if spent({4}{R}{G}{G}{G}) then life:3 else if spent({3}{R}{G}{G}) then life:2 else if spent({2}{R}{G}) then life:1
auto=if compare(kicked)~equalto~0 then name(Destroy 1 artifact) name(Destroy 1 artifact) target(artifact) destroy
auto=if compare(kicked)~equalto~1 then name(Destroy 2 artifacts) name(Destroy 2 artifacts) target(<2>artifact) destroy
auto=if compare(kicked)~equalto~2 then name(Destroy 3 artifacts) name(Destroy 3 artifacts) target(<3>artifact) destroy
auto=if compare(kicked)~equalto~3 then name(Destroy 4 artifacts) name(Destroy 4 artifacts) target(<4>artifact) destroy
auto=if compare(kicked)~equalto~4 then name(Destroy 5 artifacts) name(Destroy 5 artifacts) target(<5>artifact) destroy
auto=if compare(kicked)~equalto~5 then name(Destroy 6 artifacts) name(Destroy 6 artifacts) target(<6>artifact) destroy
auto=if compare(kicked)~equalto~6 then name(Destroy 7 artifacts) name(Destroy 7 artifacts) target(<7>artifact) destroy
auto=if compare(kicked)~equalto~7 then name(Destroy 8 artifacts) name(Destroy 8 artifacts) target(<8>artifact) destroy
auto=if compare(kicked)~equalto~8 then name(Destroy 9 artifacts) name(Destroy 9 artifacts) target(<9>artifact) destroy
auto=if compare(kicked)~equalto~9 then name(Destroy 10 artifacts) name(Destroy 10 artifacts) target(<10>artifact) destroy
auto=if compare(kicked)~equalto~10 then name(Destroy 11 artifacts) name(Destroy 11 artifacts) target(<11>artifact) destroy
auto=if compare(kicked)~equalto~11 then name(Destroy 12 artifacts) name(Destroy 12 artifacts) target(<12>artifact) destroy
auto=if compare(kicked)~equalto~12 then name(Destroy 13 artifacts) name(Destroy 13 artifacts) target(<13>artifact) destroy
auto=if compare(kicked)~equalto~13 then name(Destroy 14 artifacts) name(Destroy 14 artifacts) target(<14>artifact) destroy
auto=if compare(kicked)~equalto~14 then name(Destroy 15 artifacts) name(Destroy 15 artifacts) target(<15>artifact) destroy
auto=if compare(kicked)~equalto~15 then name(Destroy 16 artifacts) name(Destroy 16 artifacts) target(<16>artifact) destroy
auto=if compare(kicked)~equalto~16 then name(Destroy 17 artifacts) name(Destroy 17 artifacts) target(<17>artifact) destroy
auto=if compare(kicked)~equalto~17 then name(Destroy 18 artifacts) name(Destroy 18 artifacts) target(<18>artifact) destroy
auto=if compare(kicked)~equalto~18 then name(Destroy 19 artifacts) name(Destroy 19 artifacts) target(<19>artifact) destroy
auto=if compare(kicked)~morethan~18 then name(Destroy 20 artifacts) name(Destroy 20 artifacts) target(<20>*artifact) destroy
text=As an additional cost to cast Primitive Justice, you may pay {1}{R} and/or {1}{G} any number of times. -- Destroy target artifact. For each additional {1}{R} you paid, destroy another target artifact. For each additional {1}{G} you paid, destroy another target artifact, and you gain 1 life.
mana={1}{R}
type=Sorcery
[/card]
[card]
name=Primordial Wurm name=Primordial Wurm
mana={4}{G}{G} mana={4}{G}{G}
type=Creature type=Creature
@@ -47783,6 +47892,13 @@ type=Enchantment
subtype=Aura subtype=Aura
[/card] [/card]
[card] [card]
name=Psychic Miasma
auto=ability$!name(Discard a card) name(Discard a card) target(*|myhand) reject and!( if cantargetcard(*[land]|*) then target(Psychic Miasma|opponentgraveyard) moveto(ownerhand) )! !$ opponent
text=Target player discards a card. If a land card is discarded this way, return Psychic Miasma to its owner's hand.
mana={1}{B}
type=Sorcery
[/card]
[card]
name=Psychic Symbiont name=Psychic Symbiont
abilities=flying abilities=flying
auto=target(opponent) ability$!name(discard) reject notatarget(*|myhand)!$ && draw:1 auto=target(opponent) ability$!name(discard) reject notatarget(*|myhand)!$ && draw:1
@@ -52540,7 +52656,7 @@ toughness=2
name=Ruthless Ripper name=Ruthless Ripper
abilities=deathtouch abilities=deathtouch
facedown={3} facedown={3}
autofacedown={target(*[black]|myhand)}:morph autofacedown=aslongas(*[black]|myhand) {0}:name(Reveal black card and turn) morph
autofaceup=target(player) life:-2 autofaceup=target(player) life:-2
text=Deathtouch -- Morph—Reveal a black card in your hand. (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Ruthless Ripper is turned face up, target player loses 2 life. text=Deathtouch -- Morph—Reveal a black card in your hand. (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Ruthless Ripper is turned face up, target player loses 2 life.
mana={B} mana={B}
@@ -63617,6 +63733,18 @@ power=1
toughness=3 toughness=3
[/card] [/card]
[card] [card]
name=Temur Charger
facedown={3}
autofacedown=aslongas(*[green]|myhand) {0}:name(Reveal green card and turn) morph
autofaceup=name(Creature gains trample) target(creature) transforms((,newability[trample])) ueot
text=Morph—Reveal a green card in your hand. (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Temur Charger is turned face up, target creature gains trample until end of turn.
mana={1}{G}
type=Creature
subtype=Horse
power=3
toughness=1
[/card]
[card]
name=Tenacious Hunter name=Tenacious Hunter
auto=aslongas(creature[counter(-1/-1)]|battlefield) vigilance auto=aslongas(creature[counter(-1/-1)]|battlefield) vigilance
auto=aslongas(creature[counter(-1/-1)]|battlefield) deathtouch auto=aslongas(creature[counter(-1/-1)]|battlefield) deathtouch
@@ -70914,7 +71042,7 @@ toughness=5
name=Watcher of the Roost name=Watcher of the Roost
abilities=flying abilities=flying
facedown={3} facedown={3}
autofacedown={target(*[white]|myhand)}:morph autofacedown=aslongas(*[white]|myhand) {0}:name(Reveal white card and turn) morph
autofaceup=life:2 controller autofaceup=life:2 controller
text=Flying -- Morph—Reveal a white card in your hand. (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Watcher of the Roost is turned face up, you gain 2 life. text=Flying -- Morph—Reveal a white card in your hand. (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Watcher of the Roost is turned face up, you gain 2 life.
mana={2}{W} mana={2}{W}
@@ -4953,15 +4953,6 @@ mana={1}{W}
type=Instant type=Instant
[/card] [/card]
[card] [card]
name=Horde Ambusher
text=Whenever Horde Ambusher blocks, it deals 1 damage to you. -- Morph—Reveal a red card in your hand. (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Horde Ambusher is turned face up, target creature can't block this turn.
mana={1}{R}
type=Creature
subtype=Human Berserker
power=2
toughness=2
[/card]
[card]
name=Horobi's Whisper name=Horobi's Whisper
text=If you control a Swamp, destroy target nonblack creature. -- Splice onto Arcane—Exile four cards from your graveyard. (As you cast an Arcane spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card's effects to that spell.) text=If you control a Swamp, destroy target nonblack creature. -- Splice onto Arcane—Exile four cards from your graveyard. (As you cast an Arcane spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card's effects to that spell.)
mana={1}{B}{B} mana={1}{B}{B}
@@ -8398,16 +8389,6 @@ mana={U}{U}
type=Sorcery type=Sorcery
[/card] [/card]
[card] [card]
name=Pitchstone Wall
abilities=defender
text=Defender (This creature can't attack.) -- Whenever you discard a card, you may sacrifice Pitchstone Wall. If you do, return the discarded card from your graveyard to your hand.
mana={2}{R}
type=Creature
subtype=Wall
power=2
toughness=5
[/card]
[card]
name=Pithing Needle name=Pithing Needle
text=As Pithing Needle enters the battlefield, name a card. -- Activated abilities of sources with the chosen name can't be activated unless they're mana abilities. text=As Pithing Needle enters the battlefield, name a card. -- Activated abilities of sources with the chosen name can't be activated unless they're mana abilities.
mana={1} mana={1}
@@ -8420,12 +8401,6 @@ mana={6}{B}
type=Sorcery type=Sorcery
[/card] [/card]
[card] [card]
name=Planar Overlay
text=Each player chooses a land he or she controls of each basic land type. Return those lands to their owners' hands.
mana={2}{U}
type=Sorcery
[/card]
[card]
name=Planeswalker's Favor name=Planeswalker's Favor
text={3}{G}: Target opponent reveals a card at random from his or her hand. Target creature gets +X/+X until end of turn, where X is the revealed card's converted mana cost. text={3}{G}: Target opponent reveals a card at random from his or her hand. Target creature gets +X/+X until end of turn, where X is the revealed card's converted mana cost.
mana={2}{G} mana={2}{G}
@@ -8557,15 +8532,6 @@ mana={1}{B}{B}
type=Sorcery type=Sorcery
[/card] [/card]
[card] [card]
name=Preacher
text=You may choose not to untap Preacher during your untap step. -- {T}: Gain control of target creature of an opponent's choice that he or she controls for as long as Preacher remains tapped.
mana={1}{W}{W}
type=Creature
subtype=Human Cleric
power=1
toughness=1
[/card]
[card]
name=Precursor Golem name=Precursor Golem
text=When Precursor Golem enters the battlefield, put two 3/3 colorless Golem artifact creature tokens onto the battlefield. -- Whenever a player casts an instant or sorcery spell that targets only a single Golem, that player copies that spell for each other Golem that spell could target. Each copy targets a different one of those Golems. text=When Precursor Golem enters the battlefield, put two 3/3 colorless Golem artifact creature tokens onto the battlefield. -- Whenever a player casts an instant or sorcery spell that targets only a single Golem, that player copies that spell for each other Golem that spell could target. Each copy targets a different one of those Golems.
mana={5} mana={5}
@@ -8575,39 +8541,12 @@ power=3
toughness=3 toughness=3
[/card] [/card]
[card] [card]
name=Predict
text=Name a card, then put the top card of target player's library into his or her graveyard. If that card is the named card, you draw two cards. Otherwise, you draw a card.
mana={1}{U}
type=Instant
[/card]
[card]
name=Preferred Selection name=Preferred Selection
text=At the beginning of your upkeep, look at the top two cards of your library. You may sacrifice Preferred Selection and pay {2}{G}{G}. If you do, put one of those cards into your hand. If you don't, put one of those cards on the bottom of your library. text=At the beginning of your upkeep, look at the top two cards of your library. You may sacrifice Preferred Selection and pay {2}{G}{G}. If you do, put one of those cards into your hand. If you don't, put one of those cards on the bottom of your library.
mana={2}{G}{G} mana={2}{G}{G}
type=Enchantment type=Enchantment
[/card] [/card]
[card] [card]
name=Primal Whisperer
text=Primal Whisperer gets +2/+2 for each face-down creature on the battlefield. -- Morph {3}{G} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)
mana={4}{G}
type=Creature
subtype=Elf Soldier
power=2
toughness=2
[/card]
[card]
name=Primitive Etchings
text=Reveal the first card you draw each turn. Whenever you reveal a creature card this way, draw a card.
mana={2}{G}{G}
type=Enchantment
[/card]
[card]
name=Primitive Justice
text=As an additional cost to cast Primitive Justice, you may pay {1}{R} and/or {1}{G} any number of times. -- Destroy target artifact. For each additional {1}{R} you paid, destroy another target artifact. For each additional {1}{G} you paid, destroy another target artifact, and you gain 1 life.
mana={1}{R}
type=Sorcery
[/card]
[card]
name=Primordial Mist name=Primordial Mist
text=At the beginning of your end step, you may manifest the top card of your library. (Put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.) -- Exile a face-down permanent you control face up: You may play that card this turn. (You still pay its costs. Timing rules still apply.) text=At the beginning of your end step, you may manifest the top card of your library. (Put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.) -- Exile a face-down permanent you control face up: You may play that card this turn. (You still pay its costs. Timing rules still apply.)
mana={4}{U} mana={4}{U}
@@ -8693,12 +8632,6 @@ mana={3}{U}{B}
type=Sorcery type=Sorcery
[/card] [/card]
[card] [card]
name=Psychic Miasma
text=Target player discards a card. If a land card is discarded this way, return Psychic Miasma to its owner's hand.
mana={1}{B}
type=Sorcery
[/card]
[card]
name=Psychic Network name=Psychic Network
text=Each player reveals the top card of his or her library to all other players by continuously holding it against his or her forehead. This does not allow a player to look at his or her own card. (That card still counts as the top card of your library. Whenever you draw a card, draw that one and replace it with the next card of your library.) text=Each player reveals the top card of his or her library to all other players by continuously holding it against his or her forehead. This does not allow a player to look at his or her own card. (That card still counts as the top card of your library. Whenever you draw a card, draw that one and replace it with the next card of your library.)
mana={U} mana={U}
@@ -11511,15 +11444,7 @@ subtype=Licid
power=2 power=2
toughness=2 toughness=2
[/card] [/card]
[card]
name=Temur Charger
text=Morph—Reveal a green card in your hand. (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Temur Charger is turned face up, target creature gains trample until end of turn.
mana={1}{G}
type=Creature
subtype=Horse
power=3
toughness=1
[/card]
[card] [card]
name=Teremko Griffin name=Teremko Griffin
abilities=flying,banding abilities=flying,banding
+2 -1
View File
@@ -318,7 +318,8 @@ class Constants
PERPETUALDEATHTOUCH = 191, PERPETUALDEATHTOUCH = 191,
NONCOMBATVIGOR = 192, NONCOMBATVIGOR = 192,
NOMOVETRIGGER = 193, NOMOVETRIGGER = 193,
NB_BASIC_ABILITIES = 194, WASCOMMANDER = 194,
NB_BASIC_ABILITIES = 195,
RARITY_S = 'S', //Special Rarity RARITY_S = 'S', //Special Rarity
RARITY_M = 'M', //Mythics RARITY_M = 'M', //Mythics
+26 -5
View File
@@ -4564,9 +4564,16 @@ int AATurnSide::resolve()
if(sideCard->getManaCost()){ if(sideCard->getManaCost()){
if(_target->getManaCost()->getAlternative()){ if(_target->getManaCost()->getAlternative()){
sideCard->getManaCost()->setAlternative(NEW ManaCost()); sideCard->getManaCost()->setAlternative(NEW ManaCost());
sideCard->getManaCost()->getAlternative()->copy(_target->getManaCost()->getAlternative()); // Keep orignal alternative cost to cast card with other. sideCard->getManaCost()->getAlternative()->copy(_target->getManaCost()->getAlternative()); // Keep orignal alternative cost to cast the original card with other.
}
if(_target->getManaCost()->getMorph()){
sideCard->getManaCost()->setMorph(NEW ManaCost());
sideCard->getManaCost()->getMorph()->copy(_target->getManaCost()->getMorph()); // Keep orignal morph cost to cast the original card with morph.
} }
_target->getManaCost()->copy(sideCard->getManaCost()); // Show the other side cost mana symbols. _target->getManaCost()->copy(sideCard->getManaCost()); // Show the other side cost mana symbols.
if(_target->numofcastfromcommandzone > 0){ //In case you turn side of a previuosly casted commander
_target->getManaCost()->add(Constants::MTG_COLOR_ARTIFACT,2*_target->numofcastfromcommandzone);
}
} }
} else { } else {
fcard = MTGCollection()->getCardByName(_target->nameOrig); fcard = MTGCollection()->getCardByName(_target->nameOrig);
@@ -4579,6 +4586,13 @@ int AATurnSide::resolve()
if(sideCard->getManaCost()){ if(sideCard->getManaCost()){
_target->getManaCost()->resetCosts(); _target->getManaCost()->resetCosts();
_target->getManaCost()->copy(sideCard->getManaCost()); // Restore the original side cost mana symbols. _target->getManaCost()->copy(sideCard->getManaCost()); // Restore the original side cost mana symbols.
if(_target->numofcastfromcommandzone > 0){ //In case you turn side of a previuosly casted commander
_target->getManaCost()->add(Constants::MTG_COLOR_ARTIFACT,2*_target->numofcastfromcommandzone);
if(_target->getManaCost()->getAlternative())
_target->getManaCost()->getAlternative()->add(Constants::MTG_COLOR_ARTIFACT,2*_target->numofcastfromcommandzone);
if(_target->getManaCost()->getMorph())
_target->getManaCost()->getMorph()->add(Constants::MTG_COLOR_ARTIFACT,2*_target->numofcastfromcommandzone);
}
} }
} }
if(_target->owner->playMode != Player::MODE_TEST_SUITE) if(_target->owner->playMode != Player::MODE_TEST_SUITE)
@@ -4587,7 +4601,6 @@ int AATurnSide::resolve()
_target->setId = sideCard->setId; _target->setId = sideCard->setId;
} }
_target->power = sideCard->power; _target->power = sideCard->power;
_target->life = sideCard->life;
_target->toughness = sideCard->toughness; _target->toughness = sideCard->toughness;
_target->origpower = sideCard->origpower; _target->origpower = sideCard->origpower;
_target->origtoughness = sideCard->origtoughness; _target->origtoughness = sideCard->origtoughness;
@@ -4598,7 +4611,6 @@ int AATurnSide::resolve()
_target->formattedText = sideCard->formattedText; _target->formattedText = sideCard->formattedText;
_target->magicText = sideCard->magicText; _target->magicText = sideCard->magicText;
_target->colors = sideCard->colors; _target->colors = sideCard->colors;
_target->basicAbilities = sideCard->basicAbilities;
_target->isFlipped = !_target->isFlipped; _target->isFlipped = !_target->isFlipped;
_target->mPropertiesChangedSinceLastUpdate = true; _target->mPropertiesChangedSinceLastUpdate = true;
SAFE_DELETE(sideCard); SAFE_DELETE(sideCard);
@@ -4699,8 +4711,17 @@ int AAFlip::resolve()
_target->basicAbilities[i] = 1; _target->basicAbilities[i] = 1;
} }
SAFE_DELETE(myOrig); SAFE_DELETE(myOrig);
} else } else{
_target->basicAbilities = myFlip->model->data->basicAbilities; if(_target->has(Constants::ISCOMMANDER)){
_target->basicAbilities[Constants::WASCOMMANDER] = 1;
_target->basicAbilities[Constants::ISCOMMANDER] = 0;
}
for(size_t i = 0; i < _target->basicAbilities.size(); i++) {
if(i != Constants::WASCOMMANDER && i != Constants::GAINEDEXILEDEATH && i != Constants::GAINEDHANDDEATH && i != Constants::GAINEDDOUBLEFACEDEATH &&
i != Constants::DUNGEONCOMPLETED && i != Constants::PERPETUALDEATHTOUCH && i != Constants::PERPETUALLIFELINK)
_target->basicAbilities[i] = myFlip->model->data->basicAbilities[i]; // Try to keep the original special abilities on card flip.
}
}
cdaDamage = _target->damageCount; cdaDamage = _target->damageCount;
_target->copiedID = myFlip->getMTGId();//for copier _target->copiedID = myFlip->getMTGId();//for copier
if(_target->owner->playMode != Player::MODE_TEST_SUITE) if(_target->owner->playMode != Player::MODE_TEST_SUITE)
+6
View File
@@ -1061,6 +1061,12 @@ void GameObserver::gameStateBasedEffects()
MTGCardInstance * card = fl->cards[k]; MTGCardInstance * card = fl->cards[k];
card->fresh = 0; // Remove fresh attribute to cards put in library last turn card->fresh = 0; // Remove fresh attribute to cards put in library last turn
} }
MTGGameZone * fs = p->game->sideboard;
for (int k = 0; k < fs->nb_cards; k++)
{
MTGCardInstance * card = fs->cards[k];
card->fresh = 0; // Remove fresh attribute to cards put in sideboard last turn
}
} }
if (z->nb_cards == 0) if (z->nb_cards == 0)
{ {
+11 -4
View File
@@ -5450,7 +5450,15 @@ int AbilityFactory::getAbilities(vector<MTGAbility *> * v, Spell * spell, MTGCar
card->types.clear(); card->types.clear();
string cre = "Creature"; string cre = "Creature";
card->setType(cre.c_str()); card->setType(cre.c_str());
card->basicAbilities.reset(); if(card->has(Constants::ISCOMMANDER)){
card->basicAbilities[Constants::WASCOMMANDER] = 1;
card->basicAbilities[Constants::ISCOMMANDER] = 0;
}
for(size_t i = 0; i < card->basicAbilities.size(); i++) {
if(i != Constants::WASCOMMANDER && i != Constants::GAINEDEXILEDEATH && i != Constants::GAINEDHANDDEATH && i != Constants::GAINEDDOUBLEFACEDEATH &&
i != Constants::DUNGEONCOMPLETED && i != Constants::PERPETUALDEATHTOUCH && i != Constants::PERPETUALLIFELINK)
card->basicAbilities[i] = 0; // Try to keep the original special abilities on card morph.
}
card->getManaCost()->resetCosts(); card->getManaCost()->resetCosts();
} }
else if(card && !card->morphed && card->turningOver) else if(card && !card->morphed && card->turningOver)
@@ -5462,16 +5470,15 @@ int AbilityFactory::getAbilities(vector<MTGAbility *> * v, Spell * spell, MTGCar
card->name = card->model->data->name; card->name = card->model->data->name;
card->types = card->model->data->types; card->types = card->model->data->types;
card->colors = card->model->data->colors; card->colors = card->model->data->colors;
card->basicAbilities |= card->model->data->basicAbilities; card->basicAbilities |= card->model->data->basicAbilities;
card->basicAbilities[Constants::ISCOMMANDER] = card->basicAbilities[Constants::WASCOMMANDER];
card->basicAbilities[Constants::WASCOMMANDER] = 0;
ManaCost * copyCost = card->model->data->getManaCost(); ManaCost * copyCost = card->model->data->getManaCost();
card->getManaCost()->copy(copyCost); card->getManaCost()->copy(copyCost);
magicText = card->model->data->magicText; magicText = card->model->data->magicText;
string faceupC= card->magicTexts["faceup"]; string faceupC= card->magicTexts["faceup"];
magicText.append("\n"); magicText.append("\n");
magicText.append(faceupC); magicText.append(faceupC);
} }
else if(card && card->hasType(Subtypes::TYPE_EQUIPMENT) && card->target) else if(card && card->hasType(Subtypes::TYPE_EQUIPMENT) && card->target)
{ {
+2 -1
View File
@@ -224,7 +224,8 @@ const char* Constants::MTGBasicAbilities[] = {
"perpetuallifelink", //It gains lifelink perpetually "perpetuallifelink", //It gains lifelink perpetually
"perpetualdeathtouch", //It gains deathtouch perpetually "perpetualdeathtouch", //It gains deathtouch perpetually
"noncombatvigor", //instead of taking non-combat damage the source gains +1/+1 counters (e.g. Stormwild Capridor) "noncombatvigor", //instead of taking non-combat damage the source gains +1/+1 counters (e.g. Stormwild Capridor)
"nomovetrigger" //no trigger when playing these cards (e.g. fake ability cards such as Davriel Conditions, Davriel Offers, Annihilation Rooms) "nomovetrigger", //no trigger when playing these cards (e.g. fake ability cards such as Davriel Conditions, Davriel Offers, Annihilation Rooms)
"wascommander", //It was the current commander (e.g. after it flipped or morphed)
}; };
map<string,int> Constants::MTGBasicAbilitiesMap; map<string,int> Constants::MTGBasicAbilitiesMap;
+8 -5
View File
@@ -569,10 +569,13 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
} }
} }
//Commander is going back to Command Zone, so we recalculate cost according to how many times it has been casted from there. //Commander is going back to Command Zone, so we recalculate costs according to how many times it has been casted from there.
if(to == g->players[0]->game->commandzone || to == g->players[1]->game->commandzone){ if((to == g->players[0]->game->commandzone || to == g->players[1]->game->commandzone) && copy->numofcastfromcommandzone > 0){
for(int i = 0; i < copy->numofcastfromcommandzone; i++) copy->getManaCost()->add(Constants::MTG_COLOR_ARTIFACT,2*copy->numofcastfromcommandzone);
copy->getManaCost()->add(Constants::MTG_COLOR_ARTIFACT,2); if(copy->getManaCost()->getAlternative())
copy->getManaCost()->getAlternative()->add(Constants::MTG_COLOR_ARTIFACT,2*copy->numofcastfromcommandzone);
if(copy->getManaCost()->getMorph())
copy->getManaCost()->getMorph()->add(Constants::MTG_COLOR_ARTIFACT,2*copy->numofcastfromcommandzone);
} }
if (card->miracle) if (card->miracle)
@@ -871,7 +874,7 @@ MTGCardInstance * MTGGameZone::removeCard(MTGCardInstance * card, int createCopy
copy->storedSourceCard = card->storedSourceCard; copy->storedSourceCard = card->storedSourceCard;
copy->lastController = card->controller(); copy->lastController = card->controller();
copy->previousController = card->controller(); copy->previousController = card->controller();
copy->basicAbilities[Constants::ISCOMMANDER] = card->basicAbilities[Constants::ISCOMMANDER]; copy->basicAbilities[Constants::ISCOMMANDER] = (card->basicAbilities[Constants::ISCOMMANDER] | card->basicAbilities[Constants::WASCOMMANDER]);
copy->basicAbilities[Constants::GAINEDEXILEDEATH] = card->basicAbilities[Constants::GAINEDEXILEDEATH]; copy->basicAbilities[Constants::GAINEDEXILEDEATH] = card->basicAbilities[Constants::GAINEDEXILEDEATH];
copy->basicAbilities[Constants::GAINEDHANDDEATH] = card->basicAbilities[Constants::GAINEDHANDDEATH]; copy->basicAbilities[Constants::GAINEDHANDDEATH] = card->basicAbilities[Constants::GAINEDHANDDEATH];
copy->basicAbilities[Constants::GAINEDDOUBLEFACEDEATH] = card->basicAbilities[Constants::GAINEDDOUBLEFACEDEATH]; copy->basicAbilities[Constants::GAINEDDOUBLEFACEDEATH] = card->basicAbilities[Constants::GAINEDDOUBLEFACEDEATH];
+20 -9
View File
@@ -631,7 +631,7 @@ int MTGKickerRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
if(OptionKicker::KICKER_ALWAYS == options[Options::KICKERPAYMENT].number) if(OptionKicker::KICKER_ALWAYS == options[Options::KICKERPAYMENT].number)
return 0; return 0;
Player * player = game->currentlyActing(); Player * player = game->currentlyActing();
if (!player->game->hand->hasCard(card) && !player->game->graveyard->hasCard(card) && !player->game->exile->hasCard(card) && !player->game->library->hasCard(card)) if (!player->game->hand->hasCard(card) && !player->game->graveyard->hasCard(card) && !player->game->exile->hasCard(card) && !player->game->library->hasCard(card) && !game->currentlyActing()->game->commandzone->hasCard(card))
return 0; return 0;
if ((player->game->library->hasCard(card) && !card->canPlayFromLibrary()) || (player->game->graveyard->hasCard(card) && !card->has(Constants::CANPLAYFROMGRAVEYARD)) || (player->game->exile->hasCard(card) && !card->has(Constants::CANPLAYFROMEXILE))) if ((player->game->library->hasCard(card) && !card->canPlayFromLibrary()) || (player->game->graveyard->hasCard(card) && !card->has(Constants::CANPLAYFROMGRAVEYARD)) || (player->game->exile->hasCard(card) && !card->has(Constants::CANPLAYFROMEXILE)))
return 0; return 0;
@@ -822,7 +822,7 @@ int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *
{ {
alternateCost->extraCosts->costs[i]->setSource(card); alternateCost->extraCosts->costs[i]->setSource(card);
} }
if (!game->currentlyActing()->game->hand->hasCard(card) && !game->currentlyActing()->game->graveyard->hasCard(card) && !game->currentlyActing()->game->exile->hasCard(card) && !game->currentlyActing()->game->library->hasCard(card)) if (!game->currentlyActing()->game->hand->hasCard(card) && !game->currentlyActing()->game->graveyard->hasCard(card) && !game->currentlyActing()->game->exile->hasCard(card) && !game->currentlyActing()->game->library->hasCard(card) && !game->currentlyActing()->game->commandzone->hasCard(card))
return 0; return 0;
if ((game->currentlyActing()->game->library->hasCard(card) && !card->canPlayFromLibrary()) || (game->currentlyActing()->game->graveyard->hasCard(card) && !card->has(Constants::CANPLAYFROMGRAVEYARD)) || (game->currentlyActing()->game->exile->hasCard(card) && !card->has(Constants::CANPLAYFROMEXILE))) if ((game->currentlyActing()->game->library->hasCard(card) && !card->canPlayFromLibrary()) || (game->currentlyActing()->game->graveyard->hasCard(card) && !card->has(Constants::CANPLAYFROMGRAVEYARD)) || (game->currentlyActing()->game->exile->hasCard(card) && !card->has(Constants::CANPLAYFROMEXILE)))
return 0; return 0;
@@ -1466,7 +1466,7 @@ int MTGMorphCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
Player * player = game->currentlyActing(); Player * player = game->currentlyActing();
//Player * currentPlayer = game->currentPlayer; //Player * currentPlayer = game->currentPlayer;
if (!player->game->library->hasCard(card) && !player->game->graveyard->hasCard(card) && !player->game->exile->hasCard(card) && !player->game->hand->hasCard(card)) if (!player->game->library->hasCard(card) && !player->game->graveyard->hasCard(card) && !player->game->exile->hasCard(card) && !player->game->hand->hasCard(card) && !player->game->commandzone->hasCard(card))
return 0; return 0;
if ((!card->canPlayFromLibrary() && player->game->library->hasCard(card))||(!card->has(Constants::CANPLAYFROMGRAVEYARD) && player->game->graveyard->hasCard(card))||(!card->has(Constants::CANPLAYFROMEXILE) && player->game->exile->hasCard(card))) if ((!card->canPlayFromLibrary() && player->game->library->hasCard(card))||(!card->has(Constants::CANPLAYFROMGRAVEYARD) && player->game->graveyard->hasCard(card))||(!card->has(Constants::CANPLAYFROMEXILE) && player->game->exile->hasCard(card)))
return 0; return 0;
@@ -1512,11 +1512,10 @@ int MTGMorphCostRule::reactToClick(MTGCardInstance * card)
ManaCost * cost = card->getManaCost(); ManaCost * cost = card->getManaCost();
ManaCost * playerMana = player->getManaPool(); ManaCost * playerMana = player->getManaPool();
ManaCost * morph = card->getManaCost()->getMorph(); ManaCost * morph = card->getManaCost()->getMorph();
if(morph->extraCosts) if(morph->extraCosts){
for(unsigned int i = 0; i < morph->extraCosts->costs.size();i++) for(unsigned int i = 0; i < morph->extraCosts->costs.size();i++)
{ morph->extraCosts->costs[i]->setSource(card);
morph->extraCosts->costs[i]->setSource(card); }
}
//this handles extra cost payments at the moment a card is played. //this handles extra cost payments at the moment a card is played.
if (playerMana->canAfford(morph,card->has(Constants::ANYTYPEOFMANA))) if (playerMana->canAfford(morph,card->has(Constants::ANYTYPEOFMANA)))
{ {
@@ -1555,13 +1554,21 @@ int MTGMorphCostRule::reactToClick(MTGCardInstance * card)
card->getManaCost()->setManaUsedToCast(NEW ManaCost()); card->getManaCost()->setManaUsedToCast(NEW ManaCost());
card->getManaCost()->getManaUsedToCast()->copy(spellCost); card->getManaCost()->getManaUsedToCast()->copy(spellCost);
} }
int iscommander = card->has(Constants::ISCOMMANDER);
card->basicAbilities[Constants::ISCOMMANDER] = 0;//Morph is not a commander on stack
MTGCardInstance * copy = player->game->putInZone(card, card->currentZone, player->game->stack); MTGCardInstance * copy = player->game->putInZone(card, card->currentZone, player->game->stack);
if(iscommander > 0)
copy->basicAbilities[Constants::ISCOMMANDER] = 1;
copy->getManaCost()->resetCosts();//Morph has no ManaCost on stack copy->getManaCost()->resetCosts();//Morph has no ManaCost on stack
copy->setColor(0,1); copy->setColor(0,1);
copy->types.clear(); copy->types.clear();
string cre = "Creature"; string cre = "Creature";
copy->setType(cre.c_str()); copy->setType(cre.c_str());
copy->basicAbilities.reset(); for(size_t i = 0; i < copy->basicAbilities.size(); i++) {
if(i != Constants::ISCOMMANDER && i != Constants::GAINEDEXILEDEATH && i != Constants::GAINEDHANDDEATH && i != Constants::GAINEDDOUBLEFACEDEATH &&
i != Constants::DUNGEONCOMPLETED && i != Constants::PERPETUALDEATHTOUCH && i != Constants::PERPETUALLIFELINK)
copy->basicAbilities[i] = 0; // Try to keep the original special abilities on card morph.
}
Spell * spell = NULL; Spell * spell = NULL;
spell = game->mLayers->stackLayer()->addSpell(copy, NULL, spellCost, payResult, 0); spell = game->mLayers->stackLayer()->addSpell(copy, NULL, spellCost, payResult, 0);
spell->source->morphed = true; spell->source->morphed = true;
@@ -3432,6 +3439,10 @@ int MTGUnearthRule::receiveEvent(WEvent * event)
{ {
e->card->fresh = 1; e->card->fresh = 1;
} }
if (e->to == e->card->controller()->game->sideboard) // Apply fresh attribute for cards just put in sideboard
{
e->card->fresh = 1;
}
if (card && card->basicAbilities[(int)Constants::UNEARTH]) if (card && card->basicAbilities[(int)Constants::UNEARTH])
{ {
+2 -4
View File
@@ -262,7 +262,6 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
zones[nbzones++] = MTGGameZone::MY_LIBRARY; zones[nbzones++] = MTGGameZone::MY_LIBRARY;
zones[nbzones++] = MTGGameZone::MY_HAND; zones[nbzones++] = MTGGameZone::MY_HAND;
zones[nbzones++] = MTGGameZone::MY_EXILE; zones[nbzones++] = MTGGameZone::MY_EXILE;
zones[nbzones++] = MTGGameZone::MY_SIDEBOARD;
zones[nbzones++] = MTGGameZone::MY_COMMANDZONE; zones[nbzones++] = MTGGameZone::MY_COMMANDZONE;
} }
else if (zoneName.compare("myrestrictedcastingzone") == 0) else if (zoneName.compare("myrestrictedcastingzone") == 0)
@@ -276,7 +275,6 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
zones[nbzones++] = MTGGameZone::OPPONENT_LIBRARY; zones[nbzones++] = MTGGameZone::OPPONENT_LIBRARY;
zones[nbzones++] = MTGGameZone::OPPONENT_HAND; zones[nbzones++] = MTGGameZone::OPPONENT_HAND;
zones[nbzones++] = MTGGameZone::OPPONENT_EXILE; zones[nbzones++] = MTGGameZone::OPPONENT_EXILE;
zones[nbzones++] = MTGGameZone::OPPONENT_SIDEBOARD;
zones[nbzones++] = MTGGameZone::OPPONENT_COMMANDZONE; zones[nbzones++] = MTGGameZone::OPPONENT_COMMANDZONE;
} }
else if (zoneName.compare("opponentrestrictedcastingzone") == 0) else if (zoneName.compare("opponentrestrictedcastingzone") == 0)
@@ -2322,9 +2320,9 @@ bool EqpChooser::canTarget(Targetable * target,bool withoutProtections)
return false; return false;
if(!card->isInPlay(observer)) if(!card->isInPlay(observer))
return false; return false;
if(card->parentCards.size()) if(card->parentCards.size())
{ {
if((card->parentCards.at(0)) == source && (card->hasType(Subtypes::TYPE_EQUIPMENT))) if((card->parentCards.at(0)) == source && (card->hasType(Subtypes::TYPE_EQUIPMENT)))
return true; return true;
} }
return false; return false;