REPO_JP-SharedLiabilityDamage icon

SharedLiabilityDamage

Host-only solidarity damage: whenever someone dies, deal N% of each survivor's max health to every survivor, without re-triggering on solidarity-caused deaths (0 disables).誰かが死ぬたびに生存者全員へ最大体力N%ダメージ付与 連帯責任ダメージ死では再発動しない(0で無効 ホストのみ)

By REPO_JP

CHANGELOG

Changelog

[1.0.0] - Initial Release

Added

  • Shared liability damage on player death (host only)

    • Hooks PlayerAvatar.PlayerDeathRPC (Harmony Postfix)
    • When any player death is detected, schedules solidarity damage after 1 frame
    • Deals damage to every survivor based on that survivor’s own max health
    • Damage is applied via PlayerHealth.HurtOther(..., enemyIndex: -1)
  • Anti chain-trigger for solidarity-caused deaths

    • If a death is caused by this mod’s damage (enemyIndex == -1), it does not trigger solidarity again
    • Uses a short-lived per-player mark keyed by photonView.ViewID with TTL = 2 seconds
    • Purges expired marks before applying damage
  • Config

    • General.DamagePercent (0..100, default 10)
    • 0 disables the mod
  • Safety / guards

    • Runs only in multiplayer and only on the host (Master Client)
    • Survivor check uses PlayerAvatar.deadSet and PlayerHealth.health via reflection fields