1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-05 23:28:14 +02:00

* server sends confirmation (given later to player interface) after applying request (will be needed for AI)

* created new package for injuring multiple units - needed for area spells (not tested)
* proper screen updating on garrison change
* spell effects will be removed when they time out
* Corpse (Skeleton) will be accessible from all directions
* new objects supported:
- Corpse
- Lean To
- Wagon
- Warrior's Tomb

* several minor improvements
This commit is contained in:
Michał W. Urbańczyk
2009-04-16 00:28:54 +00:00
parent f9ae91d88c
commit d80afb1902
20 changed files with 576 additions and 180 deletions

View File

@@ -448,6 +448,16 @@ DLL_EXPORT void BattleNextRound::applyGs( CGameState *gs )
s->state -= MOVED;
s->state -= HAD_MORALE;
s->counterAttacks = 1;
//remove effects and restore only those with remaining turns in duration
std::vector<CStack::StackEffect> tmpEffects = s->effects;
s->effects.clear();
for(int i=0; i < tmpEffects.size(); i++)
{
tmpEffects[i].turnsRemain--;
if(tmpEffects[i].turnsRemain > 0)
s->effects.push_back(tmpEffects[i]);
}
}
}
@@ -545,6 +555,12 @@ DLL_EXPORT void SetStackEffect::applyGs( CGameState *gs )
}
}
DLL_EXPORT void StacksInjured::applyGs( CGameState *gs )
{
BOOST_FOREACH(BattleStackAttacked stackAttacked, stacks)
stackAttacked.applyGs(gs);
}
DLL_EXPORT void YourTurn::applyGs( CGameState *gs )
{
gs->currentPlayer = player;