Merge pull request #655 from kevlahnota/master

chooseacolor indicator, increased/reduced cost affects retrace,buyback,flashback
cast in graveyard that have spelltarget types "target=" fix
This commit is contained in:
Anthony Calosa
2015-11-04 07:06:47 +08:00
14 changed files with 157 additions and 147 deletions

View File

@@ -69,6 +69,16 @@ mana={B}
type=Sorcery type=Sorcery
[/card] [/card]
[card] [card]
name=Cemetery Puca
text=Whenever a creature is put into a graveyard from the battlefield, you may pay {1}. If you do, Cemetery Puca becomes a copy of that creature and gains this ability.
auto=@movedto(creature|graveyard) from(battlefield):all(trigger[from]) pay[[{1}]] copy
mana={1}{UB}{UB}
type=Creature
subtype=Shapeshifter
power=1
toughness=2
[/card]
[card]
name=Cinder Seer name=Cinder Seer
auto={2}{r}{t}:target(creature,Player) damage:type:*[red]:myhand auto={2}{r}{t}:target(creature,Player) damage:type:*[red]:myhand
text={2}{R}, {T}: Reveal any number of red cards in your hand. Cinder Seer deals X damage to target creature or player, where X is the number of cards revealed this way. text={2}{R}, {T}: Reveal any number of red cards in your hand. Cinder Seer deals X damage to target creature or player, where X is the number of cards revealed this way.
@@ -89,6 +99,16 @@ mana={1}{B}{G}
type=Instant type=Instant
[/card] [/card]
[card] [card]
name=Cryptoplasm
auto=@each my upkeep:may copy target(other creature|battlefield)
text=At the beginning of your upkeep, you may have Cryptoplasm become a copy of another target creature. If you do, Cryptoplasm gains this ability.
mana={1}{U}{U}
type=Creature
subtype=Shapeshifter
power=2
toughness=2
[/card]
[card]
name=Dark Withering name=Dark Withering
abilities=madness abilities=madness
autoexile=restriction{discarded} pay({B}) name(pay B to cast) activate name(pay B to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) autoexile=restriction{discarded} pay({B}) name(pay B to cast) activate name(pay B to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard)
@@ -99,6 +119,16 @@ mana={4}{B}{B}
type=Instant type=Instant
[/card] [/card]
[card] [card]
name=Dimir Doppelganger
auto={1}{U}{B}:target(creature|graveyard) moveto(exile) and!(copy)!
text={1}{U}{B}: Exile target creature card from a graveyard. Dimir Doppelganger becomes a copy of that card and gains this ability.
mana={1}{U}{B}
type=Creature
subtype=Shapeshifter
power=0
toughness=2
[/card]
[card]
name=Distortion Strike name=Distortion Strike
target=creature target=creature
auto=1/0 auto=1/0
@@ -462,6 +492,23 @@ type=Sorcery
text=You gain 2 life. Then if you have more life than an opponent, draw a card. Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) text=You gain 2 life. Then if you have more life than an opponent, draw a card. Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)
[/card] [/card]
[card] [card]
name=Thespian's Stage
auto={T}:Add{1}
auto={2}{T}:copy target(land|battlefield)
text={T}: Add {1} to your mana pool. -- {2}, {T}: Thespian's Stage becomes a copy of target land and gains this ability.
type=Land
[/card]
[card]
name=Unstable Shapeshifter
auto=@movedto(other creature|battlefield):all(trigger[from]) copy
text=Whenever another creature enters the battlefield, Unstable Shapeshifter becomes a copy of that creature and gains this ability.
mana={3}{U}
type=Creature
subtype=Shapeshifter
power=0
toughness=1
[/card]
[card]
name=Virulent Swipe name=Virulent Swipe
target=creature target=creature
auto=2/0 auto=2/0

View File

