PvP System
Status: Design Date: 2026-04-02
Player-versus-player combat through two mechanisms: PvP zones (open combat in designated areas) and duels (consensual 1v1 anywhere). PvP is for bragging rights only — no loot, no gold, no XP. Players earn a visible kill counter.
PvP Zones
Room Flag
A new room flag pvp marks a room as a PvP zone. Any player in a pvp-flagged room can attack any other player. Designers place these intentionally — arenas, contested territories, lawless frontier areas.
{
"id": 50,
"name": "The Bloodpit",
"description": "A sunken arena ringed by iron spikes. The sand is stained dark.",
"sector": "arena",
"flags": ["pvp"],
"exits": {"north": 49},
"hooks": []
}
The safe flag takes precedence over pvp — a room cannot be both. If both are present, safe wins.
Zone Entry
When a player enters a pvp-flagged room, they receive a warning message:
You have entered a PvP zone. Other players can attack you here.
The player receives 60 seconds of PvP immunity on entry. During immunity:
- They cannot be attacked by other players
- They cannot attack other players
- A visible indicator shows they are immune (e.g., “Player is protected by a ward of light”)
- Immunity is cleared early if the player initiates any combat action (attacking a mob is fine — only attacking a player clears it)
This prevents spawn camping and gives players time to orient or leave.
Zone Combat
- Any player can
attack <player>orkill <player>to initiate combat with another player in the samepvproom - No level restrictions. The zone is the zone.
- Standard combat mechanics apply — same formulas, same tick-based rounds, same skills
- Players can flee PvP combat using the
fleecommand (same flee mechanics as PvE) - Multiple players can attack the same target (no 1v1 restriction in zones)
Zone Death
When a player dies in PvP zone combat:
- Normal death flow: player is teleported home
- A corpse is created in the room — but it is empty (no items, no gold)
- The corpse exists for flavor and as a visible record of what happened
- The killer gains +1 to their PvP kill counter
- The dead player loses nothing from inventory or gold (standard PvE death penalties like XP loss still apply if you have them, but currently death has no XP penalty)
- No loot. No gold transfer. No reward beyond the counter.
Duels
Challenge Flow
- Player A types
challenge <player>in the same room as Player B - Player B sees: “Player A has challenged you to a duel! Type
acceptordecline.” - Player B types
accept— the duel begins. Ordecline— the challenge is dismissed. - If Player B doesn’t respond within 60 seconds, the challenge expires.
Only one pending challenge per player at a time. A player already in combat cannot issue or accept challenges.
Duel Rules
- Duels work in any room except
saferooms. Including non-PvP rooms. - Full death rules apply. The loser dies, creates a corpse, and is teleported home. Accepting a duel is accepting the risk of death.
- The corpse is empty — same as PvP zone deaths, no loot.
- The winner gains +1 to their PvP kill counter.
- During a duel, other players cannot interfere — no one else can attack either participant. The duel is isolated combat.
- Either duelist can
flee. If they succeed, the duel ends with no winner. - If either player leaves the room (moves to an exit), the duel ends with no winner.
- Standard combat mechanics apply.
Duel Restrictions
- Both players must be in the same room
- Cannot duel in
saferooms - Cannot duel while already in combat
- Cannot duel while PvP immune (in a PvP zone during the 60s window)
- Guests can duel citizens and vice versa — no tier restriction
PvP Kill Counter
Every player has a pvp-kills counter, tracked per-world. This is visible when inspecting a player:
Grendel the Warrior — Level 12 PvP Kills: 7
The counter increments on:
- Killing a player in a PvP zone
- Winning a duel (opponent dies)
The counter does not increment on:
- Duel ending by flee or room exit
- Mob kills
- Any non-PvP combat
The counter is per-world and stored on the player session. For citizens, it persists in their %mud-character state. For guests, it resets on disconnect.
Commands
| Command | Context | Description |
|---|---|---|
attack <player> / kill <player> | PvP zone | Initiate PvP combat |
challenge <player> | Any non-safe room | Issue a duel challenge |
accept | Pending challenge | Accept a duel |
decline | Pending challenge | Decline a duel |
The existing attack and kill commands gain player-targeting logic. Currently they only resolve against mobs. The resolver checks:
- Is the target name a player in the room?
- If yes, is the room
pvp-flagged or is there an active duel? - If neither, reject: “You can’t attack players here.”
Combat Mechanics
PvP combat uses the same formulas as PvE with no modifications:
- Same damage calculation (weapon damage + stat bonus, variance roll)
- Same armor/defense reduction
- Same skill usage (spells, abilities)
- Same tick-based rounds
- Same flee mechanics
No balance changes for PvP. If the PvE formulas produce degenerate PvP (e.g., healers are unkillable, rogues one-shot everyone), that’s a future tuning pass — not a system design problem.
State Changes
Player Session
pvp-kills: @ud :: per-world kill counter
pvp-immune-until: (unit @da) :: immunity expiry timestamp
duel-challenge: (unit session-id) :: pending incoming challenge
duel-opponent: (unit session-id) :: active duel partner
Room Flags
Add pvp to the set of valid room flags alongside dark, safe, no-mob, no-magic, restricted, etc.
Combat State
The existing combat system tracks who is fighting whom via fighting on mob instances. PvP combat needs a parallel tracker:
pvp-combat: (map session-id session-id) :: attacker → defender
Both players are added to the map (A→B, B→A) when PvP combat starts. Combat ticks process PvP pairs the same as PvE pairs. On death or flee, both entries are removed.
Duels use the same pvp-combat map. The duel-opponent field on the session distinguishes duels from zone PvP (duels block interference from others).
Impact on Existing Systems
| System | Change |
|---|---|
| Target resolution | attack/kill checks for player targets in PvP zones and duels |
| Combat tick | Process PvP pairs alongside PvE. Same formulas. |
| Death | Check if killer is a player → empty corpse, increment pvp-kills |
| Room entry | Check pvp flag → immunity timer + warning message |
| Flee | Works in PvP. Ends duels with no winner. |
| Score/inspect | Display pvp-kills counter |
| Room flags | Add pvp to valid flags, safe overrides pvp |
| Import | Parse pvp room flag from area JSON |
| Citizen save | Persist pvp-kills to %mud-character |
Not Included
- No global opt-in flag. PvP happens in zones or by duel consent. No always-on PvP mode.
- No level restrictions. If you’re in a PvP zone, you accept the risk regardless of level.
- No PvP-specific rewards. No loot, no gold, no XP. The kill counter is the only record.
- No ranking system. Kill counter is flat, not ELO. Leaderboards (if added) could sort by
pvp-kills. - No PvP-specific balance. Same formulas as PvE. Tuning is separate work.
- No cross-world PvP stats. Counter is per-world. A future leaderboard system could aggregate.