1 |
function scr_damage_determination_bossscr_damage_determination_bossfunction scr_damage_determination_boss(arg0)
{
switch (arg0)
{
case "Gun Single":
global.attacking_damage_stat_betrayal = global.current_hp_enemy;
global.attacking_damage_stat_critical = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + 2) * 2.5);
r = random_range(0, 2);
switch (shot_type)
{
case "strong":
b = 2.5;
break;
case "medium":
b = 2;
break;
default:
b = 1.5;
}
global.attacking_damage_stat = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + r) * b);
break;
case "Gun Multi":
global.attacking_damage_stat_betrayal = global.current_hp_enemy;
global.attacking_damage_stat_critical = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + 2) * 2.5);
r = random_range(0, 2);
b = 1.5;
var b_diff = 1 / circle_count;
var st_temp;
for (st_temp = shot_total; st_temp > 3; st_temp -= 3)
b += b_diff;
switch (st_temp)
{
case 3:
b += b_diff;
break;
case 2:
b += (0.8 * b_diff);
break;
default:
b += (0.6 * b_diff);
}
global.attacking_damage_stat = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + r) * clamp(b, 1.5, 3));
break;
case "Revolver Single":
global.attacking_damage_stat_betrayal = global.current_hp_enemy;
global.attacking_damage_stat_critical = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + 2) * 3.5);
r = random_range(0, 2);
b = 0;
var b_inc = 0.5833333333333334;
switch (shot_type)
{
case "strong":
b += b_inc;
break;
case "medium":
b += (b_inc * 0.5);
break;
default:
b = 0;
}
var st_temp;
for (st_temp = shot_total_pre; st_temp > 3; st_temp -= 3)
b += b_inc;
switch (st_temp)
{
case 3:
b += b_inc;
break;
case 2:
b += (b_inc * 0.5);
break;
default:
b += 0;
}
global.attacking_damage_stat = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + r) * b);
break;
case "Revolver Multi":
global.attacking_damage_stat_betrayal = global.current_hp_enemy;
global.attacking_damage_stat_critical = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + 2) * 3.5);
r = random_range(0, 2);
b = 0;
var b_inc = 0.5833333333333334;
var st_temp;
for (st_temp = shot_total; st_temp > 3; st_temp -= 3)
b += b_inc;
switch (st_temp)
{
case 3:
b += b_inc;
break;
case 2:
b += (b_inc / 2);
break;
default:
b += 0;
}
for (st_temp = shot_total_pre; st_temp > 3; st_temp -= 3)
b += b_inc;
switch (st_temp)
{
case 3:
... (arg0) |
2 |
{ |
3 |
switch (arg0) |
4 |
{ |
5 |
case "Gun Single": |
6 |
global.attacking_damage_stat_betrayal = global.current_hp_enemy; |
7 |
global.attacking_damage_stat_critical = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + 2) * 2.5); |
8 |
r = random_range(0, 2); |
9 |
switch (shot_type) |
10 |
{ |
11 |
case "strong": |
12 |
b = 2.5; |
13 |
break; |
14 |
case "medium": |
15 |
b = 2; |
16 |
break; |
17 |
default: |
18 |
b = 1.5; |
19 |
} |
20 |
global.attacking_damage_stat = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + r) * b); |
21 |
break; |
22 |
case "Gun Multi": |
23 |
global.attacking_damage_stat_betrayal = global.current_hp_enemy; |
24 |
global.attacking_damage_stat_critical = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + 2) * 2.5); |
25 |
r = random_range(0, 2); |
26 |
b = 1.5; |
27 |
var b_diff = 1 / circle_count; |
28 |
var st_temp; |
29 |
for (st_temp = shot_total; st_temp > 3; st_temp -= 3) |
30 |
b += b_diff; |
31 |
switch (st_temp) |
32 |
{ |
33 |
case 3: |
34 |
b += b_diff; |
35 |
break; |
36 |
case 2: |
37 |
b += (0.8 * b_diff); |
38 |
break; |
39 |
default: |
40 |
b += (0.6 * b_diff); |
41 |
} |
42 |
global.attacking_damage_stat = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + r) * clamp(b, 1.5, 3)); |
43 |
break; |
44 |
case "Revolver Single": |
45 |
global.attacking_damage_stat_betrayal = global.current_hp_enemy; |
46 |
global.attacking_damage_stat_critical = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + 2) * 3.5); |
47 |
r = random_range(0, 2); |
48 |
b = 0; |
49 |
var b_inc = 0.5833333333333334; |
50 |
switch (shot_type) |
51 |
{ |
52 |
case "strong": |
53 |
b += b_inc; |
54 |
break; |
55 |
case "medium": |
56 |
b += (b_inc * 0.5); |
57 |
break; |
58 |
default: |
59 |
b = 0; |
60 |
} |
61 |
var st_temp; |
62 |
for (st_temp = shot_total_pre; st_temp > 3; st_temp -= 3) |
63 |
b += b_inc; |
64 |
switch (st_temp) |
65 |
{ |
66 |
case 3: |
67 |
b += b_inc; |
68 |
break; |
69 |
case 2: |
70 |
b += (b_inc * 0.5); |
71 |
break; |
72 |
default: |
73 |
b += 0; |
74 |
} |
75 |
global.attacking_damage_stat = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + r) * b); |
76 |
break; |
77 |
case "Revolver Multi": |
78 |
global.attacking_damage_stat_betrayal = global.current_hp_enemy; |
79 |
global.attacking_damage_stat_critical = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + 2) * 3.5); |
80 |
r = random_range(0, 2); |
81 |
b = 0; |
82 |
var b_inc = 0.5833333333333334; |
83 |
var st_temp; |
84 |
for (st_temp = shot_total; st_temp > 3; st_temp -= 3) |
85 |
b += b_inc; |
86 |
switch (st_temp) |
87 |
{ |
88 |
case 3: |
89 |
b += b_inc; |
90 |
break; |
91 |
case 2: |
92 |
b += (b_inc / 2); |
93 |
break; |
94 |
default: |
95 |
b += 0; |
96 |
} |
97 |
for (st_temp = shot_total_pre; st_temp > 3; st_temp -= 3) |
98 |
b += b_inc; |
99 |
switch (st_temp) |
100 |
{ |
101 |
case 3: |
102 |
b += b_inc; |
103 |
break; |
104 |
case 2: |
105 |
b += (b_inc / 2); |
106 |
break; |
107 |
default: |
108 |
b += 0; |
109 |
} |
110 |
global.attacking_damage_stat = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + r) * b); |
111 |
break; |
112 |
default: |
113 |
global.attacking_damage_stat_betrayal = global.current_hp_enemy; |
114 |
global.attacking_damage_stat_critical = round((((global.player_weapon_attack + global.player_weapon_modifier_attack + global.player_attack) - global.enemy_defense_stat) + 2) * 2.2); |
115 |
r = random_range(0, 2); |
116 |
if (x == 319) |
117 |
b = 2.2; |
118 |
else |
119 |
b = abs(x - 319) / (obj_target_battle.sprite_width / 2); |
120 |
global.attacking_damage_stat = round((((global.player_weapon_attack + global.player_attack) - global.enemy_defense_stat) + r) * b); |
121 |
} |
122 |
if (global.attacking_damage_cap >= 0) |
123 |
{ |
124 |
if (global.attacking_damage_stat > global.attacking_damage_cap) |
125 |
global.attacking_damage_stat = global.attacking_damage_cap; |
126 |
if (global.attacking_damage_stat_critical > global.attacking_damage_cap) |
127 |
global.attacking_damage_stat_critical = global.attacking_damage_cap; |
128 |
} |
129 |
if (global.attacking_damage_stat < 5) |
130 |
global.attacking_damage_stat = 5; |
131 |
if (global.attacking_damage_stat_critical < 5) |
132 |
global.attacking_damage_stat_critical = 5; |
133 |
var boss_mini = global.boss_mini; |
134 |
if (button_pressed == true) |
135 |
{ |
136 |
if (global.enemy_sparing == true && global.enemy_vulnerable == true) |
137 |
{ |
138 |
global.last_hp_enemy = global.current_hp_enemy; |
139 |
global.current_hp_enemy = 0; |
140 |
global.enemy_betrayed = true; |
141 |
damage_type = "betrayed"; |
142 |
if (boss_mini == true) |
143 |
instance_create(global.enemy_damage_x, global.enemy_damage_y, obj_text_damage_count); |
144 |
else |
145 |
instance_create(319, 120, obj_text_damage_count); |
146 |
audio_play_sound(snd_monster_damage_hit_critical, 20, false); |
147 |
} |
148 |
else if (global.enemy_vulnerable == true) |
149 |
{ |
150 |
if ((arg0 == "Knife Single" && x == 319) || ((arg0 == "Gun Single" || arg0 == "Revolver Single") && b == 3.5) || ((arg0 == "Gun Multi" || arg0 == "Revolver Multi") && b == 3.5) || global.current_hp_enemy <= global.attacking_damage_stat_critical) |
151 |
{ |
152 |
global.last_hp_enemy = global.current_hp_enemy; |
153 |
global.current_hp_enemy -= global.attacking_damage_stat_critical; |
154 |
damage_type = "critical"; |
155 |
if (boss_mini == true) |
156 |
instance_create(global.enemy_damage_x, global.enemy_damage_y, obj_text_damage_count); |
157 |
else |
158 |
instance_create(319, 120, obj_text_damage_count); |
159 |
audio_play_sound(snd_monster_damage_hit_critical, 20, false); |
160 |
} |
161 |
else |
162 |
{ |
163 |
global.last_hp_enemy = global.current_hp_enemy; |
164 |
global.current_hp_enemy -= global.attacking_damage_stat; |
165 |
damage_type = "normal"; |
166 |
if (boss_mini == true) |
167 |
instance_create(global.enemy_damage_x, global.enemy_damage_y, obj_text_damage_count); |
168 |
else |
169 |
instance_create(319, 120, obj_text_damage_count); |
170 |
audio_play_sound(snd_monster_damage_hit, 20, false); |
171 |
} |
172 |
} |
173 |
else if (boss_mini == true) |
174 |
{ |
175 |
instance_create(global.enemy_damage_x, global.enemy_damage_y, obj_text_miss); |
176 |
} |
177 |
else |
178 |
{ |
179 |
instance_create(319, 120, obj_text_miss); |
180 |
} |
181 |
} |
182 |
else if (boss_mini == true) |
183 |
{ |
184 |
instance_create(global.enemy_damage_x, global.enemy_damage_y, obj_text_miss); |
185 |
} |
186 |
else |
187 |
{ |
188 |
instance_create(319, 120, obj_text_miss); |
189 |
} |
190 |
instance_create(0, 0, obj_battle_boss_attacking_code); |
191 |
if (instance_exists(obj_text_damage_count)) |
192 |
{ |
193 |
if (boss_mini == true) |
194 |
{ |
195 |
instance_create(obj_text_damage_count.x - 52, obj_text_damage_count.y + 26, obj_battle_hp_current_boss_attacking_mini); |
196 |
instance_create(obj_text_damage_count.x - 52, obj_text_damage_count.y + 26, obj_battle_hp_previous_boss_attacking_mini); |
197 |
instance_create(obj_text_damage_count.x - 52, obj_text_damage_count.y + 26, obj_battle_hp_max_boss_attacking_mini); |
198 |
} |
199 |
else if (global.battle_enemy_name != "ceroba") |
200 |
{ |
201 |
instance_create(192, 152, obj_battle_hp_current_boss_attacking); |
202 |
instance_create(192, 152, obj_battle_hp_previous_boss_attacking); |
203 |
instance_create(192, 152, obj_battle_hp_max_boss_attacking); |
204 |
} |
205 |
} |
206 |
scr_determine_can_display_damage_uiscr_determine_can_display_damage_uifunction scr_determine_can_display_damage_ui(arg0)
{
hp_ui_alpha = 1;
damage_ui_alpha = 1;
miss_ui_alpha = 1;
if (arg0 == 1)
{
var game_mode = global.game_mode;
var battle_enemy_name = global.battle_enemy_name;
if (global.game_mode == "customs")
{
switch (battle_enemy_name)
{
default:
}
}
else if (global.game_mode == "yellow")
{
switch (battle_enemy_name)
{
case "dummy training pacifist":
hp_ui_alpha = 0;
damage_ui_alpha = 0;
break;
default:
}
}
}
if (arg0 == 2)
{
var game_mode = global.game_mode;
var battle_enemy_name = global.battle_enemy_name_2;
if (global.game_mode == "customs")
{
switch (battle_enemy_name)
{
default:
}
}
else if (global.game_mode == "yellow")
{
switch (battle_enemy_name)
{
default:
}
}
}
if (arg0 == 3)
{
var game_mode = global.game_mode;
var battle_enemy_name = global.battle_enemy_name_3;
if (global.game_mode == "customs")
{
switch (battle_enemy_name)
{
default:
}
}
else if (global.game_mode == "yellow")
{
switch (battle_enemy_name)
{
default:
}
}
}
if (instance_exists(obj_battle_hp_enemy_attacking_parent))
{
with (obj_battle_hp_enemy_attacking_parent)
image_alpha = obj_target_bar_battle.hp_ui_alpha;
}
if (instance_exists(obj_text_damage_count))
{
with (obj_text_damage_count)
image_alpha = obj_target_bar_battle.damage_ui_alpha;
}
if (instance_exists(obj_text_miss))
{
with (obj_text_miss)
image_alpha = obj_target_bar_battle.miss_ui_alpha;
}
} (1); |
207 |
if (global.current_hp_enemy <= global.attacking_damage_stat_critical && instance_exists(obj_text_damage_count)) |
208 |
global.enemy_low_hp = true; |
209 |
if (instance_exists(obj_text_damage_count)) |
210 |
script_execute(scr_determine_hit_special_effect_boss); |
211 |
if (instance_exists(obj_text_fighting_parent)) |
212 |
script_execute(scr_determine_attack_bonus); |
213 |
} |