Repository navigation
Home teleport: casting again mid-cast restarts the cast (#6630) - #6641
Merged
UnhealthyKraken merged 1 commit intoNov 23, 2026
Merged
Conversation
Each click started another cast task while the first kept running, so every step's sound played once per click. Keep one cast per player: a new cast stops the running one and starts over, as live does (rsprox 1001238 ticks 10286/10288); once the cast has locked it is refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bandit-HaxUnit
marked this pull request as ready for review
November 23, 2026 18:34
UnhealthyKraken
self-requested a review
November 23, 2026 18:39
Collaborator
|
Reviewing this now (review loop, head f56d06c). |
UnhealthyKraken
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed PR #6641 at f56d06c (main 4e684ac, integration tree 1fd2de66be6f969fd78cf6356bc0c151c2df0a72).
What it does
HomeTeleportSequence.startHomeTeleport now keeps one running cast per player (a WeakMap). A new cast before the lock tick stops the old one and starts again from tick 0. After the lock (tick 21) until landing it returns null. Shared by the four home teleports, Minigame Teleport and the league casts.
What was checked
- Behaviour: no coins or runes are spent by the home teleport spells, and the cooldown is only set in
onArrival, so a stopped cast starts no cooldown and nothing is taken twice.stop()on an unlocked cast releases nothing it didn't set. The refusal after lock is also made byTeleportHandler.checkReqs(playerReqsreturns false while movement is blocked), so the newcommittedguard is a second line, as the PR says. - Parity (recording rsprox_transcripts/231/911270.txt, world 590): clicks on
teleport_home_lunarat 10286 and 10288. Tick 10288 sends spotanim -1 and sequence -1, 10289 chalk circle (800 / 4847) and sound 193, then sound 196 at 10295, 194 at 10301, 195 at 10305, graphic 804 at 10309, teleport at 10312 (click + 24). No step of the first cast (its 196 would be 10293) plays after the second click. All of this matches the PR's timings. The first cast used graphic 1750 (league_twisted_chalk_circle) and the restart used 800; the server re-rollschosenCaston every click, so that agrees. - Parity (second recording): rsprox_transcripts/239/900004.txt (standard world 351) shows the same restart for Minigame Teleport: cast chosen at 274 (chalk circle 275), spell clicked again at 276, choice at 280 resets, one circle and sound 193 at 281, teleport at 304 (choice + 24).
- Wiki (Home Teleport): says the cast can be interrupted by most actions and gives no rule for casting again mid-cast, so nothing conflicts with the restart.
- Traced:
HomeTeleports.plugin.js,MinigameTeleports.plugin.js,HomeTeleport.LeagueAreaUnlocks.js,Teleport.LeagueAreaUnlocks.js,Teleports.LeagueRelics.js(all pass throughcheckReqsthenTeleportHandler.confirm);ConnivingClues.LeagueRelics.jsspends its contract inonStartjust beforestartHomeTeleport. - Rules: no generated JSON, no plugin config or description change, LF endings.
Findings
No defects found.
Notes, not findings:
- The cited "recording 1001238 (rev 231)" is rsprox_transcripts/231/911270.txt here (the 7-digit ids map to these files at a fixed offset), and every tick and sound quoted matches it. Its header says Sailing Beta World, not a league world as
docs/minigame-teleports.md:25and the PR say; the league chalk circle (1750) on the first cast is from that world's rolls. Worth correcting the wording next time the doc is touched. - "The only capture of a mid-cast re-click is on a league world" is not quite right: rsprox_transcripts/239/900004.txt is a standard world with a mid-cast re-click of Minigame Teleport (ticks 272/276/280), and it shows the same restart, so it backs the change further.
ConnivingClues.LeagueRelics.jsuses up a contract inonStartbefore the cast starts, so with two contracts a second click before tick 21 spends a second one and restarts the cast. This was already the case before the PR (both casts ran), no recording or Wiki text settles it, and it is a different plugin.
Scope
ordinary
Verified
- Build:
yarn buildin server/ on the integration commit: ok. minigame-teleports.test.cjs: 19/19.- Consumers, each on its own:
league-areas.test.cjs33/33,league-relics.test.cjs13/13,league-fragments-sage.test.cjs5/5,teleport-confirm-coverage.test.cjs3/3,league-relics-demonic-pacts.test.cjs113/113. - Revert check: with main's
HomeTeleportSequence.js,minigame-teleports.test.cjsis 17/19; the two new tests fail. File restored. - docs:
yarn install --frozen-lockfileandyarn build(Yarn 1.22.22) in docs/: build complete. - Recording check: ticks, sound ids, animation and graphic ids of rsprox_transcripts/231/911270.txt read directly; all recordings with two home or minigame teleport clicks within 26 ticks scanned, the others are moving-click refusals or walk interrupts.
- main+head merge tree: clean
- generated JSON: none edited
Not verified
- The live game run in the PR body (3210,3424 to 3222,3218) was not repeated; the unit tests and recordings cover the timing.
- The PR's "moving click gets no message" note (recording 1001362 tick 4552, which is rsprox_transcripts/240/911378.txt): that file has two clicks at 4552 and 4556 and was not read further.
- Sounds were checked in the unit test stubs only, not heard.
- Whether live refuses a re-click after tick 21 by the busy flag or otherwise: no recording shows one.
Verdict
Merge
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.
Fixes #6630
Problem
Clicking Home Teleport again while it is casting played every sound again, once per click.
Each click on the spell called
startHomeTeleport, which submitted a new task without stopping the running one. Before tick 21 nothing blocks the spell (normal teleports block movement immediately, socheckReqsalready refuses them). The same sequence is shared by the four home teleports, Minigame Teleport and the league casts.Fix
server/plugins/combat/HomeTeleportSequence.js: one cast per player (aWeakMapof the running task). A new cast stops the running one and starts over from tick 0, as live does. Once the cast has locked (tick 21) and until it lands, a new cast is refused (returnsnull), so the teleport goes ahead; normallycheckReqsalready refuses it there through the movement block.docs/minigame-teleports.md: the captured re-cast.Testing
server/tests/minigame-teleports.test.cjs: 19/19 pass. Two new tests: a second cast 2 ticks in gives one sound per step, from the second click's timeline, and one landing at +26; a cast after the lock is refused and the first teleport lands once.HomeTeleportSequence.jsboth new tests fail (17/19).league-areas33/33,league-relics13/13,league-fragments-sage5/5,teleport-confirm-coverage3/3,league-relics-demonic-pacts113/113.Not covered
Reference
Self-reviewed with the review checklist at f56d06c. Left open: a moving click gets no "You can't use that teleport at the moment." (live sends it, rsprox 1001362 tick 4552); that's outside this fix and would be its own issue.
🤖 Generated with Claude Code