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

View File

@@ -2515,6 +2515,15 @@ public:
};
//
/* assign a creature to block a target */
class AABlock: public InstantAbility
{
public:
AABlock(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost * _cost = NULL);
int resolve();
AABlock * clone() const;
};
/* create a parent child association between cards */
class AAConnect: public InstantAbility
{

View File

@@ -260,6 +260,25 @@ public:
virtual bool equals(TargetChooser * tc);
};
class BlockableChooser: public TypeTargetChooser
{
public:
bool withoutProtections;
BlockableChooser(GameObserver *observer, int * _zones, int _nbzones, MTGCardInstance * card = NULL, int _maxtargets = 1, bool other = false, bool targetMin = false) :
TypeTargetChooser(observer, "creature",_zones, _nbzones, card, _maxtargets, other, targetMin)
{
}
;
BlockableChooser(GameObserver *observer, MTGCardInstance * card = NULL, int _maxtargets = 1, bool other = false,bool targetMin = false) :
TypeTargetChooser(observer, "creature", card, _maxtargets, other,targetMin)
{
}
;
virtual bool canTarget(Targetable * target, bool withoutProtections = false);
virtual BlockableChooser * clone() const;
virtual bool equals(TargetChooser * tc);
};
class myCursesChooser: public TypeTargetChooser
{
public: