Add Wine of zamorak spawn to the Asgarnia Chaos Temple - #1308
Open
HarleyGilpin wants to merge 6 commits into
Open
HarleyGilpin wants to merge 6 commits into
HarleyGilpin wants to merge 6 commits into
Conversation
Taking the wine by hand triggers Zamorak's wrath: 30-40 damage, a 1-per-13-levels (max 3) drain to Attack, Strength, Defence, Ranged and Magic, and the temple's monks attack. Telekinetic Grab is unaffected. Telekinetic Grab now passes telegrab = true to takeable handlers so content can distinguish grabs from hand pickups.
The client raises item piles by the model height of the object under them, so Telekinetic Grab's projectile and impact graphic now end at the floor item's height. Object definitions declare it with a height param (packet units, model units / 4); the Chaos Temple table is 96. Monks of Zamorak get a 40 height like other humanoids and the zap graphic a 50 offset so it plays at hand height instead of the feet.
The client scales projectile heights by 16 and area graphic heights not at all (single byte, max 255), while item piles sit at the supporting object's model height in client units. Store object heights in client units, divide for the projectile end height and cap area graphics.
Halve the projectile's flight time and remove the floor item on the tick the impact graphic plays instead of a fixed six ticks after casting.
The takeable hook runs before FloorItems.remove, so a player who lost the race to another thief was drained and burnt for nothing. Skip the punishment when the item is no longer on the floor. Add tests covering both hand and telegrab races.
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.
Summary
Adds the Wine of zamorak floor spawn to the Chaos Temple north-west of Goblin Village (
2931,3515, 50 tick respawn) with the 2011 theft mechanic, and fixes a few things found on the way.Wine of zamorak (
ChaosTempleWine, hooked throughtakeable)Telekinetic Grab
telegrab = truetotakeablehandlers, so content could not tell a grab from a hand pickup (theZogreFleshEaterstelegrab branch was unreachable). Fixed.heightin client units (the temple table is 384);FloorItem.height()reads it. Projectile heights are divided by 16 to match the client, andareaGfxclamps to the packet's byte range.Monks of Zamorak
height = 40on the base and Goblin Village defs (Ourania already had it) andheight = 50on the zap gfx so it plays at hand height rather than the feet.Verification
ChaosTempleWineTest: hand pickup, telegrab safe, off-tile harmless, respawn, telegrab race, late-arrival race.TelekineticGrabTest,FloorItemRespawnTest,TakeTest,MageArenaTeststill pass.Sources: 2011 wiki revision of Wine of zamorak for the numbers and messages.