Added new primitives from LTR set, added notrigger option for special tokens such as "The Monarch" and "The Ring" and "The Initiative", fixed LTR dat file, updated missing cards by sets list, added "untp" option for "rehook" and "retarget" ability to untap the equipped creature, added new restriction "oppoattacked" to check if your opponent has attacked during the current turn.
This commit is contained in:
@@ -4612,8 +4612,8 @@ AAFrozen * AAFrozen::clone() const
|
||||
}
|
||||
|
||||
// chose a new target for an aura or enchantment and equip it note: VERY basic right now.
|
||||
AANewTarget::AANewTarget(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost * _cost, bool retarget, bool reequip, bool newhook, int mutation, bool fromplay) :
|
||||
ActivatedAbility(observer, id, card, _cost, 0),retarget(retarget),reequip(reequip),newhook(newhook),mutation(mutation),fromplay(fromplay)
|
||||
AANewTarget::AANewTarget(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost * _cost, bool retarget, bool reequip, bool newhook, int mutation, bool fromplay, bool untap) :
|
||||
ActivatedAbility(observer, id, card, _cost, 0), retarget(retarget), reequip(reequip), newhook(newhook), mutation(mutation), fromplay(fromplay), untap(untap)
|
||||
{
|
||||
target = _target;
|
||||
}
|
||||
@@ -4653,6 +4653,8 @@ int AANewTarget::resolve()
|
||||
{
|
||||
((AEquip*)a)->unequip();
|
||||
((AEquip*)a)->equip(source);
|
||||
if(untap)
|
||||
source->untap();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4662,7 +4664,6 @@ int AANewTarget::resolve()
|
||||
target = source;
|
||||
source = _target;
|
||||
}
|
||||
|
||||
}
|
||||
if (_target && _target->currentZone == _target->controller()->game->battlefield && reequip && !mutation)
|
||||
{
|
||||
@@ -4690,6 +4691,8 @@ int AANewTarget::resolve()
|
||||
{
|
||||
((AEquip*)a)->unequip();
|
||||
((AEquip*)a)->equip(source);
|
||||
if(untap)
|
||||
source->untap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -775,6 +775,12 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
|
||||
return 0;
|
||||
}
|
||||
|
||||
check = restriction[i].find("oppoattacked");
|
||||
if(check != string::npos)
|
||||
{
|
||||
if(card->controller()->opponent()->raidcount < 1)
|
||||
return 0;
|
||||
}
|
||||
|
||||
check = restriction[i].find("opponentdamagedbycombat");
|
||||
if(check != string::npos)
|
||||
@@ -5491,6 +5497,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
{
|
||||
MTGAbility * a = NEW AANewTarget(observer, id, card, target, NULL, (s.find("retarget") != string::npos), false, false, 0, (s.find("fromplay") != string::npos));
|
||||
a->oneShot = 1;
|
||||
if(s.find("untp") != string::npos)
|
||||
((AANewTarget*)a)->untap = true;
|
||||
return a;
|
||||
}
|
||||
|
||||
@@ -5499,6 +5507,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
{
|
||||
MTGAbility * a = NEW AANewTarget(observer, id, card,target, NULL, false, true, (s.find("newhook") != string::npos));
|
||||
a->oneShot = 1;
|
||||
if(s.find("untp") != string::npos)
|
||||
((AANewTarget*)a)->untap = true;
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user