Combat sounds overhaul

Sound effects for every ancient spell have been corrected
Every special attack weapon currently accessible has had sound added or implementation modified:
Dragon Battleaxe
Excalibur & Enhanced Excalibur
Dragon Halberd
Dragon 2h
Rune Thrownaxe
Vesta's Spear
Ancient Mace
Bandos Godsword
Bone Dagger
Darklight
Dorgeshuun Crossbow
Dragon Scimitar
Statius's Warhammer
Seercull
Armadyl Godsword
Dragon Longsword
Dragon Mace
Magic Longbow
Magic Comp Bow
Rune Claws
Vesta's Longsword
Dark Bow
Dragon Claws
Dragon Dagger
Granite Maul
Magic Shortbow
Saradomin Sword
Dragon Spear
Zamorakian Spear
Zamorak Godsword
Dragonfire Shield
This commit is contained in:
Dark Sage 2023-08-12 08:31:15 +00:00 committed by Ryan
parent 95012b9ca5
commit 6112abf673
39 changed files with 202 additions and 78 deletions

View file

@ -13,6 +13,8 @@ import core.game.node.entity.impl.Projectile;
import core.game.node.entity.player.Player;
import core.game.node.item.Item;
import core.game.node.item.ItemPlugin;
import core.game.world.map.MapDistance;
import core.game.world.map.RegionManager;
import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
@ -20,6 +22,7 @@ import core.plugin.Plugin;
import core.game.node.entity.combat.CombatPulse;
import core.game.world.GameWorld;
import core.plugin.ClassScanner;
import org.rs09.consts.Sounds;
import java.util.concurrent.TimeUnit;
@ -84,6 +87,7 @@ public final class DragonfireShieldPlugin extends OptionHandler {
setVarp(player, 301, 0);
}
player.removeAttribute("dfs_spec");
playAudio(entity.asPlayer(), Sounds.DRAGONSLAYER_SHIELDFIRE_3761, 10, 0, true, entity.asPlayer().getLocation(), 5);
Item shield = player.getEquipment().get(EquipmentContainer.SLOT_SHIELD);
if (shield == null || shield.getId() != 11283) {
return -1;
@ -97,7 +101,13 @@ public final class DragonfireShieldPlugin extends OptionHandler {
}
return super.swing(entity, victim, state);
}
};
@Override
public void visualizeImpact(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.FIRESTRIKE_HIT_161, 10, 20, true, victim.getLocation(), 5);
super.visualizeImpact(entity, victim, state);
}
};
attack.setHandler(handler);
Entity victim = player.getProperties().getCombatPulse().getVictim();
if (player.getProperties().getCombatPulse().isAttacking() && handler.canSwing(player, victim) == InteractionType.STILL_INTERACT) {
@ -110,6 +120,7 @@ public final class DragonfireShieldPlugin extends OptionHandler {
player.getInventory().replace(new Item(11284), item.getSlot());
player.graphics(Graphics.create(1160));
player.getPacketDispatch().sendMessage("You release the charges.");
playAudio(player,Sounds.DRAGONSLAYER_SHIELD_EMPTY_3760);
return true;
case "inspect":
if (item.getId() == 11284) {

View file

@ -11,6 +11,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import core.plugin.Initializable;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the ancient mace special attack "Favour of the War God".
@ -72,6 +75,7 @@ public final class AncientMaceSpecialHandler extends MeleeSwingHandler implement
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.GOBLIN_MACE_3592, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
}
}

View file

@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import core.plugin.Initializable;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the Bone dagger special attack "Backstab".
@ -70,6 +73,7 @@ public final class BackstabSpecialHandler extends MeleeSwingHandler implements P
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.DTTD_BONE_DAGGER_STAB_1084, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
}
}

View file

@ -20,10 +20,13 @@ import core.tools.RandomFunction;
import core.game.node.entity.combat.RangeSwingHandler;
import core.game.world.GameWorld;
import core.game.world.repository.Repository;
import org.rs09.consts.Sounds;
import java.util.Iterator;
import java.util.List;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the Rune throwing axe special attack "Chain-hit".
* @author Emperor
@ -104,6 +107,7 @@ public final class ChainhitSpecialHandler extends RangeSwingHandler implements P
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.CHAINSHOT_2528, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
int speed = (int) (32 + (entity.getLocation().getDistance(victim.getLocation()) * 5));
Projectile.create(entity, victim, 258, 40, 36, 32, speed, 5, 11).send();

View file

@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Represents the cleave special handler.
@ -59,12 +62,12 @@ public final class CleaveSpecialHandler extends MeleeSwingHandler implements Plu
hit = RandomFunction.random(calculateHit(entity, victim, 1.2203));
}
state.setEstimatedHit(hit);
entity.asPlayer().getAudioManager().send(new Audio(2529), true);
return 1;
}
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.CLEAVE_2529, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
}
}

View file

@ -16,6 +16,9 @@ import core.plugin.Initializable;
import core.plugin.Plugin;
import core.tools.RandomFunction;
import core.game.node.entity.combat.RangeSwingHandler;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Represents the descent of darkness sepcial handler.
@ -121,8 +124,6 @@ public final class DescentOfDarknessSpecialHandler extends RangeSwingHandler imp
start = state.getAmmunition().getStartGraphics();
if (state.isFrozen()) {
if (entity instanceof Player) {
entity.asPlayer().getAudioManager().send(new Audio(3736), true);
entity.asPlayer().getAudioManager().send(new Audio(3737), true);
}
DRAGON_PROJECTILE.copy(entity, victim, 5).send();
} else {
@ -145,6 +146,8 @@ public final class DescentOfDarknessSpecialHandler extends RangeSwingHandler imp
@Override
public void visualizeImpact(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.DARKBOW_SHADOW_ATTACK_3736, 10, 20, true, victim.getLocation(), 10);
playAudio(entity.asPlayer(), Sounds.DARKBOW_SHADOW_IMPACT_3737, 10, 40, true, victim.getLocation(), 10);
victim.visualize(victim.getProperties().getDefenceAnimation(), state.isFrozen() ? DRAGON_IMPACT : DARKNESS_IMPACT);
}
}

