Fix tower mob level and hp scaling (#2430)

This commit is contained in:
longfruit
2023-11-08 18:15:10 -08:00
committed by GitHub
parent 1fac319eb2
commit 0bbeaf254b
7 changed files with 66 additions and 27 deletions

View File

@@ -355,6 +355,28 @@ public class EntityMonster extends GameEntity {
+ (this.getFightProperty(c.getBase())
* (1f + this.getFightProperty(c.getPercent())))));
// If in tower, scale max hp by
// +50%: Floors 3 7
// +100%: Floors 8 11
// +150%: Floor 12
var dungeonManager = getScene().getDungeonManager();
var towerManager = getScene().getPlayers().get(0).getTowerManager();
if (dungeonManager != null && dungeonManager.isTowerDungeon() && towerManager != null) {
var floor = towerManager.getCurrentFloorNumber();
float additionalScaleFactor = 0f;
if (floor >= 12) {
additionalScaleFactor = 1.5f;
} else if (floor >= 8) {
additionalScaleFactor = 1.f;
} else if (floor >= 3) {
additionalScaleFactor = .5f;
}
this.setFightProperty(
FightProperty.FIGHT_PROP_MAX_HP,
this.getFightProperty(FightProperty.FIGHT_PROP_MAX_HP) * (1 + additionalScaleFactor));
}
// Set current hp
this.setFightProperty(
FightProperty.FIGHT_PROP_CUR_HP,