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

Removed creatureBank flag from battle, battles now receive BattleLayout

struct that defines how units are placed in combat
This commit is contained in:
Ivan Savenko
2024-08-31 21:04:32 +00:00
parent c55e07dabc
commit 39a2c29c97
34 changed files with 341 additions and 258 deletions

View File

@@ -219,7 +219,7 @@ void CGMine::battleFinished(const CGHeroInstance *hero, const BattleResult &resu
void CGMine::blockingDialogAnswered(const CGHeroInstance *hero, int32_t answer) const
{
if(answer)
cb->startBattleI(hero, this);
cb->startBattle(hero, this);
}
void CGMine::serializeJsonOptions(JsonSerializeFormat & handler)
@@ -352,7 +352,7 @@ void CGResource::battleFinished(const CGHeroInstance *hero, const BattleResult &
void CGResource::blockingDialogAnswered(const CGHeroInstance *hero, int32_t answer) const
{
if(answer)
cb->startBattleI(hero, this);
cb->startBattle(hero, this);
}
void CGResource::serializeJsonOptions(JsonSerializeFormat & handler)
@@ -919,7 +919,7 @@ void CGArtifact::battleFinished(const CGHeroInstance *hero, const BattleResult &
void CGArtifact::blockingDialogAnswered(const CGHeroInstance *hero, int32_t answer) const
{
if(answer)
cb->startBattleI(hero, this);
cb->startBattle(hero, this);
}
void CGArtifact::afterAddToMap(CMap * map)
@@ -999,7 +999,7 @@ void CGGarrison::onHeroVisit (const CGHeroInstance *h) const
auto relations = cb->gameState()->getPlayerRelations(h->tempOwner, tempOwner);
if (relations == PlayerRelations::ENEMIES && stacksCount() > 0) {
//TODO: Find a way to apply magic garrison effects in battle.
cb->startBattleI(h, this);
cb->startBattle(h, this);
return;
}