View file

@ -15,6 +15,7 @@ import core.game.world.GameWorld;
import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.*;
@ -137,7 +138,7 @@ public class DragonfireSwingHandler extends CombatSwingHandler {
shield.setCharge(shield.getCharge() + 20);
EquipmentContainer.updateBonuses(p);
p.getPacketDispatch().sendMessage("Your dragonfire shield glows more brightly.");
playAudio(p, Sounds.DRAGONSLAYER_ABSORB_FIRE_3740);
p.faceLocation(entity.getCenterLocation());
victim.visualize(Animation.create(6695), Graphics.create(1163));
} else {

View file

@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the Abyssal whip's Energy drain special attack.
@ -62,12 +65,12 @@ public final class EnergyDrainSpecialHandler extends MeleeSwingHandler implement
((Player) entity).getSettings().updateRunEnergy(-10);
}
state.setEstimatedHit(hit);
entity.asPlayer().getAudioManager().send(new Audio(2713), true);
return 1;
}
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.ENERGYDRAIN_2713, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.animate(ANIMATION);
victim.graphics(GRAPHIC);
}

View file

@ -12,6 +12,7 @@ import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.*;
@ -62,6 +63,7 @@ public final class ExcaliburSpecialHandler extends MeleeSwingHandler implements
if (!p.getSettings().drainSpecial(SPECIAL_ENERGY))
return -1;
p.sendChat("For Camelot!");
playAudio(entity.asPlayer(), Sounds.SANCTUARY_2539);
p.visualize(ANIMATION, GRAPHIC);
switch(p.getEquipment().get(EquipmentContainer.SLOT_WEAPON).getId()) {
case 35: // Regular ol' excalibur

View file

@ -10,6 +10,9 @@ import core.game.world.update.flag.context.Animation;
import core.plugin.Initializable;
import core.plugin.Plugin;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles Vesta's Longsword special attack, feint.
@ -58,6 +61,7 @@ public final class FeintSpecialHandler extends MeleeSwingHandler implements Plug
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.CLEAVE_2529, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.animate(ANIMATION);
}
}

View file

@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import core.plugin.Initializable;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the healing blade special attack.
@ -69,12 +72,12 @@ public final class HealingBladeSpecialHandler extends MeleeSwingHandler implemen
}
entity.getSkills().heal(healthRestore);
entity.getSkills().incrementPrayerPoints(prayerRestore);
entity.asPlayer().getAudioManager().send(new Audio(3857), true);
return 1;
}
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.GODWARS_SARADOMIN_SPECIAL_3857, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
}

View file

@ -11,6 +11,7 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import core.plugin.Initializable;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.*;
@ -60,7 +61,6 @@ public final class IceCleaveSpecialHandler extends MeleeSwingHandler implements
hit = RandomFunction.random(calculateHit(entity, victim, 1.005));
}
state.setEstimatedHit(hit);
entity.asPlayer().getAudioManager().send(3846);
return 1;
}
@ -75,6 +75,7 @@ public final class IceCleaveSpecialHandler extends MeleeSwingHandler implements
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.GODWARS_GODSWORD_SLASH_3846, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
}
}

View file

@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import core.plugin.Initializable;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the Rune claws special attack "Impale".
@ -64,6 +67,7 @@ public final class ImpaleSpecialHandler extends MeleeSwingHandler implements Plu
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.IMPALE_2534, 10, 0, true, entity.asPlayer().getLocation(), 5);
if (((Player) entity).getDetails().getRights() == Rights.ADMINISTRATOR) {
entity.animate(Animation.create(2068));
return;

View file

@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the Judgement special attack.
@ -59,12 +62,12 @@ public final class JudgementSpecialHandler extends MeleeSwingHandler implements
hit = RandomFunction.random(calculateHit(entity, victim, 1.25));
}
state.setEstimatedHit(hit);
entity.asPlayer().getAudioManager().send(new Audio(3865), true);
return 1;
}
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.GODWARS_GODSWORD_SPECIAL_ATTACK_3865, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
}
}

View file

@ -10,6 +10,9 @@ import core.plugin.Initializable;
import core.plugin.Plugin;
import core.tools.RandomFunction;
import core.game.node.entity.combat.RangeSwingHandler;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the Magic longbow special attack "Powershot".
@ -57,7 +60,6 @@ public final class PowershotSpecialHandler extends RangeSwingHandler implements
if (isAccurateImpact(entity, victim, CombatStyle.RANGE, 1.98, 1.0)) {
hit = RandomFunction.random(calculateHit(entity, victim, 1.0));
}
entity.asPlayer().getAudioManager().send(2536);
state.setEstimatedHit(hit);
Companion.useAmmo(entity, state, victim.getLocation());
return 1 + (int) Math.ceil(entity.getLocation().getDistance(victim.getLocation()) * 0.3);
@ -65,6 +67,7 @@ public final class PowershotSpecialHandler extends RangeSwingHandler implements
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.POWERSHOT_2536, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(state.getRangeWeapon().getAnimation(), GRAPHIC);
int speed = (int) (46 + (entity.getLocation().getDistance(victim.getLocation()) * 5));
Projectile.create(entity, victim, 249, 40, 36, 45, speed, 5, 11).send();

View file

@ -16,6 +16,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import core.plugin.Initializable;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the Powerstab special attack.
@ -94,6 +97,7 @@ public final class PowerstabSpecialHandler extends MeleeSwingHandler implements
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.DRAGON_AXE_THUNDER_2530, 10, 0, true, entity.asPlayer().getLocation(), 6);
entity.visualize(ANIMATION, GRAPHIC);
}

View file

