Add the Duel Arena minigame - #1274
Open
HarleyGilpin wants to merge 11 commits into
Open
Conversation
Component ids and the rule varbits (4157-4183, 4275 on varp 286) were dumped from the 634 cache; Darkan's rule bit encoding and most of its 727 component ids don't match this revision. teleport_block was declared on varbit 4163, which is the duel arena's No Magic rule in 634, so it becomes a plain persisted variable.
Challenge requests, friendly and staked rules screens with all rules and equipment bans, mirrored stakes, confirmation screens, arena placement (obstacle/no-obstacle, no-movement side-by-side), countdown, rule enforcement, forfeit trapdoor, logout veto with forfeit on disconnect, victory screens with winnings, hospital healing and an in-memory scoreboard of the last fifty duels. Duellers and their familiars can only fight their opponent. Food, drink, prayer, summoning, movement and equipment bans are enforced through generic message/slot variables read by the existing skill scripts.
Clicking a duel request in the chat box makes the client send player option 1, so the option has to live there like Attack does.
Interface 632 rebuilds its rows from varc strings 224-273 when it opens and shows Loading... while all of them are blank, so the rows are sent as those strings before opening instead of appended with a row script.
The victory screens copy that string over the name component when they open, which replaced the text sent directly with null.
Varc 236 turns the worn equipment tab icon into the forfeit trapdoor during a duel; the 634 cache has no forfeit tab interface for any other slot, so clicking that tab now asks to forfeit like the trapdoor does.
Drop the equipment tab icon swap; the logout button now asks whether to forfeit instead of refusing, and the trapdoor keeps working.
HarleyGilpin
marked this pull request as ready for review
September 7, 2026 18:34
Queue a save of both players whenever stake items change hands so a crash can't restore a pre-transfer snapshot, return leftover stakes instead of clearing them, route the bank fallback through BankDeposit so noted and unbankable items are handled, re-check inventory space at the final accept, and treat every death inside an arena as drop-free so simultaneous deaths never drop items.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the Duel Arena -
content/minigame/duel_arenaWhat's included
Generic hooks were added to
Eating,Equipping,Movement,SummoningandQuickPrayers(no_food_message,blocked_equip_slots, ...) because item/interface option handlers can't veto each other.Tests
DuelTest(21 WorldTest cases) covers the request handshake, rule toggles and exclusions, stake mirroring/removal/restrictions, accept space and fun-weapon checks, countdown and fight start, death and forfeit payouts, disconnect forfeit, logout veto, walk-away decline, third-party attack blocking, leftover-item recovery and the scoreboard cap. Full:game:testpasses.