RuneHive-Game
Loading...
Searching...
No Matches
FightType.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.combat.attack;
2
3import com.runehive.game.world.items.containers.equipment.Equipment;
4
5/**
6 * The enumerated type whose elements represent the fighting types.
7 *
8 * @author lare96 <http://github.com/lare96>
9 */
10public enum FightType {
14
18
22
26
30
34
39
44
49
54
61
65
69
73
77
81
90
95
100
105
110
115
120
121
126
127
128
130
134
135
140
144
149
154
159
164
169
174
179
180 /* GHRAZI_STAB(390, 4, 1, 43, 0, 2282, Equipment.STAB_OFFENSE, FightStyle.ACCURATE),
181 GHRAZI_LUNGE(8145, 4, 1, 43, 1, 2285, Equipment.STAB_OFFENSE, FightStyle.AGGRESSIVE),
182 GHRAZI_SLASH(390, 4, 1, 43, 2, 2284, Equipment.SLASH_OFFENSE, FightStyle.AGGRESSIVE),
183 GHRAZI_BLOCK(8145, 4, 1, 43, 3, 2430, Equipment.STAB_OFFENSE, FightStyle.DEFENSIVE),*/
184
189
194
198
202
206
210
214
218
222
226
230
231 SCORCH(5247, 5, 1, 43, 0, 24078, Equipment.SLASH_OFFENSE, FightStyle.ACCURATE),
232 FLARE(5247, 5, 1, 43, 2, 24079, Equipment.RANGED_OFFENSE, FightStyle.ACCURATE),
233 BLAZE(5247, 5, 1, 43, 3, 24080, Equipment.MAGIC_OFFENSE, FightStyle.ACCURATE);
234
235 /** The animation executed when this type is active. */
236 private final int animation;
237
238 /** The attack delay. */
239 private final int delay;
240
241 /** The attack distance. */
242 private final int distance;
243
244 /** The parent config identification. */
245 private final int parent;
246
247 /** The child config identification. */
248 private final int child;
249
250 /** The style button identification. */
251 private final int button;
252
253 /** The type of bonus this global attributes to. */
254 private final int bonus;
255
256 /** The style active when this type is active. */
257 private final FightStyle style;
258
259 /**
260 * Creates a new {@link FightType}.
261 *
262 * @param animation the animation executed when this type is active
263 * @param delay the attack delay
264 * @param parent the parent config identification
265 * @param child the child config identification
266 * @param bonus the type of bonus this global will apply
267 * @param style the style active when this type is active
268 */
269 FightType(int animation, int delay, int distance, int parent, int child, int button, int bonus, FightStyle style) {
270 this.animation = animation;
271 this.delay = delay;
272 this.distance = distance;
273 this.parent = parent;
274 this.child = child;
275 this.button = button;
276 this.bonus = bonus;
277 this.style = style;
278 }
279
280 /**
281 * Determines the corresponding bonus for this fight type.
282 *
283 * @return the corresponding.
284 */
285 public final int getCorrespondingBonus() {
286 switch (getBonus()) {
296 return Equipment.STAB_DEFENSE;
297 default:
299 }
300 }
301
302 /**
303 * Gets the animation executed when this type is active.
304 *
305 * @return the animation executed
306 */
307 public final int getAnimation() {
308 return animation;
309 }
310
311 /**
312 * Gets the attack delay.
313 *
314 * @return the attack delay
315 */
316 public final int getDelay() {
317 return delay;
318 }
319
320 /**
321 * Gets the attack distance.
322 * @return the attack distance
323 */
324 public int getDistance() {
325 return distance;
326 }
327
328 /**
329 * Gets the parent config identification.
330 *
331 * @return the parent config
332 */
333 public final int getParent() {
334 return parent;
335 }
336
337 /**
338 * Gets the child config identification.
339 *
340 * @return the child config
341 */
342 public final int getChild() {
343 return child;
344 }
345
346 /**
347 * Gets the type of bonus this global will apply
348 *
349 * @return the bonus type
350 */
351 public final int getBonus() {
352 return bonus;
353 }
354
355 /**
356 * Gets the style active when this type is active.
357 *
358 * @return the fighting style
359 */
360 public final FightStyle getStyle() {
361 return style;
362 }
363
364 public int getButton() {
365 return button;
366 }
367}
The container that manages the equipment for a player.
static final int STAB_OFFENSE
Equipment bonus constants.
The enumerated type whose elements represent the fighting styles.
final int getChild()
Gets the child config identification.
final int animation
The animation executed when this type is active.
final int bonus
The type of bonus this global attributes to.
final int getAnimation()
Gets the animation executed when this type is active.
final int getCorrespondingBonus()
Determines the corresponding bonus for this fight type.
final int parent
The parent config identification.
final int getParent()
Gets the parent config identification.
final FightStyle getStyle()
Gets the style active when this type is active.
final FightStyle style
The style active when this type is active.
final int button
The style button identification.
final int getBonus()
Gets the type of bonus this global will apply.
final int child
The child config identification.
FightType(int animation, int delay, int distance, int parent, int child, int button, int bonus, FightStyle style)
Creates a new FightType.