-- name: No Hat Tricks -- description: Prevents using the palette editor to become invincible by taking your cap on and off repeatedly.\n\nYet another tiny mod by EmilyEmmi ---@param m MarioState function mario_update(m) local LIMIT = 0 while LIMIT < 1000 and m.area.camera and m.area.camera.cutscene == CUTSCENE_PALETTE_EDITOR and (m.action == ACT_TAKING_OFF_CAP or m.action == ACT_PUTTING_ON_CAP) do m.marioObj.header.gfx.animInfo.animFrame = m.marioObj.header.gfx.animInfo.animFrame + 1 execute_mario_action(m.marioObj) LIMIT = LIMIT + 1 end end hook_event(HOOK_MARIO_UPDATE, mario_update)