Files
2009scape/Server/src/main/content/global/skill/summoning/familiar/SpiritLarupiaNPC.java
T
Ceikry a100affda2 Repository reorganisation
Unified kotlin and java into just src/main
Unified the rs09 and core packages
Took all content out of the core package, and placed it into the new content package
Reorganised all source code relating to content to be easier to find and explore
2023-01-26 13:59:28 +00:00

61 lines
1.6 KiB
Java

package content.global.skill.summoning.familiar;
import core.plugin.Initializable;
import core.game.node.entity.skill.SkillBonus;
import core.game.node.entity.skill.Skills;
import core.game.node.entity.Entity;
import core.game.node.entity.combat.equipment.WeaponInterface;
import core.game.node.entity.player.Player;
import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
/**
* Represents the Spirit Larupia familiar.
* @author Aero
*/
@Initializable
public class SpiritLarupiaNPC extends Familiar {
/**
* Constructs a new {@code SpiritLarupiaNPC} {@code Object}.
*/
public SpiritLarupiaNPC() {
this(null, 7337);
}
/**
* Constructs a new {@code SpiritLarupiaNPC} {@code Object}.
* @param owner The owner.
* @param id The id.
*/
public SpiritLarupiaNPC(Player owner, int id) {
super(owner, id, 4900, 12784, 6, WeaponInterface.STYLE_CONTROLLED);
boosts.add(new SkillBonus(Skills.HUNTER, 5));
}
@Override
public Familiar construct(Player owner, int id) {
return new SpiritLarupiaNPC(owner, id);
}
@Override
protected boolean specialMove(FamiliarSpecial special) {
final Entity target = special.getTarget();
if (!canCombatSpecial(target)) {
return false;
}
target.getSkills().updateLevel(Skills.STRENGTH, -1, target.getSkills().getStaticLevel(Skills.STRENGTH) - 1);
faceTemporary(target, 2);
projectile(target, 1371);
sendFamiliarHit(target, 10);
visualize(Animation.create(5229), Graphics.create(1370));
return true;
}
@Override
public int[] getIds() {
return new int[] { 7337, 7338 };
}
}