Skip to content

Add toggleable GM powers command#79

Draft
joshlit wants to merge 1 commit into
OpenDAoC:masterfrom
daoc-blackthorn:codex/gm-powers-command
Draft

Add toggleable GM powers command#79
joshlit wants to merge 1 commit into
OpenDAoC:masterfrom
daoc-blackthorn:codex/gm-powers-command

Conversation

@joshlit

@joshlit joshlit commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a GM-only /powers command with toggles for god mode, outgoing damage boost, and attackability
  • preserve incoming damage messages while god mode prevents health loss
  • multiply outgoing normal and critical damage by 10.0 by default, with optional custom multipliers
  • apply the outgoing multiplier centrally in GameLiving.TakeDamage without changing player Effectiveness
  • allow hostile mobs and enemy players through the existing GM attack protections when attackable mode is enabled
  • add status, explicit on/off controls, help, and reset commands
  • group session-only state behind the abstract GMPowers contract exposed through player.GMPowers
  • use separate PlayerGMPowers and GMPowersFacade implementations so the shared null object has only false/default getters and no-op setters

Why

Staff need a convenient, session-scoped way to test combat interactions without manually changing account state or multiple unrelated settings. GamePlayer gains only one nullable backing field; its GMPowers facade safely returns the stateless null-object implementation until a power is enabled. Damage boost uses dedicated power state rather than Effectiveness, so resurrection illness, weapon skill, concentration, buffs, and other effectiveness-based systems remain untouched.

Impact

The powers are available only to GM-level accounts and are not persisted across sessions. A real per-player state object is created only when needed, and the backing field returns to null when no powers remain. Existing GM protection remains unchanged unless /powers attackable is explicitly enabled.

Validation

  • based on the latest OpenDAoC/master
  • dotnet restore GameServer/GameServer.csproj
  • dotnet build GameServer/GameServer.csproj --no-restore --nologo -v:minimal
  • build succeeded with 0 errors; existing project warnings remain

@joshlit
joshlit force-pushed the codex/gm-powers-command branch 3 times, most recently from 5e8f420 to 2b97479 Compare July 14, 2026 15:31
@joshlit
joshlit force-pushed the codex/gm-powers-command branch from 2b97479 to 3fde767 Compare July 14, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant