1 |
if (state == 3) |
2 |
{ |
3 |
if (hurttimer > 0) |
4 |
{ |
5 |
hurttimer = 0; |
6 |
body.condition = 1; |
7 |
body.siner = 0; |
8 |
body.maxdist += 20 + (hurtamt / 5); |
9 |
if (body.maxdist < 30) |
10 |
body.maxdist = 30; |
11 |
mhpratio = global.monsterhp[myself] / global.monstermaxhp[myself]; |
12 |
body.floatsinerspeed = 1 + (1 - mhpratio); |
13 |
if (mhpratio <= 0.8 && body.dancelv == 0) |
14 |
body.dancelv = 1; |
15 |
if (mhpratio <= 0.4 && jturn < 17) |
16 |
body.dancelv = 3; |
17 |
if (mhpratio <= 0.2 && jturn == 17) |
18 |
body.dancelv = 2; |
19 |
if (mhpratio <= 0) |
20 |
{ |
21 |
event_user(10); |
22 |
global.flag[241 JEVIL_plot] = 6; |
23 |
} |
24 |
if (instance_exists(obj_jokerbg_triangle_real)) |
25 |
{ |
26 |
if (mhpratio > 0) |
27 |
obj_jokerbg_triangle_real.rotspeed = 1 + (1.5 - (mhpratio * 1.5)); |
28 |
} |
29 |
laughnoise = choose(0, 1, 2); |
30 |
if (laughnoise == 0) |
31 |
snd_play(snd_joker_laugh0); |
32 |
if (laughnoise == 1) |
33 |
snd_play(snd_joker_ha1); |
34 |
if (laughnoise == 2) |
35 |
snd_play(snd_joker_ha0); |
36 |
} |
37 |
hurttimer -= 1; |
38 |
if (hurttimer < 0) |
39 |
{ |
40 |
state = 0; |
41 |
} |
42 |
else if (global.monster[myself] == 0) |
43 |
{ |
44 |
} |
45 |
} |
46 |
if (state == 0) |
47 |
{ |
48 |
siner += 1; |
49 |
thissprite = idlesprite; |
50 |
if (flash == 1) |
51 |
{ |
52 |
fsiner += 1; |
53 |
body.fsiner = fsiner; |
54 |
with (body) |
55 |
{ |
56 |
d3d_set_fog(true, c_white, 0, 1); |
57 |
if (dancelv == 0) |
58 |
draw_sprite_ext(spr_joker_main, 0, offx + flyx, offy + fly, 2, 2, 0, image_blend, (-cos(fsiner / 5) * 0.4) + 0.6); |
59 |
if (dancelv == 1) |
60 |
draw_sprite_ext(spr_joker_dance, floatsiner / 3, offx + flyx, offy + fly, 2, 2, 0, image_blend, (-cos(fsiner / 5) * 0.4) + 0.6); |
61 |
if (dancelv == 2) |
62 |
draw_sprite_ext(spr_joker_tired, 0, offx + flyx, offy + fly, 2, 2, 0, image_blend, (-cos(fsiner / 5) * 0.4) + 0.6); |
63 |
d3d_set_fog(false, c_black, 0, 0); |
64 |
} |
65 |
} |
66 |
} |
67 |
if (becomeflash == 0) |
68 |
flash = 0; |
69 |
becomeflash = 0; |