R.E.P.O.
Install with App

Details

Latest version
1.0.0
Last Updated
First Uploaded
Downloads
302
Likes
1
Size
6KB
Dependants

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<Level> (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.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.