NoDamageInShop
Grants godmode (no damage of any kind) only while in shop levels. Rebuilt from scratch against the current game version after the HappyCats and Snowlance versions of this mod both caused permanent godmode on every level.NoDamageInShop (eugenefitz)
Grants players godmode — no damage of any kind — while in shop levels only. Damage applies normally everywhere else.
Why this version exists
Two earlier mods with the same goal (HappyCats-NoDamageInShop, Snowlance-NoDamageInShop) both ended up granting godmode on every level, not just the shop:
HappyCats-NoDamageInShoppatchedPlayerHealth.HurtOtherby name only. On the current game version that patch throwsAmbiguousMatchExceptionduring startup and the mod's own damage guard (SemiFunc.RunIsShop() || RunManager.instance.levelIsShop) never reliably gates anything.Snowlance-NoDamageInShopcomparedRunManager.instance.levelCurrent == RunManager.instance.levelShop. In the current game version,levelShopis aList<Level>(the game rotates between several shop scenes), not a singleLevel— so that comparison no longer means what it used to.
Both are examples of a mod silently breaking after a REPO update changed the underlying field/method it depended on.
How this mod works
- Patches a single method:
PlayerHealth.Hurt(int damage, bool savingGrace, int enemyIndex, bool hurtByHeal), the one place all player damage funnels through (player-vs-player damage and networked hits both route back into this same method for the local player). - The patch is registered against that method's exact parameter types, so it can't silently rebind to the wrong overload if the game ever adds one.
- The shop check is
SemiFunc.RunIsShop()— the same helper the game's own code uses internally for shop-only behavior (e.g. the shopkeeper's own damage rules), rather than a hand-rolled field comparison. - If the shop check itself throws (e.g. a future update changes it again), the patch fails open: damage is allowed through as normal instead of silently granting permanent godmode. This is the opposite of what broke the two earlier mods.
Notes
- Client-side only. Every player who wants shop-immunity needs this installed on their own game.
- No config options yet — it's unconditionally shop-only, no PvP/betrayal-mode exception.
