changed alias

This commit is contained in:
Anthony Calosa
2015-11-13 05:45:17 +08:00
parent cd1b629191
commit cccc21c035
7 changed files with 83 additions and 95 deletions

View File

@@ -10934,7 +10934,7 @@ toughness=1
[/card]
[card]
name=Blustersquall
alias=110000
alias=11000
other={3}{U} name(Overload)
target=creature|opponentbattlefield
auto=overload tap all(creature|opponentbattlefield)
@@ -11599,7 +11599,7 @@ toughness=2
[/card]
[card]
name=Boneyard Wurm
alias=001100
alias=1111
anyzone=type:creature:mygraveyard/type:creature:mygraveyard cdaactive
text=Boneyard Wurm's power and toughness are each equal to the number of creature cards in your graveyard.
mana={1}{G}
@@ -14117,7 +14117,7 @@ type=Sorcery
[/card]
[card]
name=Cantivore
alias=001100
alias=1111
abilities=vigilance
anyzone=type:enchantment:graveyard/type:enchantment:graveyard cdaactive
text=Vigilance -- Cantivore's power and toughness are each equal to the number of enchantment cards in all graveyards.
@@ -16266,7 +16266,7 @@ type=Sorcery
[/card]
[card]
name=Chemister's Trick
alias=110000
alias=11000
other={3}{U}{R} name(Overload)
target=creature|opponentbattlefield
auto=paidmana -2/0
@@ -16564,7 +16564,7 @@ toughness=2
[/card]
[card]
name=Cho-Manno's Blessing
alias=0000
alias=1000
abilities=auraward
target=creature
abilities=flash
@@ -18099,7 +18099,7 @@ type=Instant
[/card]
[card]
name=Cognivore
alias=001100
alias=1111
abilities=flying
anyzone=type:instant:graveyard/type:instant:graveyard cdaactive
text=Flying -- Cognivore's power and toughness are each equal to the number of instant cards in all graveyards.
@@ -18159,7 +18159,7 @@ type=Artifact
[/card]
[card]
name=Coldsteel Heart
alias=0000
alias=1000
auto=tap
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.
@@ -19399,7 +19399,7 @@ type=Instant
[/card]
[card]
name=Counterflux
alias=110000
alias=11000
other={1}{U}{U}{R} name(Overload)
abilities=nofizzle
target=*|opponentstack
@@ -21069,7 +21069,7 @@ subtype=Aura Curse
[/card]
[card]
name=Curse of Wizardry
alias=0000
alias=1000
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.
mana={2}{B}{B}
@@ -21207,7 +21207,7 @@ type=Instant
[/card]
[card]
name=Cyclonic Rift
alias=110000
alias=11000
other={6}{U} name(Overload)
target=*[-land]|opponentbattlefield
auto=overload moveto(ownerhand) all(*[-land]|opponentbattlefield)
@@ -24429,7 +24429,7 @@ text=Destroy target artifact with converted mana cost X. It can't be regenerated
[/card]
[card]
name=Detritivore
alias=001100
alias=1111
anyzone=type:land[-basic]:opponentgraveyard/type:land[-basic]:opponentgraveyard cdaactive
autoexile=@counterremoved(0/0,1,Time) from(sourcecard) suspended:destroy target(land[-basic])
suspend(0)={X}{3}{R}
@@ -25994,7 +25994,7 @@ type=Instant
[/card]
[card]
name=Downsize
alias=110000
alias=11000
other={2}{U} name(Overload)
target=creature|opponentbattlefield
auto=overload -4/0 all(creature|opponentbattlefield)
@@ -28284,7 +28284,7 @@ subtype=Aura
[/card]
[card]
name=Dynacharge
alias=110000
alias=11000
other={2}{R} name(Overload)
target=creature|mybattlefield
auto=paidmana 2/0
@@ -29044,7 +29044,7 @@ toughness=1
[/card]
[card]
name=Electrickery
alias=110000
alias=11000
other={1}{R} name(Overload)
target=creature|opponentbattlefield
auto=paidmana damage:1
@@ -35188,7 +35188,7 @@ toughness=2
[/card]
[card]
name=Flickering Ward
alias=0000
alias=1000
abilities=auraward
target=creature
auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend
@@ -35267,7 +35267,7 @@ toughness=2
[/card]
[card]
name=Floating Shield
alias=0000
alias=1000
abilities=auraward
target=creature
auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend
@@ -43662,7 +43662,7 @@ toughness=3
[/card]
[card]
name=Hall of Triumph
alias=0000
alias=1000
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.
mana={3}
@@ -49496,7 +49496,7 @@ type=Sorcery
[/card]
[card]
name=Iona, Shield of Emeria
alias=0000
alias=1000
abilities=flying
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.
@@ -50633,7 +50633,7 @@ toughness=3
[/card]
[card]
name=Jihad
alias=0000
alias=1000
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.
mana={W}{W}{W}
@@ -56208,7 +56208,7 @@ toughness=5
[/card]
[card]
name=Lhurgoyf
alias=001100
alias=1111
anyzone=type:creature:graveyard/plusonetype:creature:graveyard cdaactive
text=Lhurgoyf's power is equal to the number of creature cards in all graveyards and its toughness is equal to that number plus 1.
mana={2}{G}{G}
@@ -57589,7 +57589,7 @@ toughness=2
[/card]
[card]
name=Lord of Extinction
alias=001100
alias=1111
anyzone=type:*:graveyard/type:*:graveyard cdaactive
text=Lord of Extinction's power and toughness are each equal to the number of cards in all graveyards.
mana={3}{B}{G}
@@ -58325,7 +58325,7 @@ type=Instant
[/card]
[card]
name=Lurebound Scarecrow
alias=0000
alias=1000
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.
mana={3}
@@ -58954,7 +58954,7 @@ toughness=6
[/card]
[card]
name=Magnivore
alias=001100
alias=1111
abilities=haste
anyzone=type:sorcery:graveyard/type:sorcery:graveyard cdaactive
text=Haste (This creature can attack the turn it comes under your control.) -- Magnivore's power and toughness are each equal to the number of sorcery cards in all graveyards.
@@ -63482,7 +63482,7 @@ toughness=4
[/card]
[card]
name=Mizzium Mortars
alias=110000
alias=11000
other={3}{R}{R}{R} name(Overload)
target=creature|opponentbattlefield
auto=paidmana damage:4
@@ -63493,7 +63493,7 @@ type=Sorcery
[/card]
[card]
name=Mizzium Skin
alias=110000
alias=11000
other={1}{U} name(Overload)
target=creature|mybattlefield
auto=paidmana 0/1
@@ -64747,7 +64747,7 @@ toughness=2
[/card]
[card]
name=Mortivore
alias=001100
alias=1111
auto={B}:regenerate
anyzone=type:creature:graveyard/type:creature:graveyard cdaactive
text=Mortivore's power and toughness are each equal to the number of creature cards in all graveyards. -- {B}: Regenerate Mortivore. (The next time this creature would be destroyed this turn, it isn't. Instead tap it, remove all damage from it, and remove it from combat.)
@@ -70982,7 +70982,7 @@ subtype=Equipment
[/card]
[card]
name=Paradise Plume
alias=0000
alias=1000
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.
mana={4}
@@ -71774,7 +71774,7 @@ type=Artifact
[/card]
[card]
name=Pentarch Paladin
alias=0000
alias=1000
abilities=flanking
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.
@@ -71786,7 +71786,7 @@ toughness=3
[/card]
[card]
name=Pentarch Ward
alias=0000
alias=1000
abilities=auraward
target=creature
auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend
@@ -74923,7 +74923,7 @@ toughness=4
[/card]
[card]
name=Prism Ring
alias=0000
alias=1000
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.
mana={1}
@@ -75394,7 +75394,7 @@ toughness=2
[/card]
[card]
name=Psychic Allergy
alias=0000
alias=1000
auto=upcost[{S(island|mybattlefield)}{S(island|mybattlefield)}] sacrifice
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.
@@ -76490,7 +76490,7 @@ toughness=1
[/card]
[card]
name=Quirion Elves
alias=0000
alias=1000
auto={T}:Add{G}
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.
@@ -79975,7 +79975,7 @@ type=Artifact
[/card]
[card]
name=Revenant
alias=001100
alias=1111
abilities=flying
anyzone=type:creature:mygraveyard/type:creature:mygraveyard cdaactive
text=Flying -- Revenant's power and toughness are each equal to the number of creature cards in your graveyard.
@@ -87950,7 +87950,7 @@ toughness=2
[/card]
[card]
name=Shifting Sky
alias=0000
alias=1000
auto=chooseacolor lord(*[-land]) becomes(,chosencolor) chooseend
text=As Shifting Sky enters the battlefield, choose a color. -- All nonland permanents are the chosen color.
mana={2}{U}
@@ -89235,7 +89235,7 @@ toughness=1
[/card]
[card]
name=Silhana Starfletcher
alias=0000
alias=1000
abilities=reach
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.
@@ -91122,7 +91122,7 @@ toughness=3
[/card]
[card]
name=Slag Fiend
alias=001100
alias=1111
anyzone=type:artifact:graveyard/type:artifact:graveyard cdaactive
text=Slag Fiend's power and toughness are each equal to the number of artifact cards in all graveyards.
mana={R}
@@ -92174,7 +92174,7 @@ toughness=3
[/card]
[card]
name=Sol Grail
alias=0000
alias=1000
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.
mana={3}
@@ -94828,7 +94828,7 @@ color=green
[/card]
[card]
name=Splinterfright
alias=001100
alias=1111
abilities=trample
anyzone=type:creature:mygraveyard/type:creature:mygraveyard cdaactive
auto=@each my upkeep:deplete:2 controller
@@ -97060,7 +97060,7 @@ toughness=4
[/card]
[card]
name=Street Spasm
alias=110000
alias=11000
other={X}{X}{R}{R} name(Overload)
target=creature[-flying]|opponentbattlefield
auto=paidmana damage:X
@@ -100291,7 +100291,7 @@ type=Legendary Land
[/card]
[card]
name=Teferi's Moat
alias=0000
alias=1000
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.
mana={3}{W}{U}
@@ -100481,7 +100481,7 @@ type=Instant
[/card]
[card]
name=Teleportal
alias=110000
alias=11000
other={3}{U}{R} name(Overload)
target=creature|mybattlefield
auto=paidmana 1/0
@@ -101009,7 +101009,7 @@ type=Artifact
[/card]
[card]
name=Terravore
alias=001100
alias=1111
abilities=trample
anyzone=type:land:graveyard/type:land:graveyard cdaactive
text=Trample -- Terravore's power and toughness are each equal to the number of land cards in all graveyards.
@@ -106235,7 +106235,7 @@ type=Artifact
[/card]
[card]
name=Umbra Stalker
alias=001100
alias=1111
anyzone=type:manab:mygraveyard/type:manab:mygraveyard cdaactive
text=Chroma - Umbra Stalker's power and toughness are each equal to the number of black mana symbols in the mana costs of cards in your graveyard.
mana={4}{B}{B}{B}
@@ -107791,7 +107791,7 @@ subtype=Aura
[/card]
[card]
name=Vandalblast
alias=110000
alias=11000
other={4}{R} name(Overload)
target=artifact|opponentbattlefield
auto=overload destroy all(artifact|opponentbattlefield)
@@ -110092,7 +110092,7 @@ toughness=2
[/card]
[card]
name=Voice of All
alias=0000
alias=1000
abilities=flying
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.)
@@ -111899,7 +111899,7 @@ toughness=1
[/card]
[card]
name=Ward Sliver
alias=0000
alias=1000
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.
mana={4}{W}
@@ -112493,7 +112493,7 @@ type=Artifact
[/card]
[card]
name=Weapon Surge
alias=110000
alias=11000
other={1}{R} name(Overload)
target=creature|mybattlefield
auto=paidmana 1/0