@ -11,6 +11,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the puncture special attack combat swing.
@ -73,13 +76,13 @@ public final class PunctureSpecialHandler extends MeleeSwingHandler implements P
} else {
hit = 0;
}
entity.asPlayer().getAudioManager().send(2537);
state.setSecondaryHit(hit);
return 1;
}
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.PUNCTURE_2537, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
}
}

View file

@ -13,6 +13,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the granite maul special attack.
@ -73,12 +76,12 @@ public final class QuickSmashSpecialHandler extends MeleeSwingHandler implements
hit = RandomFunction.random(calculateHit(entity, victim, 1.));
}
victim.getImpactHandler().handleImpact(entity, hit, CombatStyle.MELEE);
entity.asPlayer().getAudioManager().send(new Audio(2715), true);
return 1;
}
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.QUICKSMASH_2715, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
victim.animate(victim.getProperties().getDefenceAnimation());
}

View file

@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the Rampage special attack.
@ -58,6 +61,7 @@ public final class RampageSpecialHandler extends MeleeSwingHandler implements Pl
return -1;
}
p.sendChat("Raarrrrrgggggghhhhhhh!");
playAudio(entity.asPlayer(), Sounds.RAMPAGE_2538, 1);
p.visualize(ANIMATION, GRAPHIC);
@SuppressWarnings("unused")
int boost = 0;
@ -70,7 +74,6 @@ public final class RampageSpecialHandler extends MeleeSwingHandler implements Pl
p.getSkills().updateLevel(i, (int) -drain, (int) (p.getSkills().getStaticLevel(i) - drain));
}
p.getSkills().updateLevel(Skills.STRENGTH, (int) (p.getSkills().getStaticLevel(Skills.STRENGTH) * 0.20));
p.getAudioManager().send(new Audio(386), true);
return -1;
}

View file

@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import core.plugin.Initializable;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the Saradomin sword special attack.
@ -56,7 +59,6 @@ public final class SaradominsLightningHandler extends MeleeSwingHandler implemen
}
state.setEstimatedHit(hit);
state.setSecondaryHit(secondary);
entity.asPlayer().getAudioManager().send(new Audio(3853), true);
return 1;
}
@ -75,9 +77,11 @@ public final class SaradominsLightningHandler extends MeleeSwingHandler implemen
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.GODWARS_SARADOMIN_MAGIC_IMPACT_3853, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
}
@Override
public Object fireEvent(String identifier, Object... args) {
return null;

View file

@ -11,6 +11,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import core.plugin.Initializable;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Represents the Seercull's special attack which lowers the opponent's magic
@ -66,6 +69,7 @@ public final class SeercullSpecialHandler extends RangeSwingHandler implements P
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.SOULSHOT_2546, 10, 0, true, entity.asPlayer().getLocation(), 5);
victim.graphics(new Graphics(474));
int speed = (int) (35 + (entity.getLocation().getDistance(victim.getLocation()) * 10));
entity.visualize(entity.getProperties().getAttackAnimation(), DRAWBACK_GFX);

View file

@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import core.plugin.Initializable;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the Sever special attack.
@ -71,13 +74,13 @@ public final class SeverSpecialHandler extends MeleeSwingHandler implements Plug
}
}
}
entity.asPlayer().getAudioManager().send(2540);
state.setEstimatedHit(hit);
return 1;
}
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.SEVER_2540, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
}
}

View file

@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the Shatter special attack.
@ -57,13 +60,13 @@ public final class ShatterSpecialHandler extends MeleeSwingHandler implements Pl
if (isAccurateImpact(entity, victim, CombatStyle.MELEE, 0.87, 1.0)) {
hit = RandomFunction.random(calculateHit(entity, victim, 1.3546));
}
entity.asPlayer().getAudioManager().send(new Audio(2541), true);
state.setEstimatedHit(hit);
return 1;
}
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.SHATTER_2541, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
}
}

View file

