RuneHive-Game
Loading...
Searching...
No Matches
Crossbow.java
Go to the documentation of this file.
1package com.runehive.content.skill.impl.fletching.impl;
2
3import com.runehive.content.skill.impl.fletching.Fletchable;
4import com.runehive.content.skill.impl.fletching.FletchableItem;
5import com.runehive.content.skill.impl.fletching.Fletching;
6import com.runehive.game.world.items.Item;
7public enum Crossbow implements Fletchable {
8 BRONZE_CROSSBOW(new Item(9440), new Item(9420), new FletchableItem(new Item(9454), 9, 12.0)),
9 IRON_CROSSBOW(new Item(9444), new Item(9423), new FletchableItem(new Item(9457), 39, 44.0)),
10 STEEL_CROSSBOW(new Item(9446), new Item(9425), new FletchableItem(new Item(9459), 46, 54.0)),
11 MITHRIL_CROSSBOW(new Item(9448), new Item(9427), new FletchableItem(new Item(9461), 54, 64.0)),
12 ADAMANT_CROSSBOW(new Item(9450), new Item(9429), new FletchableItem(new Item(9463), 61, 82.0)),
13 RUNE_CROSSBOW(new Item(9452), new Item(9431), new FletchableItem(new Item(9465), 69, 100.0));
14
15 private final Item use;
16 private final Item with;
17 private final FletchableItem[] items;
18
20 this.use = use;
21 this.with = with;
22 this.items = items;
23 }
24
25 public static void load() {
26 for (Crossbow cuttable : values()) {
27 Fletching.addFletchable(cuttable);
28 }
29 }
30
31 @Override
32 public int getAnimation() {
33 switch (this) {
34 case BRONZE_CROSSBOW:
35 return 4436;
36 case IRON_CROSSBOW:
37 return 4438;
38 case STEEL_CROSSBOW:
39 return 4439;
41 return 4440;
43 return 4441;
44 case RUNE_CROSSBOW:
45 return 4442;
46 default:
47 return 4436;
48 }
49 }
50
51 @Override
52 public int getGraphics() {
53 return -1;
54 }
55
56 @Override
57 public Item getUse() {
58 return use;
59 }
60
61 @Override
62 public Item getWith() {
63 return with;
64 }
65
66 @Override
68 return items;
69 }
70
71 @Override
72 public String getProductionMessage() {
73 return null;
74 }
75
76 @Override
77 public Item[] getIngredients() {
78 return new Item[] { use, with };
79 }
80}
static void addFletchable(Fletchable fletchable)
The container class that represents an item that can be interacted with.
Definition Item.java:21
Crossbow(Item use, Item with, FletchableItem... items)
Definition Crossbow.java:19