1 |
if (state == 3) |
2 |
{ |
3 |
if (global.monsterhp[myself] <= (global.monstermaxhp[myself] / 2)) |
4 |
{ |
5 |
global.monsterstatus[myself] = 1; |
6 |
if (global.monstercomment[myself] == " ") |
7 |
global.monstercomment[myself] = ; |
8 |
} |
9 |
hurttimer -= 1; |
10 |
if (hurttimer < 0) |
11 |
{ |
12 |
state = 0; |
13 |
} |
14 |
else |
15 |
{ |
16 |
if (global.monster[myself] == 0) |
17 |
scr_defeatrun_ch1scr_defeatrun_ch1function scr_defeatrun_ch1()
{
defeatanim = instance_create_ch1(x, y, obj_defeatanim_ch1);
defeatanim.sprite_index = sprite_index;
defeatanim.sprite_index = hurtsprite;
defeatanim.image_index = 0;
defeatanim.image_xscale = image_xscale;
defeatanim.image_yscale = image_yscale;
instance_destroy();
} (); |
18 |
hurtshake += 1; |
19 |
if (hurtshake > 1) |
20 |
{ |
21 |
if (shakex > 0) |
22 |
shakex -= 1; |
23 |
if (shakex < 0) |
24 |
shakex += 1; |
25 |
shakex = -shakex; |
26 |
hurtshake = 0; |
27 |
} |
28 |
draw_sprite_ext(hurtsprite, 0, x + shakex, y, 2, 2, 0, image_blend, 1); |
29 |
} |
30 |
} |
31 |
if (state == 0) |
32 |
{ |
33 |
siner += 1; |
34 |
thissprite = idlesprite; |
35 |
if (global.mercymod[myself] >= global.mercymax[myself]) |
36 |
thissprite = sparedsprite; |
37 |
draw_sprite_ext(thissprite, siner / 6, x, y, 2, 2, 0, image_blend, 1); |
38 |
if (flash == 1) |
39 |
{ |
40 |
fsiner += 1; |
41 |
d3d_set_fog_ch1(true, 16777215, 0, 1); |
42 |
draw_sprite_ext(thissprite, siner / 6, x, y, 2, 2, 0, image_blend, (-cos(fsiner / 5) * 0.4) + 0.6); |
43 |
d3d_set_fog_ch1(false, 0, 0, 0); |
44 |
} |
45 |
} |
46 |
if (becomeflash == 0) |
47 |
flash = 0; |
48 |
becomeflash = 0; |