fix produce color

when you produce the chosen color, add mana of that color.
This commit is contained in:
Anthony Calosa
2016-06-23 17:44:50 +08:00
parent 7c9d52abbf
commit 4d3277f41b
7 changed files with 113 additions and 61 deletions
+10
View File
@@ -346,6 +346,16 @@ int GuiMana::receiveEventPlus(WEvent* e)
manas.push_back(NEW ManaIcon(event->color, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, x, y));
return 1;
}
else if (WEventEngageManaExtra *event = dynamic_cast<WEventEngageManaExtra*>(e))
{
if (event->destination != owner->getManaPool())
return 0;
if (event->card && event->card->view)
manas.push_back(NEW ManaIcon(event->color, event->card->view->actX, event->card->view->actY, x, y));
else
manas.push_back(NEW ManaIcon(event->color, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, x, y));
return 1;
}
else
return 0;
}