@@ -15219,16 +15219,6 @@ power=0
toughness=5 toughness=5
[/card] [/card]
[card] [card]
name=Cemetery Puca
text=Whenever a creature is put into a graveyard from the battlefield, you may pay {1}. If you do, Cemetery Puca becomes a copy of that creature and gains this ability.
auto=@movedto(creature|graveyard) from(battlefield):all(trigger[from]) pay[[{1}]] copy
mana={1}{UB}{UB}
type=Creature
subtype=Shapeshifter
power=1
toughness=2
[/card]
[card]
name=Cemetery Reaper name=Cemetery Reaper
auto=lord(other zombie|myBattlefield) 1/1 auto=lord(other zombie|myBattlefield) 1/1
auto={2}{B}{T}:moveTo(Exile) target(creature|graveyard) && token(Zombie,Creature Zombie,2/2,black) auto={2}{B}{T}:moveTo(Exile) target(creature|graveyard) && token(Zombie,Creature Zombie,2/2,black)
@@ -16540,6 +16530,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Cho-Manno's Blessing name=Cho-Manno's Blessing
alias=0000
abilities=auraward abilities=auraward
target=creature target=creature
abilities=flash abilities=flash
@@ -18133,6 +18124,7 @@ type=Artifact
[/card] [/card]
[card] [card]
name=Coldsteel Heart name=Coldsteel Heart
alias=0000
auto=tap auto=tap
auto=chooseacolor {T}:add{chosencolor} chooseend auto=chooseacolor {T}:add{chosencolor} chooseend
text=Coldsteel Heart enters the battlefield tapped. -- As Coldsteel Heart enters the battlefield, choose a color. -- {T}: Add one mana of the chosen color to your mana pool. text=Coldsteel Heart enters the battlefield tapped. -- As Coldsteel Heart enters the battlefield, choose a color. -- {T}: Add one mana of the chosen color to your mana pool.
@@ -20675,16 +20667,6 @@ power=0
toughness=0 toughness=0
[/card] [/card]
[card] [card]
name=Cryptoplasm
auto=@each my upkeep:may copy target(other creature|battlefield)
text=At the beginning of your upkeep, you may have Cryptoplasm become a copy of another target creature. If you do, Cryptoplasm gains this ability.
mana={1}{U}{U}
type=Creature
subtype=Shapeshifter
power=2
toughness=2
[/card]
[card]
name=Cryptwailing name=Cryptwailing
auto={1}{E(creature|mygraveyard)}{E(creature|mygraveyard)}:target(player) ability$!name(discard) target(*|myhand) reject!$ targetedplayer asSorcery auto={1}{E(creature|mygraveyard)}{E(creature|mygraveyard)}:target(player) ability$!name(discard) target(*|myhand) reject!$ targetedplayer asSorcery
text={1}, Exile two creature cards from your graveyard: Target player discards a card. Activate this ability only any time you could cast a sorcery. text={1}, Exile two creature cards from your graveyard: Target player discards a card. Activate this ability only any time you could cast a sorcery.
@@ -21040,6 +21022,7 @@ subtype=Aura Curse
[/card] [/card]
[card] [card]
name=Curse of Wizardry name=Curse of Wizardry
alias=0000
auto=chooseacolor transforms((,newability[@movedto(*[chosencolor]|mystack):life:-1 controller],newability[@movedto(*[chosencolor]|opponentstack):life:-1 opponent])) chooseend auto=chooseacolor transforms((,newability[@movedto(*[chosencolor]|mystack):life:-1 controller],newability[@movedto(*[chosencolor]|opponentstack):life:-1 opponent])) chooseend
text=As Curse of Wizardry enters the battlefield, choose a color. -- Whenever a player casts a spell of the chosen color, that player loses 1 life. text=As Curse of Wizardry enters the battlefield, choose a color. -- Whenever a player casts a spell of the chosen color, that player loses 1 life.
mana={2}{B}{B} mana={2}{B}{B}
@@ -24756,16 +24739,6 @@ power=2
toughness=2 toughness=2
[/card] [/card]
[card] [card]
name=Dimir Doppelganger
auto={1}{U}{B}:target(creature|graveyard) moveto(exile) and!(copy)!
text={1}{U}{B}: Exile target creature card from a graveyard. Dimir Doppelganger becomes a copy of that card and gains this ability.
mana={1}{U}{B}
type=Creature
subtype=Shapeshifter
power=0
toughness=2
[/card]
[card]
name=Dimir Guildgate name=Dimir Guildgate
auto=tap auto=tap
auto={T}:add{U} auto={T}:add{U}
@@ -35093,6 +35066,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Flickering Ward name=Flickering Ward
alias=0000
abilities=auraward abilities=auraward
target=creature target=creature
auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend
@@ -35171,6 +35145,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Floating Shield name=Floating Shield
alias=0000
abilities=auraward abilities=auraward
target=creature target=creature
auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend
@@ -43565,6 +43540,7 @@ toughness=3
[/card] [/card]
[card] [card]
name=Hall of Triumph name=Hall of Triumph
alias=0000
auto=activatechooseacolor transforms((,newability[lord(creature[chosencolor]|mybattlefield) 1/1])) forever activatechooseend auto=activatechooseacolor transforms((,newability[lord(creature[chosencolor]|mybattlefield) 1/1])) forever activatechooseend
text=As Hall of Triumph enters the battlefield, choose a color. -- Creatures you control of the chosen color get +1/+1. text=As Hall of Triumph enters the battlefield, choose a color. -- Creatures you control of the chosen color get +1/+1.
mana={3} mana={3}
@@ -49384,6 +49360,7 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Iona, Shield of Emeria name=Iona, Shield of Emeria
alias=0000
abilities=flying abilities=flying
auto=chooseacolor maxCast(*[chosencolor])0 opponent chooseend auto=chooseacolor maxCast(*[chosencolor])0 opponent chooseend
text=Flying -- As Iona, Shield of Emeria enters the battlefield, choose a color. -- Your opponents can't cast spells of the chosen color. text=Flying -- As Iona, Shield of Emeria enters the battlefield, choose a color. -- Your opponents can't cast spells of the chosen color.
@@ -50520,6 +50497,7 @@ toughness=3
[/card] [/card]
[card] [card]
name=Jihad name=Jihad
alias=0000
auto=chooseacolor transforms((,newability[aslongas(*[chosencolor]|opponentbattlefield) lord(creature[white]|mybattlefield) 2/1],newability[aslongas(*[chosencolor]|opponentbattlefield) sacrifice <1])) chooseend auto=chooseacolor transforms((,newability[aslongas(*[chosencolor]|opponentbattlefield) lord(creature[white]|mybattlefield) 2/1],newability[aslongas(*[chosencolor]|opponentbattlefield) sacrifice <1])) chooseend
text=As Jihad enters the battlefield, choose a color and an opponent. -- White creatures get +2/+1 as long as the chosen player controls a nontoken permanent of the chosen color. -- When the chosen player controls no nontoken permanents of the chosen color, sacrifice Jihad. text=As Jihad enters the battlefield, choose a color and an opponent. -- White creatures get +2/+1 as long as the chosen player controls a nontoken permanent of the chosen color. -- When the chosen player controls no nontoken permanents of the chosen color, sacrifice Jihad.
mana={W}{W}{W} mana={W}{W}{W}
@@ -54796,7 +54774,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Kytheon's Irregulars name=Kytheon's Irregulars
auto=auto={W}{W}:tap target(creature) auto={W}{W}:tap target(creature)
auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever])) auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever]))
text=Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) -- {W}{W}: Tap target creature. text=Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) -- {W}{W}: Tap target creature.
mana={2}{W}{W} mana={2}{W}{W}
@@ -58209,6 +58187,7 @@ type=Instant
[/card] [/card]
[card] [card]
name=Lurebound Scarecrow name=Lurebound Scarecrow
alias=0000
auto=chooseacolor aslongas(*[chosencolor]|myBattlefield) sacrifice <1 chooseend auto=chooseacolor aslongas(*[chosencolor]|myBattlefield) sacrifice <1 chooseend
text=As Lurebound Scarecrow enters the battlefield, choose a color. -- When you control no permanents of the chosen color, sacrifice Lurebound Scarecrow. text=As Lurebound Scarecrow enters the battlefield, choose a color. -- When you control no permanents of the chosen color, sacrifice Lurebound Scarecrow.
mana={3} mana={3}
@@ -70832,6 +70811,7 @@ subtype=Equipment
[/card] [/card]
[card] [card]
name=Paradise Plume name=Paradise Plume
alias=0000
auto=chooseacolor transforms((,newability[{T}:add{chosencolor}],newability[@movedto(*[chosencolor]|stack):life:1 controller])) forever chooseend auto=chooseacolor transforms((,newability[{T}:add{chosencolor}],newability[@movedto(*[chosencolor]|stack):life:1 controller])) forever chooseend
text=As Paradise Plume enters the battlefield, choose a color. -- Whenever a player casts a spell of the chosen color, you may gain 1 life. -- {T}: Add one mana of the chosen color to your mana pool. text=As Paradise Plume enters the battlefield, choose a color. -- Whenever a player casts a spell of the chosen color, you may gain 1 life. -- {T}: Add one mana of the chosen color to your mana pool.
mana={4} mana={4}
@@ -71623,6 +71603,7 @@ type=Artifact
[/card] [/card]
[card] [card]
name=Pentarch Paladin name=Pentarch Paladin
alias=0000
abilities=flanking abilities=flanking
auto=chooseacolor {W}{W}{T}:destroy target(*[chosencolor]) chooseend auto=chooseacolor {W}{W}{T}:destroy target(*[chosencolor]) chooseend
text=Flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.) -- As Pentarch Paladin enters the battlefield, choose a color. -- {W}{W}, {T}: Destroy target permanent of the chosen color. text=Flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.) -- As Pentarch Paladin enters the battlefield, choose a color. -- {W}{W}, {T}: Destroy target permanent of the chosen color.
@@ -71634,6 +71615,7 @@ toughness=3
[/card] [/card]
[card] [card]
name=Pentarch Ward name=Pentarch Ward
alias=0000
abilities=auraward abilities=auraward
target=creature target=creature
auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend
@@ -74770,7 +74752,8 @@ toughness=4
[/card] [/card]
[card] [card]
name=Prism Ring name=Prism Ring
auto=auto=activatechooseacolor transforms((,newability[@movedto(*[chosencolor]|mystack):life:1 controller])) forever activatechooseend alias=0000
auto=activatechooseacolor transforms((,newability[@movedto(*[chosencolor]|mystack):life:1 controller])) forever activatechooseend
text=As Prism Ring enters the battlefield, choose a color. -- Whenever you cast a spell of the chosen color, you gain 1 life. text=As Prism Ring enters the battlefield, choose a color. -- Whenever you cast a spell of the chosen color, you gain 1 life.
mana={1} mana={1}
type=Artifact type=Artifact
@@ -75240,6 +75223,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Psychic Allergy name=Psychic Allergy
alias=0000
auto=upcost[{S(island|mybattlefield)}{S(island|mybattlefield)}] sacrifice auto=upcost[{S(island|mybattlefield)}{S(island|mybattlefield)}] sacrifice
auto=chooseacolor transforms((,newability[@each opponent upkeep:damage:type:*[-token&chosencolor]:opponentbattlefield opponent])) chooseend auto=chooseacolor transforms((,newability[@each opponent upkeep:damage:type:*[-token&chosencolor]:opponentbattlefield opponent])) chooseend
text=As Psychic Allergy enters the battlefield, choose a color. -- At the beginning of each opponent's upkeep, Psychic Allergy deals X damage to that player, where X is the number of nontoken permanents of the chosen color he or she controls. -- At the beginning of your upkeep, destroy Psychic Allergy unless you sacrifice two Islands. text=As Psychic Allergy enters the battlefield, choose a color. -- At the beginning of each opponent's upkeep, Psychic Allergy deals X damage to that player, where X is the number of nontoken permanents of the chosen color he or she controls. -- At the beginning of your upkeep, destroy Psychic Allergy unless you sacrifice two Islands.
@@ -76335,6 +76319,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Quirion Elves name=Quirion Elves
alias=0000
auto={T}:Add{G} auto={T}:Add{G}
auto=chooseacolor {T}:add{chosencolor} chooseend auto=chooseacolor {T}:add{chosencolor} chooseend
text=As Quirion Elves enters the battlefield, choose a color. -- {T}: Add {G} to your mana pool. -- {T}: Add one mana of the chosen color to your mana pool. text=As Quirion Elves enters the battlefield, choose a color. -- {T}: Add {G} to your mana pool. -- {T}: Add one mana of the chosen color to your mana pool.
@@ -87769,6 +87754,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Shifting Sky name=Shifting Sky
alias=0000
auto=chooseacolor lord(*[-land]) becomes(,chosencolor) chooseend auto=chooseacolor lord(*[-land]) becomes(,chosencolor) chooseend
text=As Shifting Sky enters the battlefield, choose a color. -- All nonland permanents are the chosen color. text=As Shifting Sky enters the battlefield, choose a color. -- All nonland permanents are the chosen color.
mana={2}{U} mana={2}{U}
@@ -89053,6 +89039,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Silhana Starfletcher name=Silhana Starfletcher
alias=0000
abilities=reach abilities=reach
auto=activatechooseacolor {T}:add{chosencolor} activatechooseend auto=activatechooseacolor {T}:add{chosencolor} activatechooseend
text=Reach (This creature can block creatures with flying.) -- As Silhana Starfletcher enters the battlefield, choose a color. -- {T}: Add one mana of the chosen color to your mana pool. text=Reach (This creature can block creatures with flying.) -- As Silhana Starfletcher enters the battlefield, choose a color. -- {T}: Add one mana of the chosen color to your mana pool.
@@ -91990,6 +91977,7 @@ toughness=3
[/card] [/card]
[card] [card]
name=Sol Grail name=Sol Grail
alias=0000
auto=chooseacolor transforms((,newability[{T}:add{chosencolor}])) forever chooseend auto=chooseacolor transforms((,newability[{T}:add{chosencolor}])) forever chooseend
text=As Sol Grail enters the battlefield, choose a color. -- {T}: Add one mana of the chosen color to your mana pool. text=As Sol Grail enters the battlefield, choose a color. -- {T}: Add one mana of the chosen color to your mana pool.
mana={3} mana={3}
@@ -100081,6 +100069,7 @@ type=Legendary Land
[/card] [/card]
[card] [card]
name=Teferi's Moat name=Teferi's Moat
alias=0000
auto=chooseacolor lord(creature[chosencolor&-flying]|opponentBattlefield) cantattack chooseend auto=chooseacolor lord(creature[chosencolor&-flying]|opponentBattlefield) cantattack chooseend
text=As Teferi's Moat enters the battlefield, choose a color. -- Creatures of the chosen color without flying can't attack you. text=As Teferi's Moat enters the battlefield, choose a color. -- Creatures of the chosen color without flying can't attack you.
mana={3}{W}{U} mana={3}{W}{U}
@@ -101376,13 +101365,6 @@ mana={1}{G}{G}
type=Sorcery type=Sorcery
[/card] [/card]
[card] [card]
name=Thespian's Stage
auto={T}:Add{1}
auto={2}{T}:copy target(land|battlefield)
text={T}: Add {1} to your mana pool. -- {2}, {T}: Thespian's Stage becomes a copy of target land and gains this ability.
type=Land
[/card]
[card]
name=Thicket Basilisk name=Thicket Basilisk
auto=@combat(blocking,blocked) source(this) from(creature[-wall]):all(trigger[from]) phaseaction[combatends once] destroy 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. text=Whenever Thicket Basilisk blocks or becomes blocked by a non-Wall creature, destroy that creature at end of combat.
@@ -106635,16 +106617,6 @@ type=Enchantment
subtype=Aura subtype=Aura
[/card] [/card]
[card] [card]
name=Unstable Shapeshifter
auto=@movedto(other creature|battlefield):all(trigger[from]) copy
text=Whenever another creature enters the battlefield, Unstable Shapeshifter becomes a copy of that creature and gains this ability.
mana={3}{U}
type=Creature
subtype=Shapeshifter
power=0
toughness=1
[/card]
[card]
name=Unstoppable Ash name=Unstoppable Ash
abilities=trample abilities=trample
auto=aslongas(other treefolk|mybattlefield) choice notatarget(other treefolk|mybattlefield) (blink)forsrc oneshot auto=aslongas(other treefolk|mybattlefield) choice notatarget(other treefolk|mybattlefield) (blink)forsrc oneshot
@@ -109849,6 +109821,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Voice of All name=Voice of All
alias=0000
abilities=flying abilities=flying
auto=chooseacolor transforms((,newability[protection from(*[chosencolor])],newability[0/0])) forever chooseend auto=chooseacolor transforms((,newability[protection from(*[chosencolor])],newability[0/0])) forever chooseend
text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- As Voice of All enters the battlefield, choose a color. -- Voice of All has protection from the chosen color. (It can't be blocked, targeted, dealt damage, or enchanted by anything of the chosen color.) text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- As Voice of All enters the battlefield, choose a color. -- Voice of All has protection from the chosen color. (It can't be blocked, targeted, dealt damage, or enchanted by anything of the chosen color.)
@@ -111655,6 +111628,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Ward Sliver name=Ward Sliver
alias=0000
auto=chooseacolor transforms((,newability[lord(sliver) protection from(*[chosencolor])])) forever chooseend auto=chooseacolor transforms((,newability[lord(sliver) protection from(*[chosencolor])])) forever chooseend
text=As Ward Sliver enters the battlefield, choose a color. -- All Slivers have protection from the chosen color. text=As Ward Sliver enters the battlefield, choose a color. -- All Slivers have protection from the chosen color.
mana={4}{W} mana={4}{W}

