1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-21 17:07:40 +00:00

ru:: mods, used to let fiery weapon work

This commit is contained in:
Zeno Rogue
2025-05-24 17:15:01 +02:00
parent 25f095d225
commit 299a3b64c6
4 changed files with 47 additions and 6 deletions

View File

@@ -42,6 +42,7 @@ void statdata::reset() {
coyote_time = 0;
jump_control = 0;
hallucinating = false;
mods.clear();
}
void man::act() {
@@ -55,6 +56,8 @@ void man::act() {
auto h = max_hp();
current = next;
next.reset();
for(auto& po: powers) po.mods.clear();
for(auto& [po, type, val]: current.mods) po->mods.emplace_back(type, val);
if(h != max_hp())
hp = randround(1. * hp * max_hp() / h);
auto dat = get_dat();