mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-25 14:40:14 -05:00
Merge pull request #171 from earthiverse/feature/nerf-heal
Have fear affect heal, too
This commit is contained in:
+22
-11
@@ -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
|
||||||
@@ -1418,20 +1419,30 @@ function calculate_player_stats(player) {
|
|||||||
(player.level > 20 && 0.04) ||
|
(player.level > 20 && 0.04) ||
|
||||||
0.05;
|
0.05;
|
||||||
|
|
||||||
var excess = max(
|
player.fear = Math.max(
|
||||||
0,
|
0,
|
||||||
max(player.targets_p - player.courage, max(player.targets_m - player.mcourage, player.targets_u - player.pcourage)),
|
player.targets_p - player.courage,
|
||||||
|
player.targets_m - player.mcourage,
|
||||||
|
player.targets_u - player.pcourage,
|
||||||
);
|
);
|
||||||
var sredux = [0, 20, 40, 70, 80, 90, 100];
|
const sredux = [0, 20, 40, 70, 80, 90, 100];
|
||||||
player.speed -= sredux[min(sredux.length - 1, excess)];
|
player.speed -= sredux[Math.min(sredux.length - 1, player.fear)];
|
||||||
if (excess > 2) {
|
if (player.fear > 2) {
|
||||||
player.attack = round(player.attack * 0.2);
|
player.attack = Math.round(player.attack * 0.2);
|
||||||
} else if (excess > 1) {
|
if (mode.fear_affects_heal) {
|
||||||
player.attack = round(player.attack * 0.4);
|
player.heal = Math.round(player.heal * 0.2);
|
||||||
} else if (excess) {
|
}
|
||||||
player.attack = round(player.attack * 0.6);
|
} else if (player.fear > 1) {
|
||||||
|
player.attack = Math.round(player.attack * 0.4);
|
||||||
|
if (mode.fear_affects_heal) {
|
||||||
|
player.heal = Math.round(player.heal * 0.4);
|
||||||
|
}
|
||||||
|
} else if (player.fear) {
|
||||||
|
player.attack = Math.round(player.attack * 0.6);
|
||||||
|
if (mode.fear_affects_heal) {
|
||||||
|
player.heal = Math.round(player.heal * 0.6);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
player.fear = excess;
|
|
||||||
|
|
||||||
if (player.map == "winterland") {
|
if (player.map == "winterland") {
|
||||||
player.speed *= 0.95;
|
player.speed *= 0.95;
|
||||||
|
|||||||
Reference in New Issue
Block a user