Merge branch 'master' into cmake

This commit is contained in:
xawotihs
2016-06-07 23:35:26 +02:00
34 changed files with 12994 additions and 2149 deletions
+427 -95
View File
@@ -937,6 +937,17 @@ text={T}: Add {1} to your mana pool. -- {T}: Add {W} or {U} to your mana pool. A
type=Land
[/card]
[card]
name=Adarkar Windform
abilities=flying
auto={1}{i}:-flying target(creature)
text=Flying -- {1}{S}i}: Target creature loses flying until end of turn. ({S}i} can be paid with one mana from a snow permanent.)
mana={4}{U}
type=Snow Creature
subtype=Illusion
power=3
toughness=3
[/card]
[card]
name=Addle
target=player
auto=chooseacolor target(*[chosencolor]|targetedpersonshand) reject chooseend
@@ -1501,11 +1512,23 @@ toughness=*
color=white
[/card]
[card]
name=Ajani Steadfast
auto=counter(0/0,4,loyalty)
auto={C(0/0,1,Loyalty)}:name(+1: add 1 loyalty) donothing restriction{compare(cantargetcre)~lessthan~1}
auto={C(0/0,1,Loyalty)}:name(+1: multi transform) target(creature) transforms((,newability[1/1],newability[vigilance],newability[first strike],newability[lifelink])) ueot restriction{compare(cantargetcre)~morethan~0}
auto={C(0/0,-2,Loyalty)}:name(-2: 1/1 counters) all(creature|mybattlefield) counter(1/1,1) && all(other planeswalker|mybattlefield) counter(0/0,1,Loyalty)
auto={C(0/0,-7,Loyalty)}:name(-7: emblem) emblem transforms((,newability[forcefield controller])) forever dontremove
text=+1: Until end of turn, up to one target creature gets +1/+1 and gains first strike, vigilance, and lifelink. -- -2: Put a +1/+1 counter on each creature you control and a loyalty counter on each other planeswalker you control. -- -7: You get an emblem with "If a source would deal damage to you or a planeswalker you control, prevent all but 1 of that damage."
mana={3}{W}
type=Planeswalker
subtype=Ajani
[/card]
[card]
name=Ajani Vengeant
auto=counter(0/0,3,loyalty)
auto={C(0/0,1,Loyalty)}:frozen target(*)
auto={C(0/0,-2,Loyalty)}:damage:3 target(creature,player) && life:3 controller
auto={C(0/0,-7,Loyalty)}:target(player) destroy all(land|targetedpersonsbattlefield)
auto={C(0/0,1,Loyalty)}:name(+1: tap and hold) frozen target(*)
auto={C(0/0,-2,Loyalty)}:name(-2: damage and gain life) damage:3 target(creature,player) && life:3 controller
auto={C(0/0,-7,Loyalty)}:name(-7: ultimate) target(player) destroy all(land|targetedpersonsbattlefield)
text=+1: Target permanent doesn't untap during its controller's next untap step. -- -2: Ajani Vengeant deals 3 damage to target creature or player and you gain 3 life. -- -7: Destroy all lands target player controls.
mana={2}{R}{W}
type=Planeswalker
@@ -1514,9 +1537,10 @@ subtype=Ajani
[card]
name=Ajani, Caller of the Pride
auto=counter(0/0,4,loyalty)
auto={C(0/0,1,Loyalty)}:name(add counter) ability$!target(creature|battlefield) counter(1/1,1)!$ controller
auto={C(0/0,-3,Loyalty)}:name(gain ability) flying && double strike target(creature|battlefield) ueot
auto={C(0/0,-8,Loyalty)}:token(Cat,Creature Cat,2/2,white)*lifetotal
auto={C(0/0,1,Loyalty)}:name(+1: add 1 loyalty) donothing restriction{compare(cantargetcre)~lessthan~1}
auto={C(0/0,1,Loyalty)}:name(+1: +1/+1 counter) target(creature|battlefield) counter(1/1,1) restriction{compare(cantargetcre)~morethan~0}
auto={C(0/0,-3,Loyalty)}:name(-3: double strike and flying) flying && double strike target(creature|battlefield) ueot
auto={C(0/0,-8,Loyalty)}:name(-8: ultimate) token(Cat,Creature Cat,2/2,white)*lifetotal
text=+1: Put a +1/+1 counter on up to one target creature. -- -3: Target creature gains flying and double strike until end of turn. -- -8: Put X 2/2 white Cat creature tokens onto the battlefield, where X is your life total.
mana={1}{W}{W}
type=Planeswalker
@@ -3641,8 +3665,8 @@ text=Multikicker (You may pay an additional any number of times as you cast thi
type=Creature
subtype=Bird
mana={2}{W}
power=1
toughness=1
power=2
toughness=2
[/card]
[card]
name=Aphetto Alchemist
@@ -4562,6 +4586,14 @@ power=2
toughness=5
[/card]
[card]
name=Ardent Plea
abilities=exalted
autostack=if casted(this) then cascade:plibrarycount
text=Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.) -- Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)
mana={1}{W}{U}
type=Enchantment
[/card]
[card]
name=Ardent Recruit
auto=aslongas(artifact|mybattlefield) 2/2 >2
text=Metalcraft - Ardent Recruit gets +2/+2 as long as you control three or more artifacts.
@@ -10364,6 +10396,17 @@ mana={2}{B}{G}
type=Enchantment
[/card]
[card]
name=Bloodbraid Elf
abilities=haste
autostack=if casted(this) then cascade:plibrarycount
text=Haste -- Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)
mana={2}{R}{G}
type=Creature
subtype=Elf Berserker
power=3
toughness=2
[/card]
[card]
name=Bloodchief Ascension
auto=@each endofturn foelost(2):may counter(0/0,1,Quest)
auto=@movedTo(*|opponentgraveyard):this(counter{0/0.3.Quest}) life:-2 opponent && this(counter{0/0.3.Quest}) life:2 controller
@@ -11712,6 +11755,16 @@ power=2
toughness=2
[/card]
[card]
name=Boreal Centaur
auto={i}:1/1 limit:1
text={S}i}: Boreal Centaur gets +1/+1 until end of turn. Activate this ability only once each turn. ({S}i} can be paid with one mana from a snow permanent.)
mana={1}{G}
type=Snow Creature
subtype=Centaur Warrior
power=2
toughness=2
[/card]
[card]
name=Boreal Druid
auto={T}:Add{1}
text={T}: Add {1} to your mana pool.
@@ -11722,6 +11775,17 @@ power=1
toughness=1
[/card]
[card]
name=Boreal Griffin
abilities=flying
auto={i}:first strike
text=Flying -- {S}i}: Boreal Griffin gains first strike until end of turn. ({S}i} can be paid with one mana from a snow permanent.)
mana={3}{W}{W}
type=Snow Creature
subtype=Griffin
power=3
toughness=2
[/card]
[card]
name=Boreal Shelf
auto=tap
auto={T}:Add{U}
@@ -14315,6 +14379,14 @@ mana={3}{U}{U}
type=Sorcery
[/card]
[card]
name=Captured Sunlight
autostack=if casted(this) then cascade:plibrarycount
auto=life:4 controller
text=Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.) -- You gain 4 life.
mana={2}{G}{W}
type=Sorcery
[/card]
[card]
name=Carapace
target=creature
auto=0/2
@@ -15838,9 +15910,9 @@ toughness=3
[card]
name=Chandra Ablaze
auto=counter(0/0,5,loyalty)
auto={C(0/0,1,Loyalty)}:name(discard a card) all(this) transforms((,newability[reject notatarget(*|myhand)],newability[@discarded(*[red]|myhand) once:damage:4 target(*[creature;player])])) ueot
auto={C(0/0,-2,Loyalty)}:name(discard hand) reject all(*|hand) && draw:3 all(player)
auto={C(0/0,-7,Loyalty)}:name(cast cards) castcard(restricted) target(<anyamount>*[instant;sorcery]|mygraveyard)
auto={C(0/0,1,Loyalty)}:name(+1: discard a card) all(this) transforms((,newability[reject notatarget(*|myhand)],newability[@discarded(*[red]|myhand) once:damage:4 target(*[creature;player])])) ueot
auto={C(0/0,-2,Loyalty)}:name(-2: discard hand) reject all(*|hand) && draw:3 all(player)
auto={C(0/0,-7,Loyalty)}:name(-7: cast cards) castcard(restricted) target(<anyamount>*[instant;sorcery]|mygraveyard)
text=+1: Discard a card. If a red card is discarded this way, Chandra Ablaze deals 4 damage to target creature or player. -- -2: Each player discards his or her hand, then draws three cards. -- -7: Cast any number of red instant and/or sorcery cards from your graveyard without paying their mana costs.
mana={4}{R}{R}
type=Planeswalker
@@ -15849,18 +15921,18 @@ subtype=Chandra
[card]
name=Chandra Nalaar
auto=counter(0/0,6,loyalty)
auto={C(0/0,1,Loyalty)}:name(1 damage to player) damage:1 target(player)
auto={C(0/0,-1,Loyalty)}:name(1 damage to creature) damage:1 target(creature)
auto={C(0/0,-2,Loyalty)}:name(2 damage to creature) damage:2 target(creature)
auto={C(0/0,-3,Loyalty)}:name(3 damage to creature) damage:3 target(creature)
auto={C(0/0,-4,Loyalty)}:name(4 damage to creature) damage:4 target(creature)
auto={C(0/0,-5,Loyalty)}:name(5 damage to creature) damage:5 target(creature)
auto={C(0/0,-6,Loyalty)}:name(6 damage to creature) damage:6 target(creature)
auto={C(0/0,-7,Loyalty)}:name(7 damage to creature) damage:7 target(creature)
auto={C(0/0,-8,Loyalty)}:name(8 damage to creature) damage:8 target(creature)
auto={C(0/0,-9,Loyalty)}:name(9 damage to creature) damage:9 target(creature)
auto={C(0/0,-10,Loyalty)}:name(10 damage to creature) damage:10 target(creature)
auto={C(0/0,-8,Loyalty)}:name(10 damage to player and all of his creatures) target(player) damage:10 && damage:10 all(creature|targetedpersonsbattlefield)
auto={C(0/0,1,Loyalty)}:name(+1: 1 damage to player) damage:1 target(player)
auto={C(0/0,-1,Loyalty)}:name(-1: 1 damage to creature) damage:1 target(creature)
auto={C(0/0,-2,Loyalty)}:name(-2: 2 damage to creature) damage:2 target(creature)
auto={C(0/0,-3,Loyalty)}:name(-3: 3 damage to creature) damage:3 target(creature)
auto={C(0/0,-4,Loyalty)}:name(-4: 4 damage to creature) damage:4 target(creature)
auto={C(0/0,-5,Loyalty)}:name(-5: 5 damage to creature) damage:5 target(creature)
auto={C(0/0,-6,Loyalty)}:name(-6: 6 damage to creature) damage:6 target(creature)
auto={C(0/0,-7,Loyalty)}:name(-7: 7 damage to creature) damage:7 target(creature)
auto={C(0/0,-8,Loyalty)}:name(-8: 8 damage to creature) damage:8 target(creature)
auto={C(0/0,-9,Loyalty)}:name(-9: 9 damage to creature) damage:9 target(creature)
auto={C(0/0,-10,Loyalty)}:name(-10: 10 damage to creature) damage:10 target(creature)
auto={C(0/0,-8,Loyalty)}:name(-8: 10 damage to player and all of his creatures) target(player) damage:10 && damage:10 all(creature|targetedpersonsbattlefield)
text=+1: Chandra Nalaar deals 1 damage to target player. -- -X: Chandra Nalaar deals X damage to target creature. -- -8: Chandra Nalaar deals 10 damage to target player and each creature he or she controls.
mana={3}{R}{R}
type=Planeswalker
@@ -16420,6 +16492,17 @@ power=1
toughness=1
[/card]
[card]
name=Chilling Shade
abilities=flying
auto={i}:1/1
text=Flying -- {S}i}: Chilling Shade gets +1/+1 until end of turn. ({S}i} can be paid with one mana from a snow permanent.)
mana={2}{B}
type=Snow Creature
subtype=Shade
power=1
toughness=1
[/card]
[card]
name=Chime of Night
target=creature
auto=@movedTo(this|graveyard) from(battlefield):destroy target(creature[-black])
@@ -23973,6 +24056,15 @@ mana={3}{B}{B}
type=Sorcery
[/card]
[card]
name=Demonic Dread
target=creature|battlefield
auto=cantblock
autostack=if casted(this) then cascade:plibrarycount
text=Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.) -- Target creature can't block this turn.
mana={1}{B}{R}
type=Sorcery
[/card]
[card]
name=Demonic Hordes
auto={T}:destroy target(land)
auto=upcostmulti[{B}{B}{B}] tap && ability$!name(sacrifice land) notatarget(land|opponentbattlefield) sacrifice!$ opponent
@@ -24087,6 +24179,15 @@ mana={1}{G}
type=Enchantment
[/card]
[card]
name=Deny Reality
target=*|battlefield
auto=moveTo(ownerhand)
autostack=if casted(this) then cascade:plibrarycount
text=Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.) -- Return target permanent to its owner's hand.
mana={3}{U}{B}
type=Sorcery
[/card]
[card]
name=Denying Wind
target=player
auto=moveto(exile) target(<upto:7>*|targetedpersonslibrary)
@@ -24691,6 +24792,17 @@ power=1
toughness=1
[/card]
[card]
name=Diamond Faerie
abilities=flying
auto={1}{i}:all(creature[snow]|mybattlefield) 1/1 ueot
text=Flying -- {1}{S}i}: Snow creatures you control get +1/+1 until end of turn. ({S}i} can be paid with one mana from a snow permanent.)
mana={2}{G}{W}{U}
type=Snow Creature
subtype=Faerie
power=3
toughness=3
[/card]
[card]
name=Diamond Kaleidoscope
auto={3}{T}:token(Prism,creature artifact prism, 0/1, artifact)
auto={S(prism|myBattlefield)}:Add{W}
@@ -29299,9 +29411,9 @@ toughness=3
[card]
name=Elspeth Tirel
auto=counter(0/0,4,loyalty)
auto={C(0/0,2,Loyalty)}:life:type:creature:mybattlefield
auto={C(0/0,-2,Loyalty)}:token(Soldier,Creature Soldier,1/1,white)*3
auto={C(0/0,-5,Loyalty)}:destroy all(other *[-land;-token])
auto={C(0/0,2,Loyalty)}:name(+2: gain life) life:type:creature:mybattlefield
auto={C(0/0,-2,Loyalty)}:name(-2: soldier) token(Soldier,Creature Soldier,1/1,white)*3
auto={C(0/0,-5,Loyalty)}:name(-5: ultimate) destroy all(other *[-land;-token])
text=+2: You gain 1 life for each creature you control. -- -2: Put three 1/1 white Soldier creature tokens onto the battlefield. -- -5: Destroy all other permanents except for lands and tokens.
mana={3}{W}{W}
type=Planeswalker
@@ -29310,9 +29422,9 @@ subtype=Elspeth
[card]
name=Elspeth, Knight-Errant
auto=counter(0/0,4,loyalty)
auto={C(0/0,1,Loyalty)}:token(Soldier,Creature Soldier,1/1,white)
auto={C(0/0,1,Loyalty)}:3/3 && flying target(creature)
auto={C(0/0,-8,Loyalty)}:name(emblem) emblem transforms((,newability[lord(*[artifact;creature;land;enchantment]|mybattlefield) indestructible])) forever dontremove
auto={C(0/0,1,Loyalty)}:name(+1: soldier) token(Soldier,Creature Soldier,1/1,white)
auto={C(0/0,1,Loyalty)}:name(+1: +3/+3 flying) 3/3 && flying target(creature)
auto={C(0/0,-8,Loyalty)}:name(-8: emblem) emblem transforms((,newability[lord(*[artifact;creature;land;enchantment]|mybattlefield) indestructible])) forever dontremove
text=+1: Put a 1/1 white Soldier creature token onto the battlefield. -- +1: Target creature gets +3/+3 and gains flying until end of turn. -- -8: For the rest of the game, artifacts, creatures, enchantments, and lands you control are indestructible.
mana={2}{W}{W}
type=Planeswalker
@@ -30536,6 +30648,16 @@ mana={W}
type=Instant
[/card]
[card]
name=Enlisted Wurm
autostack=if casted(this) then cascade:plibrarycount
text=Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)
mana={4}{G}{W}
type=Creature
subtype=Wurm
power=5
toughness=5
[/card]
[card]
name=Enormous Baloth
mana={6}{G}
type=Creature
@@ -31417,6 +31539,17 @@ power=4
toughness=3
[/card]
[card]
name=Etherium-Horn Sorcerer
auto={1}{U}{R}:moveto(ownerhand)
autostack=if casted(this) then cascade:plibrarycount
text={1}{U}{R}: Return Etherium-Horn Sorcerer to its owner's hand. -- Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)
mana={4}{U}{R}
type=Artifact Creature
subtype=Minotaur Wizard
power=3
toughness=6
[/card]
[card]
name=Etherium Abomination
autograveyard={1}{U}{B}:moveto(mybattlefield) && transforms((,unearth,haste)) asSorcery forever
text=Unearth {1}{U}{B} ({1}{U}{B}: Return this card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step or if it would leave the battlefield. Unearth only as a sorcery.)
@@ -36772,6 +36905,17 @@ power=5
toughness=3
[/card]
[card]
name=Frost Raptor
abilities=flying
auto={i}:shroud
text=Flying -- {S}i{S}i}: Frost Raptor gains shroud until end of turn. ({S}i} can be paid with one mana from a snow permanent.)
mana={2}{U}
type=Snow Creature
subtype=Bird
power=2
toughness=2
[/card]
[card]
name=Frost Walker
auto=@targeted(this):sacrifice
text=When Frost Walker becomes the target of a spell or ability, sacrifice it.
@@ -37572,10 +37716,10 @@ toughness=3
[card]
name=Garruk, Apex Predator
auto=counter(0/0,5,loyalty)
auto={C(0/0,1,Loyalty)}:name(destroy Planeswalker) destroy target(other planeswalker|battlefield)
auto={C(0/0,1,Loyalty)}:name(3/3 Beast) token(Beast,Creature Beast,3/3,deathtouch,black)
auto={C(0/0,-3,Loyalty)}:name(Destroy Creature) target(creature) dynamicability<!mytgt toughnesslifegain srccontroller!> && destroy
auto={C(0/0,-8,Loyalty)}:name(Emblem) emblem transforms((,newability[@combat(attacking) source(creature|mybattlefield):all(trigger[to]) 5/5 ueot],newability[@combat(attacking) source(creature|mybattlefield):all(trigger[to]) trample ueot])) forever dontremove
auto={C(0/0,1,Loyalty)}:name(+1: destroy Planeswalker) destroy target(other planeswalker|battlefield)
auto={C(0/0,1,Loyalty)}:name(+1: Beast) token(Beast,Creature Beast,3/3,deathtouch,black)
auto={C(0/0,-3,Loyalty)}:name(-3: Destroy creature) target(creature) dynamicability<!mytgt toughnesslifegain srccontroller!> && destroy
auto={C(0/0,-8,Loyalty)}:name(-8: Emblem) emblem transforms((,newability[@combat(attacking) source(creature|mybattlefield):all(trigger[to]) 5/5 ueot],newability[@combat(attacking) source(creature|mybattlefield):all(trigger[to]) trample ueot])) forever dontremove
text=+1: Destroy another target planeswalker. -- +1: Put a 3/3 black Beast creature token with deathtouch onto the battlefield. -- -3: Destroy target creature. You gain life equal to its toughness. -- -8: Target opponent gets an emblem with "Whenever a creature attacks you, it gets +5/+5 and gains trample until end of turn." -- Starting Loyalty {5}
mana={5}{B}{G}
type=Planeswalker
@@ -37584,9 +37728,9 @@ subtype=Garruk
[card]
name=Garruk, Primal Hunter
auto=counter(0/0,3,loyalty)
auto={C(0/0,1,Loyalty)}:token(Beast,Creature Beast,3/3,green)
auto={C(0/0,-3,Loyalty)}:draw:power:highest:*:mybattlefield
auto={C(0/0,-6,Loyalty)}:foreach(land|mybattlefield) token(-22010012)
auto={C(0/0,1,Loyalty)}:name(+1: beast) token(Beast,Creature Beast,3/3,green)
auto={C(0/0,-3,Loyalty)}:name(-3: draw) draw:power:highest:*:mybattlefield
auto={C(0/0,-6,Loyalty)}:name(-6: ultimate) foreach(land|mybattlefield) token(-22010012)
text=+1: Put a 3/3 green Beast creature token onto the battlefield. -- -3: Draw cards equal to the greatest power among creatures you control. -- -6: Put a 6/6 green Wurm creature token onto the battlefield for each land you control.
mana={2}{G}{G}{G}
type=Planeswalker
@@ -37605,8 +37749,8 @@ color=Green
name=Garruk Relentless
auto=counter(0/0,3,loyalty)
auto=this(counter{0/0.1.loyalty}<3) flip(Garruk the Veil-Cursed)
auto={0}:target(creature) dynamicability<!mytgt powerstrike tosrc!> damage:3
auto={0}:token(Wolf,Creature Wolf,2/2,green)
auto={0}:name(0: powerstrike) target(creature) dynamicability<!mytgt powerstrike tosrc!> damage:3
auto={0}:name(0: wolf) token(Wolf,Creature Wolf,2/2,green)
text=When Garruk Relentless has two or fewer loyalty counters on him, transform him. -- 0: Garruk Relentless deals 3 damage to target creature. That creature deals damage equal to its power to him. -- 0: Put a 2/2 green Wolf creature token onto the battlefield.
mana={3}{G}
type=Planeswalker
@@ -37614,9 +37758,9 @@ subtype=Garruk
[/card]
[card]
name=Garruk the Veil-Cursed
auto={C(0/0,1,Loyalty)}:token(Wolf,Creature Wolf,1/1,black,deathtouch)
auto={C(0/0,-1,Loyalty)}{S(creature|myBattlefield)}:name(fetch creature) moveTo(ownerhand) notatarget(creature|mylibrary)
auto={C(0/0,-3,Loyalty)}:all(creature|mybattlefield) trample ueot && all(creature|mybattlefield) foreach(creature|mygraveyard) 1/1 ueot
auto={C(0/0,1,Loyalty)}:name(+1: wolf) token(Wolf,Creature Wolf,1/1,black,deathtouch)
auto={C(0/0,-1,Loyalty)}{S(creature|myBattlefield)}:name(-1: fetch creature) moveTo(ownerhand) notatarget(creature|mylibrary)
auto={C(0/0,-3,Loyalty)}:name(-3: ultimate) all(creature|mybattlefield) trample ueot && all(creature|mybattlefield) foreach(creature|mygraveyard) 1/1 ueot
text=+1: Put a 1/1 black Wolf creature token with deathtouch onto the battlefield. -- -1: Sacrifice a creature. If you do, search your library for a creature card, reveal it, put it into your hand, then shuffle your library. -- -3: Creatures you control gain trample and get +X/+X until end of turn, where X is the number of creature cards in your graveyard.
type=Planeswalker
subtype=Garruk
@@ -37625,9 +37769,9 @@ subtype=Garruk
[card]
name=Garruk Wildspeaker
auto=counter(0/0,3,loyalty)
auto={C(0/0,1,Loyalty)}:untap target(<2>land)
auto={C(0/0,-1,Loyalty)}:token(Beast,Creature Beast,3/3,green)
auto={C(0/0,-4,Loyalty)}:all(creature|mybattlefield) 3/3 && all(creature|mybattlefield) trample
auto={C(0/0,1,Loyalty)}:name(+1: untap) untap target(<2>land)
auto={C(0/0,-1,Loyalty)}:name(-1: beast) token(Beast,Creature Beast,3/3,green)
auto={C(0/0,-4,Loyalty)}:name(-4: overrun) all(creature|mybattlefield) 3/3 && all(creature|mybattlefield) trample
text=+1: Untap two target lands. -- -1: Put a 3/3 green Beast creature token onto the battlefield. -- -4: Creatures you control get +3/+3 and gain trample until end of turn.
mana={2}{G}{G}
type=Planeswalker
@@ -37953,6 +38097,17 @@ power=0
toughness=1
[/card]
[card]
name=Gelid Shackles
target=creature
auto=cantblock
auto=noactivatedability
auto={i}:defender
text=Enchant creature -- Enchanted creature can't block and its activated abilities can't be activated. -- {S}i}: Enchanted creature gains defender until end of turn. ({S}i} can be paid with one mana from a snow permanent.)
mana={W}
type=Snow Enchantment
subtype=Aura
[/card]
[card]
name=Gemini Engine
auto=@combat(attacking) source(this):token(Twin,Gemini Creature,p/t,battleready) && all(Twin[gemini]|mybattlefield) phaseaction[combatends,sourceinplay] sacrifice
text=Whenever Gemini Engine attacks, put a colorless Construct artifact creature token named Twin onto the battlefield attacking. Its power is equal to Gemini Engine's power and its toughness is equal to Gemini Engine's toughness. Sacrifice the token at end of combat.
@@ -38922,9 +39077,9 @@ toughness=2
[card]
name=Gideon, Champion of Justice
auto=counter(0/0,4,loyalty)
auto={C(0/0,1,Loyalty)}:name(target opponent) target(opponent) deplete:0 && foreach(creature|targetedpersonsbattlefield) counter(0/0,1,loyalty) all(this)
auto={0}:transforms((Human Soldier Creature,setpower=counter{0%0.1.Loyalty},settoughness=counter{0%0.1.Loyalty},indestructible)) ueot && transforms((,newability[preventAllDamage to(this)])) ueot
auto={C(0/0,-15,Loyalty)}:name(exile other permanents) moveto(exile) all(other *)
auto={C(0/0,1,Loyalty)}:name(+1: target opponent) target(opponent) deplete:0 && foreach(creature|targetedpersonsbattlefield) counter(0/0,1,loyalty) all(this)
auto={0}:name(0: transform) transforms((Human Soldier Creature,setpower=counter{0%0.1.Loyalty},settoughness=counter{0%0.1.Loyalty},indestructible)) ueot && transforms((,newability[preventAllDamage to(this)])) ueot
auto={C(0/0,-15,Loyalty)}:name(-15: exile other permanents) moveto(exile) all(other *)
text=+1: Put a loyalty counter on Gideon, Champion of Justice for each creature target opponent controls. -- 0: Until end of turn, Gideon, Champion of Justice becomes an indestructible Human Soldier creature with power and toughness each equal to the number of loyalty counters on him. He's still a planeswalker. Prevent all damage that would be dealt to him this turn. -- -15: Exile all other permanents.
mana={2}{W}{W}
type=Planeswalker
@@ -40506,6 +40661,17 @@ power=2
toughness=2
[/card]
[card]
name=Goblin Rimerunner
auto={T}:cantblock target(creature)
auto={i}:haste
text={T}: Target creature can't block this turn. -- {S}i}: Goblin Rimerunner gains haste until end of turn. ({S}i} can be paid with one mana from a snow permanent.)
mana={2}{R}
type=Snow Creature
subtype=Goblin Warrior
power=2
toughness=2
[/card]
[card]
name=Goblin Rock Sled
abilities=trample,cantattack
auto=@combat(attacking) source(this):frozen
@@ -50049,9 +50215,9 @@ type=Artifact
[card]
name=Jace Beleren
auto=counter(0/0,3,loyalty)
auto={C(0/0,2,Loyalty)}:draw:1 controller && draw:1 opponent
auto={C(0/0,-1,Loyalty)}:draw:1 target(player)
auto={C(0/0,-10,Loyalty)}:deplete:20 target(player)
auto={C(0/0,2,Loyalty)}:name(+2: each player draw) draw:1 controller && draw:1 opponent
auto={C(0/0,-1,Loyalty)}:name(-1: draw 1) draw:1 target(player)
auto={C(0/0,-10,Loyalty)}:name(-10: deplete 20) deplete:20 target(player)
text=+2: Each player draws a card. -- -1: Target player draws a card. -- -10: Target player puts the top twenty cards of his or her library into his or her graveyard.
mana={1}{U}{U}
type=Planeswalker
@@ -50060,9 +50226,9 @@ subtype=Jace
[card]
name=Jace, Memory Adept
auto=counter(0/0,4,loyalty)
auto={C(0/0,1,Loyalty)}:deplete:1 target(player) && draw:1 controller
auto={0}:deplete:10 target(player)
auto={C(0/0,-7,Loyalty)}:target(<anyamount>player) draw:20
auto={C(0/0,1,Loyalty)}:name(+1: deplete) deplete:1 target(player) && draw:1 controller
auto={0}:name(0: deplete 10) deplete:10 target(player)
auto={C(0/0,-7,Loyalty)}:name(-7: draw 20) target(<anyamount>player) draw:20
text=+1: Draw a card. Target player puts the top card of his or her library into his or her graveyard. -- 0: Target player puts the top ten cards of his or her library into his or her graveyard. -- -7: Any number of target players each draw twenty cards.
mana={3}{U}{U}
type=Planeswalker
@@ -52074,6 +52240,18 @@ power=2
toughness=2
[/card]
[card]
name=Kathari Remnant
abilities=flying
auto={B}:regenerate
autostack=if casted(this) then cascade:plibrarycount
text=Flying -- {B}: Regenerate Kathari Remnant. -- Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)
mana={2}{U}{B}
type=Creature
subtype=Bird Skeleton
power=0
toughness=1
[/card]
[card]
name=Kathari Screecher
abilities=flying
autograveyard={2}{U}:moveto(mybattlefield) && transforms((,unearth,haste)) asSorcery forever
@@ -53071,7 +53249,7 @@ name=Kiora, the Crashing Wave
auto=counter(0/0,2,loyalty)
auto={C(0/0,1,Loyalty)}:name(+1: Prevention) target(*|opponentbattlefield) transforms((,newability[preventalldamage from(this)],newability[preventalldamage to(this)])) uynt
auto={C(0/0,-1,Loyalty)}:name(-1: Draw 1 and Lands +1) draw:1 controller && maxPlay(land)+1 ueot
auto={C(0/0,-5,Loyalty)}:emblem name(-5: Emblem) transforms((,newability[@each my endofturn:token(-378521) controller])) forever dontremove
auto={C(0/0,-5,Loyalty)}:name(-5: Emblem) emblem transforms((,newability[@each my endofturn:token(-378521) controller])) forever dontremove
text=+1: Until your next turn, prevent all damage that would be dealt to and dealt by target permanent an opponent controls. -- -1: Draw a card. You may play an additional land this turn. -- -5: You get an emblem with "At the beginning of your end step, put a 9/9 blue Kraken creature token onto the battlefield." -- Starting Loyalty (2)
mana={2}{G}{U}
type=Planeswalker
@@ -54187,9 +54365,9 @@ type=Land
[card]
name=Koth of the Hammer
auto=counter(0/0,3,loyalty)
auto={C(0/0,1,Loyalty)}:untap target(mountain) && transforms((Elemental Creature,setpower=4,settoughness=4,red)) ueot
auto={C(0/0,-2,Loyalty)}:foreach(mountain|myBattlefield) add{R}
auto={C(0/0,-5,Loyalty)}:name(emblem) emblem transforms((,newability[lord(mountain|mybattlefield) {t}:damage:1 target(creature)],newability[lord(mountain|mybattlefield) {t}:damage:1 target(player)])) forever dontremove
auto={C(0/0,1,Loyalty)}:name(+1: untap) untap target(mountain) && transforms((Elemental Creature,setpower=4,settoughness=4,red)) ueot
auto={C(0/0,-2,Loyalty)}:name(-2: add mana) foreach(mountain|myBattlefield) add{R}
auto={C(0/0,-5,Loyalty)}:name(-5: emblem) emblem transforms((,newability[lord(mountain|mybattlefield) {t}:damage:1 target(creature)],newability[lord(mountain|mybattlefield) {t}:damage:1 target(player)])) forever dontremove
text=+1: Untap target Mountain. It becomes a 4/4 red Elemental creature until end of turn. It's still a land. -- -2: Add {R} to your mana pool for each Mountain you control. -- -5: You get an emblem with "Mountains you control have '{T}: This land deals 1 damage to target creature or player.'"
mana={2}{R}{R}
type=Planeswalker
@@ -56799,9 +56977,9 @@ toughness=4
[card]
name=Liliana Vess
auto=counter(0/0,5,loyalty)
auto={C(0/0,1,Loyalty)}:target(player) ability$!name(discard) target(*|myhand) reject!$ targetedplayer
auto={C(0/0,-2,Loyalty)}:target(*|mylibrary) moveTo(library)
auto={C(0/0,-8,Loyalty)}:moveTo(mybattlefield) all(creature|graveyard)
auto={C(0/0,1,Loyalty)}:name(+1: discard) target(player) ability$!name(discard) target(*|myhand) reject!$ targetedplayer
auto={C(0/0,-2,Loyalty)}:name(-2: fetch) target(*|mylibrary) moveTo(library)
auto={C(0/0,-8,Loyalty)}:name(-8: reanimate) moveTo(mybattlefield) all(creature|graveyard)
text=+1: Target player discards a card. -- -2: Search your library for a card, then shuffle your library and put that card on top of it. -- -8: Put all creature cards in all graveyards onto the battlefield under your control.
mana={3}{B}{B}
type=Planeswalker
@@ -56810,9 +56988,9 @@ subtype=Liliana
[card]
name=Liliana of the Dark Realms
auto=counter(0/0,3,loyalty)
auto={C(0/0,1,Loyalty)}:name(fetch) moveTo(hand) target(swamp|myLibrary)
auto={C(0/0,-3,Loyalty)}:name(choose) ability$!choice name(+X/+X) target(creature) type:land:mybattlefield/type:land:mybattlefield ueot _ choice name(-X/-X) target(creature) -type:land:mybattlefield/-type:land:mybattlefield ueot!$ controller
auto={C(0/0,-6,Loyalty)}:name(emblem) emblem transforms((,newability[lord(swamp|mybattlefield) {T}:add{B}{B}{B}{B}])) forever dontremove
auto={C(0/0,1,Loyalty)}:name(+1: fetch) moveTo(hand) target(swamp|myLibrary)
auto={C(0/0,-3,Loyalty)}:name(-3: choose) ability$!choice name(+X/+X) target(creature) type:land:mybattlefield/type:land:mybattlefield ueot _ choice name(-X/-X) target(creature) -type:land:mybattlefield/-type:land:mybattlefield ueot!$ controller
auto={C(0/0,-6,Loyalty)}:name(-6: emblem) emblem transforms((,newability[lord(swamp|mybattlefield) {T}:add{B}{B}{B}{B}])) forever dontremove
text=+1: Search your library for a Swamp card, reveal it, and put it into your hand. Then shuffle your library. -- -3: Target creature gets +X/+X or -X/-X until end of turn, where X is the number of Swamps you control. -- -6: You get an emblem with "Swamps you control have '{T}: Add {B}{B}{B}{B} to your mana pool.'"
mana={2}{B}{B}
type=Planeswalker
@@ -58597,6 +58775,13 @@ power=5
toughness=6
[/card]
[card]
name=Maelstrom Nexus
auto=@movedto(*|mystack) restriction{thisturn(*|mystack)~lessthan~2}:all(trigger[to]) transforms((,newability[cascade:plibrarycount])) ueot
text=The first spell you cast each turn has cascade. (When you cast your first spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)
mana={W}{U}{B}{R}{G}
type=Enchantment
[/card]
[card]
name=Maelstrom Pulse
target=*[-land]
auto=all(*[share!name!]) destroy
@@ -67285,9 +67470,9 @@ toughness=7
[card]
name=Nicol Bolas, Planeswalker
auto=counter(0/0,5,loyalty)
auto={C(0/0,3,Loyalty)}:destroy target(*[-creature]|battlefield)
auto={C(0/0,-2,Loyalty)}:name(gain control) moveTo(mybattlefield) target(creature)
auto={C(0/0,-9,Loyalty)}:target(player) damage:7 && all(this) transforms((,newability[ability$!notatarget(<7>*|mybattlefield) sacrifice!$ targetedplayer],newability[ability$!notatarget(<7>*|myhand) reject!$ targetedplayer]))
auto={C(0/0,3,Loyalty)}:name(+3: destroy) destroy target(*[-creature]|battlefield)
auto={C(0/0,-2,Loyalty)}:name(-2: gain control) moveTo(mybattlefield) target(creature)
auto={C(0/0,-9,Loyalty)}:name(-9: ultimate) target(player) damage:7 && all(this) transforms((,newability[ability$!notatarget(<7>*|mybattlefield) sacrifice!$ targetedplayer],newability[ability$!notatarget(<7>*|myhand) reject!$ targetedplayer]))
text=+3: Destroy target noncreature permanent. -- -2: Gain control of target creature. -- -9: Nicol Bolas, Planeswalker deals 7 damage to target player. That player discards seven cards, then sacrifices seven permanents.
mana={4}{U}{B}{B}{R}
type=Planeswalker
@@ -67799,9 +67984,9 @@ mana={4}{B}{B}
[card]
name=Nissa, Worldwaker
auto=counter(0/0,3,loyalty)
auto={C(0/0,1,Loyalty)}:name(land becomes 4/4) target(land|mybattlefield) becomes(Elemental Creature,4/4,trample) forever
auto={C(0/0,1,Loyalty)}:name(untap up to 4 forest) target(<upto:4>forest|mybattlefield) untap
auto={C(0/0,-7,Loyalty)}:name(search Lands) moveTo(mybattlefield) target(<anyamount>land[basic]|mylibrary) and!( becomes(Elemental Creature,4/4,trample) forever )! oneshot
auto={C(0/0,1,Loyalty)}:name(+1: land becomes 4/4) target(land|mybattlefield) becomes(Elemental Creature,4/4,trample) forever
auto={C(0/0,1,Loyalty)}:name(+1: untap up to 4 forest) target(<upto:4>forest|mybattlefield) untap
auto={C(0/0,-7,Loyalty)}:name(-7: search Lands) moveTo(mybattlefield) target(<anyamount>land[basic]|mylibrary) and!( becomes(Elemental Creature,4/4,trample) forever )! oneshot
text=+1: Target land you control becomes a 4/4 Elemental creature with trample. It's still a land. -- +1: Untap up to four target Forests. -- -7: Search your library for any number of basic land cards, put them onto the battlefield, then shuffle your library. Those lands become 4/4 Elemental creatures with trample. They're still lands.
mana={3}{G}{G}
type=Planeswalker
@@ -67810,9 +67995,9 @@ subtype=Nissa
[card]
name=Nissa Revane
auto=counter(0/0,2,loyalty)
auto={C(0/0,1,Loyalty)}:moveTo(mybattlefield) target(Nissa's Chosen|mylibrary)
auto={C(0/0,1,Loyalty)}:life:twicetype:elf:mybattlefield controller
auto={C(0/0,-7,Loyalty)}:moveTo(mybattlefield) target(<anyamount>creature[elf]|mylibrary)
auto={C(0/0,1,Loyalty)}:name(+1: fetch) moveTo(mybattlefield) target(Nissa's Chosen|mylibrary)
auto={C(0/0,1,Loyalty)}:name(+1: gain life) life:twicetype:elf:mybattlefield controller
auto={C(0/0,-7,Loyalty)}:name(-7: ultimate) moveTo(mybattlefield) target(<anyamount>creature[elf]|mylibrary)
text=+1: Search your library for a card named Nissa's Chosen and put it onto the battlefield. Then shuffle your library. -- +1: You gain 2 life for each Elf you control. -- -7: Search your library for any number of Elf creature cards and put them onto the battlefield. Then shuffle your library.
mana={2}{G}{G}
type=Planeswalker
@@ -69101,6 +69286,16 @@ power=1
toughness=3
[/card]
[card]
name=Ohran Yeti
auto={2}{i}:first strike target(creature[snow])
text={2}{S}i}: Target snow creature gains first strike until end of turn. ({S}i} can be paid with one mana from a snow permanent.)
mana={3}{R}
type=Snow Creature
subtype=Yeti
power=3
toughness=3
[/card]
[card]
name=Ojutai, Soul of Winter
abilities=flying,vigilance
auto=@combat(attacking) source(dragon|mybattlefield):name(tap & Freeze) target(*[-land]|opponentbattlefield) transforms((,newability[tap],newability[frozen])) uynt
@@ -72812,6 +73007,17 @@ power=7
toughness=7
[/card]
[card]
name=Phyrexian Ironfoot
auto=doesnotuntap
auto={1}{i}:untap
text=Phyrexian Ironfoot doesn't untap during your untap step. -- {1}{S}i}: Untap Phyrexian Ironfoot. ({S}i} can be paid with one mana from a snow permanent.)
mana={3}
type=Snow Artifact Creature
subtype=Construct
power=3
toughness=4
[/card]
[card]
name=Phyrexian Lens
auto={L}{T}:Add{W}
auto={L}{T}:Add{U}
@@ -72954,6 +73160,17 @@ power=2
toughness=2
[/card]
[card]
name=Phyrexian Snowcrusher
abilities=mustattack
auto={1}{i}:1/0
text=Phyrexian Snowcrusher attacks each turn if able. -- {1}{S}i}: Phyrexian Snowcrusher gets +1/+0 until end of turn. ({S}i} can be paid with one mana from a snow permanent.)
mana={6}
type=Snow Artifact Creature
subtype=Juggernaut
power=6
toughness=5
[/card]
[card]
name=Phyrexian Soulgorger
auto=cumulativeupcost[{S(creature|myBattlefield)}] sacrifice
text=Cumulative upkeep - Sacrifice a creature. (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.)
@@ -73862,6 +74079,16 @@ power=4
toughness=4
[/card]
[card]
name=Platinum Emperion
abilities=cantchangelife
mana={8}
type=Artifact Creature
subtype=Golem
power=8
toughness=8
text=Your life total can't change. (You can't gain or lose life. You can't pay any amount of life except 0.)
[/card]
[card]
name=Plaxcaster Frogling
auto=counter(1/1,3)
auto={2}:shroud target(creature[counter{1/1.1}])
@@ -77358,9 +77585,10 @@ type=Sorcery
[/card]
[card]
name=Ral Zarek
auto={C(0/0,1,Loyalty)}:tap target(*) && ability$!untap target(*)!$ controller
auto={C(0/0,-2,Loyalty)}:damage:3 target(creature,player)
auto={C(0/0,-7,Loyalty)}:flipacoin winability turns:+1 controller winabilityend flipend && flipacoin winability turns:+1 controller winabilityend flipend && flipacoin winability turns:+1 controller winabilityend flipend && flipacoin winability turns:+1 controller winabilityend flipend && flipacoin winability turns:+1 controller winabilityend flipend
auto=counter(0/0,4,loyalty)
auto={C(0/0,1,Loyalty)}:name(+1: tap and untap) tap target(*) && ability$!untap target(*)!$ controller
auto={C(0/0,-2,Loyalty)}:name(-2: 3 damage) damage:3 target(creature,player)
auto={C(0/0,-7,Loyalty)}:name(-7: ultimate) flipacoin winability turns:+1 controller winabilityend flipend && flipacoin winability turns:+1 controller winabilityend flipend && flipacoin winability turns:+1 controller winabilityend flipend && flipacoin winability turns:+1 controller winabilityend flipend && flipacoin winability turns:+1 controller winabilityend flipend
text=+1: Tap target permanent, then untap another target permanent. -- -2: Ral Zarek deals 3 damage to target creature or player. -- -7: Flip five coins. Take an extra turn after this one for each coin that comes up heads.
mana={2}{U}{R}
type=Planeswalker
@@ -80548,6 +80776,51 @@ power=1
toughness=2
[/card]
[card]
name=Rime Transfusion
target=creature
auto=2/1
auto=teach(creature) {i}:cantbeblockedby(creature[-snow]) ueot
text=Enchant creature -- Enchanted creature gets +2/+1 and has "{S}i}: This creature can't be blocked this turn except by snow creatures." ({S}i} can be paid with one mana from a snow permanent.)
mana={1}{B}
type=Snow Enchantment
subtype=Aura
[/card]
[card]
name=Rimebound Dead
auto={i}:regenerate
text={S}i}: Regenerate Rimebound Dead. ({S}i} can be paid with one mana from a snow permanent.)
mana={B}
type=Snow Creature
subtype=Skeleton
power=1
toughness=1
[/card]
[card]
name=Rimefeather Owl
abilities=flying
anyzone=type:snow:battlefield/type:snow:battlefield cdaactive
auto={1}{i}:counter(0/0,1,Ice) target(*)
auto=lord(*[counter{0/0.1.Ice}]) transforms((snow))
text=Flying -- Rimefeather Owl's power and toughness are each equal to the number of snow permanents on the battlefield. -- {1}{S}i}: Put an ice counter on target permanent. -- Permanents with ice counters on them are snow.
mana={5}{U}{U}
type=Snow Creature
subtype=Bird
power=*
toughness=*
[/card]
[card]
name=Rimescale Dragon
abilities=flying
auto={2}{i}:name(tap) target(creature) transforms((,newability[counter(0/0.1.Ice)]))
auto=lord(creature[counter{0/0.1.Ice}]) doesnotuntap
text=Flying -- {2}{S}i}: Tap target creature and put an ice counter on it. ({S}i} can be paid with one mana from a snow permanent.) -- Creatures with ice counters on them don't untap during their controllers' untap steps.
mana={5}{R}{R}
type=Snow Creature
subtype=Dragon
power=5
toughness=5
[/card]
[card]
name=Rimewind Taskmage
auto=aslongas(*[snow]|myBattlefield) {1}{T}:tap target(*) >3
auto=aslongas(*[snow]|myBattlefield) {1}{T}:untap target(*) >3
@@ -83759,9 +84032,9 @@ toughness=1
[card]
name=Sarkhan Vol
auto=counter(0/0,4,loyalty)
auto={C(0/0,1,Loyalty)}:all(creature|mybattlefield) 1/1 && all(creature|mybattlefield) haste
auto={C(0/0,-2,Loyalty)}:target(creature) transforms((,newability[moveTo(opponentbattlefield)],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot
auto={C(0/0,-6,Loyalty)}:token(Dragon,Creature Dragon,4/4,red,flying)*5
auto={C(0/0,1,Loyalty)}:name(+1: +1/+1 haste) all(creature|mybattlefield) 1/1 && all(creature|mybattlefield) haste
auto={C(0/0,-2,Loyalty)}:name(-2: gain control) target(creature) transforms((,newability[moveTo(opponentbattlefield)],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot
auto={C(0/0,-6,Loyalty)}:name(-6: 5 Dragons) token(Dragon,Creature Dragon,4/4,red,flying)*5
text=+1: Creatures you control get +1/+1 and gain haste until end of turn. -- -2: Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. -- -6: Put five 4/4 red Dragon creature tokens with flying onto the battlefield.
mana={2}{R}{G}
type=Planeswalker
@@ -87562,6 +87835,16 @@ power=4
toughness=4
[/card]
[card]
name=Shardless Agent
autostack=if casted(this) then cascade:plibrarycount
text=Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)
mana={1}{G}{U}
type=Artifact Creature
subtype=Human Rogue
power=2
toughness=2
[/card]
[card]
name=Shared Discovery
auto=draw:3
text=As an additional cost to cast Shared Discovery, tap four untapped creatures you control. -- Draw three cards.
@@ -92768,9 +93051,9 @@ type=Sorcery
[card]
name=Sorin, Lord of Innistrad
auto=counter(0/0,3,loyalty)
auto={C(0/0,1,Loyalty)}:token(Vampire,Creature Vampire,1/1,black,lifelink)
auto={C(0/0,-2,Loyalty)}:name(emblem) emblem transforms((,newability[lord(creature|mybattlefield) 1/0])) forever dontremove
auto={C(0/0,-6,Loyalty)}:target(<upto:3>other creature,planeswalker) destroy and!(moveto(mybattlefield))!
auto={C(0/0,1,Loyalty)}:name(+1: vampire token) token(Vampire,Creature Vampire,1/1,black,lifelink)
auto={C(0/0,-2,Loyalty)}:name(-2: emblem) emblem transforms((,newability[lord(creature|mybattlefield) 1/0])) forever dontremove
auto={C(0/0,-6,Loyalty)}:name(-6: destroy) target(<upto:3>other creature,planeswalker) destroy and!(moveto(mybattlefield))!
text=+1: Put a 1/1 black Vampire creature token with lifelink onto the battlefield. -- -2: You get an emblem with "Creatures you control get +1/+0." -- -6: Destroy up to three target creatures and/or other planeswalkers. Return each card put into a graveyard this way to the battlefield under your control.
mana={2}{W}{B}
type=Planeswalker
@@ -95445,6 +95728,17 @@ power=5
toughness=5
[/card]
[card]
name=Stalking Yeti
auto=target(creature|opponentbattlefield) dynamicability<!powerstrike eachother!>
auto={2}{i}:moveTo(ownerhand) asSorcery
text=When Stalking Yeti enters the battlefield, if it's on the battlefield, it deals damage equal to its power to target creature an opponent controls and that creature deals damage equal to its power to Stalking Yeti. -- {2}{S}i}: Return Stalking Yeti to its owner's hand. Activate this ability only any time you could cast a sorcery. ({S}i} can be paid with one mana from a snow permanent.)
mana={2}{R}{R}
type=Snow Creature
subtype=Yeti
power=3
toughness=3
[/card]
[card]
name=Stalwart Aven
abilities=flying
auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever]))
@@ -96744,6 +97038,14 @@ power=4
toughness=4
[/card]
[card]
name=Stormcaller's Boon
auto={S}:lord(creature|myBattlefield) flying ueot
autostack=if casted(this) then cascade:plibrarycount
text=Sacrifice Stormcaller's Boon: Creatures you control gain flying until end of turn. -- Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)
mana={2}{W}{U}
type=Enchantment
[/card]
[card]
name=Stormcloud Djinn
abilities=flying,cloud
auto={R}{R}:2/0 && damage:1 controller
@@ -99764,9 +100066,9 @@ toughness=4
[card]
name=Tamiyo, the Moon Sage
auto=counter(0/0,4,loyalty)
auto={C(0/0,1,Loyalty)}:name(tap permanent) target(*) tap && frozen
auto={C(0/0,-2,Loyalty)}:name(draw a card) target(player) draw:type:creature[tapped]:targetedpersonsbattlefield controller
auto={C(0/0,-8,Loyalty)}:name(emblem) emblem transforms((,newability[nomaxhand],newability[@movedTo(*[-token]|mygraveyard):may name(reclaim) moveTo(myhand) all(trigger[to])])) forever dontremove
auto={C(0/0,1,Loyalty)}:name(+1: tap permanent) target(*) tap && frozen
auto={C(0/0,-2,Loyalty)}:name(-2: draw a card) target(player) draw:type:creature[tapped]:targetedpersonsbattlefield controller
auto={C(0/0,-8,Loyalty)}:name(-8: emblem) emblem transforms((,newability[nomaxhand],newability[@movedTo(*[-token]|mygraveyard):may name(reclaim) moveTo(myhand) all(trigger[to])])) forever dontremove
text=+1: Tap target permanent. It doesn't untap during its controller's next untap step. -- -2: Draw a card for each tapped creature target player controls. -- -8: You get an emblem with "You have no maximum hand size" and "Whenever a card is put into your graveyard from anywhere, you may return it to your hand."
mana={3}{U}{U}
type=Planeswalker
@@ -101180,7 +101482,7 @@ toughness=4
[card]
name=Tezzeret the Seeker
auto=counter(0/0,4,loyalty)
auto={C(0/0,1,Loyalty)}:untap target(<upto:2>artifact)
auto={C(0/0,1,Loyalty)}:name(+1: untap) untap target(<upto:2>artifact)
auto={0}:name(X = 0) target(artifact[manacost<=0]|mylibrary) moveTo(mybattlefield)
auto={C(0/0,-1,Loyalty)}:name(X = 1) target(artifact[manacost<=1]|mylibrary) moveTo(mybattlefield)
auto={C(0/0,-2,Loyalty)}:name(X = 2) target(artifact[manacost<=2]|mylibrary) moveTo(mybattlefield)
@@ -101192,7 +101494,7 @@ auto={C(0/0,-7,Loyalty)}:name(X = 7) target(artifact[manacost<=7]|mylibrary) mov
auto={C(0/0,-8,Loyalty)}:name(X = 8) target(artifact[manacost<=8]|mylibrary) moveTo(mybattlefield)
auto={C(0/0,-9,Loyalty)}:name(X = 9) target(artifact[manacost<=9]|mylibrary) moveTo(mybattlefield)
auto={C(0/0,-10,Loyalty)}:name(X = 10) target(artifact[manacost<=10]|mylibrary) moveTo(mybattlefield)
auto={C(0/0,-5,Loyalty)}:name(transform your artifacts) all(artifact|mybattlefield) becomes(Artifact Creature,5/5) ueot
auto={C(0/0,-5,Loyalty)}:name(-5: transform your artifacts) all(artifact|mybattlefield) becomes(Artifact Creature,5/5) ueot
text=+1: Untap up to two target artifacts. -- -X: Search your library for an artifact card with converted mana cost X or less and put it onto the battlefield. Then shuffle your library. -- -5: Artifacts you control become 5/5 artifact creatures until end of turn.
mana={3}{U}{U}
type=Planeswalker
@@ -101613,6 +101915,17 @@ mana={1}{G}{G}
type=Sorcery
[/card]
[card]
name=Thermopod
auto={i}:haste
auto={S(creature|myBattlefield)}:Add{R}
text={S}i}: Thermopod gains haste until end of turn. ({S}i} can be paid with one mana from a snow permanent.) -- Sacrifice a creature: Add {R} to your mana pool.
mana={4}{R}
type=Snow Creature
subtype=Slug
power=4
toughness=3
[/card]
[card]
name=Thicket Basilisk
auto=@combat(blocking,blocked) source(this) from(creature[-wall]):all(trigger[from]) phaseaction[combatends once] destroy
text=Whenever Thicket Basilisk blocks or becomes blocked by a non-Wall creature, destroy that creature at end of combat.
@@ -102764,9 +103077,9 @@ type=Instant
[card]
name=Tibalt, the Fiend-Blooded
auto=counter(0/0,2,Loyalty)
auto={counter(0/0,1,Loyalty)}:name(draw and random discard) draw:1 controller && discard:1 controller
auto={counter(0/0,-4,Loyalty)}:name(damage target player) target(player) damage:type:*:targetedpersonshand
auto={counter(0/0,-6,Loyalty)}:name(gain control creatures) all(creature|battlefield) moveTo(mybattlefield) && all(creature) transforms((,newability[untap],newability[haste],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)])) ueot
auto={counter(0/0,1,Loyalty)}:name(+1: draw and random discard) draw:1 controller && discard:1 controller
auto={counter(0/0,-4,Loyalty)}:name(-4: damage target player) target(player) damage:type:*:targetedpersonshand
auto={counter(0/0,-6,Loyalty)}:name(-6: gain control creatures) all(creature|battlefield) moveTo(mybattlefield) && all(creature) transforms((,newability[untap],newability[haste],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)])) ueot
text=+1: Draw a card, then discard a card at random. -- -4: Tibalt, the Fiend-Blooded deals damage equal to the number of cards in target player's hand to that player. -- -6: Gain control of all creatures until end of turn. Untap them. They gain haste until end of turn.
mana={R}{R}
type=Planeswalker
@@ -108482,9 +108795,9 @@ toughness=5
[card]
name=Venser, the Sojourner
auto=counter(0/0,3,loyalty)
auto={C(0/0,2,Loyalty)}:(blink)ueot target(*|mybattlefield)
auto={C(0/0,-1,Loyalty)}:all(creature) unblockable ueot
auto={C(0/0,-8,Loyalty)}:name(emblem) emblem transforms((,newability[@movedto(*|mystack):choice target(*|battlefield) moveto(exile)])) forever dontremove
auto={C(0/0,2,Loyalty)}:name(+2: exile) (blink)ueot target(*|mybattlefield)
auto={C(0/0,-1,Loyalty)}:name(-1: unblockable) all(creature) unblockable ueot
auto={C(0/0,-8,Loyalty)}:name(-8: emblem) emblem transforms((,newability[@movedto(*|mystack):choice target(*|battlefield) moveto(exile)])) forever dontremove
text=+2: Exile target permanent you own. Return it to the battlefield under your control at the beginning of the next end step. -- -1: Creatures are unblockable this turn. -- -8: You get an emblem with "Whenever you cast a spell, exile target permanent."
mana={3}{W}{U}
type=Planeswalker
@@ -109493,6 +109806,14 @@ power=2
toughness=2
[/card]
[card]
name=Violent Outburst
autostack=if casted(this) then cascade:plibrarycount
auto=lord(creature|myBattlefield) 1/0
text=Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.) -- Creatures you control get +1/+0 until end of turn.
mana={1}{R}{G}
type=Instant
[/card]
[card]
name=Violent Ultimatum
target=<3>*
auto=destroy
@@ -110671,9 +110992,9 @@ subtype=Aura
[card]
name=Vraska the Unseen
auto=counter(0/0,5,loyalty)
auto={C(0/0,1,Loyalty)}:name(dread) transforms((,newability[@combatdamaged(this) from(creature):all(trigger[from]) destroy])) uynt
auto={C(0/0,-3,Loyalty)}:destroy target(*[-land])
auto={C(0/0,-7,Loyalty)}:token(-290538)*3
auto={C(0/0,1,Loyalty)}:name(+1: dread) transforms((,newability[@combatdamaged(this) from(creature):all(trigger[from]) destroy])) uynt
auto={C(0/0,-3,Loyalty)}:name(-3: destroy) destroy target(*[-land])
auto={C(0/0,-7,Loyalty)}:name(-7: assassin) token(-290538)*3
text=+1: Until your next turn, whenever a creature deals combat damage to Vraska the Unseen, destroy that creature. -- -3: Destroy target nonland permanent. -- -7: Put three 1/1 black Assassin creature tokens onto the battlefield with "Whenever this creature deals combat damage to a player, that player loses the game."
mana={3}{B}{G}
type=Planeswalker
@@ -116485,6 +116806,17 @@ power=2
toughness=0
[/card]
[card]
name=Zombie Musher
abilities=snowforestlandwalk,snowplainslandwalk,snowmountainlandwalk,snowislandlandwalk,snowswamplandwalk
auto={i}:regenerate
text=Snow landwalk -- {S}i}: Regenerate Zombie Musher. ({S}i} can be paid with one mana from a snow permanent.)
mana={3}{B}
type=Snow Creature
subtype=Zombie
power=2
toughness=3
[/card]
[card]
name=Zombie Outlander
abilities=protection from green
text=Protection from green
File diff suppressed because it is too large Load Diff
@@ -9,7 +9,10 @@ manapool:{W}{W}{W}{W}{W}{W}{W}
[PLAYER2]
life:20
[DO]
#apex hawks is {2}{W} so the mana remaining will be {W}{W}{W}{W}
Apex Hawks
#apex hawks has {1}{W} multikicker so we can afford {2}{W}{W} since our mana is {W}{W}{W}{W}
#it will come with two +1/+1 counters making it 1 4/4 Flyer
choice 1
next
next
@@ -22,5 +25,6 @@ COMBATDAMAGE
inplay:Apex Hawks,Fervor
manapool:{0}
[PLAYER2]
life:17
[END]
#life must be 16 not 17.....(20 - 4)
life:16
[END]
@@ -0,0 +1,25 @@
#Testing Sphere of Resistance
#It must not crash with buyback
[INIT]
FIRSTMAIN
[PLAYER1]
inplay:Sphere of Resistance,Swamp
hand:Capsize
manapool:{6}{U}{U}{U}{U}
[PLAYER2]
[DO]
Capsize
# pay buyback
choice 1
Sphere of Resistance
Capsize
Swamp
[ASSERT]
FIRSTMAIN
[PLAYER1]
graveyard:Capsize
hand:Sphere of Resistance,Swamp
manapool{0}
[PLAYER2]
[END]
+1
View File
@@ -635,6 +635,7 @@ spark_elemental.txt
spectral_shield_CANTBETARGETOF.txt
spell_rupture.txt
spell_rupture_2.txt
Sphere_of_Resistance.txt
sphinx_summoner.txt
spirit_link.txt
spirit_link_i173.txt
@@ -33,7 +33,8 @@ blinkmoth nexus
COMBATATTACKERS
[PLAYER1]
inplay:blinkmoth nexus
manapool:{1}
#changed to {c} since all colorless produced are now {c}
manapool:{c}
[PLAYER2]
life:19
[END]
+2 -1
View File
@@ -17,5 +17,6 @@ graveyard:lightning bolt
manapool:{0}
[PLAYER2]
graveyard:cathodion
manapool:{3}
#changed to {c} since all colorless produced are now {c}
manapool:{c}{c}{c}
[END]
@@ -18,6 +18,7 @@ FIRSTMAIN
hand:Elvish Berserker,White Knight,Llanowar Elves,Rancor,Tranquility,Lotus Petal
inplay:Library of Alexandria
library:Soul Warden
manapool:{1}
#changed to {c} since all colorless produced are now {c}
manapool:{c}
[PLAYER2]
[END]
@@ -18,6 +18,7 @@ FIRSTMAIN
hand:Elvish Berserker,White Knight,Llanowar Elves,Rancor,Tranquility,Lotus Petal,Lhurgoyf,Mawcor
inplay:Library of Alexandria
library:Soul Warden
manapool:{1}
#changed to {c} since all colorless produced are now {c}
manapool:{c}
[PLAYER2]
[END]
+2 -1
View File
@@ -15,7 +15,8 @@ FIRSTMAIN
[PLAYER1]
graveyard:black knight,Spoils Of Evil
life:22
manapool:{2}
#changed to {c} since all colorless produced are now {c}
manapool:{c}{c}
[PLAYER2]
graveyard:swamp,grizzly bears,dragon engine
[END]
+2 -1
View File
@@ -19,6 +19,7 @@ choice 1
firstmain
[PLAYER1]
inplay:Urza's Mine,Urza's Power Plant,Urza's Tower
manapool:{4}
#changed to {c} since all colorless produced are now {c}
manapool:{c}{c}{c}{c}
[PLAYER2]
[END]
+2 -1
View File
@@ -18,6 +18,7 @@ Urza's Tower
firstmain
[PLAYER1]
inplay:Urza's Mine,Urza's Power Plant,Urza's Tower,Deserted Temple
manapool:{5}
#changed to {c} since all colorless produced are now {c}
manapool:{c}{c}{c}{c}{c}
[PLAYER2]
[END]
@@ -12,6 +12,7 @@ Urza's Mine
FIRSTMAIN
[PLAYER1]
inplay:Urza's Mine,1090,Urza's Power Plant,1091
manapool:{2}
#changed to {c} since all colorless produced are now {c}
manapool:{c}{c}
[PLAYER2]
[END]
+78 -6
View File
@@ -584,6 +584,18 @@ private:
if (target->controller()->life >= target->controller()->initLife)
intValue = 1;
}
else if (s == "plibrarycount")
{
intValue = 0;
if (target->controller()->game->library->nb_cards)
intValue = target->controller()->game->library->nb_cards;
}
else if (s == "olibrarycount")
{
intValue = 0;
if (target->controller()->opponent()->game->library->nb_cards)
intValue = target->controller()->opponent()->game->library->nb_cards;
}
else if (s == "highestlifetotal")
{
intValue = target->controller()->life <= target->controller()->opponent()->life? target->controller()->opponent()->life:target->controller()->life;
@@ -652,6 +664,10 @@ private:
{
intValue = target->controller()->epic;
}
else if (s == "snowcount")
{//this is just to count the number of snow mana produced ... just for debugging purposes...
intValue = target->controller()->snowManaG + target->controller()->snowManaU +target->controller()->snowManaR + target->controller()->snowManaB + target->controller()->snowManaW + target->controller()->snowManaC;
}
else if (s == "p" || s == "power")
{
intValue = target->getCurrentPower();
@@ -778,6 +794,46 @@ private:
intValue = 1;
}//end
}
else if (s == "cantargetmycre")// can target my creature
{
intValue = 0;
for (int j = card->controller()->game->battlefield->nb_cards - 1; j >= 0; --j)
{
if (card->controller()->game->battlefield->cards[j]->hasType("creature") && !card->controller()->game->battlefield->cards[j]->protectedAgainst(card))
{
intValue += 1;
}
}
}
else if (s == "cantargetoppocre")// can target opponent creature
{
intValue = 0;
for (int j = card->controller()->opponent()->game->battlefield->nb_cards - 1; j >= 0; --j)
{
if (card->controller()->opponent()->game->battlefield->cards[j]->hasType("creature") && !card->controller()->opponent()->game->battlefield->cards[j]->protectedAgainst(card))
{
intValue += 1;
}
}
}
else if (s == "cantargetcre")// can target any creature
{
intValue = 0;
for (int j = card->controller()->opponent()->game->battlefield->nb_cards - 1; j >= 0; --j)
{
if (card->controller()->opponent()->game->battlefield->cards[j]->hasType("creature") && !card->controller()->opponent()->game->battlefield->cards[j]->protectedAgainst(card))
{
intValue += 1;
}
}
for (int k = card->controller()->game->battlefield->nb_cards - 1; k >= 0; --k)
{
if (card->controller()->game->battlefield->cards[k]->hasType("creature") && !card->controller()->game->battlefield->cards[k]->protectedAgainst(card))
{
intValue += 1;
}
}
}
else if (s == "controllerturn")//intvalue = 1 if its your turn this(variable{controllerturn})
{
intValue = 0;
@@ -1698,7 +1754,8 @@ class AAEPIC: public ActivatedAbility
{
public:
string named;
AAEPIC(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * target,string _newName, ManaCost * cost = NULL);
bool FField;
AAEPIC(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * target,string _newName, ManaCost * cost = NULL, bool ffield = false );
int resolve();
const string getMenuText();
AAEPIC * clone() const;
@@ -2356,7 +2413,8 @@ public:
{
if (!isReactingToClick(_card)) return 0;
game->currentlyActing()->getManaPool()->pay(cost);
game->currentlyActing()->life += life;
if(!game->currentlyActing()->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
game->currentlyActing()->life += life;
lastUsedOn = lastChecked;
return 1;
}
@@ -2964,7 +3022,7 @@ public:
{
if (newPhase != currentPhase && newPhase == phase && game->currentPlayer == ((MTGCardInstance *) target)->controller())
{
if (!onlyIfTargetTapped || ((MTGCardInstance *) target)->isTapped())
if ((!onlyIfTargetTapped || ((MTGCardInstance *) target)->isTapped()) && (!game->currentPlayer->inPlay()->hasAbility(Constants::CANTCHANGELIFE)))
{
if (life > 0)
{
@@ -4547,7 +4605,7 @@ public:
void Update(float)
{
if (newPhase != currentPhase && newPhase == phase)
if (newPhase != currentPhase && newPhase == phase && !game->currentPlayer->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
{
if ((controller && game->currentPlayer == source->controller()) || (!controller && game->currentPlayer
!= source->controller()))
@@ -6019,12 +6077,26 @@ public:
string nbcardsStr;
bool toexile;
AADepleter(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target,string nbcardsStr, ManaCost * _cost = NULL,
int who = TargetChooser::UNSET, bool toexile = false);
int who = TargetChooser::UNSET, bool toexile = false);
int resolve();
const string getMenuText();
AADepleter * clone() const;
};
//AACascade
class AACascade: public ActivatedAbilityTP
{
public:
string nbcardsStr;
AACascade(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target,string nbcardsStr, ManaCost * _cost = NULL,
int who = TargetChooser::UNSET);
int resolve();
void toCastCard(MTGCardInstance * card);
const string getMenuText();
AACascade * clone() const;
};
//Generic skip turn/extra turn
class AAModTurn: public ActivatedAbilityTP
{
@@ -6193,7 +6265,7 @@ public:
{
Player * p = (Player *) isDamaged->damage->target;
WParsedInt lifetoset(life_s, NULL, source);
if(p && p == source->controller() && p->life <= lifetoset.getValue())
if(p && p == source->controller() && p->life <= lifetoset.getValue() && !p->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
p->life = lifetoset.getValue();
}
}
+20
View File
@@ -155,6 +155,15 @@ public:
virtual ToLibraryCost * clone() const;
};
//toGraveyard cost
class ToGraveCost : public ExtraCost
{
public:
ToGraveCost(TargetChooser *_tc = NULL);
virtual int doPay();
virtual ToGraveCost * clone() const;
};
//Millyourself cost
class MillCost : public ExtraCost
{
@@ -195,6 +204,17 @@ public:
virtual TapCost * clone() const;
};
//Snow cost
class SnowCost : public ExtraCost
{
public:
SnowCost();
virtual int isPaymentSet();
virtual int canPay();
virtual int doPay();
virtual SnowCost * clone() const;
};
//untap cost
class UnTapCost : public ExtraCost
{
+3 -1
View File
@@ -89,6 +89,7 @@ public:
bool isMorphed;
bool isFlipped;
bool isPhased;
bool isCascaded;
int phasedTurn;
bool graveEffects;
bool exileEffects;
@@ -254,7 +255,8 @@ public:
bool isTargetter();
int cardistargetter;
int myconvertedcost;
ManaCost * computeNewCost(MTGCardInstance * card,ManaCost * oldCost);
ManaCost * computeNewCost(MTGCardInstance * card,ManaCost * oldCost, ManaCost * refCost,bool noTrinisphere = false);
int countTrini;
void eventattacked();
void eventattackedAlone();
+8 -3
View File
@@ -72,6 +72,7 @@ class Constants
static const string kManaRed;
static const string kManaBlack;
static const string kManaWhite;
static const string kManaWaste;
// alternative costs constants
@@ -94,9 +95,11 @@ class Constants
MTG_COLOR_RED = 3,
MTG_COLOR_BLACK = 4,
MTG_COLOR_WHITE = 5,
MTG_COLOR_LAND = 6,
MTG_COLOR_WASTE = 6,
MTG_COLOR_LAND = 7,
MTG_NB_COLORS = 7,
MTG_NB_COLORS = 8,
MTG_UNCOLORED = 0,
@@ -238,7 +241,9 @@ class Constants
TRINISPHERE = 120,
CANPLAYFROMEXILE = 121,
LIBRARYEATER = 122,
NB_BASIC_ABILITIES = 123,
DEVOID = 123,
CANTCHANGELIFE = 124,
NB_BASIC_ABILITIES = 125,
RARITY_S = 'S', //Special Rarity
+9
View File
@@ -43,9 +43,16 @@ public:
int extraTurn;
int drawCounter;
int epic;
int forcefield;
int initLife;
int raidcount;
int handmodifier;
int snowManaG;
int snowManaR;
int snowManaB;
int snowManaU;
int snowManaW;
int snowManaC;
vector<string> prowledTypes;
vector<MTGCardInstance*>curses;
Player(GameObserver *observer, string deckFile, string deckFileSmall, MTGDeck * deck = NULL);
@@ -73,6 +80,8 @@ public:
ManaPool * getManaPool();
void takeMulligan();
void serumMulligan();
bool hasPossibleAttackers();
bool noPossibleAttackers();
bool DeadLifeState(bool check = false);
ManaCost * doesntEmpty;
ManaCost * poolDoesntEmpty;
+3
View File
@@ -714,6 +714,9 @@ bool AIPlayerBaka::payTheManaCost(ManaCost * cost, MTGCardInstance * target,vect
if(!cost->getConvertedCost())
{
DebugTrace("AIPlayerBaka: Card was a land and ai cant play any more lands this turn. ");
if (target && target->isLand() && game->playRestrictions->canPutIntoZone(target, game->battlefield) == PlayRestriction::CANT_PLAY)
return false;
DebugTrace("AIPlayerBaka: Card or Ability was free to play. ");
if(!cost->hasX())//don't return true if it contains {x} but no cost, locks ai in a loop. ie oorchi hatchery cost {x}{x} to play.
return true;
+105 -50
View File
@@ -264,12 +264,10 @@ AADamager * AADamager::clone() const
AADepleter::AADepleter(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target,string nbcardsStr, ManaCost * _cost, int who, bool toexile) :
ActivatedAbilityTP(observer, _id, card, _target, _cost, who),nbcardsStr(nbcardsStr),toexile(toexile)
{
}
int AADepleter::resolve()
{
Player * player = getPlayerFromTarget(getTarget());
if (player)
{
WParsedInt numCards(nbcardsStr, NULL, source);
@@ -300,6 +298,93 @@ AADepleter * AADepleter::clone() const
return NEW AADepleter(*this);
}
//AACascade
AACascade::AACascade(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target,string nbcardsStr, ManaCost * _cost, int who) :
ActivatedAbilityTP(observer, _id, card, _target, _cost, who),nbcardsStr(nbcardsStr)
{
}
int AACascade::resolve()
{
Player * player = getPlayerFromTarget(getTarget());
if (player)
{
WParsedInt numCards(nbcardsStr, NULL, source);
MTGLibrary * library = player->game->library;
MTGRemovedFromGame * exile = player->game->exile;
MTGCardInstance * viable = NULL;
int counter = 0;
for (int i = 0; i < numCards.getValue(); i++)
{
if (library->nb_cards)
{
for(int z = library->nb_cards; z >= 0; z--)
{
if(!library->cards[z]->isLand() && (library->cards[z]->getManaCost()->getConvertedCost() < source->getManaCost()->getConvertedCost()))
{
viable = library->cards[z];
player->game->putInZone(viable, library, exile);
{
vector<MTGCardInstance*>selectedCards;
for(int j=0; j < library->nb_cards; j++)
{
if(library->cards[j]->isCascaded)
{
library->cards[j]->isCascaded = false;
selectedCards.push_back(library->cards[j]);
}
}
if(selectedCards.size())
{
std::random_shuffle ( selectedCards.begin(), selectedCards.end() );
for(unsigned int i = 0; i < selectedCards.size();++i)
{
vector<MTGCardInstance *>oldOrder = library->cards;
vector<MTGCardInstance *>newOrder;
newOrder.push_back(selectedCards[i]);
for(unsigned int k = 0;k < oldOrder.size();++k)
{
MTGCardInstance * rearranged = oldOrder[k];
if(rearranged != selectedCards[i])
newOrder.push_back(rearranged);
}
library->cards = newOrder;
}
}
}
toCastCard(viable->next);
return 1;
}
else
{
library->cards[library->nb_cards - 1]->isCascaded=true;
counter++;
}
}
}
}
}
return 1;
}
void AACascade::toCastCard(MTGCardInstance * thisCard)
{
MTGAbility *ac = NEW AACastCard(game, game->mLayers->actionLayer()->getMaxId(), thisCard, thisCard,false,false,true,"","",false,false);
MayAbility *ma1 = NEW MayAbility(game, game->mLayers->actionLayer()->getMaxId(), ac, thisCard->clone(),true);
MTGAbility *ga1 = NEW GenericAddToGame(game, game->mLayers->actionLayer()->getMaxId(), thisCard,NULL,ma1);
ga1->resolve();
return;
}
const string AACascade::getMenuText()
{
return "Cascade";
}
AACascade * AACascade::clone() const
{
return NEW AACascade(*this);
}
//take extra turns or skip turns, values in the negitive will make you skip.
AAModTurn::AAModTurn(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target,string nbTurnStr, ManaCost * _cost, int who) :
ActivatedAbilityTP(observer, _id, card, _target, _cost, who),nbTurnStr(nbTurnStr)
@@ -394,7 +479,7 @@ int AACopier::resolve()
MTGCardInstance * myClone = NEW MTGCardInstance(clone, source->controller()->game);
source->copy(myClone);
source->isACopier = true;
source->copiedID = _target->copiedID;
source->copiedID = _target->getMTGId();
source->modifiedbAbi = _target->modifiedbAbi;
source->origbasicAbilities = _target->origbasicAbilities;
if(_target->isMorphed)
@@ -1220,25 +1305,15 @@ int GenericPaidAbility::resolve()
{
must = true;
//cost increase - reduce + trinisphere effect ability todo...
if(((MTGCardInstance *)target)->getIncreasedManaCost()->getConvertedCost())
optionalCost->add(((MTGCardInstance *)target)->getIncreasedManaCost());
if(((MTGCardInstance *)target)->getReducedManaCost()->getConvertedCost())
optionalCost->remove(((MTGCardInstance *)target)->getReducedManaCost());
//trinisphere effect must be hardcoded...here..
/*if(((MTGCardInstance *)target)->has(Constants::TRINISPHERE))
optionalCost = ((MTGCardInstance *)target)->computeNewCost(((MTGCardInstance *)target),optionalCost,optionalCost);
if(optionalCost->extraCosts)
{
if(optionalCost->getConvertedCost() == 2)
optionalCost->add(Constants::MTG_COLOR_ARTIFACT, 1);
else if(optionalCost->getConvertedCost() == 1)
optionalCost->add(Constants::MTG_COLOR_ARTIFACT, 2);
else if(optionalCost->getConvertedCost() < 1)
optionalCost->add(Constants::MTG_COLOR_ARTIFACT, 3);
}*/
for(unsigned int i = 0; i < optionalCost->extraCosts->costs.size();i++)
optionalCost->extraCosts->costs[i]->setSource(((MTGCardInstance *)target));
}
}
if(asAlternate && nomenu && optionalCost->getConvertedCost() < 1)
{
nomenuAbility->resolve();
}
else
{
MenuAbility * a1 = NEW MenuAbility(game, this->GetId(), target, source, must, selection, NULL, newName);
@@ -1386,15 +1461,18 @@ AAFakeAbility * AAFakeAbility::clone() const
}
//EPIC
AAEPIC::AAEPIC(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * _target, string _named,ManaCost * cost):
ActivatedAbility(observer, id, source, cost, 0),named(_named)
AAEPIC::AAEPIC(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * _target, string _named,ManaCost * cost, bool _ffield):
ActivatedAbility(observer, id, source, cost, 0),named(_named),FField(_ffield)
{
this->target = _target;
}
int AAEPIC::resolve()
{
MTGCardInstance * _target = (MTGCardInstance *)target;
_target->controller()->epic = 1;
if(FField)
_target->controller()->forcefield = 1;
else
_target->controller()->epic = 1;
return 1;
}
@@ -4081,19 +4159,8 @@ int AAlterCost::destroy()
int AAlterCost::testDestroy()
{
MTGCardInstance * _target = (MTGCardInstance *)target;
if(!this->manaReducer->isInPlay(game))
{
if (amount > 0)
{
_target->getIncreasedManaCost()->remove(type,amount);
refreshCost(_target);//special case for 0 cost.
}
else
{
_target->getReducedManaCost()->remove(type,abs(amount));
refreshCost(_target);//special case for 0 cost.
}
return MTGAbility::testDestroy();
}
return 0;
@@ -4102,8 +4169,10 @@ void AAlterCost::refreshCost(MTGCardInstance * card)
{
ManaCost * original = NEW ManaCost();
original->copy(card->model->data->getManaCost());
original->add(card->getIncreasedManaCost());
original->remove(card->getReducedManaCost());
if(card->getIncreasedManaCost()->getConvertedCost())
original->add(card->getIncreasedManaCost());
if(card->getReducedManaCost()->getConvertedCost())
original->remove(card->getReducedManaCost());
card->getManaCost()->copy(original);
delete original;
return;
@@ -4115,14 +4184,6 @@ void AAlterCost::increaseTheCost(MTGCardInstance * card)
for(int k = Constants::MTG_COLOR_ARTIFACT; k < Constants::NB_Colors;k++)
{
card->getManaCost()->add(k,card->getIncreasedManaCost()->getCost(k));
if (card->getManaCost()->getAlternative())
{
card->getManaCost()->getAlternative()->add(k,card->getIncreasedManaCost()->getCost(k));
}
if (card->getManaCost()->getBuyback())
{
card->getManaCost()->getBuyback()->add(k,card->getIncreasedManaCost()->getCost(k));
}
}
}
return;
@@ -4135,14 +4196,6 @@ void AAlterCost::decreaseTheCost(MTGCardInstance * card)
for(int k = Constants::MTG_COLOR_ARTIFACT; k < Constants::NB_Colors;k++)
{
card->getManaCost()->remove(k,card->getReducedManaCost()->getCost(k));
if (card->getManaCost()->getAlternative())
{
card->getManaCost()->getAlternative()->remove(k,card->getReducedManaCost()->getCost(k));
}
if (card->getManaCost()->getBuyback())
{
card->getManaCost()->getBuyback()->remove(k,card->getReducedManaCost()->getCost(k));
}
}
}
return;
@@ -4620,6 +4673,8 @@ int AAExchangeLife::resolve()
Damageable * _target = (Damageable *) getTarget();
if (_target)
{
if(_target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER && ((Player*)_target)->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
return 0;
Player *player = source->controller();
int oldlife = player->getLife();
int targetOldLife = _target->getLife();
+6 -3
View File
@@ -244,7 +244,10 @@ void CardGui::Render()
highlightborder = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white");
if(fakeborder)
{
fakeborder->SetColor(ARGB((int)(actA),15,15,15));
if(card->has(Constants::CANPLAYFROMGRAVEYARD)||card->has(Constants::CANPLAYFROMEXILE)||card->has(Constants::PAYZERO))
fakeborder->SetColor(ARGB((int)(actA),7,235,7));//green border
else
fakeborder->SetColor(ARGB((int)(actA),15,15,15));
renderer->RenderQuad(fakeborder.get(), actX, actY, actT, (29 * actZ + 1) / 16, 42 * actZ / 16);
}
//draw border for highlighting
@@ -365,8 +368,8 @@ void CardGui::Render()
buff = "CT";
if(!card->isToken && card->isACopier)
buff = "C";
if(card->has(Constants::PAYZERO))
buff += "Z";
//if(card->has(Constants::PAYZERO))
//buff += "Z";
if(card->alias == 1000)
{
if(card->chooseacolor == 1)
+35 -10
View File
@@ -71,6 +71,9 @@ int Damage::resolve()
}
//-------------------------------------------------
//Ajani Steadfast ---
if(target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE && ((MTGCardInstance*)target)->hasType("planeswalker") && ((MTGCardInstance*)target)->controller()->forcefield)
damage = 1;
if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE)
{
MTGCardInstance * _target = (MTGCardInstance *) target;
@@ -127,7 +130,9 @@ int Damage::resolve()
_target->doDamageTest = 1;
}
if (target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER)
{
{//Ajani Steadfast
if(((Player*)target)->forcefield)
damage = 1;
if(source->has(Constants::LIBRARYEATER) && typeOfDamage == 1)
{
for (int j = damage; j > 0; j--)
@@ -191,7 +196,8 @@ int Damage::resolve()
{
//Damage + 1, 2, or 3 poison counters on player
Player * _target = (Player *) target;
a = target->dealDamage(damage);
if(!_target->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
a = target->dealDamage(damage);
target->damageCount += damage;
if ( typeOfDamage == 1 && target == source->controller()->opponent() )//add vector prowledtypes.
{
@@ -223,7 +229,10 @@ int Damage::resolve()
{
// "Normal" case,
//return the left over amount after effects have been applied to them.
a = target->dealDamage(damage);
if (target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER && ((Player *)target)->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
;//do nothing
else
a = target->dealDamage(damage);
target->damageCount += damage;//the amount must be the actual damage so i changed this from 1 to damage, this fixes pdcount and odcount
if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE){
((MTGCardInstance*)target)->wasDealtDamage = true;
@@ -265,28 +274,44 @@ void Damage::Render()
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
char buffer[200];
sprintf(buffer, _("Deals %i damage to").c_str(), damage);
mFont->DrawString(buffer, x + 20, y, JGETEXT_LEFT);
//mFont->DrawString(buffer, x + 20, y, JGETEXT_LEFT);
mFont->DrawString(buffer, x + 32, y + GetVerticalTextOffset(), JGETEXT_LEFT);
JRenderer * renderer = JRenderer::GetInstance();
JQuadPtr quad = WResourceManager::Instance()->RetrieveCard(source, CACHE_THUMB);
if (quad.get())
{
float scale = 30 / quad->mHeight;
renderer->RenderQuad(quad.get(), x, y, 0, scale, scale);
//float scale = 30 / quad->mHeight;
//renderer->RenderQuad(quad.get(), x, y, 0, scale, scale);
quad->SetColor(ARGB(255,255,255,255));
float scale = mHeight / quad->mHeight;
renderer->RenderQuad(quad.get(), x + (quad->mWidth * scale / 2), y + (quad->mHeight * scale / 2), 0, scale, scale);
}
else
{
mFont->DrawString(_(source->getName()).c_str(), x, y - 15);
//mFont->DrawString(_(source->getName()).c_str(), x, y - 15);
mFont->DrawString(_(source->getName()).c_str(), x, y + GetVerticalTextOffset() - 15);
}
quad = target->getIcon();
if (quad.get())
{
float scale = 30 / quad->mHeight;
renderer->RenderQuad(quad.get(), x + 150, y, 0, scale, scale);
//float scale = 30 / quad->mHeight;
//renderer->RenderQuad(quad.get(), x + 150, y, 0, scale, scale);
float backupX = quad->mHotSpotX;
float backupY = quad->mHotSpotY;
quad->SetColor(ARGB(255,255,255,255));
quad->SetHotSpot(quad->mWidth / 2, quad->mHeight / 2);
float scale = mHeight / quad->mHeight;
renderer->RenderQuad(quad.get(), x + 130, y - 0.5f + ((mHeight - quad->mHeight) / 2) + quad->mHotSpotY, 0, scale, scale);
quad->SetHotSpot(backupX, backupY);
}
else
{
//if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE)
//mFont->DrawString(_(((MTGCardInstance *) target)->getName()).c_str(), x + 120, y);
if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE)
mFont->DrawString(_(((MTGCardInstance *) target)->getName()).c_str(), x + 120, y);
mFont->DrawString(_(((MTGCardInstance *) target)->getName()).c_str(), x + 35, y+15 + GetVerticalTextOffset());
else if(target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER)
mFont->DrawString(_(((Player *) target)->getDisplayName()).c_str(), x + 35, y+15 + GetVerticalTextOffset());
}
}
+1 -1
View File
@@ -125,7 +125,7 @@ void DeckMenu::RenderDeckManaColors()
if (deckManaColors.size() == 6)
{
// due to space constraints don't display icons for colorless mana.
for( int colorIdx = Constants::MTG_COLOR_GREEN; colorIdx < Constants::MTG_COLOR_LAND; ++colorIdx )
for( int colorIdx = Constants::MTG_COLOR_GREEN; colorIdx < Constants::MTG_COLOR_WASTE; ++colorIdx )
{
if ( (deckManaColors.at(colorIdx) == '1') != 0)
{
+1
View File
@@ -394,6 +394,7 @@ void StatsWrapper::updateStats(string filename, MTGAllCards *collection)
void StatsWrapper::updateStats(DeckDataWrapper *myDeck)
{
if(!this) return;
if (!this->needUpdate || !myDeck) return;
this->needUpdate = false;
+132 -2
View File
@@ -130,6 +130,107 @@ int ExtraManaCost::doPay()
return 1;
}
//Snow cost
SnowCost * SnowCost::clone() const
{
SnowCost * ec = NEW SnowCost(*this);
return ec;
}
SnowCost::SnowCost() :
ExtraCost("Snow Mana")
{
}
int SnowCost::isPaymentSet()
{
if (source->controller()->getManaPool()->getConvertedCost())
{
int result = 0;
result += source->controller()->snowManaG;
result += source->controller()->snowManaU;
result += source->controller()->snowManaR;
result += source->controller()->snowManaB;
result += source->controller()->snowManaW;
result += source->controller()->snowManaC;
if (result)
{
if ((source->controller()->snowManaC && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{1}",NULL,source))) ||
(source->controller()->snowManaG && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{g}",NULL,source))) ||
(source->controller()->snowManaU && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{u}",NULL,source))) ||
(source->controller()->snowManaR && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{r}",NULL,source))) ||
(source->controller()->snowManaB && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{b}",NULL,source))) ||
(source->controller()->snowManaW && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{w}",NULL,source))) ||
(source->controller()->snowManaC && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{c}",NULL,source))))
return 1;
else
return 0;
}
}
return 0;
}
int SnowCost::canPay()
{
return isPaymentSet();
}
int SnowCost::doPay()
{
if (source->controller()->getManaPool()->getConvertedCost())
{
int result = 0;
result += source->controller()->snowManaG;
result += source->controller()->snowManaU;
result += source->controller()->snowManaR;
result += source->controller()->snowManaB;
result += source->controller()->snowManaW;
result += source->controller()->snowManaC;
if (result)
{
if (source->controller()->snowManaC && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{1}",NULL,source)))
{
source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{1}",NULL,source));
source->controller()->snowManaC -= 1;
}
else if (source->controller()->snowManaG && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{g}",NULL,source)))
{
source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{g}",NULL,source));
source->controller()->snowManaG -= 1;
}
else if (source->controller()->snowManaU && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{u}",NULL,source)))
{
source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{u}",NULL,source));
source->controller()->snowManaU -= 1;
}
else if (source->controller()->snowManaR && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{r}",NULL,source)))
{
source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{r}",NULL,source));
source->controller()->snowManaR -= 1;
}
else if (source->controller()->snowManaB && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{b}",NULL,source)))
{
source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{b}",NULL,source));
source->controller()->snowManaB -= 1;
}
else if (source->controller()->snowManaW && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{w}",NULL,source)))
{
source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{w}",NULL,source));
source->controller()->snowManaW -= 1;
}
else if (source->controller()->snowManaC && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{c}",NULL,source)))
{
source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{c}",NULL,source));
source->controller()->snowManaC -= 1;
}
else
return 0;
return 1;
}
}
return 0;
}
//life cost
LifeCost * LifeCost::clone() const
{
@@ -147,7 +248,7 @@ LifeCost::LifeCost(TargetChooser *_tc)
int LifeCost::canPay()
{
MTGCardInstance * _target = (MTGCardInstance *) target;
if(_target->controller()->life <= 0)
if(_target->controller()->life <= 0 || _target->controller()->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
{
return 0;
}
@@ -185,7 +286,7 @@ SpecificLifeCost::SpecificLifeCost(TargetChooser *_tc, int slc)
int SpecificLifeCost::canPay()
{
MTGCardInstance * _target = (MTGCardInstance *) target;
if(_target->controller()->life >= slc)
if(_target->controller()->life >= slc && !_target->controller()->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
{
return 1;
}
@@ -394,6 +495,35 @@ int ToLibraryCost::doPay()
return 0;
}
//to graveyard cost
ToGraveCost * ToGraveCost::clone() const
{
ToGraveCost * ec = NEW ToGraveCost(*this);
if (tc)
ec->tc = tc->clone();
return ec;
}
ToGraveCost::ToGraveCost(TargetChooser *_tc)
: ExtraCost("Move a card to Graveyard", _tc)
{
}
int ToGraveCost::doPay()
{
MTGCardInstance * _target = (MTGCardInstance *) target;
if (target)
{
source->storedCard = target->createSnapShot();
_target->controller()->game->putInGraveyard(target);
target = NULL;
if (tc)
tc->initTargets();
return 1;
}
return 0;
}
//Mill yourself as a cost
MillCost * MillCost::clone() const
{
+66 -71
View File
@@ -600,6 +600,32 @@ void GameObserver::gameStateBasedEffects()
/////////////////////////////////////
for (int d = 0; d < 2; d++)
{
////check snow count
if (players[d]->snowManaC > players[d]->getManaPool()->getCost(0) + players[d]->getManaPool()->getCost(6))
players[d]->snowManaC = players[d]->getManaPool()->getCost(0) + players[d]->getManaPool()->getCost(6);
if (players[d]->snowManaC < 0)
players[d]->snowManaC = 0;
if (players[d]->snowManaG > players[d]->getManaPool()->getCost(1))
players[d]->snowManaG = players[d]->getManaPool()->getCost(1);
if (players[d]->snowManaG < 0)
players[d]->snowManaG = 0;
if (players[d]->snowManaU > players[d]->getManaPool()->getCost(2))
players[d]->snowManaU = players[d]->getManaPool()->getCost(2);
if (players[d]->snowManaU < 0)
players[d]->snowManaU = 0;
if (players[d]->snowManaR > players[d]->getManaPool()->getCost(3))
players[d]->snowManaR = players[d]->getManaPool()->getCost(3);
if (players[d]->snowManaR < 0)
players[d]->snowManaR = 0;
if (players[d]->snowManaB > players[d]->getManaPool()->getCost(4))
players[d]->snowManaB = players[d]->getManaPool()->getCost(4);
if (players[d]->snowManaB < 0)
players[d]->snowManaB = 0;
if (players[d]->snowManaW > players[d]->getManaPool()->getCost(5))
players[d]->snowManaW = players[d]->getManaPool()->getCost(5);
if (players[d]->snowManaW < 0)
players[d]->snowManaW = 0;
MTGGameZone * dzones[] = { players[d]->game->inPlay, players[d]->game->graveyard, players[d]->game->hand, players[d]->game->library, players[d]->game->exile };
for (int k = 0; k < 5; k++)
{
@@ -612,6 +638,21 @@ void GameObserver::gameStateBasedEffects()
zone->cards[c]->cardistargetter = 0;
}
}
///while checking all these zones, lets also strip devoid cards of thier colors
for (int w = 0; w < zone->nb_cards; w++)
{
MTGCardInstance * card = zone->cards[w];
for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i)
{
if (card->has(Constants::DEVOID))
{
card->removeColor(i);
}
}
}
}//check for losers if its GAMEOVER clear the stack to allow gamestateeffects to continue
players[d]->DeadLifeState();
}
@@ -912,13 +953,12 @@ void GameObserver::gameStateBasedEffects()
//Auto skip Phases
int skipLevel = (currentPlayer->playMode == Player::MODE_TEST_SUITE || mLoading) ? Constants::ASKIP_NONE
: options[Options::ASPHASES].number;
int nrCreatures = currentPlayer->game->inPlay->hasType("creature")?1:0;
if (skipLevel == Constants::ASKIP_SAFE || skipLevel == Constants::ASKIP_FULL)
{
if ((opponent()->isAI() && !(isInterrupting)) && ((mCurrentGamePhase == MTG_PHASE_UNTAP)
|| (mCurrentGamePhase == MTG_PHASE_DRAW) || (mCurrentGamePhase == MTG_PHASE_COMBATBEGIN)
|| ((mCurrentGamePhase == MTG_PHASE_COMBATATTACKERS) && (nrCreatures == 0))
|| ((mCurrentGamePhase == MTG_PHASE_COMBATATTACKERS) && (currentPlayer->noPossibleAttackers()))
|| mCurrentGamePhase == MTG_PHASE_COMBATEND || mCurrentGamePhase == MTG_PHASE_ENDOFTURN
|| ((mCurrentGamePhase == MTG_PHASE_CLEANUP) && (currentPlayer->game->hand->nb_cards < 8))))
userRequestNextGamePhase();
@@ -975,74 +1015,15 @@ void GameObserver::Affinity()
string type = "";
//only do any of the following if a card with the stated ability is in your hand.
ManaCost * original = NEW ManaCost();
ManaCost * alternate = NEW ManaCost();
ManaCost * buyback = NEW ManaCost();
ManaCost * flashback = NEW ManaCost();
ManaCost * retrace = NEW ManaCost();
original->copy(card->model->data->getManaCost());
alternate->copy(card->model->data->getManaCost()->getAlternative());
buyback->copy(card->model->data->getManaCost()->getBuyback());
flashback->copy(card->model->data->getManaCost()->getFlashback());
retrace->copy(card->model->data->getManaCost()->getRetrace());
//have to run alter cost before affinity or the 2 cancel each other out.
if(card->getIncreasedManaCost()->getConvertedCost()||card->getReducedManaCost()->getConvertedCost())
{
{//start1
if(card->getIncreasedManaCost()->getConvertedCost())
{
original->add(card->getIncreasedManaCost());
for(int kc = Constants::MTG_COLOR_ARTIFACT; kc < Constants::NB_Colors;kc++)
{
if (card->getManaCost()->getAlternative())
{
alternate->add(kc,card->getIncreasedManaCost()->getCost(kc));
}
if (card->getManaCost()->getBuyback())
{
buyback->add(kc,card->getIncreasedManaCost()->getCost(kc));
}
if (card->getManaCost()->getFlashback())
{
flashback->add(kc,card->getIncreasedManaCost()->getCost(kc));
}
if (card->getManaCost()->getRetrace())
{
retrace->add(kc,card->getIncreasedManaCost()->getCost(kc));
}
}
}
if(card->getReducedManaCost()->getConvertedCost())
{
original->remove(card->getReducedManaCost());
for(int kc = Constants::MTG_COLOR_ARTIFACT; kc < Constants::NB_Colors;kc++)
{
if (card->getManaCost()->getAlternative())
{
alternate->remove(kc,card->getReducedManaCost()->getCost(kc));
}
if (card->getManaCost()->getBuyback())
{
buyback->remove(kc,card->getIncreasedManaCost()->getCost(kc));
}
if (card->getManaCost()->getFlashback())
{
flashback->remove(kc,card->getIncreasedManaCost()->getCost(kc));
}
if (card->getManaCost()->getRetrace())
{
retrace->remove(kc,card->getIncreasedManaCost()->getCost(kc));
}
}
}
if(card->getManaCost())
card->getManaCost()->copy(original);
if(card->getManaCost()->getAlternative())
card->getManaCost()->setAlternative(alternate);
if(card->getManaCost()->getBuyback())
card->getManaCost()->setBuyback(buyback);
if(card->getManaCost()->getFlashback())
card->getManaCost()->setFlashback(flashback);
if(card->getManaCost()->getRetrace())
card->getManaCost()->setRetrace(retrace);
if(card->getManaCost()->extraCosts)
{
for(unsigned int i = 0; i < card->getManaCost()->extraCosts->costs.size();i++)
@@ -1050,11 +1031,11 @@ void GameObserver::Affinity()
card->getManaCost()->extraCosts->costs[i]->setSource(card);
}
}
}
}//end1
int reducem = 0;
bool resetCost = false;
for(unsigned int na = 0; na < card->cardsAbilities.size();na++)
{
{//start2
ANewAffinity * newAff = dynamic_cast<ANewAffinity*>(card->cardsAbilities[na]);
if(newAff)
{
@@ -1092,7 +1073,7 @@ void GameObserver::Affinity()
card->getManaCost()->remove(removingCost);
SAFE_DELETE(removingCost);
}
}
}//end2
if(card->has(Constants::AFFINITYARTIFACTS)||
card->has(Constants::AFFINITYFOREST)||
card->has(Constants::AFFINITYGREENCREATURES)||
@@ -1100,7 +1081,7 @@ void GameObserver::Affinity()
card->has(Constants::AFFINITYMOUNTAIN)||
card->has(Constants::AFFINITYPLAINS)||
card->has(Constants::AFFINITYSWAMP))
{
{//start3
if (card->has(Constants::AFFINITYARTIFACTS))
{
type = "artifact";
@@ -1155,13 +1136,27 @@ void GameObserver::Affinity()
if(card->getManaCost()->getCost(color) > 0)
card->getManaCost()->remove(color,1);
}
}//end3
//trinisphere... now how to implement kicker recomputation
if(card->has(Constants::TRINISPHERE))
{
for(int jj = card->getManaCost()->getConvertedCost(); jj < 3; jj++)
{
card->getManaCost()->add(Constants::MTG_COLOR_ARTIFACT, 1);
card->countTrini++;
}
}
else
{
if(card->countTrini)
{
card->getManaCost()->remove(Constants::MTG_COLOR_ARTIFACT, card->countTrini);
card->countTrini=0;
}
}
SAFE_DELETE(original);
SAFE_DELETE(alternate);
SAFE_DELETE(buyback);
SAFE_DELETE(flashback);
SAFE_DELETE(retrace);
}//end
}
}
+30 -4
View File
@@ -2561,6 +2561,16 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return a;
}
//Forcefield
found = s.find("forcefield");
if (found != string::npos)
{
MTGAbility * a = NEW AAEPIC(observer, id, card, target,"Forcefield",NULL,true);
a->oneShot = 1;
return a;
}
//Damage
vector<string> splitDamage = parseBetween(s, "damage:", " ", false);
if (splitDamage.size())
@@ -2674,6 +2684,16 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return a;
}
//Cascade
vector<string> splitCascade = parseBetween(s, "cascade:", " ", false);
if (splitCascade.size())
{
Targetable * t = spell ? spell->getNextTarget() : NULL;
MTGAbility * a = NEW AACascade(observer, id, card, t , splitCascade[1], NULL, who);
a->oneShot = 1;
return a;
}
//modify turns
vector<string> splitModTurn = parseBetween(s, "turns:", " ", false);
if (splitModTurn.size())
@@ -4379,8 +4399,11 @@ void AbilityFactory::addAbilities(int _id, Spell * spell)
case 130553:// Beacon of Immortality
{
Player * player = spell->getNextPlayerTarget();
if (player->life < (INT_MAX / 4))
player->life += player->life;
if (!player->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
{
if (player->life < (INT_MAX / 4))
player->life += player->life;
}
zones->putInZone(card, spell->from, zones->library);
zones->library->shuffle();
break;
@@ -5752,7 +5775,7 @@ const string AManaProducer::getMenuText()
menutext = _("Add ");
char buffer[128];
int alreadyHasOne = 0;
for (int i = 0; i < 6; i++)
for (int i = 0; i < 8; i++)
{
int value = output->getCost(i);
if (value)
@@ -5761,8 +5784,11 @@ const string AManaProducer::getMenuText()
menutext.append(",");
sprintf(buffer, "%i ", value);
menutext.append(buffer);
if (i >= Constants::MTG_COLOR_GREEN && i <= Constants::MTG_COLOR_WHITE)
if (i == Constants::MTG_COLOR_WASTE)
menutext.append(_(" colorless"));
else if (i >= Constants::MTG_COLOR_GREEN && i <= Constants::MTG_COLOR_WASTE)
menutext.append(_(Constants::MTGColorStrings[i]));
alreadyHasOne = 1;
}
}
+123 -15
View File
@@ -12,6 +12,9 @@
#include "Counters.h"
#include "Subtypes.h"
#include "AIPlayerBaka.h"
using namespace std;
SUPPORT_OBJECT_ANALYTICS(MTGCardInstance)
@@ -115,7 +118,14 @@ void MTGCardInstance::copy(MTGCardInstance * card)
AbilityFactory af(observer);
af.addAbilities(observer->mLayers->actionLayer()->getMaxId(), spell);
delete spell;
mtgid = backupid;
if(observer->players[1]->playMode == Player::MODE_TEST_SUITE)
mtgid = backupid; // there must be a way to get the token id...
else
{
mtgid = card->getMTGId(); ///////////////////////////////////////////////////
setId = card->setId; // Copier/Cloner cards produces the same token...//
rarity = card->getRarity(); ///////////////////////////////////////////////////
}
castMethod = castMethodBackUP;
backupTargets = this->backupTargets;
storedCard = oldStored;
@@ -168,6 +178,7 @@ void MTGCardInstance::initMTGCI()
isMorphed = false;
isFlipped = false;
isPhased = false;
isCascaded = false;
phasedTurn = -1;
didattacked = 0;
didblocked = 0;
@@ -194,6 +205,7 @@ void MTGCardInstance::initMTGCI()
storedSourceCard = NULL;
myPair = NULL;
miracle = false;
countTrini = 0;
for (int i = 0; i < ManaCost::MANA_PAID_WITH_SUSPEND +1; i++)
alternateCostPaid[i] = 0;
@@ -918,23 +930,119 @@ JQuadPtr MTGCardInstance::getIcon()
return WResourceManager::Instance()->RetrieveCard(this, CACHE_THUMB);
}
ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * oldCost)
ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * newCost, ManaCost * refCost, bool noTrinisphere)
{
if(card->isLand())
return oldCost;
if(!card)
return oldCost;
//use forcedalive//
//pay zero costs//
//kicker???...//
//morph cost todo//
//trinisphere must be here below//
if(card->has(Constants::TRINISPHERE))
for(int jj = oldCost->getConvertedCost(); jj < 3; jj++)
oldCost->add(Constants::MTG_COLOR_ARTIFACT, 1);
return NULL;
if(card->getIncreasedManaCost()->getConvertedCost())
newCost->add(card->getIncreasedManaCost());
if(card->getReducedManaCost()->getConvertedCost())
newCost->remove(card->getReducedManaCost());
if(refCost->extraCosts)
newCost->extraCosts = refCost->extraCosts;
//affinity
int color = 0;
string type = "";
ManaCost * original = NEW ManaCost();
original->copy(newCost);
int reducem = 0;
bool resetCost = false;
for(unsigned int na = 0; na < card->cardsAbilities.size();na++)
{//start2
ANewAffinity * newAff = dynamic_cast<ANewAffinity*>(card->cardsAbilities[na]);
if(newAff)
{
if(!resetCost)
{
resetCost = true;
newCost->copy(original);
}
TargetChooserFactory tf(observer);
TargetChooser * tcn = tf.createTargetChooser(newAff->tcString,card,NULL);
return oldCost;
for (int w = 0; w < 2; ++w)
{
Player *p = observer->players[w];
MTGGameZone * zones[] = { p->game->inPlay, p->game->graveyard, p->game->hand, p->game->library, p->game->stack, p->game->exile };
for (int k = 0; k < 6; k++)
{
MTGGameZone * z = zones[k];
if (tcn->targetsZone(z))
reducem += z->countByCanTarget(tcn);
}
}
SAFE_DELETE(tcn);
ManaCost * removingCost = ManaCost::parseManaCost(newAff->manaString);
for(int j = 0; j < reducem; j++)
newCost->remove(removingCost);
SAFE_DELETE(removingCost);
}
}//end2
if(card->has(Constants::AFFINITYARTIFACTS)||
card->has(Constants::AFFINITYFOREST)||
card->has(Constants::AFFINITYGREENCREATURES)||
card->has(Constants::AFFINITYISLAND)||
card->has(Constants::AFFINITYMOUNTAIN)||
card->has(Constants::AFFINITYPLAINS)||
card->has(Constants::AFFINITYSWAMP))
{//start3
if (card->has(Constants::AFFINITYARTIFACTS))
type = "artifact";
else if (card->has(Constants::AFFINITYSWAMP))
type = "swamp";
else if (card->has(Constants::AFFINITYMOUNTAIN))
type = "mountain";
else if (card->has(Constants::AFFINITYPLAINS))
type = "plains";
else if (card->has(Constants::AFFINITYISLAND))
type = "island";
else if (card->has(Constants::AFFINITYFOREST))
type = "forest";
else if (card->has(Constants::AFFINITYGREENCREATURES))
{
color = 1;
type = "creature";
}
newCost->copy(original);
int reduce = 0;
if(card->has(Constants::AFFINITYGREENCREATURES))
{
TargetChooserFactory tf(observer);
TargetChooser * tc = tf.createTargetChooser("creature[green]",NULL);
reduce = card->controller()->game->battlefield->countByCanTarget(tc);
SAFE_DELETE(tc);
}
else
reduce = card->controller()->game->battlefield->countByType(type);
for(int i = 0; i < reduce;i++)
if(newCost->getCost(color) > 0)
newCost->remove(color,1);
}//end3
SAFE_DELETE(original);
if(!noTrinisphere)
{
//trinisphere... now how to implement kicker recomputation
if(card->has(Constants::TRINISPHERE))
{
for(int jj = newCost->getConvertedCost(); jj < 3; jj++)
{
newCost->add(Constants::MTG_COLOR_ARTIFACT, 1);
card->countTrini++;
}
}
else
{
if(card->countTrini)
{
newCost->remove(Constants::MTG_COLOR_ARTIFACT, card->countTrini);
card->countTrini=0;
}
}
}
return newCost;
}
MTGCardInstance * MTGCardInstance::getNextPartner()
+5 -2
View File
@@ -4,7 +4,7 @@ using std::string;
#include "MTGDefinitions.h"
char Constants::MTGColorChars[] = {'x','g','u','r','b','w','l'};
char Constants::MTGColorChars[] = {'x','g','u','r','b','w','c','l'};
vector <const char*> Constants::MTGColorStrings;
const string Constants::kManaColorless = "colorless";
@@ -13,6 +13,7 @@ const string Constants::kManaBlue = "blue";
const string Constants::kManaRed = "red";
const string Constants::kManaBlack = "black";
const string Constants::kManaWhite = "white";
const string Constants::kManaWaste = "waste";
int Constants::_r[7] = {75,20,20,200,50,255,128};
int Constants::_g[7] = {30,140,30,15,50,255,128};
@@ -151,7 +152,9 @@ const char* Constants::MTGBasicAbilities[] = {
"zerocast",
"trinisphere",
"canplayfromexile",
"libraryeater"
"libraryeater",
"devoid",
"cantchangelife"
};
map<string,int> Constants::MTGBasicAbilitiesMap;
+6
View File
@@ -375,6 +375,12 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
{
copy->miracle = true;
}
if(from == g->players[0]->game->battlefield || from == g->players[1]->game->battlefield)
if(to != g->players[0]->game->battlefield || to != g->players[1]->game->battlefield)
{
card->kicked = 0;
copy->kicked = 0;//kicked reset everflowing chalice...
}
if (card->discarded)
{//set discarded for madness...
if(from == g->players[0]->game->hand || from == g->players[1]->game->hand)
+172 -97
View File
@@ -481,84 +481,86 @@ int MTGKickerRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
return 0;
if ((player->game->graveyard->hasCard(card) && !card->has(Constants::CANPLAYFROMGRAVEYARD)) || (player->game->exile->hasCard(card) && !card->has(Constants::CANPLAYFROMEXILE)))
return 0;
ManaCost * kicker = card->getManaCost()->getKicker();
if(!kicker)
{
SAFE_DELETE(kicker);
if(!allowedToCast(card,player))
return 0;
}
ManaCost * playerMana = player->getManaPool();
ManaCost * withKickerCost= NEW ManaCost(card->model->data->getManaCost());
if(card->getIncreasedManaCost()->getConvertedCost())
withKickerCost->add(card->getIncreasedManaCost());
if(card->getReducedManaCost()->getConvertedCost())
withKickerCost->remove(card->getReducedManaCost());
withKickerCost->add(card->model->data->getManaCost()->getKicker());
if(!playerMana->canAfford(withKickerCost))
{
delete withKickerCost;
if(!card->getManaCost()->getKicker())
return 0;
if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || (card->StackIsEmptyandSorcerySpeed()))
{
if(card->controller()->epic)
return 0;
if (card->controller()->game->playRestrictions->canPutIntoZone(card, game->currentActionPlayer->game->stack) == PlayRestriction::CANT_PLAY)
return 0;
ManaCost * playerMana = player->getManaPool();
ManaCost * withKickerCost= NEW ManaCost(card->getManaCost());
withKickerCost->add(card->getManaCost()->getKicker());
//cost reduction/recalculation must be here or outside somehow...
#ifdef WIN32
withKickerCost->Dump();
#endif
if (playerMana->canAfford(withKickerCost))
return 1;
}
delete withKickerCost;
return 1;
return 0;
}
int MTGKickerRule::reactToClick(MTGCardInstance * card)
{
if(!isReactingToClick(card, NULL))
if (!isReactingToClick(card))
return 0;
Player * player = game->currentlyActing();
ManaCost * withKickerCost= NEW ManaCost(card->model->data->getManaCost());//using pointers here alters the real cost of the card.
if(card->getIncreasedManaCost()->getConvertedCost())
withKickerCost->add(card->getIncreasedManaCost());
if(card->getReducedManaCost()->getConvertedCost())
withKickerCost->remove(card->getReducedManaCost());
if (card->model->data->getManaCost()->getKicker()->isMulti)
{
while(player->getManaPool()->canAfford(withKickerCost))
{
withKickerCost->add(card->model->data->getManaCost()->getKicker());
card->kicked += 1;
}
card->kicked -= 1;
//for(int i = 0;i < card->kicked;i++)
//player->getManaPool()->pay(card->getManaCost()->kicker);
card->paymenttype = MTGAbility::PUT_INTO_PLAY_WITH_KICKER;
}
else
{
withKickerCost->add(card->model->data->getManaCost()->getKicker());
card->paymenttype = MTGAbility::PUT_INTO_PLAY_WITH_KICKER;
}
if (withKickerCost->isExtraPaymentSet())
ManaCost * cost = card->getManaCost();
//this handles extra cost payments at the moment a card is played.
if (cost->isExtraPaymentSet())
{
if (!game->targetListIsSet(card))
{
delete withKickerCost;
return 0;
}
}
else
{
withKickerCost->setExtraCostsAction(this, card);
game->mExtraPayment = withKickerCost->extraCosts;
delete withKickerCost;
cost->setExtraCostsAction(this, card);
game->mExtraPayment = cost->extraCosts;
return 0;
}
ManaCost * previousManaPool = NEW ManaCost(player->getManaPool());
player->getManaPool()->pay(withKickerCost);
withKickerCost->doPayExtra();
int payResult = player->getManaPool()->pay(card->getManaCost());
if (card->getManaCost()->getKicker())
{ //cost reduction/recalculation must be here or outside somehow...
ManaCost * withKickerCost= NEW ManaCost(card->getManaCost());
withKickerCost->add(withKickerCost->getKicker());
if (card->getManaCost()->getKicker()->isMulti)
{
while(previousManaPool->canAfford(withKickerCost))
{
withKickerCost->add(withKickerCost->getKicker());
card->kicked += 1;
}
for(int i = 0;i < card->kicked;i++)
player->getManaPool()->pay(card->getManaCost()->getKicker());
payResult = ManaCost::MANA_PAID_WITH_KICKER;
}
else if (previousManaPool->canAfford(withKickerCost))
{
player->getManaPool()->pay(card->getManaCost()->getKicker());
payResult = ManaCost::MANA_PAID_WITH_KICKER;
}
delete withKickerCost;
}
card->getManaCost()->doPayExtra();
ManaCost * spellCost = previousManaPool->Diff(player->getManaPool());
delete withKickerCost;
delete previousManaPool;
if (card->isLand())
{
MTGCardInstance * copy = player->game->putInZone(card, card->currentZone, player->game->temp);
Spell * spell = NEW Spell(game, 0,copy,NULL,NULL, ManaCost::MANA_PAID_WITH_KICKER);
Spell * spell = NEW Spell(game, 0,copy,NULL,NULL, payResult);
spell->resolve();
delete spellCost;
delete spell;
@@ -569,21 +571,21 @@ int MTGKickerRule::reactToClick(MTGCardInstance * card)
MTGCardInstance * copy = player->game->putInZone(card, card->currentZone, player->game->stack);
if (game->targetChooser)
{
spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, spellCost, ManaCost::MANA_PAID_WITH_KICKER, 0);
spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, spellCost, payResult, 0);
game->targetChooser = NULL;
}
else
{
spell = game->mLayers->stackLayer()->addSpell(copy, NULL, spellCost, ManaCost::MANA_PAID_WITH_KICKER, 0);
spell = game->mLayers->stackLayer()->addSpell(copy, NULL, spellCost, payResult, 0);
}
if (card->has(Constants::STORM))
{
int storm = player->game->stack->seenThisTurn("*", Constants::CAST_ALL) + player->opponent()->game->stack->seenThisTurn("*", Constants::CAST_ALL);
ManaCost * stormSpellCost = player->getManaPool();
ManaCost * spellCost = player->getManaPool();
for (int i = storm; i > 1; i--)
{
spell = game->mLayers->stackLayer()->addSpell(copy, NULL, stormSpellCost, ManaCost::MANA_PAID_WITH_KICKER, 1);
spell = game->mLayers->stackLayer()->addSpell(copy, NULL, spellCost, payResult, 1);
}
}//end of storm
@@ -629,7 +631,14 @@ int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *
{
if (card->alias == 11000)
return 0;//overload has its own rule
ManaCost * alternateCost = card->getManaCost()->getAlternative();
if(!card->getManaCost()->getAlternative())
return 0;
ManaCost * alternateCost = card->computeNewCost(card,NEW ManaCost(card->model->data->getManaCost()->getAlternative()),card->getManaCost()->getAlternative());
if(alternateCost->extraCosts)
for(unsigned int i = 0; i < alternateCost->extraCosts->costs.size();i++)
{
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))
return 0;
if ((game->currentlyActing()->game->graveyard->hasCard(card) && !card->has(Constants::CANPLAYFROMGRAVEYARD)) || (game->currentlyActing()->game->exile->hasCard(card) && !card->has(Constants::CANPLAYFROMEXILE)))
@@ -689,9 +698,13 @@ int MTGAlternativeCostRule::reactToClick(MTGCardInstance * card)
if ( !isReactingToClick(card))
return 0;
ManaCost *alternateCost = card->getManaCost()->getAlternative();
ManaCost * alternateCost = card->computeNewCost(card,NEW ManaCost(card->model->data->getManaCost()->getAlternative()),card->getManaCost()->getAlternative());
card->paymenttype = MTGAbility::ALTERNATIVE_COST;
if(alternateCost->extraCosts)
for(unsigned int i = 0; i < alternateCost->extraCosts->costs.size();i++)
{
alternateCost->extraCosts->costs[i]->setSource(card);
}
return reactToClick(card, alternateCost, ManaCost::MANA_PAID_WITH_ALTERNATIVE);
}
@@ -795,7 +808,15 @@ int MTGBuyBackRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
return 0;
if(!allowedToCast(card,player))
return 0;
return MTGAlternativeCostRule::isReactingToClick( card, mana, card->getManaCost()->getBuyback() );
if(!card->getManaCost()->getBuyback())
return 0;
ManaCost * buybackCost = card->computeNewCost(card,NEW ManaCost(card->model->data->getManaCost()->getBuyback()),card->getManaCost()->getBuyback());
if(buybackCost->extraCosts)
for(unsigned int i = 0; i < buybackCost->extraCosts->costs.size();i++)
{
buybackCost->extraCosts->costs[i]->setSource(card);
}
return MTGAlternativeCostRule::isReactingToClick( card, mana, buybackCost );
}
int MTGBuyBackRule::reactToClick(MTGCardInstance * card)
@@ -803,11 +824,15 @@ int MTGBuyBackRule::reactToClick(MTGCardInstance * card)
if (!isReactingToClick(card))
return 0;
ManaCost * alternateCost = card->getManaCost()->getBuyback();
ManaCost * buybackCost = card->computeNewCost(card,NEW ManaCost(card->model->data->getManaCost()->getBuyback()),card->getManaCost()->getBuyback());
if(buybackCost->extraCosts)
for(unsigned int i = 0; i < buybackCost->extraCosts->costs.size();i++)
{
buybackCost->extraCosts->costs[i]->setSource(card);
}
card->paymenttype = MTGAbility::BUYBACK_COST;
return MTGAlternativeCostRule::reactToClick(card, alternateCost, ManaCost::MANA_PAID_WITH_BUYBACK);
return MTGAlternativeCostRule::reactToClick(card, buybackCost, ManaCost::MANA_PAID_WITH_BUYBACK);
}
@@ -837,19 +862,31 @@ int MTGFlashBackRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
Player * player = game->currentlyActing();
if (!player->game->graveyard->hasCard(card))
return 0;
return MTGAlternativeCostRule::isReactingToClick(card, mana, card->getManaCost()->getFlashback() );
if(!card->getManaCost()->getFlashback())
return 0;
ManaCost * flashbackCost = card->computeNewCost(card,NEW ManaCost(card->model->data->getManaCost()->getFlashback()),card->getManaCost()->getFlashback());
if(flashbackCost->extraCosts)
for(unsigned int i = 0; i < flashbackCost->extraCosts->costs.size();i++)
{
flashbackCost->extraCosts->costs[i]->setSource(card);
}
return MTGAlternativeCostRule::isReactingToClick(card, mana, flashbackCost );
}
int MTGFlashBackRule::reactToClick(MTGCardInstance * card)
{
ManaCost * alternateCost = card->getManaCost()->getFlashback();
ManaCost * flashbackCost = card->computeNewCost(card,NEW ManaCost(card->model->data->getManaCost()->getFlashback()),card->getManaCost()->getFlashback());
if(flashbackCost->extraCosts)
for(unsigned int i = 0; i < flashbackCost->extraCosts->costs.size();i++)
{
flashbackCost->extraCosts->costs[i]->setSource(card);
}
if (!isReactingToClick(card))
return 0;
card->paymenttype = MTGAbility::FLASHBACK_COST;
return MTGAlternativeCostRule::reactToClick(card, alternateCost, ManaCost::MANA_PAID_WITH_FLASHBACK);
return MTGAlternativeCostRule::reactToClick(card, flashbackCost, ManaCost::MANA_PAID_WITH_FLASHBACK);
}
@@ -878,12 +915,19 @@ MTGAlternativeCostRule(observer, _id)
int MTGRetraceRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
{
Player * player = game->currentlyActing();
ManaCost * alternateManaCost = card->getManaCost()->getRetrace();
if(!card->getManaCost()->getRetrace())
return 0;
ManaCost * retraceCost = card->computeNewCost(card,NEW ManaCost(card->model->data->getManaCost()->getRetrace()),card->getManaCost()->getRetrace());
if(retraceCost->extraCosts)
for(unsigned int i = 0; i < retraceCost->extraCosts->costs.size();i++)
{
retraceCost->extraCosts->costs[i]->setSource(card);
}
if (!player->game->graveyard->hasCard(card))
return 0;
return MTGAlternativeCostRule::isReactingToClick( card, mana, alternateManaCost );
return MTGAlternativeCostRule::isReactingToClick( card, mana, retraceCost );
}
@@ -891,12 +935,17 @@ int MTGRetraceRule::reactToClick(MTGCardInstance * card)
{
if (!isReactingToClick(card))
return 0;
ManaCost * alternateCost = card->getManaCost()->getRetrace();
ManaCost * retraceCost = card->computeNewCost(card,NEW ManaCost(card->model->data->getManaCost()->getRetrace()),card->getManaCost()->getRetrace());
if(retraceCost->extraCosts)
for(unsigned int i = 0; i < retraceCost->extraCosts->costs.size();i++)
{
retraceCost->extraCosts->costs[i]->setSource(card);
}
card->paymenttype = MTGAbility::RETRACE_COST;
return MTGAlternativeCostRule::reactToClick(card, alternateCost, ManaCost::MANA_PAID_WITH_RETRACE);
return MTGAlternativeCostRule::reactToClick(card, retraceCost, ManaCost::MANA_PAID_WITH_RETRACE);
}
ostream& MTGRetraceRule::toString(ostream& out) const
@@ -1048,7 +1097,9 @@ int MTGMorphCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
Player * player = game->currentlyActing();
//Player * currentPlayer = game->currentPlayer;
if (!player->game->hand->hasCard(card))
if (!player->game->graveyard->hasCard(card) && !player->game->exile->hasCard(card) && !player->game->hand->hasCard(card))
return 0;
if ((!card->has(Constants::CANPLAYFROMGRAVEYARD) && player->game->graveyard->hasCard(card))||(!card->has(Constants::CANPLAYFROMEXILE) && player->game->exile->hasCard(card)))
return 0;
if (!card->getManaCost()->getMorph())
return 0;
@@ -1062,7 +1113,12 @@ int MTGMorphCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
if (card->controller()->game->playRestrictions->canPutIntoZone(card, card->controller()->game->stack) == PlayRestriction::CANT_PLAY)
return 0;
ManaCost * playerMana = player->getManaPool();
ManaCost * morph = card->getManaCost()->getMorph();
ManaCost * morph = card->computeNewCost(card,NEW ManaCost(card->model->data->getManaCost()->getMorph()),card->getManaCost()->getMorph());
if(morph->extraCosts)
for(unsigned int i = 0; i < morph->extraCosts->costs.size();i++)
{
morph->extraCosts->costs[i]->setSource(card);
}
#ifdef WIN32
ManaCost * cost = card->getManaCost();
@@ -1070,7 +1126,7 @@ int MTGMorphCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *)
#endif
//cost of card.
if (morph && playerMana->canAfford(morph))
if (playerMana->canAfford(morph))
{
return 1;
}
@@ -1085,8 +1141,13 @@ int MTGMorphCostRule::reactToClick(MTGCardInstance * card)
return 0;
Player * player = game->currentlyActing();
ManaCost * cost = card->getManaCost();
ManaCost * morph = card->getManaCost()->getMorph();
ManaCost * playerMana = player->getManaPool();
ManaCost * morph = card->computeNewCost(card,NEW ManaCost(card->model->data->getManaCost()->getMorph()),card->getManaCost()->getMorph());
if(morph->extraCosts)
for(unsigned int i = 0; i < morph->extraCosts->costs.size();i++)
{
morph->extraCosts->costs[i]->setSource(card);
}
//this handles extra cost payments at the moment a card is played.
if (playerMana->canAfford(morph))
{
@@ -1108,7 +1169,7 @@ int MTGMorphCostRule::reactToClick(MTGCardInstance * card)
}
//------------------------------------------------------------------------
ManaCost * previousManaPool = NEW ManaCost(player->getManaPool());
player->getManaPool()->pay(card->getManaCost()->getMorph());
player->getManaPool()->pay(morph);
card->getManaCost()->getMorph()->doPayExtra();
int payResult = ManaCost::MANA_PAID_WITH_MORPH;
//if morph has a extra payment thats set, this code pays it.the if statement is 100% needed as it would cause a crash on cards that dont have the morph cost.
@@ -1122,6 +1183,12 @@ int MTGMorphCostRule::reactToClick(MTGCardInstance * card)
card->morphed = true;
card->isMorphed = true;
MTGCardInstance * copy = player->game->putInZone(card, card->currentZone, player->game->stack);
copy->getManaCost()->resetCosts();//Morph has no ManaCost on stack
copy->setColor(0,1);
copy->types.clear();
string cre = "Creature";
copy->setType(cre.c_str());
copy->basicAbilities.reset();
Spell * spell = NULL;
spell = game->mLayers->stackLayer()->addSpell(copy, NULL, spellCost, payResult, 0);
spell->source->morphed = true;
@@ -1169,10 +1236,12 @@ int MTGPayZeroRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
return 0;
Player * player = game->currentlyActing();
ManaCost * cost = NEW ManaCost(ManaCost::parseManaCost("{0}",NULL,NULL));
if(card->getIncreasedManaCost()->getConvertedCost())
cost->add(card->getIncreasedManaCost());
if(card->getReducedManaCost()->getConvertedCost())
cost->remove(card->getReducedManaCost());
ManaCost * newCost = card->computeNewCost(card,cost,cost);
if(newCost->extraCosts)
for(unsigned int i = 0; i < newCost->extraCosts->costs.size();i++)
{
newCost->extraCosts->costs[i]->setSource(card);
}
if(card->isLand())
return 0;
@@ -1187,7 +1256,7 @@ int MTGPayZeroRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
else
CustomName = "Zero Cast From Anywhere";
return MTGAlternativeCostRule::isReactingToClick(card, mana, cost);
return MTGAlternativeCostRule::isReactingToClick(card, mana, newCost);
}
int MTGPayZeroRule::reactToClick(MTGCardInstance * card)
@@ -1196,14 +1265,16 @@ int MTGPayZeroRule::reactToClick(MTGCardInstance * card)
return 0;
ManaCost * cost = NEW ManaCost(ManaCost::parseManaCost("{0}",NULL,NULL));
if(card->getIncreasedManaCost()->getConvertedCost())
cost->add(card->getIncreasedManaCost());
if(card->getReducedManaCost()->getConvertedCost())
cost->remove(card->getReducedManaCost());
ManaCost * newCost = card->computeNewCost(card,cost,cost);
if(newCost->extraCosts)
for(unsigned int i = 0; i < newCost->extraCosts->costs.size();i++)
{
newCost->extraCosts->costs[i]->setSource(card);
}
card->paymenttype = MTGAbility::PAYZERO_COST;
return MTGAlternativeCostRule::reactToClick(card, cost, ManaCost::MANA_PAID);
return MTGAlternativeCostRule::reactToClick(card, newCost, ManaCost::MANA_PAID);
}
ostream& MTGPayZeroRule::toString(ostream& out) const
@@ -1229,10 +1300,12 @@ int MTGOverloadRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
return 0;
Player * player = game->currentlyActing();
ManaCost * cost = NEW ManaCost(card->model->data->getManaCost()->getAlternative());
if(card->getIncreasedManaCost()->getConvertedCost())
cost->add(card->getIncreasedManaCost());
if(card->getReducedManaCost()->getConvertedCost())
cost->remove(card->getReducedManaCost());
ManaCost * newCost = card->computeNewCost(card,cost,cost);
if(newCost->extraCosts)
for(unsigned int i = 0; i < newCost->extraCosts->costs.size();i++)
{
newCost->extraCosts->costs[i]->setSource(card);
}
if (card->isLand())
return 0;
@@ -1241,7 +1314,7 @@ int MTGOverloadRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
if ((!card->has(Constants::CANPLAYFROMGRAVEYARD) && player->game->graveyard->hasCard(card))||(!card->has(Constants::CANPLAYFROMEXILE) && player->game->exile->hasCard(card)))
return 0;
return MTGAlternativeCostRule::isReactingToClick(card, mana, cost);
return MTGAlternativeCostRule::isReactingToClick(card, mana, newCost);
}
int MTGOverloadRule::reactToClick(MTGCardInstance * card)
@@ -1250,14 +1323,16 @@ int MTGOverloadRule::reactToClick(MTGCardInstance * card)
return 0;
ManaCost * cost = NEW ManaCost(card->model->data->getManaCost()->getAlternative());
if(card->getIncreasedManaCost()->getConvertedCost())
cost->add(card->getIncreasedManaCost());
if(card->getReducedManaCost()->getConvertedCost())
cost->remove(card->getReducedManaCost());
ManaCost * newCost = card->computeNewCost(card,cost,cost);
if(newCost->extraCosts)
for(unsigned int i = 0; i < newCost->extraCosts->costs.size();i++)
{
newCost->extraCosts->costs[i]->setSource(card);
}
card->paymenttype = MTGAbility::OVERLOAD_COST;
return MTGAlternativeCostRule::reactToClick(card, cost, ManaCost::MANA_PAID_WITH_OVERLOAD, true);
return MTGAlternativeCostRule::reactToClick(card, newCost, ManaCost::MANA_PAID_WITH_OVERLOAD, true);
}
ostream& MTGOverloadRule::toString(ostream& out) const
+36 -4
View File
@@ -139,10 +139,14 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
}
break;
case 's':
if (value == "s2l")
if (value.find("s2l") != string::npos)
{ //Send To Library Cost (move from anywhere to Library)
manaCost->addExtraCost(NEW ToLibraryCost(tc));
}
else if (value.find("s2g") != string::npos)
{ //Send to Graveyard Cost (move from anywhere to Graveyard)
manaCost->addExtraCost(NEW ToGraveCost(tc));
}
else
{ //Sacrifice
manaCost->addExtraCost(NEW SacrificeCost(tc));
@@ -229,6 +233,13 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
manaCost->addExtraCost(NEW LifeorManaCost(NULL,manaType));
break;
}
case 'i' :
{
SAFE_DELETE(tc);
manaCost->add(0,1);
manaCost->addExtraCost(NEW SnowCost);
break;
}
case 'q':
if(value == "q")
{
@@ -250,7 +261,7 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
{
manaCost->addExtraCost(NEW CycleCost(tc));
}
else
else if(value.find("(") != string::npos)
{
size_t counter_start = value.find("(");
size_t counter_end = value.find(")", counter_start);
@@ -276,9 +287,15 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
tc = tcf.createTargetChooser(target, c);
}
manaCost->addExtraCost(NEW CounterCost(counter, tc));
break;
}
break;
}
else if(value == "c")
{
manaCost->add(Constants::MTG_COLOR_WASTE, 1);
break;
}
break;
}
default: //uncolored cost and hybrid costs and special cost
{
if(value == "unattach")
@@ -742,6 +759,10 @@ int ManaCost::getConvertedCost()
ExtraCost * pMana = dynamic_cast<LifeorManaCost*>(extraCosts->costs[i]);
if (pMana)
result++;
//snow cost???
ExtraCost * sMana = dynamic_cast<SnowCost*>(extraCosts->costs[i]);
if (sMana)
result++;
}
}
@@ -1092,6 +1113,8 @@ int ManaPool::remove(int color, int value)
int ManaPool::add(int color, int value, MTGCardInstance * source)
{
if (color == Constants::MTG_COLOR_ARTIFACT)
color = Constants::MTG_COLOR_WASTE;
int result = ManaCost::add(color, value);
for (int i = 0; i < value; ++i)
{
@@ -1105,6 +1128,15 @@ int ManaPool::add(ManaCost * _cost, MTGCardInstance * source)
{
if (!_cost)
return 0;
//while colorless is still exactly the same, there are now cards that require
//true colorless mana, ei:eldrazi. so whenever we add mana, we now replace it with the
//new type. keeping the old type intact for payment methods {1}{c} ....
int replaceArtifact = _cost->getCost(Constants::MTG_COLOR_ARTIFACT);
if (replaceArtifact)
{
_cost->add(Constants::MTG_COLOR_WASTE, replaceArtifact);
_cost->remove(Constants::MTG_COLOR_ARTIFACT, replaceArtifact);
}
int result = ManaCost::add(_cost);
for (int i = 0; i < Constants::NB_Colors; i++)
{
+27 -1
View File
@@ -34,8 +34,15 @@ Player::Player(GameObserver *observer, string file, string fileSmall, MTGDeck *
extraTurn = 0;
drawCounter = 0;
epic = 0;
forcefield = 0;
raidcount = 0;
handmodifier = 0;
snowManaG = 0;
snowManaR = 0;
snowManaB = 0;
snowManaU = 0;
snowManaW = 0;
snowManaC = 0;
prowledTypes.clear();
doesntEmpty = NEW ManaCost();
poolDoesntEmpty = NEW ManaCost();
@@ -155,7 +162,8 @@ int Player::gainOrLoseLife(int value)
thatmuch = abs(value); //the value that much is a variable to be used with triggered abilities.
//ie:when ever you gain life, draw that many cards. when used in a trigger draw:thatmuch, will return the value
//that the triggered event stored in the card for "that much".
life+=value;
if (!inPlay()->hasAbility(Constants::CANTCHANGELIFE))
life+=value;
if (value<0)
lifeLostThisTurn += abs(value);
@@ -238,6 +246,24 @@ void Player::serumMulligan()
//Draw hand no penalty
}
bool Player::hasPossibleAttackers()
{
MTGGameZone * z = game->inPlay;
int nbcards = z->nb_cards;
for (int j = 0; j < nbcards; ++j)
{
MTGCardInstance * c = z->cards[j];
if (c->canAttack())
return true;
}
return false;
}
bool Player::noPossibleAttackers()
{
return !hasPossibleAttackers();
}
bool Player::DeadLifeState(bool check)
{
if ((life <= 0)||(poisonCount >= 10))
+26 -1
View File
@@ -149,7 +149,32 @@ WEventCreatureBlockerRank::WEventCreatureBlockerRank(MTGCardInstance * card, MTG
WEventEngageMana::WEventEngageMana(int color, MTGCardInstance* card, ManaPool * destination) :
WEvent(), color(color), card(card), destination(destination)
{
{//controller snow
if(color == 1 && card->controller()->getManaPool() == destination && card->hasType("snow"))
card->controller()->snowManaG += 1;
if(color == 2 && card->controller()->getManaPool() == destination && card->hasType("snow"))
card->controller()->snowManaU += 1;
if(color == 3 && card->controller()->getManaPool() == destination && card->hasType("snow"))
card->controller()->snowManaR += 1;
if(color == 4 && card->controller()->getManaPool() == destination && card->hasType("snow"))
card->controller()->snowManaB += 1;
if(color == 5 && card->controller()->getManaPool() == destination && card->hasType("snow"))
card->controller()->snowManaW += 1;
if((color == 0 || color == 6) && card->controller()->getManaPool() == destination && card->hasType("snow"))
card->controller()->snowManaC += 1;
//opponent snow
if(color == 1 && card->controller()->opponent()->getManaPool() == destination && card->hasType("snow"))
card->controller()->opponent()->snowManaG += 1;
if(color == 2 && card->controller()->opponent()->getManaPool() == destination && card->hasType("snow"))
card->controller()->opponent()->snowManaU += 1;
if(color == 3 && card->controller()->opponent()->getManaPool() == destination && card->hasType("snow"))
card->controller()->opponent()->snowManaR += 1;
if(color == 4 && card->controller()->opponent()->getManaPool() == destination && card->hasType("snow"))
card->controller()->opponent()->snowManaB += 1;
if(color == 5 && card->controller()->opponent()->getManaPool() == destination && card->hasType("snow"))
card->controller()->opponent()->snowManaW += 1;
if((color == 0 || color == 6) && card->controller()->opponent()->getManaPool() == destination && card->hasType("snow"))
card->controller()->opponent()->snowManaC += 1;
}
WEventConsumeMana::WEventConsumeMana(int color, ManaPool * source) :
WEvent(), color(color), source(source)