View File

@@ -122,8 +122,6 @@ class GameObserver{
void gameStateBasedEffects(); void gameStateBasedEffects();
void enchantmentStatus(); void enchantmentStatus();
void Affinity(); void Affinity();
void ComputeTrinisphere();
void RemoveTrinisphere(MTGCardInstance * card);
void addObserver(MTGAbility * observer); void addObserver(MTGAbility * observer);
bool removeObserver(ActionElement * observer); bool removeObserver(ActionElement * observer);
void startGame(GameType, Rules * rules); void startGame(GameType, Rules * rules);

View File

@@ -213,6 +213,7 @@ public:
COUNTERS = 30, COUNTERS = 30,
PUT_INTO_PLAY_WITH_KICKER = 31, PUT_INTO_PLAY_WITH_KICKER = 31,
STANDARD_FIZZLER = 32, STANDARD_FIZZLER = 32,
CASTINGRAVEYARD_COST = 33,
}; };
}; };

View File

@@ -253,9 +253,25 @@ public:
int cardistargetted; int cardistargetted;
bool isTargetter(); bool isTargetter();
int cardistargetter; int cardistargetter;
int tmodifier;
int tmodifierb;
int myconvertedcost; int myconvertedcost;
ManaCost * computeNewCost(MTGCardInstance * card,ManaCost * oldCost)
{
if(card->isLand())
return oldCost;
if(!card)
return NULL;
//i don't know why this method doesn't affect cards in hand, but is working on other zones....//
//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 oldCost;
};
void eventattacked(); void eventattacked();
void eventattackedAlone(); void eventattackedAlone();

