revised pw rule
also fixed where planeswalker can use its ability after it was transformed/flipped by activation ex. Garruk Relentless... You can’t activate a loyalty ability of Garruk Relentless and later that turn after he transforms activate a loyalty ability of Garruk, the Veil-Cursed.
This commit is contained in:
@@ -3347,6 +3347,7 @@ InstantAbility(observer, id, card, _target),flipStats(flipStats),isflipcard(isfl
|
||||
int AAFlip::resolve()
|
||||
{
|
||||
int cdaDamage = 0;
|
||||
int activatedanyability = 0;
|
||||
MTGCardInstance * Flipper = (MTGCardInstance*)source;
|
||||
this->oneShot = true;
|
||||
if(Flipper->isFlipped)
|
||||
@@ -3397,6 +3398,17 @@ int AAFlip::resolve()
|
||||
_target->setMTGId(myFlip->getMTGId());
|
||||
_target->setId = myFlip->setId;
|
||||
}
|
||||
//check pw
|
||||
if(_target->hasType(Subtypes::TYPE_PLANESWALKER))
|
||||
{
|
||||
for(unsigned int k = 0;k < _target->cardsAbilities.size();++k)
|
||||
{
|
||||
ActivatedAbility * check = dynamic_cast<ActivatedAbility*>(_target->cardsAbilities[k]);
|
||||
if(check && check->counters)
|
||||
activatedanyability++;
|
||||
}
|
||||
}
|
||||
//
|
||||
for(unsigned int i = 0;i < _target->cardsAbilities.size();i++)
|
||||
{
|
||||
MTGAbility * a = dynamic_cast<MTGAbility *>(_target->cardsAbilities[i]);
|
||||
@@ -3428,6 +3440,19 @@ int AAFlip::resolve()
|
||||
}
|
||||
}
|
||||
}
|
||||
//limit pw abi
|
||||
if(activatedanyability)
|
||||
{
|
||||
if(_target->hasType(Subtypes::TYPE_PLANESWALKER))
|
||||
{
|
||||
for(unsigned int k = 0;k < _target->cardsAbilities.size();++k)
|
||||
{
|
||||
ActivatedAbility * check = dynamic_cast<ActivatedAbility*>(_target->cardsAbilities[k]);
|
||||
if(check)//is there a better way?
|
||||
check->counters++;
|
||||
}
|
||||
}
|
||||
}
|
||||
//power
|
||||
int powerMod = 0;
|
||||
int toughMod = 0;
|
||||
|
||||
Reference in New Issue
Block a user