1package com.osroyale.game.world.entity.combat.strategy.player.special.melee;
3import com.osroyale.game.Animation;
4import com.osroyale.game.Graphic;
5import com.osroyale.game.UpdatePriority;
6import com.osroyale.game.world.entity.combat.hit.CombatHit;
7import com.osroyale.game.world.entity.combat.hit.Hit;
8import com.osroyale.game.world.entity.combat.strategy.player.PlayerMeleeStrategy;
9import com.osroyale.game.world.entity.mob.Direction;
10import com.osroyale.game.world.entity.mob.Mob;
11import com.osroyale.game.world.entity.mob.data.LockType;
12import com.osroyale.game.world.entity.mob.player.Player;
13import com.osroyale.game.world.pathfinding.TraversalMap;
14import com.osroyale.game.world.position.Position;
15import com.osroyale.net.packet.out.SendMessage;
55 public boolean canAttack(
Player attacker,
Mob defender) {
57 attacker.send(
new SendMessage(
"That creature is too large to knock back!"));
64 attacker.send(
new SendMessage(
"That entity can not be knocked back as something is blocking it!"));
68 return super.canAttack(attacker, defender);
72 public void hit(
Player attacker,
Mob defender,
Hit hit) {
73 super.hit(attacker, defender, hit);
79 attacker.graphic(GRAPHIC);
80 defender.movement.
reset();
83 defender.locking.lock(3,
LockType.STUN);
84 defender.movement.
walkTo(position);
89 return new CombatHit[] { nextMeleeHit(attacker, defender) };
abstract Combat<? extends Mob > getCombat()
void walkTo(int x, int y)
static boolean isTraversable(Position from, Direction direction, int size)
Position transform(int diffX, int diffY, int diffZ)
static Direction getDirection(int deltaX, int deltaY)