View File

@@ -236,7 +236,8 @@ class Constants
OPPGCREATUREEXILER = 118, OPPGCREATUREEXILER = 118,
PAYZERO = 119, PAYZERO = 119,
TRINISPHERE = 120, TRINISPHERE = 120,
NB_BASIC_ABILITIES = 121, CANPLAYFROMEXILE = 121,
NB_BASIC_ABILITIES = 122,
RARITY_S = 'S', //Special Rarity RARITY_S = 'S', //Special Rarity

View File

@@ -76,6 +76,8 @@ public:
MTGPutInPlayRule(GameObserver* observer, int _id); MTGPutInPlayRule(GameObserver* observer, int _id);
const string getMenuText() const string getMenuText()
{ {
if(game && game->gameType() == GAME_TYPE_MOMIR)
return "Play Land";
return "Cast Card Normally"; return "Cast Card Normally";
} }
virtual MTGPutInPlayRule * clone() const; virtual MTGPutInPlayRule * clone() const;

View File

@@ -47,7 +47,8 @@ public:
MANA_PAID_WITH_FLASHBACK = 5, MANA_PAID_WITH_FLASHBACK = 5,
MANA_PAID_WITH_RETRACE = 6, MANA_PAID_WITH_RETRACE = 6,
MANA_PAID_WITH_MORPH = 7, MANA_PAID_WITH_MORPH = 7,
MANA_PAID_WITH_SUSPEND = 8 MANA_PAID_WITH_SUSPEND = 8,
MANA_PAID_WITH_OTHERCOST = 9
}; };
ExtraCosts * extraCosts; ExtraCosts * extraCosts;

