1 |
if (state == 3) |
2 |
{ |
3 |
hurttimer -= 1; |
4 |
if (hurttimer < 0) |
5 |
{ |
6 |
state = 0; |
7 |
} |
8 |
else |
9 |
{ |
10 |
if (global.monster[myself] == 0) |
11 |
{ |
12 |
hspeed = 12; |
13 |
turnt -= 8; |
14 |
vspeed = -4; |
15 |
} |
16 |
hurtshake += 1; |
17 |
if (hurtshake > 1) |
18 |
{ |
19 |
if (shakex > 0) |
20 |
shakex -= 1; |
21 |
if (shakex < 0) |
22 |
shakex += 1; |
23 |
shakex = -shakex; |
24 |
hurtshake = 0; |
25 |
} |
26 |
draw_sprite_ext(spr_enemy1_hurt, 0, x + shakex, y, 2, 2, turnt, image_blend, 1); |
27 |
} |
28 |
} |
29 |
if (state == 0) |
30 |
{ |
31 |
siner += 1; |
32 |
thissprite = spr_enemy1_idle; |
33 |
if (global.mercymod[myself] >= global.mercymax[myself]) |
34 |
thissprite = spr_enemy1_spared; |
35 |
draw_sprite_ext(thissprite, siner / 5, x, y, 2, 2, 0, image_blend, 1); |
36 |
if (flash == 1) |
37 |
{ |
38 |
fsiner += 1; |
39 |
d3d_set_fog(true, c_white, 0, 1); |
40 |
draw_sprite_ext(thissprite, siner / 5, x, y, 2, 2, 0, image_blend, (-cos(fsiner / 5) * 0.4) + 0.6); |
41 |
d3d_set_fog(false, c_black, 0, 0); |
42 |
} |
43 |
} |
44 |
if (becomeflash == 0) |
45 |
flash = 0; |
46 |
becomeflash = 0; |