1 |
if (state == 3) |
2 |
{ |
3 |
if (global.monsterhp[myself] <= (global.monstermaxhp[myself] / 3)) |
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 |
{ |
18 |
hspeed = 12; |
19 |
turnt -= 8; |
20 |
vspeed = -4; |
21 |
} |
22 |
hurtshake += 1; |
23 |
if (hurtshake > 1) |
24 |
{ |
25 |
if (shakex > 0) |
26 |
shakex -= 1; |
27 |
if (shakex < 0) |
28 |
shakex += 1; |
29 |
shakex = -shakex; |
30 |
hurtshake = 0; |
31 |
} |
32 |
draw_sprite_ext(spr_smallchecker_hurt, 0, x + shakex, y, 2, 2, 0, image_blend, 1); |
33 |
} |
34 |
} |
35 |
if (state == 0) |
36 |
{ |
37 |
siner += 1; |
38 |
thissprite = spr_smallchecker_idle; |
39 |
if (global.mercymod[myself] >= global.mercymax[myself]) |
40 |
thissprite = spr_smallchecker_run; |
41 |
draw_sprite_ext(thissprite, siner / 3, x, y, 2, 2, 0, image_blend, 1); |
42 |
if (flash == 1) |
43 |
{ |
44 |
fsiner += 1; |
45 |
d3d_set_fog(true, c_white, 0, 1); |
46 |
draw_sprite_ext(thissprite, siner / 3, x, y, 2, 2, 0, image_blend, (-cos(fsiner / 5) * 0.4) + 0.6); |
47 |
d3d_set_fog(false, c_black, 0, 0); |
48 |
} |
49 |
} |
50 |
if (becomeflash == 0) |
51 |
flash = 0; |
52 |
becomeflash = 0; |