View File

@@ -313,11 +313,11 @@ class MTGDredgeRule: public PermanentAbility, public ReplacementEffect
public:
//vector<MTGCardInstance*>soulbonders;
TargetChooser * tcb;
//MTGAbility * dredgeAbility;
//MTGAbility * targetAbility;
//MTGAbility * targetAbilityAdder;
//MTGAbility * targetAbility1;
//MTGAbility * mod;
MTGAbility * dredgeAbility;
MTGAbility * targetAbility;
MTGAbility * targetAbilityAdder;
MTGAbility * targetAbility1;
MTGAbility * mod;
//MTGAbility * activateDredge;
//vector<MTGAbility*>pairing;
MTGDredgeRule(GameObserver* observer, int _id);

View File

@@ -1834,10 +1834,6 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
{
shouldPlayPercentage = 90;
}
else if (!card->isLand() && card->has(Constants::PAYZERO))
{
shouldPlayPercentage = 70;
}
else
{
// shouldPlay == baka_effect_bad giving it a 1 for odd ball lottery chance.
@@ -1986,10 +1982,6 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
{
shouldPlayPercentage = 90;
}
else if (!card->isLand() && card->has(Constants::PAYZERO))
{
shouldPlayPercentage = 70;
}
else
{
// shouldPlay == baka_effect_bad giving it a 1 for odd ball lottery chance.
@@ -2137,10 +2129,6 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
{
shouldPlayPercentage = 90;
}
else if (!card->isLand() && card->has(Constants::PAYZERO))
{
shouldPlayPercentage = 70;
}
else
{
// shouldPlay == baka_effect_bad giving it a 1 for odd ball lottery chance.
@@ -2447,7 +2435,7 @@ int AIPlayerBaka::computeActions()
cd.SetExclusionColor(Constants::MTG_COLOR_LAND);
MTGCardInstance *freecard = cd.match(game->graveyard);
int canCastCard = game->playRestrictions->canPutIntoZone(freecard, game->inPlay);
if (freecard && (canCastCard == PlayRestriction::CAN_PLAY) && freecard->has(Constants::PAYZERO) && freecard->has(Constants::CANPLAYFROMGRAVEYARD) && (freecard->getIncreasedManaCost()->getConvertedCost() < 1) && (freecard->alias != 001100))
if (freecard && (canCastCard == PlayRestriction::CAN_PLAY) && freecard->has(Constants::PAYZERO) && freecard->has(Constants::CANPLAYFROMGRAVEYARD) && (freecard->getIncreasedManaCost()->getConvertedCost() < 1) && (freecard->alias != 1111))
{
MTGAbility * castFreeCard = observer->mLayers->actionLayer()->getAbility(MTGAbility::PAYZERO_COST);
AIAction * aa = NEW AIAction(this, castFreeCard, freecard); //TODO putinplay action
@@ -2462,7 +2450,7 @@ int AIPlayerBaka::computeActions()
cd.SetExclusionColor(Constants::MTG_COLOR_LAND);
MTGCardInstance *freecard = cd.match(game->exile);
int canCastCard = game->playRestrictions->canPutIntoZone(freecard, game->inPlay);
if (freecard && (canCastCard == PlayRestriction::CAN_PLAY) && freecard->has(Constants::PAYZERO) && freecard->has(Constants::CANPLAYFROMEXILE) && (freecard->getIncreasedManaCost()->getConvertedCost() < 1) && (freecard->alias != 001100))
if (freecard && (canCastCard == PlayRestriction::CAN_PLAY) && freecard->has(Constants::PAYZERO) && freecard->has(Constants::CANPLAYFROMEXILE) && (freecard->getIncreasedManaCost()->getConvertedCost() < 1) && (freecard->alias != 1111))
{
MTGAbility * castFreeCard = observer->mLayers->actionLayer()->getAbility(MTGAbility::PAYZERO_COST);
AIAction * aa = NEW AIAction(this, castFreeCard, freecard); //TODO putinplay action

View File

@@ -348,7 +348,7 @@ void CardGui::Render()
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),216,191,216));//thistle powered down
else if(!card->wasDealtDamage && card->pbonus >= 3)
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,0));//yellow buff
else if(card->hasType("legendary") && card->hasType("eldrazi"))
else if(card->hasType("legendary") && card->hasType("eldrazi") && !card->has(Constants::CHANGELING))
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),238,130,238));//violet legendary eldrazi
else
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,255,255));//white default
@@ -365,9 +365,9 @@ void CardGui::Render()
buff = "CT";
if(!card->isToken && card->isACopier)
buff = "C";
if(game && card->has(Constants::PAYZERO) && ((card->currentZone == card->controller()->game->hand) || (card->has(Constants::CANPLAYFROMGRAVEYARD) && card->currentZone == card->controller()->game->graveyard) || (card->has(Constants::CANPLAYFROMEXILE) && card->currentZone == card->controller()->game->exile)))
if(card->has(Constants::PAYZERO))
buff += "Z";
if(card->alias == 0000)
if(card->alias == 1000)
{
if(card->chooseacolor == 1)
buff += "\n-Green";
@@ -385,7 +385,7 @@ void CardGui::Render()
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
char buffer[200];
sprintf(buffer, "%s", buff.c_str());
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,182,193));//Light Pink indicator
mFont->SetColor(ARGB(static_cast<unsigned char>(actA),255,215,0));//Gold indicator
mFont->SetScale(0.8f);
mFont->DrawString(buffer, actX - 10 * actZ, actY - (16 * actZ));
mFont->SetScale(1);

