1 |
if (global.enemy_mode == 0) |
2 |
{ |
3 |
if (global.attack_repeat == false) |
4 |
{ |
5 |
if (global.attack_cycle < 2) |
6 |
global.attack_cycle++ |
7 |
else |
8 |
global.attack_repeat = true |
9 |
} |
10 |
else |
11 |
{ |
12 |
do |
13 |
{ |
14 |
global.attack_cycle = irandom_range(1, 2) |
15 |
} until (global.attack_cycle != global.attack_last); |
16 |
} |
17 |
} |
18 |
else if (global.enemy_mode == 1) |
19 |
{ |
20 |
if (global.attack_repeat == false) |
21 |
{ |
22 |
if (global.attack_cycle <= 2) |
23 |
global.attack_cycle = 3 |
24 |
else if (global.attack_cycle < 4) |
25 |
global.attack_cycle++ |
26 |
else |
27 |
global.attack_repeat = true |
28 |
} |
29 |
else |
30 |
{ |
31 |
do |
32 |
{ |
33 |
global.attack_cycle = irandom_range(3, 4) |
34 |
} until (global.attack_cycle != global.attack_last); |
35 |
} |
36 |
} |
37 |
else if (global.enemy_mode == 2) |
38 |
{ |
39 |
if (global.attack_repeat == false) |
40 |
{ |
41 |
if (global.attack_cycle <= 4) |
42 |
global.attack_cycle = 5 |
43 |
else if (global.attack_cycle < 6) |
44 |
global.attack_cycle++ |
45 |
else |
46 |
global.attack_repeat = true |
47 |
} |
48 |
else |
49 |
{ |
50 |
do |
51 |
{ |
52 |
global.attack_cycle = irandom_range(5, 6) |
53 |
} until (global.attack_cycle != global.attack_last); |
54 |
} |
55 |
} |
56 |
else if (global.enemy_mode == 3) |
57 |
{ |
58 |
if (global.attack_repeat == false) |
59 |
{ |
60 |
if (global.attack_cycle <= 6) |
61 |
global.attack_cycle = 7 |
62 |
else if (global.attack_cycle < 8) |
63 |
global.attack_cycle++ |
64 |
else |
65 |
global.attack_repeat = true |
66 |
} |
67 |
else |
68 |
{ |
69 |
do |
70 |
{ |
71 |
global.attack_cycle = irandom_range(7, 8) |
72 |
} until (global.attack_cycle != global.attack_last); |
73 |
} |
74 |
} |
75 |
else if (global.enemy_mode == 4) |
76 |
{ |
77 |
if (global.attack_repeat == false) |
78 |
{ |
79 |
if (global.attack_cycle <= 8) |
80 |
global.attack_cycle = 9 |
81 |
else if (global.attack_cycle < 10) |
82 |
global.attack_cycle++ |
83 |
else |
84 |
global.attack_repeat = true |
85 |
} |
86 |
else |
87 |
{ |
88 |
do |
89 |
{ |
90 |
global.attack_cycle = irandom_range(9, 10) |
91 |
} until (global.attack_cycle != global.attack_last); |
92 |
} |
93 |
} |
94 |
else if (global.enemy_mode == 5) |
95 |
{ |
96 |
if (global.attack_repeat == false) |
97 |
{ |
98 |
if (global.attack_cycle <= 10) |
99 |
global.attack_cycle = 11 |
100 |
else if (global.attack_cycle < 12) |
101 |
global.attack_cycle++ |
102 |
else |
103 |
global.attack_repeat = true |
104 |
} |
105 |
else |
106 |
{ |
107 |
do |
108 |
{ |
109 |
global.attack_cycle = irandom_range(11, 12) |
110 |
} until (global.attack_cycle != global.attack_last); |
111 |
} |
112 |
} |
113 |
else if (global.enemy_mode == 6) |
114 |
{ |
115 |
if (global.attack_repeat == false) |
116 |
{ |
117 |
if (global.attack_cycle <= 12) |
118 |
global.attack_cycle = 13 |
119 |
else if (global.attack_cycle < 14) |
120 |
global.attack_cycle++ |
121 |
else |
122 |
global.attack_repeat = true |
123 |
} |
124 |
else |
125 |
{ |
126 |
do |
127 |
{ |
128 |
global.attack_cycle = irandom_range(13, 14) |
129 |
} until (global.attack_cycle != global.attack_last); |
130 |
} |
131 |
} |
132 |
else if (global.enemy_mode == 7) |
133 |
{ |
134 |
if (global.attack_repeat == false) |
135 |
{ |
136 |
if (global.attack_cycle <= 14) |
137 |
global.attack_cycle = 15 |
138 |
else if (global.attack_cycle < 16) |
139 |
global.attack_cycle++ |
140 |
else |
141 |
global.attack_repeat = true |
142 |
} |
143 |
else |
144 |
{ |
145 |
do |
146 |
{ |
147 |
global.attack_cycle = irandom_range(15, 16) |
148 |
} until (global.attack_cycle != global.attack_last); |
149 |
} |
150 |
} |
151 |
global.attack_last = global.attack_cycle |