@ -14,7 +14,9 @@ import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
import static core.api.ContentAPIKt.stun;
/**
@ -104,12 +106,12 @@ public final class ShoveSpecialHandler extends MeleeSwingHandler implements Plug
victim.getWalkingQueue().addPath(dest.getX(), dest.getY());
}
}
entity.asPlayer().getAudioManager().send(2533);
return 1;
}
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.SHOVE_2544, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
}

View file

@ -11,6 +11,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the Dragon claws special attack "Slice and Dice".
@ -101,6 +104,7 @@ public final class SliceAndDiceSpecialHandler extends MeleeSwingHandler implemen
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.PUNCTURE_2537, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
}
}

View file

@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles Statius' Warhammer special attack - Smash.
@ -66,6 +69,7 @@ public final class SmashSpecialHandler extends MeleeSwingHandler implements Plug
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.TZHAAR_KET_OM_CRUSH_2520, 10, 0, true, entity.asPlayer().getLocation(), 4);
entity.visualize(ANIMATION, GRAPHIC);
}
}

View file

@ -14,6 +14,9 @@ import core.plugin.Plugin;
import core.tools.RandomFunction;
import core.game.node.entity.combat.RangeSwingHandler;
import core.game.world.GameWorld;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the magic shortbow special attack "Snapshot".
@ -72,7 +75,6 @@ public final class SnapshotSpecialHandler extends RangeSwingHandler implements P
if (isAccurateImpact(entity, victim, CombatStyle.MELEE, 0.9, 1.0)) {
hit = RandomFunction.random(max);
}
entity.asPlayer().getAudioManager().send(2545);
state.setSecondaryHit(hit);
Companion.useAmmo(entity, state, victim.getLocation());
return 1 + (int) Math.ceil(entity.getLocation().getDistance(victim.getLocation()) * 0.3);
@ -100,6 +102,7 @@ public final class SnapshotSpecialHandler extends RangeSwingHandler implements P
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.SNAPSHOT_2545, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
int speed = (int) (27 + (entity.getLocation().getDistance(victim.getLocation()) * 5));
Projectile.create(entity, victim, 249, 40, 36, 20, speed, 15, 11).send();

View file

@ -12,6 +12,9 @@ import core.plugin.Initializable;
import core.plugin.Plugin;
import core.tools.RandomFunction;
import core.game.node.entity.combat.RangeSwingHandler;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Represents the Dorgeshuun crossbow's special attack - snipe.
@ -68,6 +71,7 @@ public final class SnipeSpecialHandler extends RangeSwingHandler implements Plug
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.DTTD_BONE_CROSSBOW_SA_1080, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.animate(ANIMATION);
Projectile.create(entity, victim, 698, 36, 25, 35, 72).send();
}

View file

@ -16,6 +16,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import core.plugin.Initializable;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles Vesta's Spear special attack - Spear Wall.
@ -93,7 +96,8 @@ public final class SpearWallSpecialHandler extends MeleeSwingHandler implements
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
entity.visualize(ANIMATION, GRAPHIC);
playAudio(entity.asPlayer(), Sounds.CLEAVE_2529, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
}
@Override
@ -103,6 +107,7 @@ public final class SpearWallSpecialHandler extends MeleeSwingHandler implements
if (s != null) {
s.getVictim().animate(victim.getProperties().getDefenceAnimation());
}
}
return;
}

View file

@ -19,6 +19,9 @@ import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the Dragon halberd special attack.
@ -156,6 +159,7 @@ public final class SweepSpecialHandler extends MeleeSwingHandler implements Plug
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.HALBERD_SWIPE_2533, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
}

View file

@ -13,6 +13,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import core.plugin.Initializable;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles the Warstrike special attack.
@ -78,12 +81,12 @@ public final class WarstrikeSpecialHandler extends MeleeSwingHandler implements
}
}
}
entity.asPlayer().getAudioManager().send(new Audio(3834), true);
return 1;
}
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
playAudio(entity.asPlayer(), Sounds.GODWARS_SARADOMIN_MAGIC_CASTANDFIRE_3834, 10, 0, true, entity.asPlayer().getLocation(), 5);
entity.visualize(ANIMATION, GRAPHIC);
}
}

View file

@ -13,6 +13,9 @@ import core.game.world.update.flag.context.Graphics;
import core.plugin.Plugin;
import core.plugin.Initializable;
import core.tools.RandomFunction;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.playAudio;
/**
* Handles Darklight's special attack, Weaken.
@ -73,6 +76,6 @@ public final class WeakenSpecialHandler extends MeleeSwingHandler implements Plu
@Override
public void visualize(Entity entity, Entity victim, BattleState state) {
entity.visualize(ANIMATION, GRAPHIC);
entity.asPlayer().getAudioManager().send(new Audio(225), true);
playAudio(entity.asPlayer(), Sounds.DARKLIGHT_WEAKEN_225, 10, 0, true, entity.asPlayer().getLocation(), 5);
}
}

View file

@ -17,6 +17,7 @@ import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import org.rs09.consts.Sounds;
/**
* Handles the Blood spells from the Ancient spellbook.
@ -80,10 +81,10 @@ public final class BloodSpells extends CombatSpell {
@Override
public Plugin<SpellType> newInstance(SpellType arg) throws Throwable {
SpellBook.ANCIENT.register(4, new BloodSpells(SpellType.RUSH, 56, 33.0, -1, -1, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.BLOOD_RUNE.getItem(1), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2)));
SpellBook.ANCIENT.register(6, new BloodSpells(SpellType.BURST, 68, 39.0, -1, -1, new Animation(1979, Priority.HIGH), null, null, BURST_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4)));
SpellBook.ANCIENT.register(5, new BloodSpells(SpellType.BLITZ, 80, 45.0, -1, -1, new Animation(1978, Priority.HIGH), null, BLITZ_PROJECTILE, BLITZ_END, Runes.BLOOD_RUNE.getItem(4), Runes.DEATH_RUNE.getItem(2)));
SpellBook.ANCIENT.register(7, new BloodSpells(SpellType.BARRAGE, 92, 51.0, -1, -1, new Animation(1979, Priority.HIGH), null, null, BARRAGE_END, Runes.SOUL_RUNE.getItem(1), Runes.BLOOD_RUNE.getItem(4), Runes.DEATH_RUNE.getItem(4)));
SpellBook.ANCIENT.register(4, new BloodSpells(SpellType.RUSH, 56, 33.0, Sounds.BLOOD_RUSH_CASTING_108, Sounds.BLOOD_RUSH_IMPACT_110, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.BLOOD_RUNE.getItem(1), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2)));
SpellBook.ANCIENT.register(6, new BloodSpells(SpellType.BURST, 68, 39.0, Sounds.BLOOD_CAST_106, Sounds.BLOOD_BURST_IMPACT_105, new Animation(1979, Priority.HIGH), null, null, BURST_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4)));
SpellBook.ANCIENT.register(5, new BloodSpells(SpellType.BLITZ, 80, 45.0, Sounds.BLOOD_CAST_106, Sounds.BLOOD_BLITZ_IMPACT_104, new Animation(1978, Priority.HIGH), null, BLITZ_PROJECTILE, BLITZ_END, Runes.BLOOD_RUNE.getItem(4), Runes.DEATH_RUNE.getItem(2)));
SpellBook.ANCIENT.register(7, new BloodSpells(SpellType.BARRAGE, 92, 51.0, Sounds.BLOOD_CAST_106, Sounds.BLOOD_BARRAGE_IMPACT_102, new Animation(1979, Priority.HIGH), null, null, BARRAGE_END, Runes.SOUL_RUNE.getItem(1), Runes.BLOOD_RUNE.getItem(4), Runes.DEATH_RUNE.getItem(4)));
return this;
}

View file

@ -18,6 +18,7 @@ import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.*;
@ -93,7 +94,7 @@ public final class IceSpells extends CombatSpell {
* @param end The end graphics.
*/
private IceSpells(SpellType type, int level, double baseExperience, int impactSound, Animation anim, Graphics start, Projectile projectile, Graphics end, Item... runes) {
super(type, SpellBook.ANCIENT, level, baseExperience, 171, impactSound, anim, start, projectile, end, runes);
super(type, SpellBook.ANCIENT, level, baseExperience, Sounds.ICE_CAST_171, impactSound, anim, start, projectile, end, runes);
}
@Override
@ -120,10 +121,10 @@ public final class IceSpells extends CombatSpell {
@Override
public Plugin<SpellType> newInstance(SpellType arg) throws Throwable {
SpellBook.ANCIENT.register(0, new IceSpells(SpellType.RUSH, 58, 34.0, 173, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2), Runes.WATER_RUNE.getItem(2)));
SpellBook.ANCIENT.register(2, new IceSpells(SpellType.BURST, 70, 40.0, 170, new Animation(1979, Priority.HIGH), null, BURST_PROJECTILE, BURST_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4), Runes.WATER_RUNE.getItem(4)));
SpellBook.ANCIENT.register(1, new IceSpells(SpellType.BLITZ, 82, 46.0, 169, new Animation(1978, Priority.HIGH), BLITZ_START, null, BLITZ_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.WATER_RUNE.getItem(3)));
SpellBook.ANCIENT.register(3, new IceSpells(SpellType.BARRAGE, 94, 52.0, 168, new Animation(1979, Priority.HIGH), null, BARRAGE_PROJECTILE, BARRAGE_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(4), Runes.WATER_RUNE.getItem(6)));
SpellBook.ANCIENT.register(0, new IceSpells(SpellType.RUSH, 58, 34.0, Sounds.ICE_RUSH_IMPACT_173, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2), Runes.WATER_RUNE.getItem(2)));
SpellBook.ANCIENT.register(2, new IceSpells(SpellType.BURST, 70, 40.0, Sounds.ICE_BURST_IMPACT_170, new Animation(1979, Priority.HIGH), null, BURST_PROJECTILE, BURST_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4), Runes.WATER_RUNE.getItem(4)));
SpellBook.ANCIENT.register(1, new IceSpells(SpellType.BLITZ, 82, 46.0, Sounds.ICE_BLITZ_IMPACT_169, new Animation(1978, Priority.HIGH), BLITZ_START, null, BLITZ_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.WATER_RUNE.getItem(3)));
SpellBook.ANCIENT.register(3, new IceSpells(SpellType.BARRAGE, 94, 52.0, Sounds.ICE_BARRAGE_IMPACT_168, new Animation(1979, Priority.HIGH), null, BARRAGE_PROJECTILE, BARRAGE_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(4), Runes.WATER_RUNE.getItem(6)));
return this;
}

