-
Notifications
You must be signed in to change notification settings - Fork 2
/
move.a
51 lines (41 loc) · 1.67 KB
/
move.a
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
include "types.a"
typedef Kind uses int;
public enrich Kind {
public static const Kind PHYSICAL = (Kind)0;
public static const Kind SPECIAL = (Kind)1;
private static string[2] kind_names;
static {
kind_names[0] = "PHYSICAL";
kind_names[1] = "SPECIAL";
}
public string toString() {
return kind_names[(int)this];
}
}
class Move {
public static Move GENERIC = new Move("Generic", 50, Type.NORMAL, Kind.PHYSICAL);
public static Move FLAMETHROWER = new Move("Flamethrower", 95, Type.FIRE, Kind.SPECIAL);
public static Move SHADOW_BALL = new Move("Shadow Ball", 80, Type.GHOST, Kind.SPECIAL);
public static Move HYDRO_PUMP = new Move("Hydro Pump", 120, Type.WATER, Kind.SPECIAL);
public static Move WATER_GUN = new Move("Water Gun", 40, Type.WATER, Kind.SPECIAL);
public static Move RAZOR_LEAF = new Move("Razor Leaf", 55, Type.GRASS, Kind.PHYSICAL);
public static Move BUBBLEBEAM = new Move("Bubblebeam", 65, Type.WATER, Kind.SPECIAL);
public static Move SPARK = new Move("Spark", 65, Type.ELECTRIC, Kind.SPECIAL);
// Name of this move.
public string name;
// Base power of the attack.
public int power;
// Type of the attack (one of 17).
public Type type;
// Physical or Special.
public Kind kind;
public Move(string name, int power, Type type, Kind kind) {
this.name = name;
this.power = power;
this.type = type;
this.kind = kind;
}
public string toString() {
return name + ", power " + (string) power + ", " + type.toString() + " type, " + kind.toString();
}
}