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