1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

- Battle interface fixes. It's possible to move stacks & attack

- Creature window allows to pass stack artifact to hero
- Fixes for Mana Drain, including #916
This commit is contained in:
DjWarmonger
2012-04-17 14:50:23 +00:00
parent cd4c93318d
commit f720038ca5
8 changed files with 69 additions and 30 deletions

View File

@@ -922,6 +922,7 @@ DLL_LINKAGE void BattleNextRound::applyGs( CGameState *gs )
s->state -= EBattleStackState::MOVED;
s->state -= EBattleStackState::HAD_MORALE;
s->state -= EBattleStackState::FEAR;
s->state -= EBattleStackState::DRAINED_MANA;
s->counterAttacks = 1 + s->valOfBonuses(Bonus::ADDITIONAL_RETALIATION);
// new turn effects
s->battleTurnPassed();
@@ -952,6 +953,7 @@ DLL_LINKAGE void BattleTriggerEffect::applyGs( CGameState *gs )
case Bonus::MANA_DRAIN:
{
CGHeroInstance * h = gs->getHero(additionalInfo);
st->state.insert (EBattleStackState::DRAINED_MANA);
h->mana -= val;
vstd::amax(h->mana, 0);
break;