Add Support for Vedlaken Shackles and the likes

the alias 50120 is there to prevent untap  during untap phase and the
canuntap restriction will trigger if it's possible to untap ie tha card
doesn't have doesnotuntap,, or frozen or is tapped.
This commit is contained in:
Anthony Calosa
2016-06-30 16:18:39 +08:00
parent e6aafbc8a6
commit 547a9fcc17
6 changed files with 222 additions and 49 deletions

View File

@@ -469,6 +469,13 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
return 0;
}
check = restriction[i].find("canuntap");
if(check != string::npos)
{
if(card->frozen >= 1 || card->basicAbilities[(int)Constants::DOESNOTUNTAP] || !card->isTapped())
return 0;
}
check = restriction[i].find("raid");
if(check != string::npos)
{
@@ -2226,6 +2233,15 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return a;
}
//gain control until source is untapped or leaves battlefield
found = s.find("shackle");
if (found != string::npos)
{
MTGAbility * a = NEW AShackleWrapper(observer, id, card, target);
a->oneShot = 1;
return a;
}
//momentary blink
found = s.find("(blink)");
if (found != string::npos)