massive update, additions and changelog in first comment.
This commit is contained in:
@@ -18,6 +18,22 @@ WEventPhaseChange::WEventPhaseChange(Phase * from, Phase * to) : WEvent(CHANGE_P
|
||||
|
||||
WEventCardTap::WEventCardTap(MTGCardInstance * card, bool before, bool after) : WEventCardUpdate(card), before(before), after(after){}
|
||||
|
||||
WEventCardTappedForMana::WEventCardTappedForMana(MTGCardInstance * card, bool before, bool after) : WEventCardUpdate(card), before(before), after(after){}
|
||||
|
||||
WEventCardAttacked::WEventCardAttacked(MTGCardInstance * card) : WEventCardUpdate(card){}
|
||||
|
||||
WEventCardAttackedNotBlocked::WEventCardAttackedNotBlocked(MTGCardInstance * card) : WEventCardUpdate(card){}
|
||||
|
||||
WEventCardAttackedBlocked::WEventCardAttackedBlocked(MTGCardInstance * card) : WEventCardUpdate(card){}
|
||||
|
||||
WEventCardBlocked::WEventCardBlocked(MTGCardInstance * card) : WEventCardUpdate(card){}
|
||||
|
||||
WEventcardDraw::WEventcardDraw(Player * player,int nb_cards) : player(player), nb_cards(nb_cards){}
|
||||
|
||||
WEventCardSacrifice::WEventCardSacrifice(MTGCardInstance * card) : WEventCardUpdate(card){}
|
||||
|
||||
WEventCardDiscard::WEventCardDiscard(MTGCardInstance * card) : WEventCardUpdate(card){}
|
||||
|
||||
WEventCardChangeType::WEventCardChangeType(MTGCardInstance * card, int type, bool before, bool after) : WEventCardUpdate(card), type(type), before(before), after(after){}
|
||||
|
||||
WEventCreatureAttacker::WEventCreatureAttacker(MTGCardInstance * card, Targetable * before, Targetable * after) : WEventCardUpdate(card), before(before), after(after){}
|
||||
@@ -51,11 +67,61 @@ Targetable * WEventZoneChange::getTarget(int target) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Targetable * WEventCardAttacked::getTarget(int target) {
|
||||
if (target) return card;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Targetable * WEventCardSacrifice::getTarget(int target) {
|
||||
if (target) return card;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Targetable * WEventCardDiscard::getTarget(int target) {
|
||||
if (target) return card;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Targetable * WEventCardAttackedNotBlocked::getTarget(int target) {
|
||||
if (target) return card;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Targetable * WEventCardAttackedBlocked::getTarget(int target) {
|
||||
switch (target) {
|
||||
case TARGET_TO :
|
||||
return card;
|
||||
case TARGET_FROM :
|
||||
return card->getNextOpponent();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Targetable * WEventCardBlocked::getTarget(int target) {
|
||||
switch (target) {
|
||||
case TARGET_TO :
|
||||
return card;
|
||||
case TARGET_FROM :
|
||||
return card->getNextOpponent();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Targetable * WEventCardTap::getTarget(int target){
|
||||
if (target) return card;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Targetable * WEventCardTappedForMana::getTarget(int target){
|
||||
if (target) return card;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Targetable * WEventcardDraw::getTarget(Player * player){
|
||||
if (player) return player;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
std::ostream& WEvent::toString(std::ostream& out) const
|
||||
{
|
||||
return out << "EVENT";
|
||||
|
||||
Reference in New Issue
Block a user