1 |
exit; |
2 |
if (!active) |
3 |
exit; |
4 |
if (instance_exists(obj_pipis_controller)) |
5 |
exit; |
6 |
if (instance_exists(obj_sneo_phonecall)) |
7 |
exit; |
8 |
if (instance_exists(obj_sneo_bulletcontroller) && obj_sneo_bulletcontroller.type == 1) |
9 |
exit; |
10 |
if (instance_exists(obj_sneo_bulletcontroller) && obj_sneo_bulletcontroller.type == 8) |
11 |
exit; |
12 |
with (obj_spamton_neo_enemy) |
13 |
{ |
14 |
if (instance_exists(obj_sneo_bulletcontroller) && obj_sneo_bulletcontroller.type != 1.5) |
15 |
hitcon = 1; |
16 |
} |
17 |
var a = random(45); |
18 |
repeat (8) |
19 |
{ |
20 |
part = instance_create(other.x, other.y, obj_yheart_sneo_particle); |
21 |
part.direction = a + random(15); |
22 |
part.speed = 8; |
23 |
part.friction = 0.8; |
24 |
a += 45; |
25 |
} |
26 |
if (global.monsterhp[obj_spamton_neo_enemy.myself] == global.monstermaxhp[obj_spamton_neo_enemy.myself]) |
27 |
{ |
28 |
if (other.big == 1) |
29 |
{ |
30 |
with (obj_spamton_neo_enemy) |
31 |
{ |
32 |
if (instance_exists(obj_sneo_bulletcontroller) && obj_sneo_bulletcontroller.type == 1.5) |
33 |
{ |
34 |
obj_sneo_bulletcontroller.mercyaccumulated += 1; |
35 |
__mercydmgwriter = instance_create(global.monsterx[myself], (global.monstery[myself] + 20) - (global.hittarget[myself] * 20), obj_dmgwriter); |
36 |
__mercydmgwriter.damage = 1; |
37 |
__mercydmgwriter.type = 5; |
38 |
global.hittarget[myself]++; |
39 |
} |
40 |
else |
41 |
{ |
42 |
scr_mercyaddscr_mercyaddfunction scr_mercyadd(arg0, arg1)
{
global.mercymod[arg0] += arg1;
if (global.mercymod[arg0] < 0)
global.mercymod[arg0] = 0;
if (global.mercymod[arg0] >= 100)
global.mercymod[arg0] = 100;
var _playsound = 1;
if (arg1 <= 0)
_playsound = 0;
if (i_ex(obj_dmgwriter))
{
with (obj_dmgwriter)
{
if (type == 5)
_playsound = 0;
}
}
if (_playsound)
{
var _pitch = 0.8;
if (arg1 < 99)
_pitch = 1;
if (arg1 <= 50)
_pitch = 1.2;
if (arg1 <= 25)
_pitch = 1.4;
snd_play_x(snd_mercyadd, 0.8, _pitch);
}
__mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter);
__mercydmgwriter.damage = arg1;
__mercydmgwriter.type = 5;
global.hittarget[arg0]++;
} (myself, 1); |
43 |
} |
44 |
} |
45 |
} |
46 |
else |
47 |
{ |
48 |
with (obj_spamton_neo_enemy) |
49 |
singleshotmercy += 1; |
50 |
} |
51 |
} |
52 |
else |
53 |
{ |
54 |
var dmg = 0; |
55 |
if (other.big == 1) |
56 |
dmg = ceil(global.monstermaxhp[obj_spamton_neo_enemy.myself] * 0.01); |
57 |
else |
58 |
dmg = ceil(global.monstermaxhp[obj_spamton_neo_enemy.myself] * 0.002); |
59 |
if ((global.monsterhp[obj_spamton_neo_enemy.myself] - dmg) < 1) |
60 |
global.monsterhp[obj_spamton_neo_enemy.myself] = 1; |
61 |
else |
62 |
global.monsterhp[obj_spamton_neo_enemy.myself] -= dmg; |
63 |
if (dmg != 0) |
64 |
{ |
65 |
dm = instance_create(global.monsterx[global.chartarget[obj_spamton_neo_enemy.myself]], (global.monstery[global.chartarget[obj_spamton_neo_enemy.myself]] - (global.hittarget[global.chartarget[obj_spamton_neo_enemy.myself]] * 20)) + 20, obj_dmgwriter); |
66 |
dm.type = 1; |
67 |
dm.delay = 8; |
68 |
dm.damage = dmg; |
69 |
} |
70 |
} |
71 |
snd_play(snd_damage); |
72 |
with (other) |
73 |
event_user(0); |