modified castcard to support put into play
for reanimated aura
This commit is contained in:
@@ -30262,7 +30262,7 @@ type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Enduring Ideal
|
||||
auto=moveto(mybattlefield) notatarget(enchantment|mylibrary) and!( transforms((,newability[if cantargetcard(aura) then retarget target(creature|mybattlefield)])) )!
|
||||
auto=moveto(mybattlefield) notatarget(enchantment|mylibrary) and!(castcard(putinplay))!
|
||||
auto=if compare(epicactivated)~lessthan~1 then emblem transforms((,newability[epic controller],newability[@each my upkeep:castcard(copied named!:Enduring Ideal:!)])) forever dontremove
|
||||
text=Search your library for an enchantment card and put it onto the battlefield. Then shuffle your library. -- Epic (For the rest of the game, you can't cast spells. At the beginning of each of your upkeeps, copy this spell except for its epic ability.)
|
||||
mana={5}{W}{W}
|
||||
@@ -88918,7 +88918,7 @@ type=Sorcery
|
||||
[card]
|
||||
name=Silent Sentinel
|
||||
abilities=flying
|
||||
auto=@combat(attacking) source(this):may moveto(mybattlefield) target(enchantment|mygraveyard) and!( transforms((,newability[if cantargetcard(aura) then retarget target(creature|mybattlefield)])) )!
|
||||
auto=@combat(attacking) source(this):may moveto(mybattlefield) target(enchantment|mygraveyard) and!(castcard(putinplay))!
|
||||
text=Flying -- Whenever Silent Sentinel attacks, you may return target enchantment card from your graveyard to the battlefield.
|
||||
mana={5}{W}{W}
|
||||
type=Creature
|
||||
@@ -95343,7 +95343,7 @@ type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Starfield of Nyx
|
||||
auto=@each my upkeep:may moveto(mybattlefield) target(enchantment|mygraveyard) and!( transforms((,newability[if cantargetcard(aura) then retarget target(creature|mybattlefield)])) )!
|
||||
auto=@each my upkeep:may moveto(mybattlefield) target(enchantment|mygraveyard) and!(castcard(putinplay))!
|
||||
auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=1]) transforms((,newability[becomes(Creature)],setpower=1,settoughness=1)) >4
|
||||
auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=2]) transforms((,newability[becomes(Creature)],setpower=2,settoughness=2)) >4
|
||||
auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=3]) transforms((,newability[becomes(Creature)],setpower=3,settoughness=3)) >4
|
||||
|
||||
@@ -6025,7 +6025,8 @@ public:
|
||||
string nameThis;
|
||||
MTGCardInstance * theNamedCard;
|
||||
bool noEvent;
|
||||
AACastCard(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target,bool restricted,bool copied,bool _asNormal,string nameCard,string abilityName,bool _noEvent);
|
||||
bool putinplay;
|
||||
AACastCard(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target,bool restricted,bool copied,bool _asNormal,string nameCard,string abilityName,bool _noEvent, bool putinplay);
|
||||
|
||||
int testDestroy(){return 0;};
|
||||
void Update(float dt);
|
||||
|
||||
@@ -5507,8 +5507,8 @@ AEquip * AEquip::clone() const
|
||||
}
|
||||
|
||||
// casting a card for free, or casting a copy of a card.
|
||||
AACastCard::AACastCard(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target,bool _restricted,bool _copied,bool asNormal,string _namedCard,string _name,bool _noEvent) :
|
||||
MTGAbility(observer, _id, _source),restricted(_restricted),asCopy(_copied),normal(asNormal),cardNamed(_namedCard),nameThis(_name),noEvent(_noEvent)
|
||||
AACastCard::AACastCard(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target,bool _restricted,bool _copied,bool asNormal,string _namedCard,string _name,bool _noEvent,bool putinplay) :
|
||||
MTGAbility(observer, _id, _source),restricted(_restricted),asCopy(_copied),normal(asNormal),cardNamed(_namedCard),nameThis(_name),noEvent(_noEvent),putinplay(putinplay)
|
||||
{
|
||||
target = _target;
|
||||
andAbility = NULL;
|
||||
@@ -5633,12 +5633,18 @@ int AACastCard::resolveSpell()
|
||||
MTGCardInstance * copy = NULL;
|
||||
if (normal ||(!_target->hasType(Subtypes::TYPE_INSTANT) && !_target->hasType(Subtypes::TYPE_SORCERY)))
|
||||
{
|
||||
copy =_target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->stack,noEvent);
|
||||
if (putinplay && (_target->hasType(Subtypes::TYPE_ARTIFACT)||_target->hasType(Subtypes::TYPE_CREATURE)||_target->hasType(Subtypes::TYPE_ENCHANTMENT)||_target->hasType(Subtypes::TYPE_PLANESWALKER)))
|
||||
copy =_target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->battlefield,noEvent);
|
||||
else
|
||||
copy =_target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->stack,noEvent);
|
||||
copy->changeController(source->controller(),true);
|
||||
}
|
||||
else
|
||||
{
|
||||
copy =_target->controller()->game->putInZone(_target, _target->currentZone, _target->controller()->game->stack,noEvent);
|
||||
if (putinplay && (_target->hasType(Subtypes::TYPE_ARTIFACT)||_target->hasType(Subtypes::TYPE_CREATURE)||_target->hasType(Subtypes::TYPE_ENCHANTMENT)||_target->hasType(Subtypes::TYPE_PLANESWALKER)))
|
||||
copy =_target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->battlefield,noEvent);
|
||||
else
|
||||
copy =_target->controller()->game->putInZone(_target, _target->currentZone, _target->controller()->game->stack,noEvent);
|
||||
copy->changeController(source->controller(),true);
|
||||
}
|
||||
if (game->targetChooser)
|
||||
@@ -5693,6 +5699,8 @@ const string AACastCard::getMenuText()
|
||||
{
|
||||
if(nameThis.size())
|
||||
return nameThis.c_str();
|
||||
if(putinplay)
|
||||
return "Put Into Play";
|
||||
return "Cast For Free";
|
||||
}
|
||||
|
||||
|
||||
@@ -2331,6 +2331,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
bool asCopy = splitCastCard[1].find("copied") != string::npos;
|
||||
bool asNormal = splitCastCard[1].find("normal") != string::npos;
|
||||
bool sendNoEvent = splitCastCard[1].find("noevent") != string::npos;
|
||||
bool putinplay = splitCastCard[1].find("putinplay") != string::npos;
|
||||
string nameCard = "";
|
||||
if(splitCastCard[1].find("named!:") != string::npos)
|
||||
{
|
||||
@@ -2340,7 +2341,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
nameCard = splitCastName[1];
|
||||
}
|
||||
}
|
||||
MTGAbility *a = NEW AACastCard(observer, id, card, target,withRestrictions,asCopy,asNormal,nameCard,newName,sendNoEvent);
|
||||
MTGAbility *a = NEW AACastCard(observer, id, card, target,withRestrictions,asCopy,asNormal,nameCard,newName,sendNoEvent,putinplay);
|
||||
a->oneShot = false;
|
||||
if(splitCastCard[1].find("trigger[to]") != string::npos)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user