1 | if (active == 1) |
2 | { |
3 | if (global.inv < 0) |
4 | { |
5 | instance_create(0, 0, obj_shake); |
6 | snd_stop(snd_hurt1); |
7 | snd_play(snd_hurt1); |
8 | global.inv = global.invc * 40; |
9 | for (i = 0; i < 3; i += 1) |
10 | { |
11 | temphp[i] = global.hp[global.char[i]]; |
12 | if (temphp[i] < 0) |
13 | temphp[i] = 0; |
14 | } |
15 | if ((ceil(temphp[0] + temphp[1] + temphp[2]) / 3) >= 10) |
16 | { |
17 | for (i = 0; i < 3; i += 1) |
18 | { |
19 | if (temphp[i] > 0) |
20 | global.hp[global.char[i]] = ceil(global.hp[global.char[i]] * 0.7); |
21 | } |
22 | } |
23 | else |
24 | { |
25 | scr_damage_all |
26 | } |
27 | } |
28 | } |