Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add several special weapons, various fixes #279

Merged
merged 3 commits into from
Sep 6, 2023
Merged

Add several special weapons, various fixes #279

merged 3 commits into from
Sep 6, 2023

Conversation

Naton1
Copy link
Contributor

@Naton1 Naton1 commented Sep 4, 2023

This does a bunch of things. Mainly numerous bug fixes/making more accurate to OSRS, and adding several new special attacks:

  • Change ahrims staff to single handed, and add mage % boost
  • Fix various level/bonuses for pvp armor (like vestas/statius)
  • Add ghostly robe equipment bonuses
  • Update dragon knives to be knives instead of darts
  • Use constant for tick length where applicable
  • Fix recoil damage to be accurate to how rs works
  • Fix redemption
  • Refactor items that don't use ammo from weapon slot to have data stored in the ranged weapon type enum, and use where applicable
  • Add vestas longsword spec
  • Add statius warhammer spec
  • Add ancient godsword spec
  • Fix dark bow spec (it should roll accuracy, but even if not accurate it hits 8-8, not just skip accuracy check altogether)
  • Fix armadyl crossbow spec, and apply double bolt percentage
  • Minor fix to zaryte crossbow spec hit delay
  • Minor fixes to ballista spec numbers, and add light ballista
  • Add morrigans javelin + spec
  • Add dragon knife + spec
  • Add volatile nightmare staff spec
  • Add spell accuracy multiplier ability, and implement zuriel's staff ancient magic effect for ice/blood spells
  • Update magic strength loading from equipment to take number from bonus manager instead of hardcoding boosts again
  • Update pending hit to set hit to accurate if changing total damage to be greater than zero
  • Add ability for ranged weapons to override default animation - throwing dragon knives is an animation, not a graphic
  • Fix issue with bonus manager not counting dragon javelin bonus with heavy ballista because it would only count one range strength boost

For the new special attacks I have added most of the animations/graphics, but some I'm not sure of/weren't matching with what rs has. The attacks all work regardless.

Note there's various empty whitespace removals that Intellij just automatically removed whenever I changed a file because some spacing was weird. Ideally these should be removed anyways so I left them.

@tobywisener
Copy link
Collaborator

Would be awesome if we could open smaller PRs in future, usually try to keep one feature per PR ;)
But will look at this in entirety now :)

Copy link
Collaborator

@tobywisener tobywisener left a comment

Choose a reason for hiding this comment

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

All of this is great work, maybe just use Misc.getTicks in PrayerHandler.java and good to go?

@@ -440,7 +441,7 @@ public void execute() {
continue;
double drainMinute = pd.drainRate;
double drainSeconds = drainMinute / 60;
double drainTicks = (drainSeconds * 0.6);
double drainTicks = (drainSeconds * GameConstants.GAME_ENGINE_PROCESSING_CYCLE_RATE / 1000D);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use Misc.getTicks(drainSeconds) here?

@@ -173,22 +173,6 @@ public static HitDamage getHitDamage(Mobile entity, Mobile victim, CombatType ty
damage *= damageMultiplier;
}

// Do ranged effects with the calculated damage..
Copy link
Collaborator

Choose a reason for hiding this comment

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

Great job on moving this to DarkBowCombatMethod! 🗡️

* @param cast the entity casting this spell
* @return the accuracy multiplier
*/
public double getAccuracyMultiplier(Mobile cast) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Great job, we can extend this in future to use the OSRSBoxed data that DrHenny & Advo have been plugging in

@@ -30,11 +31,11 @@ public class Misc {
* @return
*/
public static int getTicks(int seconds) {
return (int) (seconds / 0.6);
return (int) (seconds / GameConstants.GAME_ENGINE_PROCESSING_CYCLE_RATE / 1000D);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good shit, this is much better using the constant

@tobywisener tobywisener merged commit adbb171 into RSPSApp:master Sep 6, 2023
1 check failed
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