-Laurent Added @damaged, cards to 10E and LEG, small correction to ALA, ARB, CHK, EVE and ZEN
- Added @damaged works fine (tested with thieving magpie), please test your additions if you plan to add some cards with this keyword and report if buggy. As the other trigger, you cannot have a target unless there is a may ability. - Added 2 cards to 10E - Reminisce and Thieving Magpie both tested and working. - Added 2 cards to LEG - Jovial Evil and Spiritual Sanctuary (not tested yet) but should work.
This commit is contained in:
@@ -157,6 +157,35 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class TrDamaged:public TriggeredAbility{
|
||||
public:
|
||||
TargetChooser * tc;
|
||||
TargetChooser * fromTc;
|
||||
TrDamaged (int id, MTGCardInstance * source, TargetChooser * tc, TargetChooser * fromTc = NULL):TriggeredAbility(id,source), tc(tc), fromTc(fromTc){}
|
||||
|
||||
int resolve(){
|
||||
return 0; //This is a trigger, this function should not be called
|
||||
}
|
||||
|
||||
int triggerOnEvent(WEvent * event){
|
||||
WEventDamage * e = dynamic_cast<WEventDamage *>(event);
|
||||
if (!e) return 0;
|
||||
if(!tc->canTarget(e->damage->target)) return 0;
|
||||
if (fromTc && !fromTc->canTarget(e->damage->source)) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
~ TrDamaged (){
|
||||
SAFE_DELETE(tc);
|
||||
SAFE_DELETE(fromTc);
|
||||
}
|
||||
|
||||
TrDamaged * clone() const{
|
||||
TrDamaged * a = NEW TrDamaged (*this);
|
||||
a->isClone = 1;
|
||||
return a;
|
||||
}
|
||||
};
|
||||
|
||||
//counters
|
||||
class AACounter: public ActivatedAbility{
|
||||
|
||||
Reference in New Issue
Block a user