From 81b3d0ae151801bc7fb6587f9e92bd32747cfac6 Mon Sep 17 00:00:00 2001 From: MysterD Date: Wed, 31 May 2023 20:56:47 -0700 Subject: [PATCH] Prevented water heal in Arena (thanks Coolio and wereyoshi) --- mods/arena/arena-player.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mods/arena/arena-player.lua b/mods/arena/arena-player.lua index e0f2871ee..b2aa94d7b 100644 --- a/mods/arena/arena-player.lua +++ b/mods/arena/arena-player.lua @@ -384,6 +384,17 @@ function mario_local_update(m) play_sound(SOUND_GENERAL_BREAK_BOX, m.marioObj.header.gfx.cameraToObject) end + -- prevent water heal + if m.health >= 0x100 then + if ((m.healCounter or m.hurtCounter) == 0) then + if ((m.action & ACT_FLAG_SWIMMING ~= 0) and (m.action & ACT_FLAG_INTANGIBLE == 0)) then + if ((m.pos.y >= (m.waterLevel - 140)) and not (m.area.terrainType & TERRAIN_SNOW ~= 0)) then + m.health = m.health - 0x1A + end + end + end + end + -- check for ladder mario_check_for_ladder(m)