1package com.osroyale.content.skill.impl.hunter.net;
3import com.osroyale.game.action.Action;
4import com.osroyale.game.action.policy.WalkablePolicy;
5import com.osroyale.game.world.entity.mob.player.Player;
6import com.osroyale.game.world.object.GameObject;
8public class PuroPuroAction
extends Action<Player> {
9 private final GameObject object;
10 private boolean run =
false;
11 private int walkAnimation;
13 public PuroPuroAction(Player player, GameObject
object) {
14 super(player, 3,
false);
20 run =
getMob().movement.isRunningToggled();
21 walkAnimation =
getMob().mobAnimation.getWalk();
22 getMob().mobAnimation.setWalk(6594);
25 getMob().movement.setRunningToggled(
false);
26 getMob().message(
"You use your strength to push through the wheat.");
31 if (
getMob().getX() >
object.getX()) {
33 }
else if (
getMob().getX() <
object.getX()) {
37 if (
getMob().getY() >
object.getY()) {
39 }
else if (
getMob().getY() <
object.getY()) {
43 getMob().walk(
getMob().getPosition().transform(dx, dy),
true);
52 protected void onCancel(
boolean logout) {
54 getMob().mobAnimation.setWalk(walkAnimation);
55 getMob().movement.setRunningToggled(run);
65 return "puro-puro-action";
abstract String getName()
abstract WalkablePolicy getWalkablePolicy()
synchronized final void cancel()