View File

@@ -301,7 +301,7 @@ bool Spell::FullfilledAlternateCost(const int &costType)
hasFullfilledAlternateCost = (payResult == ManaCost::MANA_PAID_WITH_RETRACE); hasFullfilledAlternateCost = (payResult == ManaCost::MANA_PAID_WITH_RETRACE);
break; break;
case ManaCost::MANA_PAID_WITH_SUSPEND: case ManaCost::MANA_PAID_WITH_SUSPEND:
hasFullfilledAlternateCost = (payResult == ManaCost::MANA_PAID_WITH_RETRACE); hasFullfilledAlternateCost = (payResult == ManaCost::MANA_PAID_WITH_SUSPEND);
break; break;
} }

View File

@@ -364,8 +364,20 @@ void CardGui::Render()
if(card->isToken && card->isACopier) if(card->isToken && card->isACopier)
buff = "CT"; buff = "CT";
if(!card->isToken && card->isACopier) if(!card->isToken && card->isACopier)
buff = "C"; buff = "C";
if(card->alias == 0000)
{
if(card->chooseacolor == 1)
buff += "\n-Green";
else if(card->chooseacolor == 2)
buff += "\n-Blue";
else if(card->chooseacolor == 3)
buff += "\n-Red";
else if(card->chooseacolor == 4)
buff += "\n-Black";
else if(card->chooseacolor == 5)
buff += "\n-White";
}
if(!alternate && buff != "" && game->gameType() == GAME_TYPE_CLASSIC)//it seems that other game modes makes cards as tokens!!! hmmm... if(!alternate && buff != "" && game->gameType() == GAME_TYPE_CLASSIC)//it seems that other game modes makes cards as tokens!!! hmmm...
{ {
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);

View File

@@ -885,9 +885,6 @@ void GameObserver::gameStateBasedEffects()
// plus modify costs // // plus modify costs //
///////////////////////////// /////////////////////////////
Affinity(); Affinity();
//trinisphere? buggy...
//ComputeTrinisphere();
//end trinisphere
///////////////////////////////////// /////////////////////////////////////
// Check colored statuses on cards // // Check colored statuses on cards //
///////////////////////////////////// /////////////////////////////////////
@@ -979,10 +976,14 @@ void GameObserver::Affinity()
//only do any of the following if a card with the stated ability is in your hand. //only do any of the following if a card with the stated ability is in your hand.
ManaCost * original = NEW ManaCost(); ManaCost * original = NEW ManaCost();
ManaCost * alternate = NEW ManaCost(); ManaCost * alternate = NEW ManaCost();
ManaCost * buyback = NEW ManaCost();
ManaCost * flashback = NEW ManaCost();
ManaCost * retrace = NEW ManaCost();
original->copy(card->model->data->getManaCost()); original->copy(card->model->data->getManaCost());
alternate->copy(card->model->data->getManaCost()->getAlternative()); alternate->copy(card->model->data->getManaCost()->getAlternative());
if (card->has(Constants::PAYZERO)) buyback->copy(card->model->data->getManaCost()->getBuyback());
original = ManaCost::parseManaCost("{0}",NULL,card);//can't figure out 2 or more alternative... 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. //have to run alter cost before affinity or the 2 cancel each other out.
if(card->getIncreasedManaCost()->getConvertedCost()||card->getReducedManaCost()->getConvertedCost()) if(card->getIncreasedManaCost()->getConvertedCost()||card->getReducedManaCost()->getConvertedCost())
{ {
@@ -995,10 +996,22 @@ void GameObserver::Affinity()
{ {
alternate->add(kc,card->getIncreasedManaCost()->getCost(kc)); 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()) if(card->getReducedManaCost()->getConvertedCost())
{ {
original->remove(card->getReducedManaCost()); original->remove(card->getReducedManaCost());
for(int kc = Constants::MTG_COLOR_ARTIFACT; kc < Constants::NB_Colors;kc++) for(int kc = Constants::MTG_COLOR_ARTIFACT; kc < Constants::NB_Colors;kc++)
{ {
@@ -1006,12 +1019,30 @@ void GameObserver::Affinity()
{ {
alternate->remove(kc,card->getReducedManaCost()->getCost(kc)); 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()) if(card->getManaCost())
card->getManaCost()->copy(original); card->getManaCost()->copy(original);
if(card->getManaCost()->getAlternative()) if(card->getManaCost()->getAlternative())
card->getManaCost()->setAlternative(alternate); 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) if(card->getManaCost()->extraCosts)
{ {
for(unsigned int i = 0; i < card->getManaCost()->extraCosts->costs.size();i++) for(unsigned int i = 0; i < card->getManaCost()->extraCosts->costs.size();i++)
@@ -1068,7 +1099,8 @@ void GameObserver::Affinity()
card->has(Constants::AFFINITYISLAND)|| card->has(Constants::AFFINITYISLAND)||
card->has(Constants::AFFINITYMOUNTAIN)|| card->has(Constants::AFFINITYMOUNTAIN)||
card->has(Constants::AFFINITYPLAINS)|| card->has(Constants::AFFINITYPLAINS)||
card->has(Constants::AFFINITYSWAMP)){ card->has(Constants::AFFINITYSWAMP))
{
if (card->has(Constants::AFFINITYARTIFACTS)) if (card->has(Constants::AFFINITYARTIFACTS))
{ {
type = "artifact"; type = "artifact";
@@ -1123,86 +1155,13 @@ void GameObserver::Affinity()
if(card->getManaCost()->getCost(color) > 0) if(card->getManaCost()->getCost(color) > 0)
card->getManaCost()->remove(color,1); card->getManaCost()->remove(color,1);
} }
}
} //SAFE_DELETE(original);
SAFE_DELETE(original);
}//end }//end
} }
} }
} }
void GameObserver::ComputeTrinisphere()
{
for (int td = 0; td < 2; td++)
{
MTGGameZone * dzones[] = { players[td]->game->graveyard, players[td]->game->hand, players[td]->game->library, players[td]->game->exile };
for (int tk = 0; tk < 4; tk++)
{
MTGGameZone * zone = dzones[tk];
for (int ct = zone->nb_cards - 1; ct >= 0; ct--)
{
if(zone->cards[ct]->has(Constants::TRINISPHERE))
{
if(zone->cards[ct]->getManaCost()->getConvertedCost() == 2)
{
zone->cards[ct]->getManaCost()->add(Constants::MTG_COLOR_ARTIFACT, 1);
zone->cards[ct]->tmodifier = 1;
}
else if(zone->cards[ct]->getManaCost()->getConvertedCost() == 1)
{
zone->cards[ct]->getManaCost()->add(Constants::MTG_COLOR_ARTIFACT, 2);
zone->cards[ct]->tmodifier = 2;
}
else if(zone->cards[ct]->getManaCost()->getConvertedCost() < 1)
{
zone->cards[ct]->getManaCost()->add(Constants::MTG_COLOR_ARTIFACT, 3);
zone->cards[ct]->tmodifier = 3;
}
if(zone->cards[ct]->getManaCost()->getAlternative())
{
ManaCost * currentAlternate = NEW ManaCost();
currentAlternate->copy(zone->cards[ct]->getManaCost()->getAlternative());
if(zone->cards[ct]->getManaCost()->getAlternative()->getConvertedCost() == 2)
zone->cards[ct]->tmodifierb = 1;
else if(zone->cards[ct]->getManaCost()->getAlternative()->getConvertedCost() == 1)
zone->cards[ct]->tmodifierb = 2;
else if(zone->cards[ct]->getManaCost()->getAlternative()->getConvertedCost() < 1)
zone->cards[ct]->tmodifierb = 3;
currentAlternate->add(Constants::MTG_COLOR_ARTIFACT, zone->cards[ct]->tmodifierb);
zone->cards[ct]->getManaCost()->setAlternative(currentAlternate);
}
}
else
RemoveTrinisphere(zone->cards[ct]);
if(zone->cards[ct]->getManaCost()->extraCosts)
{
for(unsigned int i = 0; i < zone->cards[ct]->getManaCost()->extraCosts->costs.size();i++)
{
zone->cards[ct]->getManaCost()->extraCosts->costs[i]->setSource(zone->cards[ct]);
}
}
}
}
}
}
void GameObserver::RemoveTrinisphere(MTGCardInstance * card)
{
if(card->has(Constants::TRINISPHERE))
return;
if(card->tmodifier)
{
card->getManaCost()->remove(Constants::MTG_COLOR_ARTIFACT, card->tmodifier);
card->tmodifier = 0;
}
if(card->getManaCost()->getAlternative() && card->tmodifierb)
{
ManaCost * newalternate = NEW ManaCost();
newalternate->copy(card->getManaCost()->getAlternative());
newalternate->remove(Constants::MTG_COLOR_ARTIFACT, card->tmodifierb);
card->getManaCost()->setAlternative(newalternate);
card->tmodifierb = 0;
}
}
void GameObserver::Render() void GameObserver::Render()
{ {
if(mLayers) if(mLayers)

View File

@@ -65,8 +65,6 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
LKItoughness = toughness; LKItoughness = toughness;
cardistargetted = 0; cardistargetted = 0;
cardistargetter = 0; cardistargetter = 0;
tmodifier = 0;
tmodifierb = 0;
myconvertedcost = getManaCost()->getConvertedCost(); myconvertedcost = getManaCost()->getConvertedCost();
} }

View File

@@ -149,7 +149,8 @@ const char* Constants::MTGBasicAbilities[] = {
"mygcreatureexiler", "mygcreatureexiler",
"oppgcreatureexiler", "oppgcreatureexiler",
"payzero", "payzero",
"trinisphere" "trinisphere",
"canplayfromexile"
}; };
map<string,int> Constants::MTGBasicAbilitiesMap; map<string,int> Constants::MTGBasicAbilitiesMap;

