@Voom, saying "toughen up" or "get corpse eater" isn't much of an argument. It's not just about positive status effect like regen or sustenance, but also negative effects like poison, bleeding wound and chaos grip. And as I just found, time doesn't pass as it should (more below).
I finally got around to digging around the code and found where the problem was. ActorStatsController.applyConditionsToPlayer() (and the monsters equivalent applyConditionsToMonsters) is only called in two places:
Code: Select all
GameRoundController.java:
public void onNewFullRound() {
controllers.mapController.resetMapsNotRecentlyVisited();
controllers.actorStatsController.applyConditionsToMonsters(world.model.currentMap, true);
controllers.actorStatsController.applyConditionsToPlayer(world.model.player, true);
gameRoundListeners.onNewFullRound();
}
public void onNewPlayerRound() {
world.model.worldData.tickWorldTime();
controllers.actorStatsController.applyConditionsToPlayer(world.model.player, false);
controllers.actorStatsController.applySkillEffectsForNewRound(world.model.player, world.model.currentMap);
controllers.mapController.handleMapEvents(world.model.currentMap, world.model.player.position, MapObject.MapObjectEvaluationType.afterEveryRound);
}
It doesn't get called in the CombatController's
Code: Select all
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();
if (pickupLootBags && totalExpThisFight > 0) {
controllers.itemController.lootMonsterBags(killedMonsterBags, totalExpThisFight);
} else {
controllers.gameRoundController.resume();
}
resetCombatState();
}
Also, notice how exitCombat() calls the gameRoundController.resetRoundTimers(). This reset has two effects: as mentioned in my original post, if you go from monster to monster quickly and kill them in the first round of combat, the status effects never apply because the 6s round gets reset before an end of round is processed. The other effect that I had noticed but wasn't sure is that time passes more slowly when fighting quickly and monsters don't respawn as fast as if you're just standing still in a corner.
Finally, I traced this change to version 0.7.0 and
a commit from Oskar. Based on the comment of this commit, it seems the effect of combat on rounds was perhaps unnoticed and quite possibly unwanted.
So, in light of all this, I propose the following: remove the resetRoundTimers() call from exitFromCombat(). This will just continue the time wherever the round timer is at. Moreover, I think we should replace it with a call to a new function. Here I'm putting what I think should go in it. If you thing something doesn't belong or something else should, please let me know.
Code: Select all
public void onNewEndOfCombatRound() {
world.model.worldData.tickWorldTime();
controllers.actorStatsController.applyConditionsToPlayer(world.model.player, false);
controllers.actorStatsController.applyConditionsToMonsters(world.model.currentMap, true);
}
I'm new to both Git and Android development so bear with me while I learn the ropes. I might be a little slow, but I will test it as soon as I learn how to build and install on my phone, and then send a pull request to Zukero.