diff --git a/httpstatic/chan_minigames.js b/httpstatic/chan_minigames.js index 53b40a2e..f6d98161 100644 --- a/httpstatic/chan_minigames.js +++ b/httpstatic/chan_minigames.js @@ -31,6 +31,7 @@ export function render(data) { SELECT({name: "selfheal", value: boss.selfheal}, [ OPTION({value: "0"}, "Deals damage as normal"), OPTION({value: "1"}, "Heals the boss"), + OPTION({value: "2"}, "Overheals the boss"), ]), ]), LI([ diff --git a/modules/http/chan_minigames.pike b/modules/http/chan_minigames.pike index ef86ca8e..a7b57c48 100644 --- a/modules/http/chan_minigames.pike +++ b/modules/http/chan_minigames.pike @@ -59,7 +59,7 @@ constant sections = ([ "hpgrowth": 0, //0 for static, positive numbers for fixed growth, -1 for overkill "autoreset": 1, //Reset at end of stream automatically. There'll be a mod command to reset regardless. "giftrecipient": 0, - "selfheal": 1, + "selfheal": 1, //0 lets current boss damage themselves (phoenix mode), 1 self-heal up to current max HP, 2 self-heal unlimited ]), "crown": ([ "enabled": 0, diff --git a/modules/http/chan_monitors.pike b/modules/http/chan_monitors.pike index 242d96e1..352f30ae 100644 --- a/modules/http/chan_monitors.pike +++ b/modules/http/chan_monitors.pike @@ -286,7 +286,10 @@ void advance_goalbar(object channel, mapping|string info, mapping person, int ad if (string recip = info->boss_giftrecipient && extra->msg_param_recipient_display_name) from_name = recip; if (info->boss_selfheal && lower_case(from_name) == lower_case(channel->expand_variables("$bossname$"))) { int dmg = (int)channel->expand_variables("$bossdmg$"); - if (advance > dmg) advance = dmg; //No healing past your max HP + if (advance > dmg) { + if (info->boss_selfheal == 2) channel->set_variable("bossmaxhp", dmg - advance, "add"); //Overheal: Healing can increase max HP + else advance = dmg; //Normal heal: No healing past your max HP + } advance = -advance; //Heal rather than hurt. } int total = (int)channel->set_variable(varname, advance, "add"); //Abuse the fact that it'll take an int just fine for add :)