Merge pull request #30 from dacmot/end_round_at_end_of_combat

End round at end of combat
This commit is contained in:
Zukero
2017-07-25 21:07:01 +02:00
committed by GitHub
2 changed files with 10 additions and 2 deletions

View File

@@ -19,6 +19,7 @@
Additional programming by Lucas Delvallet<br />
Additional programming by Florian Doublet<br />
Additional programming by M.H. Alkotob<br />
Additional programming by Olivier Dragon<br />
Additional graphics by Karvis<br />
Russian translation by Dreamer..., e.solodookhin, shell.andor, konstmih, istasman, Aleksey Kabanov, Alexander Zubok, Paul Sulemenkov and dromoz<br />
Italian translation by k6blue, liogiu, Joker and Andrea Luciano Damico<br />

View File

@@ -55,10 +55,9 @@ public final class CombatController implements VisualEffectCompletedCallback {
public void exitCombat(boolean pickupLootBags) {
setCombatSelection(null, null);
world.model.uiSelections.isInCombat = false;
combatTurnListeners.onCombatEnded();
world.model.uiSelections.selectedPosition = null;
world.model.uiSelections.selectedMonster = null;
controllers.gameRoundController.resetRoundTimers();
endOfCombatRound();
if (pickupLootBags && totalExpThisFight > 0) {
controllers.itemController.lootMonsterBags(killedMonsterBags, totalExpThisFight);
} else {
@@ -557,6 +556,14 @@ public final class CombatController implements VisualEffectCompletedCallback {
}
}
public void endOfCombatRound() {
combatTurnListeners.onCombatEnded();
world.model.worldData.tickWorldTime();
controllers.gameRoundController.resetRoundTimers();
controllers.actorStatsController.applyConditionsToPlayer(world.model.player, false);
controllers.actorStatsController.applyConditionsToMonsters(world.model.currentMap, true);
}
public void monsterSteppedOnPlayer(Monster m) {
setCombatSelection(m);
enterCombat(BeginTurnAs.monsters);