View File

@@ -3092,7 +3092,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
{
MTGAbility * a = NEW APowerToughnessModifier(observer, id, card, target, wppt,s,true);
a->forcedAlive = 1;
a->forceDestroy = -1;
//a->forceDestroy = -1;
return a;
//return NEW APowerToughnessModifier(observer, id, card, target, wppt,s,true);
}

View File

@@ -546,7 +546,7 @@ MTGCardInstance * MTGGameZone::removeCard(MTGCardInstance * card, int createCopy
copy->kicked = card->kicked;
copy->storedCard = card->storedCard;
copy->storedSourceCard = card->storedSourceCard;
for (int i = 0; i < ManaCost::MANA_PAID_WITH_BESTOW +1; i++)
for (int i = 0; i < ManaCost::MANA_PAID_WITH_OVERLOAD +1; i++)
copy->alternateCostPaid[i] = card->alternateCostPaid[i];
//stupid bug with tokens...

View File

@@ -627,7 +627,7 @@ PermanentAbility(observer, _id)
int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
{
if (card->alias == 110000)
if (card->alias == 11000)
return 0;//overload has its own rule
ManaCost * alternateCost = card->getManaCost()->getAlternative();
if (!game->currentlyActing()->game->hand->hasCard(card) && !game->currentlyActing()->game->graveyard->hasCard(card) && !game->currentlyActing()->game->exile->hasCard(card))
@@ -1165,6 +1165,8 @@ MTGAlternativeCostRule(observer, _id)
int MTGPayZeroRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
{
if(!card->has(Constants::PAYZERO))
return 0;
Player * player = game->currentlyActing();
ManaCost * cost = NEW ManaCost(ManaCost::parseManaCost("{0}",NULL,NULL));
if(card->getIncreasedManaCost()->getConvertedCost())
@@ -1174,8 +1176,6 @@ int MTGPayZeroRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
if(card->isLand())
return 0;
if(!card->has(Constants::PAYZERO))
return 0;
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)))
@@ -1225,7 +1225,7 @@ MTGAlternativeCostRule(observer, _id)
int MTGOverloadRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
{
if (card->alias != 110000)
if (card->alias != 11000)
return 0;
Player * player = game->currentlyActing();
ManaCost * cost = NEW ManaCost(card->model->data->getManaCost()->getAlternative());
@@ -2255,9 +2255,9 @@ MTGDredgeRule::MTGDredgeRule(GameObserver* observer, int _id) :
PermanentAbility(observer, _id)
{
tcb = NULL;
//dredgeAbility = NULL;
//targetAbility = NULL;
//mod = NULL;
dredgeAbility = NULL;
targetAbility = NULL;
mod = NULL;
}
;
@@ -2314,26 +2314,26 @@ WEvent * MTGDredgeRule::replace(WEvent * event)
}
//there is a memleak here that i have no idea what causes it.
dredgeCard *dc = NEW dredgeCard(game, game->mLayers->actionLayer()->getMaxId(), card,NULL);
dc->oneShot = true;
GenericTargetAbility *gta = NEW GenericTargetAbility(game, "Dredge A Card","",game->mLayers->actionLayer()->getMaxId(), card,tcb->clone(),dc->clone());
gta->oneShot = true;
//SAFE_DELETE(dredgeAbility);
dredgeAbility = NEW dredgeCard(game, game->mLayers->actionLayer()->getMaxId(), card,NULL);
dredgeAbility->oneShot = true;
targetAbility = NEW GenericTargetAbility(game, "Dredge A Card","",game->mLayers->actionLayer()->getMaxId(), card,tcb->clone(),dredgeAbility->clone());
targetAbility->oneShot = true;
SAFE_DELETE(dredgeAbility);
GenericAddToGame *gatg = NEW GenericAddToGame(game, game->mLayers->actionLayer()->getMaxId(), card,NULL,gta->clone());
gatg->oneShot = true;
//SAFE_DELETE(targetAbility);
//MTGAbility * setDredge = targetAbilityAdder->clone();
//SAFE_DELETE(targetAbilityAdder);
//setDredge->oneShot = true;
targetAbilityAdder = NEW GenericAddToGame(game, game->mLayers->actionLayer()->getMaxId(), card,NULL,targetAbility->clone());
targetAbilityAdder->oneShot = true;
SAFE_DELETE(targetAbility);
MTGAbility * setDredge = targetAbilityAdder->clone();
SAFE_DELETE(targetAbilityAdder);
setDredge->oneShot = true;
selection.push_back(gatg);
AADrawer *ad = NEW AADrawer(game, game->mLayers->actionLayer()->getMaxId(), card,card,NULL, "1",TargetChooser::CONTROLLER,true);
selection.push_back(ad);
MenuAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Dredge or Draw");
selection.push_back(setDredge);
targetAbility1 = NEW AADrawer(game, this->GetId(), card,card,NULL, "1",TargetChooser::CONTROLLER,true);
selection.push_back(targetAbility1);
MTGAbility * menuChoice = NEW MenuAbility(game, this->GetId(), card, card,true,selection,card->controller(),"Dredge or Draw");
menuChoice->addToGame();
//SAFE_DELETE(tcb);
SAFE_DELETE(tcb);
}
SAFE_DELETE(event);