TrcardDrawn changes
@drawn(who) -> static version @drawof(player) -> current controller of the card @drawfoeof(player) -> current opponent of the card
This commit is contained in:
@@ -1196,9 +1196,9 @@ public:
|
||||
class TrcardDrawn: public Trigger
|
||||
{
|
||||
public:
|
||||
|
||||
TrcardDrawn(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc,bool once = false) :
|
||||
Trigger(observer, id, source,once, tc)
|
||||
bool thiscontroller, thisopponent;
|
||||
TrcardDrawn(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc,bool once = false, bool thiscontroller = false, bool thisopponent = false) :
|
||||
Trigger(observer, id, source,once, tc),thiscontroller(thiscontroller),thisopponent(thisopponent)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1207,7 +1207,12 @@ public:
|
||||
WEventcardDraw * e = dynamic_cast<WEventcardDraw *> (event);
|
||||
if (!e) return 0;
|
||||
if (!tc->canTarget(e->player)) return 0;
|
||||
|
||||
if(thiscontroller)
|
||||
if(e->player != source->controller())
|
||||
return 0;
|
||||
if(thisopponent)
|
||||
if(e->player == source->controller())
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user