- Fix issue 102 (Rampage not working correctly)
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-10-20 13:24:12 +00:00
parent 771b6d75be
commit 83bc12a275
5 changed files with 55 additions and 2 deletions

View File

@@ -3980,11 +3980,12 @@ class ARampageAbility:public MTGAbility{
int receiveEvent(WEvent * event) {
if (dynamic_cast<WEventBlockersChosen*>(event)) {
nbOpponents = source->blockers.size();
if (nbOpponents <= MaxOpponent) return 0;
source->power += PowerModifier * (nbOpponents - MaxOpponent);
source->addToToughness(ToughnessModifier * (nbOpponents - MaxOpponent));
}
else if (WEventPhaseChange* pe = dynamic_cast<WEventPhaseChange*>(event)) {
if (Constants::MTG_PHASE_AFTER_EOT == pe->to->id)
if (Constants::MTG_PHASE_AFTER_EOT == pe->to->id && nbOpponents > MaxOpponent)
{
source->power -= PowerModifier * (nbOpponents - MaxOpponent);
source->addToToughness(-ToughnessModifier * (nbOpponents - MaxOpponent));