todo others...
This commit is contained in:
Anthony Calosa
2016-06-09 15:35:59 +08:00
parent 76e7827ebf
commit 06fdf3f0a5
8 changed files with 115 additions and 9 deletions
@@ -16791,6 +16791,18 @@ mana={1}
type=Artifact
[/card]
[card]
name=Chrome Mox
auto=may imprint notatarget(*[-land;-artifact]|myhand)
auto=this(variable{evictg}>0) {t}:add{g}
auto=this(variable{evictu}>0) {t}:add{u}
auto=this(variable{evictr}>0) {t}:add{r}
auto=this(variable{evictb}>0) {t}:add{b}
auto=this(variable{evictw}>0) {t}:add{w}
text=Imprint - When Chrome Mox enters the battlefield, you may exile a nonartifact, nonland card from your hand. -- {T}: Add one mana of any of the exiled card's colors to your mana pool.
mana={0}
type=Artifact
[/card]
[card]
name=Chrome Steed
auto=aslongas(artifact|mybattlefield) 2/2 >2
text=Metalcraft - Chrome Steed gets +2/+2 as long as you control three or more artifacts.
@@ -17070,6 +17082,16 @@ mana={3}{W}
type=Enchantment
[/card]
[card]
name=Circular Logic
abilities=madness
target=*|stack
auto=if cantargetcard(*|opponentstack) then transforms((,newability[pay[[{value:type:*:opponentgraveyard}]] name(pay {value} mana) donothing?fizzle])) forever else transforms((,newability[pay[[{value:type:*:mygraveyard}]] name(pay {value} mana) donothing?fizzle])) forever
autoexile=restriction{discarded} pay({U}) name(pay U to cast) activate name(pay U to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard)
text=Counter target spell unless its controller pays {1} for each card in your graveyard. -- Madness {U} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.)
mana={2}{U}
type=Instant
[/card]
[card]
name=Citadel Castellan
abilities=vigilance
auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1.2) && becomes(renown) forever]))
@@ -3862,12 +3862,6 @@ power=2
toughness=3
[/card]
[card]
name=Circular Logic
text=Counter target spell unless its controller pays {1} for each card in your graveyard. -- Madness {U} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.)
mana={2}{U}
type=Instant
[/card]
[card]
name=City in a Bottle
text=Whenever a nontoken permanent from the Arabian Nights expansion other than City in a Bottle is on the battlefield, its controller sacrifices it. -- Players can't play cards from the Arabian Nights expansion.
mana={2}
+22 -1
View File
@@ -565,6 +565,26 @@ private:
intValue +=1;
}
}
else if (s == "evictg")
{
intValue = card->imprintG;
}
else if (s == "evictu")
{
intValue = card->imprintU;
}
else if (s == "evictr")
{
intValue = card->imprintR;
}
else if (s == "evictb")
{
intValue = card->imprintB;
}
else if (s == "evictw")
{
intValue = card->imprintW;
}
else if (s == "targetedcurses")
{
if(card->playerTarget)
@@ -1963,7 +1983,8 @@ public:
string named;
bool undying;
bool persist;
AAMover(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target, string dest,string _name, ManaCost * _cost = NULL, bool undying = false, bool persist = false);
bool imprint;
AAMover(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target, string dest,string _name, ManaCost * _cost = NULL, bool undying = false, bool persist = false, bool imprint = false);
MTGGameZone * destinationZone(Targetable * target = NULL);
int resolve();
const string getMenuText();
+8
View File
@@ -257,6 +257,14 @@ public:
int myconvertedcost;
ManaCost * computeNewCost(MTGCardInstance * card,ManaCost * oldCost, ManaCost * refCost,bool noTrinisphere = false);
int countTrini;
vector<MTGCardInstance*>imprintedCards;
int imprintG;
int imprintU;
int imprintR;
int imprintB;
int imprintW;
string currentimprintName;
vector<string>imprintedNames;
void eventattacked();
void eventattackedAlone();
+6 -2
View File
@@ -2927,8 +2927,8 @@ AInstantCastRestrictionUEOT::~AInstantCastRestrictionUEOT()
//AAMover
AAMover::AAMover(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target, string dest,string newName, ManaCost * _cost, bool undying, bool persist) :
ActivatedAbility(observer, _id, _source, _cost, 0), destination(dest),named(newName),undying(undying),persist(persist)
AAMover::AAMover(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target, string dest,string newName, ManaCost * _cost, bool undying, bool persist, bool imprint) :
ActivatedAbility(observer, _id, _source, _cost, 0), destination(dest),named(newName),undying(undying),persist(persist),imprint(imprint)
{
if (_target)
target = _target;
@@ -2986,6 +2986,8 @@ int AAMover::resolve()
p->game->putInZone(_target, fromZone, destZone);
while(_target->next)
_target = _target->next;
if (imprint)
source->imprintedCards.push_back(_target);
if(andAbility)
{
MTGAbility * andAbilityClone = andAbility->clone();
@@ -3062,6 +3064,8 @@ const char* AAMover::getMenuText(TargetChooser * tc)
// move card into exile
else if (dest == game->players[i]->game->exile)
{
if(imprint)
return "Imprint";
return "Exile";
}
+40
View File
@@ -687,6 +687,46 @@ void GameObserver::gameStateBasedEffects()
card->myPair->myPair = NULL;
card->myPair = NULL;
}
///clear imprints
if(isInPlay(card) && card->imprintedCards.size())
{
for(size_t ic = 0; ic < card->imprintedCards.size(); ic++)
{
if(!isInExile(card->imprintedCards[ic]))
card->imprintedCards.erase(card->imprintedCards.begin() + ic);
}
}
//reset imprints
if(isInPlay(card))
{
card->imprintG = 0;
card->imprintU = 0;
card->imprintR = 0;
card->imprintB = 0;
card->imprintW = 0;
card->currentimprintName = "";
if (card->imprintedCards.size())
{
for(size_t i = 0; i < card->imprintedCards.size(); i++)
{
if (card->imprintedCards[i]->hasColor(Constants::MTG_COLOR_GREEN))
card->imprintG += 1;
if (card->imprintedCards[i]->hasColor(Constants::MTG_COLOR_BLUE))
card->imprintU += 1;
if (card->imprintedCards[i]->hasColor(Constants::MTG_COLOR_RED))
card->imprintR += 1;
if (card->imprintedCards[i]->hasColor(Constants::MTG_COLOR_BLACK))
card->imprintB += 1;
if (card->imprintedCards[i]->hasColor(Constants::MTG_COLOR_WHITE))
card->imprintW += 1;
if (card->imprintedCards[i]->getName().size())
{
card->currentimprintName = card->imprintedCards[i]->getName();
card->imprintedNames.push_back(card->imprintedCards[i]->getName());
}
}
}
}
card->bypassTC = false; //turn off bypass
////////////////////////////////////////////////////
//Unattach Equipments that dont have valid targets//
+9
View File
@@ -2361,6 +2361,15 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
}
//imprint
found = s.find("imprint");
if (found != string::npos)
{
MTGAbility * a = NEW AAMover(observer, id, card, target, "exile",newName,NULL,false,false,true);
a->oneShot = 1;
return a;
}
//phaseout
found = s.find("phaseout");
if (found != string::npos)
{
+8
View File
@@ -206,6 +206,14 @@ void MTGCardInstance::initMTGCI()
myPair = NULL;
miracle = false;
countTrini = 0;
imprintedCards.clear();
imprintG = 0;
imprintU = 0;
imprintR = 0;
imprintB = 0;
imprintW = 0;
currentimprintName = "";
imprintedNames.clear();
for (int i = 0; i < ManaCost::MANA_PAID_WITH_SUSPEND +1; i++)
alternateCostPaid[i] = 0;