1package com.osroyale.game;
3import com.osroyale.game.world.entity.mob.Mob;
4import com.osroyale.game.world.position.Position;
6public class ProjectileTest {
8 Position start, target, offset;
9 private final int creatorSize, startDistanceOffset, lockon, delay, startHeight, endHeight, projectileId, speed, slope, angle, radius, stepMultiplier;
11 public ProjectileTest(Position start, Position end,
int lockon,
12 int projectileId,
int speed,
int delay,
int startHeight,
int endHeight,
13 int curve,
int creatorSize,
int startDistanceOffset,
int stepMultiplier) {
16 this.offset =
new Position((end.getX() - start.getX()),
17 (end.getY() - start.getY()));
18 this.creatorSize = creatorSize;
19 this.startDistanceOffset = startDistanceOffset;
21 this.projectileId = projectileId;
24 this.startHeight = startHeight;
25 this.endHeight = endHeight;
27 this.angle = getAngle();
28 this.radius = getRadius();
29 this.stepMultiplier = stepMultiplier;
32 public ProjectileTest(Mob source, Mob victim,
int projectileId,
33 int delay,
int speed,
int startHeight,
int endHeight,
int curve,
int creatorSize,
int stepMultiplier) {
34 this(source.getPosition(), victim.getPosition(),
35 (victim.isPlayer() ? -victim.getIndex() - 1
36 : victim.getIndex() + 1), projectileId, speed, delay,
37 startHeight, endHeight, curve, creatorSize, 64, stepMultiplier);
40 public ProjectileTest(Position start, Position end,
int lockon,
41 int projectileId,
int speed,
int delay,
int startHeight,
int endHeight,
43 this(start, end, lockon, projectileId, speed, delay, startHeight, endHeight, curve, 1, 0, 0);
46 public ProjectileTest(Position source, Position delta,
int slope,
int speed,
int projectileId,
int startHeight,
int endHeight,
int lockon,
int delay,
int creatorSize,
int startDistanceOffset) {
47 this(source, delta, lockon, projectileId, speed, delay, startHeight, endHeight, slope, creatorSize, startDistanceOffset, 0);
50 public int getLockon() {
54 public int getProjectileId() {
55 return this.projectileId;
58 public int getStepMultiplier() {
59 return stepMultiplier;
62 public int getSlope() {
66 public int getEndHeight() {
67 return this.endHeight;
70 public int getStartHeight() {
71 return this.startHeight;
74 public int getSpeed() {
78 public int getDelay() {
82 public int getCreatorSize() {
83 return this.creatorSize;
86 public Position getOffset() {
90 public int getStartDistanceOffset() {
91 return this.startDistanceOffset;
94 public Position getStart() {
98 public Position getTarget() {
102 public int getAngle() {
106 public int getRadius() {
110 public int getDuration(
int distance) {
112 return this.delay + (distance * this.stepMultiplier);
117 public int getHitDelay(
int distance) {
118 return (
int) Math.floor(getDuration(distance) / 30D) + 1;