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_ponman_idle, 0, x + shakex, y, 2, 2, 0, image_blend, 1); |
33 |
if (sleeping == 0) |
34 |
draw_sprite_ext(spr_ponman_eye, 0, x + 28 + eyex, y + 32 + eyey, 2, 2, 0, c_white, 1); |
35 |
if (sleeping == 1) |
36 |
{ |
37 |
scr_mercyaddscr_mercyaddfunction scr_mercyadd(arg0, arg1)
{
global.mercymod[arg0] += arg1;
if (global.mercymod[arg0] < 0)
global.mercymod[arg0] = 0;
} (myself, -100); |
38 |
sprite_index = spr_ponman_idle; |
39 |
image_index = 0; |
40 |
sleeping = 0; |
41 |
} |
42 |
} |
43 |
} |
44 |
if (state == 0) |
45 |
{ |
46 |
thissprite = spr_ponman_idle; |
47 |
this_index = image_index; |
48 |
if (sleeping == 1) |
49 |
{ |
50 |
thissprite = spr_ponman_appear; |
51 |
this_index = sleep_index; |
52 |
if (sleep_index > 0.5) |
53 |
sleep_index -= 0.25; |
54 |
} |
55 |
draw_sprite_ext(thissprite, this_index, x, y, 2, 2, 0, image_blend, 1); |
56 |
if (sleeping == 0) |
57 |
draw_sprite_ext(spr_ponman_eye, 0, x + 28 + eyex, y + 32 + eyey, 2, 2, 0, c_white, 1); |
58 |
if (flash == 1) |
59 |
{ |
60 |
fsiner += 1; |
61 |
d3d_set_fog(true, c_white, 0, 1); |
62 |
draw_sprite_ext(thissprite, this_index, x, y, 2, 2, 0, image_blend, (-cos(fsiner / 5) * 0.4) + 0.6); |
63 |
d3d_set_fog(false, c_black, 0, 0); |
64 |
} |
65 |
} |
66 |
if (becomeflash == 0) |
67 |
flash = 0; |
68 |
becomeflash = 0; |