put heal nerf behind mode toggle

This commit is contained in:
Kent Rasmussen
2025-04-02 14:35:16 +09:00
parent 0a0b0e20d5
commit 4bb479f98d
+10 -3
View File
@@ -166,6 +166,7 @@ var mode = {
all_smart: 1, all_smart: 1,
prevent_external: 0, // for "test" / "hardcore" prevent_external: 0, // for "test" / "hardcore"
pvp_level_gap: 0, // have to be within 10 level to attack pvp_level_gap: 0, // have to be within 10 level to attack
fear_affects_heal: 1, // when feared heal output is lowered
}; };
var events = { var events = {
// SEASONS // SEASONS
@@ -1428,13 +1429,19 @@ function calculate_player_stats(player) {
player.speed -= sredux[Math.min(sredux.length - 1, player.fear)]; player.speed -= sredux[Math.min(sredux.length - 1, player.fear)];
if (player.fear > 2) { if (player.fear > 2) {
player.attack = Math.round(player.attack * 0.2); player.attack = Math.round(player.attack * 0.2);
player.heal = Math.round(player.heal * 0.2); if (mode.fear_affects_heal) {
player.heal = Math.round(player.heal * 0.2);
}
} else if (player.fear > 1) { } else if (player.fear > 1) {
player.attack = Math.round(player.attack * 0.4); player.attack = Math.round(player.attack * 0.4);
player.heal = Math.round(player.heal * 0.4); if (mode.fear_affects_heal) {
player.heal = Math.round(player.heal * 0.4);
}
} else if (player.fear) { } else if (player.fear) {
player.attack = Math.round(player.attack * 0.6); player.attack = Math.round(player.attack * 0.6);
player.heal = Math.round(player.heal * 0.6); if (mode.fear_affects_heal) {
player.heal = Math.round(player.heal * 0.6);
}
} }
if (player.map == "winterland") { if (player.map == "winterland") {