Erwan
- Magic 2010: Combat Damages don't go on the stack anymore - Comp rules: "goes to graveyard" effects don't go on the stack anymore - Regenerate "fixed" (untested) - Basic "ReplacementEffect" mechanism for damage prevention. Can be extended to other replacement effects with some limits. - TODO: Damages don't go on the stack, the abilities that create them do.
This commit is contained in:
@@ -330,7 +330,21 @@ int TargetChooser::targetListSet(){
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
a specific Card
|
||||
**/
|
||||
CardTargetChooser::CardTargetChooser(MTGCardInstance * _card, MTGCardInstance * source):TargetChooser(source){
|
||||
validTarget = _card;
|
||||
}
|
||||
|
||||
int CardTargetChooser::canTarget(Targetable * target ){
|
||||
if (!TargetChooser::canTarget(target)) return 0;
|
||||
if (target->typeAsTarget() == TARGET_CARD){
|
||||
MTGCardInstance * card = (MTGCardInstance *) target;
|
||||
if (card == validTarget) return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
Choose anything that has a given list of types
|
||||
@@ -522,9 +536,15 @@ int TargetZoneChooser::targetsZone(MTGGameZone * z){
|
||||
}
|
||||
|
||||
/* Player Target */
|
||||
|
||||
PlayerTargetChooser::PlayerTargetChooser(MTGCardInstance * card, int _maxtargets, Player *_p):TargetChooser(card, _maxtargets){
|
||||
p = _p;
|
||||
}
|
||||
|
||||
int PlayerTargetChooser::canTarget(Targetable * target){
|
||||
if (target->typeAsTarget() == TARGET_PLAYER){
|
||||
return 1;
|
||||
Player * _target = (Player *) target;
|
||||
if (!p || p == _target) return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user