fixed a bug with lords not removing altercost correctly when the source is phased.

added 
cantbeblockerof(this)<--this = the card who owns the ability.
cantbeblockerof(targetchooser) <--the target cant block anything targetable by this targetchooser.
spin engine and similar will use cantbeblockerof(this).
others were done with a workaround, which i hope will be updated soon.
This commit is contained in:
omegablast2002@yahoo.com
2013-02-06 02:45:40 +00:00
parent 1d06a74fd9
commit e424c3ab27
7 changed files with 182 additions and 8 deletions
+20
View File
@@ -3566,6 +3566,26 @@ int AAlterCost::addToGame()
return MTGAbility::addToGame();
}
int AAlterCost::destroy()
{
MTGCardInstance * _target = (MTGCardInstance *)target;
if(!this->manaReducer->isInPlay(game))
{
if (amount > 0)
{
_target->getIncreasedManaCost()->remove(type,amount);
refreshCost(_target);//special case for 0 cost.
}
else
{
_target->getReducedManaCost()->remove(type,abs(amount));
refreshCost(_target);//special case for 0 cost.
}
return MTGAbility::testDestroy();
}
return 0;
}
int AAlterCost::testDestroy()
{
MTGCardInstance * _target = (MTGCardInstance *)target;