Commit Graph

279 Commits

Author SHA1 Message Date
Steve Soltys 682e48bdc8 Add AttackRequirementDSL and small changes to CombatSpellDSL 2016-03-16 22:41:51 +00:00
Steve Soltys ec248a185b Add initial combat spell support 2016-03-16 22:41:20 +00:00
Gary Tierney 9f47fae6a9 Fix combat not working after logout; Fix DDS hits
* Removes the use of the MOB_STATE_CACHE and instead monkey patches a
  get_combat_state method onto Mob.
2016-03-16 22:39:33 +00:00
Gary Tierney 3082fade1d Add ranged combat support
* Clean up the CombatAction and Attack code to make it easier to use for
  range.

* Add collision detection to the distance checks before attacking in the
  CombatAction.

* Create a Ruby DSL for defining projectile types and fix the
  ProjectileUpdateOperation so it uses the correct position offset.

* Fix the packet structure of the HintIconMessageEncoder.
2016-02-29 22:24:26 +00:00
Gary Tierney f80ea82ce7 Add regexp support to name_lookup#find_entities 2016-02-29 22:22:32 +00:00
Gary Tierney c32d19ac08 Update the combat plugin definition file 2016-02-29 22:21:51 +00:00
Gary Tierney 17e8d02886 Move next_attack logic to CombatState
* Moves the decision of what attack is used next to CombatState and
  defers selecting the attack until the player is actually ready to hit
  their target for damage.

* Adds a distance check so combat is only initiated within the correct
  range. If the player isn't close enough to their target, they will run
  towards it and check every tick if they're close enough to make an
  attack.
2016-02-29 22:21:21 +00:00
Gary Tierney 064f22d2e0 Fix the default return value for equipped_weapon 2016-02-29 22:21:12 +00:00
Gary Tierney e5a2533a30 Remove attribute decls from incorrect namespace 2016-02-29 22:21:05 +00:00
Gary Tierney 04df65be4c Move AttackRequirement to separate source unit 2016-02-29 22:20:49 +00:00
Gary Tierney 5686a1dcd6 Add support for combat related UI
* Allows switching between different combat styles, and updates the
  combat tabs styles for every equipped weapon. If a weapon with a
  special attack is equipped, the special bar for that interface will be
  shown.

* Adds a scheduled task which periodically restores special energy to
  the player and updates their special bar.
2016-02-29 21:35:55 +00:00
Gary Tierney c9592c38df Complete special attacks; Fix WeaponClass issues
* Adds a button property to a WeaponClasses styles, which maps a combat
  style to the button that was pressed in the combat tab.

* Adds full support for special attacks, with their config IDs and
  buttons.

* Adds the DDS special attack, along with the D2H special attack as some
  starting examples.

* Rename the "no_weapon" Weapon to "unarmed", so it shows up better in
  the UI.
2016-02-29 21:35:36 +00:00
Gary Tierney 348e5cc8dc Build a framework for a maintainable combat plugin
* Uses a hierarchy of WeaponClasses -> Weapons for performing attacks,
  with WeaponClass having a set of styles and associated Attacks for
  those styles. Weapons and their classes are built with an easy to use
  and clean DSL.

* Adds a BonusContainer mixin, so that Equipment, Weapons, and
  WeaponClasses can all have their own set of bonuses which apply to the
  player.

* Allows attacks to be queued to the Mobs CombatState instance from
  external code, allowing e.g., NPCs or auto-cast to queue attacks to be
  executed.
2016-02-29 21:27:17 +00:00
AymericDu 92f3d91cb4 refactor wrap in dialogue.rb 2016-02-26 16:49:04 +01:00
Major- d3c5417403 Fix #218 2016-02-15 17:32:00 +00:00
Major- 8f5ddb0761 Fix #170 2016-02-14 16:25:38 +00:00
Major- 1a86e286bb Require shops to use names instead of ids 2016-02-14 16:12:57 +00:00
Major- 6eebdd1f11 Improve Falador/Varrock npcs.rb formatting 2016-02-14 16:11:31 +00:00
Jesse Woolsey f00998d58e Add Varrock shops 2016-02-13 17:54:57 -05:00
Jesse Woolsey ae9a3098e9 * Fix Prayer Burying Animation 2016-02-13 17:28:07 -05:00
Major- f83e8b3040 Fix many issues with the Tutorial Island plugin
Amongst other things, this:
* Stops the player from trying to leave the Runescape Guide's house if
  they have yet to speak to him.