View File

@@ -1132,7 +1132,7 @@ MTGMorphCostRule * MTGMorphCostRule::clone() const
MTGPlayFromGraveyardRule::MTGPlayFromGraveyardRule(GameObserver* observer, int _id) : MTGPlayFromGraveyardRule::MTGPlayFromGraveyardRule(GameObserver* observer, int _id) :
MTGAlternativeCostRule(observer, _id) MTGAlternativeCostRule(observer, _id)
{ {
aType = MTGAbility::PUT_INTO_PLAY; aType = MTGAbility::CASTINGRAVEYARD_COST;
} }
int MTGPlayFromGraveyardRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana) int MTGPlayFromGraveyardRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
@@ -1155,9 +1155,9 @@ int MTGPlayFromGraveyardRule::reactToClick(MTGCardInstance * card)
ManaCost * cost = card->getManaCost(); ManaCost * cost = card->getManaCost();
card->paymenttype = MTGAbility::PUT_INTO_PLAY; card->paymenttype = MTGAbility::CASTINGRAVEYARD_COST;
return MTGAlternativeCostRule::reactToClick(card, cost, ManaCost::MANA_PAID); return MTGAlternativeCostRule::reactToClick(card, cost, ManaCost::MANA_PAID_WITH_OTHERCOST);
} }
ostream& MTGPlayFromGraveyardRule::toString(ostream& out) const ostream& MTGPlayFromGraveyardRule::toString(ostream& out) const