blob: 33d4e652c19d72c4c68cf1c1a17eb32a9e1b769e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package NET.worlds.scape;
public class InventoryAction extends InventoryItem {
public InventoryAction(String id, String name) {
super(id, name);
}
public InventoryAction(String id, String name, int qty) {
super(id, name, qty);
}
public InventoryAction(InventoryAction in) {
super(in);
}
@Override
public InventoryItem cloneItem() {
return new InventoryAction(this);
}
public static InventoryAction createAction(String id, String name, int qty) {
return (InventoryAction)(id.equals("H") ? new HighJump(id, name, qty) : new InventoryAction(id, name, qty));
}
public boolean doAction() {
return true;
}
}
|