* Fixes the hint icon for both the Runescape Guide and the door.
* Ensures all files pass rubocop.
* Generally improves the code throughout the plugin.
2016-02-13 17:49:44 +00:00
Major- 70c0856df8 Fix text-only dialogues with continues 2016-02-13 16:31:42 +00:00
Major- 8e6760c617 Only fire door events when the door is reached 2016-02-13 16:31:42 +00:00
Major- 9a920d95ee Add support for Events defined in Ruby
A slightly complicated and hacky change, because this requires working
around JRuby issue 2359.
2016-02-13 16:31:42 +00:00
Jesse Woolsey 931363ff4e * Npcs added to Falador 2016-02-13 10:18:06 -05:00
Jesse Woolsey d5aa94ab6c * Fix mob.stop_animation 2016-02-13 08:32:32 -05:00
Jesse Woolsey 574371f578 * Fix Spam Clicking for Magic
* Fix OverRide Magic Spells
* Fix Process Element check
* Runes Read In the correct of how Runescape does (primary, elemental)
* Changed MAGIC_SKILL_ID for add exp to Skill::Magic
2016-02-13 03:21:47 -05:00
Jesse Woolsey 8bc3ba60ac * Varrock Npcs
* Fixed The big indent so it should be readable now
2016-02-12 17:19:18 -05:00
WizardJesse1 31d8d9ab17 Added Edgeville Npcs 2016-02-12 06:47:56 -05:00
WizardJesse1 ca1f09aece Added Edgeville Npcs
* Added every npc that was missing from edgeville 
* Removed and moved any npcs that were not in the correct area
2016-02-12 06:23:55 -05:00
WizardJesse1 1162eac7ad More Npcs to Al-Kharid
* Added every npc that was missing from al-kharid
* Removed and moved any npcs that were not in the correct area
2016-02-12 03:42:17 -05:00
Ryley Kimmel dd9edb358d Merge pull request #202 from ryleykimmel/issue179
Rebase HintIconMessage
2016-02-11 11:36:05 -05:00
atomicint 437a664f00 Rebase HintIconMessage
- Split HintIconMessage into two separate classes (PositionHintIconMessage and MobHintIconMessage)
- Split HintIconMessageEncoder into two separate encoders (PositionHintIconMessageEncoder and MobHintIconMessageEncoder)

This resolves #179

Add PositionHintIconMessage#reset

Fix parse errors introduced in e799577
This also resolves #181

Order enumerators by value
Clean up PositionHintIconHintMessageEncoder for 377/317
2016-02-11 11:35:20 -05:00
Major- d6ac9eeeaa Remove message filtering 2016-02-11 13:07:02 +00:00
WizardJesse1 0fcd138f86 Fix Magic Check Issues
I forgot to check a few things when i changed magic check's

Issues Fix

* You couldn't teleport but now you can
* Illegal items would throw an error
* Process elements would get removed even if you couldn't cast the spell due to moving illegal items
2016-02-09 19:30:35 -05:00
WizardJesse1 74a8af7b91 Fixed Issue #186
It has the correct message now and it supports a/an
2016-02-09 17:54:55 -05:00
WizardJesse1 e5033965ee Fixed Enchant Ring Animation
Currently uses the correct animation now
2016-02-09 16:56:02 -05:00
Major d9cf285f5e Merge pull request #172 from ryleykimmel/issue169
Pass the new Position of Players to area listeners
2016-02-09 16:02:29 +00:00
atomicint 4a1c82da52 Let area listeners have access to the updated position from the MobPositionUpdateEvent
Fix issue #169
2016-02-08 17:44:25 -05:00
Major 732cb35dc7 Fix incorrect doc comment 2016-02-08 17:55:47 +00:00
Major b11d38a673 Merge pull request #166 from ryleykimmel/issue164
Notify area listeners upon login
2016-02-07 11:20:39 +00:00
WizardJesse1 84dcdc0761 Fixed Player Option Order
The order for player options were wrong. It's all in the correct order now
2016-02-07 04:18:30 -05:00
atomicint 18a4d69443 Notify area listeners upon login 2016-02-07 03:48:18 -05:00
atomicint 6bb0c70c07 Fixed "It heals some health" food consumable message. 2016-02-03 19:21:53 -05:00
thispixel e7229e7f61 separate potion and food consume delays 2016-02-02 11:10:44 +00:00
Gary Tierney 9720574310 Merge pull request #149 from thispixel/master
fixes issue #148 - add consumable delays
2016-02-01 20:42:02 +00:00
Gary Tierney b8e5cbacbe Merge pull request #147 from WizardJesse1/patch-13
Fixed food eating delays
2016-02-01 18:57:25 +00:00
thispixel 1c6091251a fixes issue #148 - add consumable delays 2016-02-01 11:26:31 +00:00
WizardJesse1 1a1a7dcca7 Fix magic skill checks
* Checks are now in order of how runescape does it.

* Changed rune to be capitalized to Rune
2016-01-31 23:37:34 +00:00
WizardJesse1 e194a6b46c Fixed food eating delays
* Removed the equal check due to causing issue's with food delays since when you eat one food it should be on the same tick
2016-01-31 15:50:20 -05:00