Skip to content

Commit 3185616

Browse files
committed
reduced the healing factor so that it has the same modifier on it as the damage reducer
1 parent ddf6190 commit 3185616

File tree

3 files changed

+38
-32
lines changed

3 files changed

+38
-32
lines changed

broadcast/deploy-battle-nads.s.sol/10143/run-latest.json

Lines changed: 27 additions & 27 deletions
Large diffs are not rendered by default.

src/battle-nads/Combat.sol

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,14 +307,18 @@ abstract contract Combat is MonsterFactory {
307307

308308
// Health regen has to be normalized for the default cooldown to prevent quickness points from
309309
// giving extreme health regeneration benefits
310-
uint256 targetHealthRegeneration = uint256(combatant.stats.vitality) * VITALITY_REGEN_MODIFIER;
310+
uint256 targetHealthRegeneration = (uint256(combatant.stats.vitality) + uint256(combatant.stats.level)) * VITALITY_REGEN_MODIFIER;
311311

312312
if (combatant.isMonster()) {
313-
targetHealthRegeneration /= 2;
313+
if (attacker.stats.class == CharacterClass.Boss) {
314+
targetHealthRegeneration = targetHealthRegeneration * 3 / 2;
315+
} else if (attacker.stats.class == CharacterClass.Basic) {
316+
targetHealthRegeneration = targetHealthRegeneration * 4 / 5;
317+
} // else: elites have 1:1 regen
314318
}
315319

316320
if (combatant.stats.class == CharacterClass.Monk) {
317-
targetHealthRegeneration += (uint256(combatant.stats.level) * 2 + 10);
321+
targetHealthRegeneration += ((uint256(combatant.stats.level) * 3 / 2) + 10);
318322
} else if (combatant.stats.class == CharacterClass.Bard) {
319323
targetHealthRegeneration = 1;
320324
}
@@ -327,6 +331,8 @@ abstract contract Combat is MonsterFactory {
327331
targetHealthRegeneration = 0;
328332
}
329333

334+
targetHealthRegeneration = (targetHealthRegeneration + 2) * DAMAGE_DILUTION_FACTOR / DAMAGE_DILUTION_BASE;
335+
330336
// Cannot regenerate above max
331337
if (currentHealth + targetHealthRegeneration > maxHealth) {
332338
uint256 recovered = maxHealth > currentHealth ? maxHealth - currentHealth : 0;

src/battle-nads/Constants.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ contract Constants {
2424
uint256 internal constant HEALTH_BASE = 1500;
2525
uint256 internal constant LEVEL_HEALTH_MODIFIER = 60;
2626
uint256 internal constant VITALITY_HEALTH_MODIFIER = 100;
27-
uint256 internal constant VITALITY_REGEN_MODIFIER = 5;
27+
uint256 internal constant VITALITY_REGEN_MODIFIER = 3;
2828
uint256 internal constant STURDINESS_HEALTH_MODIFIER = 20;
2929

3030
uint256 internal constant MONSTER_HEALTH_BASE = 1200;
@@ -68,7 +68,7 @@ contract Constants {
6868
uint256 internal constant STARTING_OCCUPANT_THRESHOLD = 16;
6969
uint8 internal constant NO_COMBAT_ZONE_SPACING = 5;
7070

71-
uint256 internal constant DAMAGE_DILUTION_FACTOR = 350;
71+
uint256 internal constant DAMAGE_DILUTION_FACTOR = 380;
7272
uint256 internal constant DAMAGE_DILUTION_BASE = 1000;
7373

7474
// BALANCES

0 commit comments

Comments
 (0)