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:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user