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 god
About this mod Author’s original text
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-NoDamageInShop patched PlayerHealth.HurtOther by name only. On the current game version that patch throws AmbiguousMatchException during startup and the mod's own damage guard (SemiFunc.RunIsShop() || RunManager.instance.levelIsShop) never reliably gates anything.
- Snowlance-NoDamageInShop compared RunManager.instance.levelCurrent == RunManager.instance.levelShop. In the current game version, levelShop is a List (the game rotates between several shop scenes), not a single Level — 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.
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: