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 |
if (global.flag[51 + myself] == 5) |
19 |
global.flag[524 hathy_susie_whacks] += 1; |
20 |
global.flag[521 hathy_violences] += 1; |
21 |
scr_defeatrunscr_defeatrunfunction scr_defeatrun()
{
defeatanim = instance_create(x, y, obj_defeatanim);
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();
} (); |
22 |
} |
23 |
hurtshake += 1; |
24 |
if (hurtshake > 1) |
25 |
{ |
26 |
if (shakex > 0) |
27 |
shakex -= 1; |
28 |
if (shakex < 0) |
29 |
shakex += 1; |
30 |
shakex = -shakex; |
31 |
hurtshake = 0; |
32 |
} |
33 |
draw_sprite_ext(spr_heartenemy_hurt, 0, x + shakex, y, 2, 2, 0, image_blend, 1); |
34 |
} |
35 |
} |
36 |
if (state == 0) |
37 |
{ |
38 |
siner += 1; |
39 |
thissprite = spr_heartenemy_idle; |
40 |
if (global.mercymod[myself] >= global.mercymax[myself]) |
41 |
thissprite = spr_heartenemy_spared; |
42 |
draw_sprite_ext(thissprite, siner / 5, x, y, 2, 2, 0, image_blend, 1); |
43 |
if (flash == 1) |
44 |
{ |
45 |
fsiner += 1; |
46 |
d3d_set_fog(true, c_white, 0, 1); |
47 |
draw_sprite_ext(thissprite, siner / 5, x, y, 2, 2, 0, image_blend, (-cos(fsiner / 5) * 0.4) + 0.6); |
48 |
d3d_set_fog(false, c_black, 0, 0); |
49 |
} |
50 |
} |
51 |
if (becomeflash == 0) |
52 |
flash = 0; |
53 |
becomeflash = 0; |