1 |
thisnum = dmg; |
2 |
if (thisnum >= 0) |
3 |
{ |
4 |
place = 0; |
5 |
numadd = 10; |
6 |
if (thisnum >= numadd) |
7 |
{ |
8 |
while (thisnum >= numadd) |
9 |
{ |
10 |
place += 1; |
11 |
numadd *= 10; |
12 |
} |
13 |
} |
14 |
} |
15 |
else |
16 |
{ |
17 |
thisnum = 0; |
18 |
place = 0; |
19 |
} |
20 |
thisnum2 = thisnum; |
21 |
for (i = place; i >= 0; i -= 1) |
22 |
{ |
23 |
numnum[i] = floor(thisnum2 / power(10, i)); |
24 |
thisnum2 -= (numnum[i] * power(10, i)); |
25 |
} |
26 |
if (thisnum > 0) |
27 |
{ |
28 |
if (drawbar == 1) |
29 |
{ |
30 |
draw_set_color(c_black); |
31 |
ossafe_fill_rectangle(x - 1, ystart + 7, x + round((global.monstermaxhp[global.mytarget] * stretchfactor) + 1), ystart + 21); |
32 |
draw_set_color(c_dkgray); |
33 |
ossafe_fill_rectangle(x, ystart + 8, x + round(global.monstermaxhp[global.mytarget] * stretchfactor), ystart + 20); |
34 |
draw_set_color(c_lime); |
35 |
if (apparenthp > 0) |
36 |
ossafe_fill_rectangle(x, ystart + 8, round(x + (apparenthp * stretchfactor)), ystart + 20); |
37 |
} |
38 |
for (i = place; i >= 0; i -= 1) |
39 |
{ |
40 |
draw_set_color(c_red); |
41 |
if (stretchwidth <= 120) |
42 |
draw_sprite_ext(spr_dmgnum_o, numnum[i], ((x + 30) - (i * 32)) + (place * 16), y - 28, 1, 1, 0, c_red, 1); |
43 |
else |
44 |
draw_sprite_ext(spr_dmgnum_o, numnum[i], (((x - 30) + (stretchwidth / 2)) - (i * 32)) + (place * 16), y - 28, 1, 1, 0, c_red, 1); |
45 |
} |
46 |
} |
47 |
if (thisnum == 0) |
48 |
{ |
49 |
draw_set_color(c_white); |
50 |
if (special == 0) |
51 |
draw_sprite_ext(spr_dmgmiss_o, 0, x - 10, y - 16, 1, 1, 0, c_ltgray, 1); |
52 |
if (special == 1) |
53 |
{ |
54 |
draw_set_color(c_red); |
55 |
scr_setfontscr_setfontvar newfont = argument0;
if (global.language == "ja")
{
if (newfont == fnt_main)
newfont = fnt_ja_main;
if (newfont == fnt_maintext)
newfont = fnt_ja_maintext;
if (newfont == fnt_plain)
newfont = fnt_ja_plain;
}
draw_set_font(newfont); (fnt_main); |
56 |
ex = choose(0, 1, 2, 3, 4, 5); |
57 |
draw_text(x - 10, y - 10, scr_gettextscr_gettextvar text_id = argument[0];
var text = ds_map_find_value(global.text_data_en, text_id);
if (is_undefined(text))
text = "";
if (global.language == "ja")
{
var loc_text = ds_map_find_value(global.text_data_ja, text_id);
if (!is_undefined(loc_text))
text = loc_text;
}
for (var i = 1; i <= (string_length(text) - 3); i++)
{
if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]")
{
var sel = string_char_at(text, i + 2);
var replace;
if (sel == "C")
replace = global.charname;
else if (sel == "G")
replace = string(global.gold);
else if (sel == "I")
replace = global.itemname[global.menucoord[1]];
else if (sel == "1" && argument_count > 1)
replace = argument[1];
else if (sel == "2" && argument_count > 2)
replace = argument[2];
else if (sel == "3" && argument_count > 3)
replace = argument[3];
else if (sel == "4" && argument_count > 4)
replace = argument[4];
else if (sel == "5" && argument_count > 5)
replace = argument[5];
else if (sel == "6" && argument_count > 6)
replace = argument[6];
else if (sel == "7" && argument_count > 7)
replace = argument[7];
else if (sel == "8" && argument_count > 8)
replace = argument[8];
else if (sel == "9" && argument_count > 9)
replace = argument[9];
else
replace = "";
var before = string_copy(text, 1, i - 1);
var after = string_copy(text, i + 4, string_length(text));
text = before + replace + after;
i += (string_length(replace) - 1);
}
}
return text; ("damage_special_" + string(ex))); |
58 |
} |
59 |
} |
60 |
if (y > ystart) |
61 |
{ |
62 |
y = ystart; |
63 |
vspeed = 0; |
64 |
gravity = 0; |
65 |
} |