Skip to content

Runecrafting rework: Reworked entering Altars and enchanting tiaras

What has been done in this MR?

Some introduction: I recently fixed a bug that involved the runecrafting skill. I noticed that the code in general could be improved. Lots of it is still Java. So I started a complete rewrite of the code. Some parts are simple translations to Kotlin, other changes are more involved. This is the first of a few (hopefully not too many) MRs for this rewrite. Please be as critical as you can code quality wise. I'd want this MR to be a good foundation for the upcoming runecrafting rework MRs 🙂

Concrete changes:

  • Added a dependency to MockK: a mocking library that helps in unit testing by controlling how external units behave
  • Added a dependency to AssertJ: personal taste. I think these assertions read easier
  • Added new Kotlin enum classes for
    • Altar called NewAltar. I can't replace the old Altar fully yet, will happen in the future. When that's done NewAltar will be renamed to Altar
    • Talisman called NewTalisman. I can't replace the old Talisman fully yet, will happen in the future. When that's done NewTalisman will be renamed to Talisman
    • Tiara. The old Tiara class still exists and will be removed in future MRs
  • Reworked the implementation for entering Mysterious Ruins
  • Reworked the implementation for enchanting tiaras
  • Removed some stuff from enums that might have existed in the 2009 cache but were never implemented, such as:
    • Soul talisman
    • Soul tiara
    • Astral tiara
  • I added a bunch of equals() overrides on core code, mainly to be able to decently unit test classes that make use of them
  • Unit tested everything I could. If I missed something please let me know

What should testers check?

  • Entering MysteriousRuins still work with talismans and tiaras
    • Entering the Earth runic altar completes the respective Varrock diary task
    • "Normal" altars require Rune Mysteries quest completion
    • Entering Cosmic altar requires Lost City quest completion
    • Entering Astral altar requires Lunar Diplomacy quest completion
    • Entering the Law Altar through the Abyss require that the player doesn't have any weapons or armor
    • Entering Death altar requires Mourning's End Part II quest completion
    • Entering Blood altar requires Legacy of Seergaze quest completion
  • Enchanting tiaras at their respective altars still work as expected
  • I have tested these changes thoroughly.

Merge request reports