added "blockable" targetchooser, a targetchooser which shows the cards considered "blockable" by source.

corrected an error in ability$! parsing that prevents transforms to use it in newability[

added "block" keyword. and ability.
This commit is contained in:
omegablast2002@yahoo.com
2012-04-02 13:32:50 +00:00
parent 4dfacaa409
commit b705158e13
5 changed files with 110 additions and 1 deletions
+25
View File
@@ -4798,6 +4798,31 @@ ABlinkGeneric::~ABlinkGeneric()
SAFE_DELETE(ability);
}
// target becomes blocked by source
AABlock::AABlock(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost * _cost) :
InstantAbility(observer, id, card, target)
{
target = _target;
}
int AABlock::resolve()
{
MTGCardInstance * _target = (MTGCardInstance *) target;
source = (MTGCardInstance*)source;
if (_target && source->canBlock(_target))
{
source->toggleDefenser(_target);
source->getObserver()->isInterrupting = NULL;
}
return 1;
}
AABlock * AABlock::clone() const
{
return NEW AABlock(*this);
}
// target becomes a parent of card(source)
AAConnect::AAConnect(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost * _cost) :
InstantAbility(observer, id, card, target)