View file

@ -90,8 +90,8 @@ public final class MiasmicSpells extends CombatSpell {
* @param projectile The projectile.
* @param end The end graphics.
*/
private MiasmicSpells(SpellType type, int level, double baseExperience, int impactSound, Animation anim, Graphics start, Projectile projectile, Graphics end, Item... runes) {
super(type, SpellBook.ANCIENT, level, baseExperience, 171, impactSound, anim, start, projectile, end, runes);
private MiasmicSpells(SpellType type, int level, double baseExperience, int castAudio, int impactSound, Animation anim, Graphics start, Projectile projectile, Graphics end, Item... runes) {
super(type, SpellBook.ANCIENT, level, baseExperience, castAudio, impactSound, anim, start, projectile, end, runes);
}
@Override
@ -111,10 +111,10 @@ public final class MiasmicSpells extends CombatSpell {
@Override
public Plugin<SpellType> newInstance(SpellType arg) throws Throwable {
SpellBook.ANCIENT.register(16, new MiasmicSpells(SpellType.RUSH, 61, 36.0, 173, new Animation(10513, Priority.HIGH), RUSH_START, null, RUSH_END, Runes.EARTH_RUNE.getItem(1), Runes.SOUL_RUNE.getItem(1), Runes.CHAOS_RUNE.getItem(2)));
SpellBook.ANCIENT.register(17, new MiasmicSpells(SpellType.BURST, 73, 42.0, 170, new Animation(10516, Priority.HIGH), BURST_START, null, BURST_END, Runes.EARTH_RUNE.getItem(3), Runes.SOUL_RUNE.getItem(3), Runes.CHAOS_RUNE.getItem(4)));
SpellBook.ANCIENT.register(18, new MiasmicSpells(SpellType.BLITZ, 85, 48.0, 169, new Animation(10524, Priority.HIGH), BLITZ_START, null, BLITZ_END, Runes.EARTH_RUNE.getItem(3), Runes.SOUL_RUNE.getItem(3), Runes.BLOOD_RUNE.getItem(2)));
SpellBook.ANCIENT.register(19, new MiasmicSpells(SpellType.BARRAGE, 97, 54.0, 168, new Animation(10518, Priority.HIGH), BARRAGE_START, null, BARRAGE_END, Runes.EARTH_RUNE.getItem(4), Runes.SOUL_RUNE.getItem(4), Runes.BLOOD_RUNE.getItem(4)));
SpellBook.ANCIENT.register(16, new MiasmicSpells(SpellType.RUSH, 61, 36.0, 5368, 5365, new Animation(10513, Priority.HIGH), RUSH_START, null, RUSH_END, Runes.EARTH_RUNE.getItem(1), Runes.SOUL_RUNE.getItem(1), Runes.CHAOS_RUNE.getItem(2)));
SpellBook.ANCIENT.register(17, new MiasmicSpells(SpellType.BURST, 73, 42.0, 5366, 5372, new Animation(10516, Priority.HIGH), BURST_START, null, BURST_END, Runes.EARTH_RUNE.getItem(3), Runes.SOUL_RUNE.getItem(3), Runes.CHAOS_RUNE.getItem(4)));
SpellBook.ANCIENT.register(18, new MiasmicSpells(SpellType.BLITZ, 85, 48.0, 5370, 5367, new Animation(10524, Priority.HIGH), BLITZ_START, null, BLITZ_END, Runes.EARTH_RUNE.getItem(3), Runes.SOUL_RUNE.getItem(3), Runes.BLOOD_RUNE.getItem(2)));
SpellBook.ANCIENT.register(19, new MiasmicSpells(SpellType.BARRAGE, 97, 54.0, 5371, 5369, new Animation(10518, Priority.HIGH), BARRAGE_START, null, BARRAGE_END, Runes.EARTH_RUNE.getItem(4), Runes.SOUL_RUNE.getItem(4), Runes.BLOOD_RUNE.getItem(4)));
return this;
}

View file

@ -17,6 +17,7 @@ import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import org.rs09.consts.Sounds;
/**
* Handles the Shadow spells from the Ancient spellbook.
@ -81,10 +82,10 @@ public final class ShadowSpells extends CombatSpell {
@Override
public Plugin<SpellType> newInstance(SpellType arg) throws Throwable {
SpellBook.ANCIENT.register(12, new ShadowSpells(SpellType.RUSH, 52, 31.0, 175, 176, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.SOUL_RUNE.getItem(1), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2), Runes.AIR_RUNE.getItem(1)));
SpellBook.ANCIENT.register(14, new ShadowSpells(SpellType.BURST, 64, 37.0, 177, 178, new Animation(1979, Priority.HIGH), null, BURST_PROJECTILE, BURST_END, Runes.SOUL_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4), Runes.AIR_RUNE.getItem(1)));
SpellBook.ANCIENT.register(13, new ShadowSpells(SpellType.BLITZ, 76, 43.0, 181, 182, new Animation(1978, Priority.HIGH), null, null, BLITZ_END, Runes.SOUL_RUNE.getItem(2), Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.AIR_RUNE.getItem(2)));
SpellBook.ANCIENT.register(15, new ShadowSpells(SpellType.BARRAGE, 88, 48.0, 181, 185, new Animation(1979, Priority.HIGH), null, null, BARRAGE_END, Runes.SOUL_RUNE.getItem(3), Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(4), Runes.AIR_RUNE.getItem(4)));
SpellBook.ANCIENT.register(12, new ShadowSpells(SpellType.RUSH, 52, 31.0, Sounds.SHADOW_CAST_178, Sounds.SHADOW_RUSH_IMPACT_179, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.SOUL_RUNE.getItem(1), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2), Runes.AIR_RUNE.getItem(1)));
SpellBook.ANCIENT.register(14, new ShadowSpells(SpellType.BURST, 64, 37.0, Sounds.SHADOW_CAST_178, Sounds.SHADOW_BURST_IMPACT_177, new Animation(1979, Priority.HIGH), null, BURST_PROJECTILE, BURST_END, Runes.SOUL_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4), Runes.AIR_RUNE.getItem(1)));
SpellBook.ANCIENT.register(13, new ShadowSpells(SpellType.BLITZ, 76, 43.0, Sounds.SHADOW_CAST_178, Sounds.SHADOW_BLITZ_IMPACT_176, new Animation(1978, Priority.HIGH), null, null, BLITZ_END, Runes.SOUL_RUNE.getItem(2), Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.AIR_RUNE.getItem(2)));
SpellBook.ANCIENT.register(15, new ShadowSpells(SpellType.BARRAGE, 88, 48.0, Sounds.SHADOW_CAST_178, Sounds.SHADOW_BARRAGE_IMPACT_175, new Animation(1979, Priority.HIGH), null, null, BARRAGE_END, Runes.SOUL_RUNE.getItem(3), Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(4), Runes.AIR_RUNE.getItem(4)));
return this;
}

View file

@ -16,6 +16,7 @@ import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.*;
@ -92,10 +93,10 @@ public final class SmokeSpells extends CombatSpell {
@Override
public Plugin<SpellType> newInstance(SpellType arg) throws Throwable {
SpellBook.ANCIENT.register(8, new SmokeSpells(SpellType.RUSH, 50, 30.0, 176, 177, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2), Runes.FIRE_RUNE.getItem(1), Runes.AIR_RUNE.getItem(1)));
SpellBook.ANCIENT.register(10, new SmokeSpells(SpellType.BURST, 62, 36.0, 179, 180, new Animation(1979, Priority.HIGH), null, BURST_PROJECTILE, BURST_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4), Runes.FIRE_RUNE.getItem(2), Runes.AIR_RUNE.getItem(2)));
SpellBook.ANCIENT.register(9, new SmokeSpells(SpellType.BLITZ, 74, 42.0, 183, 184, new Animation(1978, Priority.HIGH), null, BLITZ_PROJECTILE, BLITZ_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.FIRE_RUNE.getItem(2), Runes.AIR_RUNE.getItem(2)));
SpellBook.ANCIENT.register(11, new SmokeSpells(SpellType.BARRAGE, 86, 48.0, 183, 185, new Animation(1979, Priority.HIGH), null, BARRAGE_PROJECTILE, BARRAGE_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(4), Runes.FIRE_RUNE.getItem(4), Runes.AIR_RUNE.getItem(4)));
SpellBook.ANCIENT.register(8, new SmokeSpells(SpellType.RUSH, 50, 30.0, Sounds.SMOKE_CAST_183, Sounds.SMOKE_RUSH_IMPACT_185, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2), Runes.FIRE_RUNE.getItem(1), Runes.AIR_RUNE.getItem(1)));
SpellBook.ANCIENT.register(10, new SmokeSpells(SpellType.BURST, 62, 36.0, Sounds.SMOKE_CAST_183, Sounds.SMOKE_BURST_IMPACT_182, new Animation(1979, Priority.HIGH), null, BURST_PROJECTILE, BURST_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4), Runes.FIRE_RUNE.getItem(2), Runes.AIR_RUNE.getItem(2)));
SpellBook.ANCIENT.register(9, new SmokeSpells(SpellType.BLITZ, 74, 42.0, Sounds.SMOKE_CAST_183, Sounds.SMOKE_BLITZ_IMPACT_181, new Animation(1978, Priority.HIGH), null, BLITZ_PROJECTILE, BLITZ_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.FIRE_RUNE.getItem(2), Runes.AIR_RUNE.getItem(2)));
SpellBook.ANCIENT.register(11, new SmokeSpells(SpellType.BARRAGE, 86, 48.0, Sounds.SMOKE_CAST_183, Sounds.SMOKE_BARRAGE_IMPACT_180, new Animation(1979, Priority.HIGH), null, BARRAGE_PROJECTILE, BARRAGE_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(4), Runes.FIRE_RUNE.getItem(4), Runes.AIR_RUNE.getItem(4)));
return this;
}

View file

@ -11,6 +11,7 @@ import core.game.world.GameWorld;
import core.game.world.map.Location;
import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import org.rs09.consts.Sounds;
import static core.api.ContentAPIKt.hasTimerActive;
@ -240,6 +241,10 @@ public class TeleportManager {
@Override
public boolean pulse() {
if (delay == 0) {
if (entity instanceof Player) {
entity.asPlayer().getAudioManager().send(new Audio(Sounds.BLOCK_TELEPORT_197), true);
}
entity.getAnimator().forceAnimation(new Animation(getSettings().getStartEmote()));
entity.graphics(new Graphics(getSettings().getStartGfx()));
} else if (delay == 4) {
@ -449,9 +454,9 @@ public class TeleportManager {
switch (++delay) {
case 2:
entity.animate(Animation.create(3265));
if(entity instanceof Player) {
((Player) entity).getAudioManager().send(1098, 1);
}
if(entity instanceof Player) {
((Player) entity).getAudioManager().send(1098, 1);
}
break;
case 4:
entity.animate(Animation.create(3266));
@ -831,3 +836,4 @@ public class TeleportManager {
this.teleportType = teleportType;
}
}

View file

@ -8,6 +8,7 @@ import core.game.node.entity.player.link.audio.Audio;
import core.game.world.map.zone.ZoneBorders;
import core.tools.StringUtils;
import core.game.event.*;
import org.rs09.consts.Sounds;
import java.util.List;
@ -21,33 +22,33 @@ import static core.api.ContentAPIKt.*;
* @author jamix77
*/
public enum PrayerType {
THICK_SKIN(1, 12, 83, 5, PrayerCategory.BABY_BLUE, 10000, new SkillBonus(Skills.DEFENCE, 0.05)),
BURST_OF_STRENGTH(4, 12, 84, 7, PrayerCategory.GREEN, 2689, new SkillBonus(Skills.STRENGTH, 0.05)),
CLARITY_OF_THOUGHT(7, 12, 85, 9, PrayerCategory.PINK, 2664, new SkillBonus(Skills.ATTACK, 0.05)),
SHARP_EYE(8, 12, 862, 11, PrayerCategory.LIME_GREEN, 2685, new SkillBonus(Skills.RANGE, 0.05)),
MYSTIC_WILL(9, 12, 863, 13, PrayerCategory.LIME_GREEN, 2670, new SkillBonus(Skills.MAGIC, 0.05)),
ROCK_SKIN(10, 6, 86, 15, PrayerCategory.BABY_BLUE, 2684, new SkillBonus(Skills.DEFENCE, 0.1)),
SUPERHUMAN_STRENGTH(13, 6, 87, 17, PrayerCategory.GREEN, 2689, new SkillBonus(Skills.STRENGTH, 0.1)),
IMPROVED_REFLEXES(16, 6, 88, 19, PrayerCategory.PINK, 2662, new SkillBonus(Skills.ATTACK, 0.1)),
RAPID_RESTORE(19, 26, 89, 21, PrayerCategory.PURPLE, 2679),
RAPID_HEAL(22, 18, 90, 23, PrayerCategory.PURPLE, 2678),
PROTECT_ITEMS(25, 18, 91, 25, PrayerCategory.DARK_GREEN, 1982),
HAWK_EYE(26, 6, 864, 27, PrayerCategory.LIME_GREEN, 2666, new SkillBonus(Skills.RANGE, 0.1)),
MYSTIC_LORE(27, 6, 865, 29, PrayerCategory.LIME_GREEN, 2668, new SkillBonus(Skills.MAGIC, 0.1)),
STEEL_SKIN(28, 3, 92, 31, PrayerCategory.BABY_BLUE, 2687, new SkillBonus(Skills.DEFENCE, 0.15)),
ULTIMATE_STRENGTH(31, 3, 93, 33, PrayerCategory.GREEN, 2691, new SkillBonus(Skills.STRENGTH, 0.15)),
INCREDIBLE_REFLEXES(34, 3, 94, 35, PrayerCategory.PINK, 2667, new SkillBonus(Skills.ATTACK, 0.15)),
THICK_SKIN(1, 12, 83, 5, PrayerCategory.BABY_BLUE, Sounds.THICK_SKIN_2690, new SkillBonus(Skills.DEFENCE, 0.05)),
BURST_OF_STRENGTH(4, 12, 84, 7, PrayerCategory.GREEN, Sounds.STRENGTH_BURST_2688, new SkillBonus(Skills.STRENGTH, 0.05)),
CLARITY_OF_THOUGHT(7, 12, 85, 9, PrayerCategory.PINK, Sounds.CLARITY_2664, new SkillBonus(Skills.ATTACK, 0.05)),
SHARP_EYE(8, 12, 862, 11, PrayerCategory.LIME_GREEN, Sounds.SHARP_EYE_2685, new SkillBonus(Skills.RANGE, 0.05)),
MYSTIC_WILL(9, 12, 863, 13, PrayerCategory.LIME_GREEN, Sounds.MYSTIC_WILL_2670, new SkillBonus(Skills.MAGIC, 0.05)),
ROCK_SKIN(10, 6, 86, 15, PrayerCategory.BABY_BLUE, Sounds.ROCK_SKIN_2684, new SkillBonus(Skills.DEFENCE, 0.1)),
SUPERHUMAN_STRENGTH(13, 6, 87, 17, PrayerCategory.GREEN, Sounds.SUPERHUMAN_STRENGTH_2689, new SkillBonus(Skills.STRENGTH, 0.1)),
IMPROVED_REFLEXES(16, 6, 88, 19, PrayerCategory.PINK, Sounds.IMPROVED_REFLEXES_2662, new SkillBonus(Skills.ATTACK, 0.1)),
RAPID_RESTORE(19, 26, 89, 21, PrayerCategory.PURPLE, Sounds.RAPID_RESTORE_2679),
RAPID_HEAL(22, 18, 90, 23, PrayerCategory.PURPLE, Sounds.RAPID_HEAL_2678),
PROTECT_ITEMS(25, 18, 91, 25, PrayerCategory.DARK_GREEN, Sounds.PROTECT_ITEMS_1982),
HAWK_EYE(26, 6, 864, 27, PrayerCategory.LIME_GREEN, Sounds.HAWK_EYE_2666, new SkillBonus(Skills.RANGE, 0.1)),
MYSTIC_LORE(27, 6, 865, 29, PrayerCategory.LIME_GREEN, Sounds.MYSTIC_2668, new SkillBonus(Skills.MAGIC, 0.1)),
STEEL_SKIN(28, 3, 92, 31, PrayerCategory.BABY_BLUE, Sounds.STEEL_SKIN_2687, new SkillBonus(Skills.DEFENCE, 0.15)),
ULTIMATE_STRENGTH(31, 3, 93, 33, PrayerCategory.GREEN, Sounds.ULTIMATE_STRENGTH_2691, new SkillBonus(Skills.STRENGTH, 0.15)),
INCREDIBLE_REFLEXES(34, 3, 94, 35, PrayerCategory.PINK, Sounds.INCREDIBLE_REFLEXES_2667, new SkillBonus(Skills.ATTACK, 0.15)),
PROTECT_FROM_SUMMONING(35, 2, 1168, 53, PrayerCategory.DARK_BROWN, PrayerCategory.MAGENTA, new Audio(4262)),
PROTECT_FROM_MAGIC(37, 3, 95, 37, PrayerCategory.LIGHT_BROWN, 2675),
PROTECT_FROM_MISSILES(40, 3, 96, 39, PrayerCategory.LIGHT_BROWN, 2677),
PROTECT_FROM_MELEE(43, 4, 97, 41, PrayerCategory.LIGHT_BROWN, 2676),
EAGLE_EYE(44, 3, 866, 43, PrayerCategory.LIME_GREEN, 2666, new SkillBonus(Skills.RANGE, 0.15)),
MYSTIC_MIGHT(45, 3, 867, 45, PrayerCategory.LIME_GREEN, 2669, new SkillBonus(Skills.MAGIC, 0.15)),
RETRIBUTION(46, 12, 98, 47, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(10000)),
REDEMPTION(49, 6, 99, 49, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(2678)),
SMITE(52, 2, 100, 51, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(2685)),
CHIVALRY(60, 2, 1052, 55, PrayerCategory.PINK, 3826, 65, new SkillBonus(Skills.DEFENCE, 0.2), new SkillBonus(Skills.STRENGTH, 0.18), new SkillBonus(Skills.ATTACK, 0.15)),
PIETY(70, 2, 1053, 57, PrayerCategory.PINK, 3825, 70, new SkillBonus(Skills.DEFENCE, 0.25), new SkillBonus(Skills.STRENGTH, 0.23), new SkillBonus(Skills.ATTACK, 0.2));
PROTECT_FROM_MAGIC(37, 3, 95, 37, PrayerCategory.LIGHT_BROWN, Sounds.PROTECT_FROM_MAGIC_2675),
PROTECT_FROM_MISSILES(40, 3, 96, 39, PrayerCategory.LIGHT_BROWN, Sounds.PROTECT_FROM_MISSILES_2677),
PROTECT_FROM_MELEE(43, 4, 97, 41, PrayerCategory.LIGHT_BROWN, Sounds.PROTECT_FROM_MELEE_2676),
EAGLE_EYE(44, 3, 866, 43, PrayerCategory.LIME_GREEN, Sounds.EAGLE_EYE_2665, new SkillBonus(Skills.RANGE, 0.15)),
MYSTIC_MIGHT(45, 3, 867, 45, PrayerCategory.LIME_GREEN, Sounds.MYSTIC_MIGHT_2669, new SkillBonus(Skills.MAGIC, 0.15)),
RETRIBUTION(46, 12, 98, 47, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(2682)),
REDEMPTION(49, 6, 99, 49, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(2680)),
SMITE(52, 2, 100, 51, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(2686)),
CHIVALRY(60, 2, 1052, 55, PrayerCategory.PINK, Sounds.KR_CHIVALRY_3826, 65, new SkillBonus(Skills.DEFENCE, 0.2), new SkillBonus(Skills.STRENGTH, 0.18), new SkillBonus(Skills.ATTACK, 0.15)),
PIETY(70, 2, 1053, 57, PrayerCategory.PINK, Sounds.KR_PIETY_3825, 70, new SkillBonus(Skills.DEFENCE, 0.25), new SkillBonus(Skills.STRENGTH, 0.23), new SkillBonus(Skills.ATTACK, 0.2));
/**
* Represents the a cache of objects related to prayers in order to decide
@ -248,6 +249,7 @@ public enum PrayerType {
player.dispatch (new PrayerActivatedEvent(this));
} else {
player.getPrayer().getActive().remove(this);
player.getAudioManager().send(Sounds.CANCEL_PRAYER_2663);
findNextIcon(player);
player.dispatch (new PrayerDeactivatedEvent(this));
}