Skip to content

Add missing skill master skillcape dialogue - #1128

Open
HarleyGilpin wants to merge 1 commit into
GregHib:mainfrom
HarleyGilpin:feat/add-skill-masters-dialogue
Open

Add missing skill master skillcape dialogue#1128
HarleyGilpin wants to merge 1 commit into
GregHib:mainfrom
HarleyGilpin:feat/add-skill-masters-dialogue

Conversation

@HarleyGilpin

@HarleyGilpin HarleyGilpin commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Adds skillcape purchase dialogue for all remaining skill masters so every Cape of Accomplishment is obtainable (wiki reference).

New masters

  • Ajjat (Attack), Sloane (Strength) — Warriors' Guild
  • Cap'n Izzy No-Beard (Agility), Master fisher (Fishing), Wilfred (Woodcutting)
  • Gadrin (Mining), Estate agent (Construction), Hunting expert (Hunter)
  • Robe store owner (Magic) — wires up the existing but orphaned Yanille skillcape shops

Extended existing NPCs

  • Kuradal (Slayer), Thurgo (Smithing), Surgeon General Tafani (Constitution)
  • Martin Thwait (Thieving) — now opens the skillcape/trimmed shop variants and enforces the 50 Thieving/50 Agility requirements (transcript)

Refactor

The purchase transaction copy-pasted across eight existing masters (MeleeTutor, BrotherJared, HeadChef, CraftingGuild, Kaqemeex, Pikkupstix, Martin, Thok) is extracted into shared buySkillcape/skillcapeOffer/skillcapeMasterDialogue helpers in content/entity/player/dialogue/Skillcape.kt, keeping each NPC's bespoke lines. Also resolves Thok's // TODO proper message branches.

Bug fixes

  • Everyone received trimmed capes: the trim check compared Constitution's max level (life points — 100 at level 10) against 99, so a "second 99" was always found.
  • Hickton's bought("fletching_cape_(t)") hook used a non-existent item id — trimmed cape buyers got no hood.
  • Shop-sold capes (Ranged, Firemaking, Fletching, Runecrafting, Thieving, Magic) now grant the free hood via a central bought() hook.
  • Skillcape shop selection opened the trimmed variant for players without 99 in the shop's own skill; Aubury's cape shop option was ungated and never opened the trimmed variant.
  • The buy_skillcape jingle (defined but unused) now plays on every cape purchase.

Tests

AjjatTest (purchase/trimmed/gating/insufficient coins), GadrinTest, RobeStoreOwnerTest (shop gating), MartinThwaitTest (skill requirements), SkillcapesTest (free hood hook incl. trimmed Hickton regression). Full suite passes.

Adds skillcape purchase dialogue for all remaining skill masters so
every Cape of Accomplishment is obtainable:

- New masters: Ajjat (Attack), Sloane (Strength), Cap'n Izzy No-Beard
  (Agility), Master fisher (Fishing), Wilfred (Woodcutting), Gadrin
  (Mining), Estate agent (Construction), Hunting expert (Hunter) and
  Robe store owner (Magic, level-gated shop).
- Existing NPCs extended: Kuradal (Slayer), Thurgo (Smithing), Surgeon
  General Tafani (Constitution) and Martin Thwait (Thieving, including
  the 50 Thieving/50 Agility shop requirements).

Extracts the copy-pasted purchase transaction from the eight existing
masters into shared buySkillcape/skillcapeOffer/skillcapeMasterDialogue
helpers, keeping each NPC's bespoke lines.

Fixes along the way:
- Trimmed capes were given to everyone: the trim check compared
  Constitution's max level (life points, 100 at level 10) against 99.
- Hickton's bought("fletching_cape_(t)") hook used a non-existent item
  id, so trimmed cape buyers received no hood.
- Shop-sold capes (Ranged, Firemaking, Fletching, Runecrafting,
  Thieving, Magic) now grant the free hood via a central bought hook.
- Skillcape shop selection opened the trimmed variant for players
  without 99 in the shop's own skill; Aubury's cape shop was ungated
  and never opened the trimmed variant.
- The buy_skillcape jingle is now played on every cape purchase.
init {
// Skillcapes sold through shops come with a free hood, like the dialogue-sold capes.
bought("ranged_cape,ranged_cape_t,firemaking_cape,firemaking_cape_t,fletching_cape,fletching_cape_t,runecrafting_cape,runecrafting_cape_t,thieving_cape,thieving_cape_t,magic_cape,magic_cape_t") { item ->
inventory.add("${item.id.removeSuffix("_t").removeSuffix("_cape")}_hood")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hood is already added in Skillcape.kt:L42 (where it should be) this one isn't needed,

Comment on lines +30 to +31
println("DEBUG inv: " + player.inventory.items.filter { it.id.isNotEmpty() })
println("DEBUG max: " + Skill.entries.associateWith { player.levels.getMax(it) })

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
println("DEBUG inv: " + player.inventory.items.filter { it.id.isNotEmpty() })
println("DEBUG max: " + Skill.entries.associateWith { player.levels.getMax(it) })

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.

2 participants