|
1
|
if ((mercified && sprite_index == spr_bullet_dice_all4s) || (mercified && image_index >= 10 && image_index < 15 && sprite_index == spr_bullet_dice4pip))
|
|
2
|
{
|
|
3
|
snd_play(snd_mercyadd);
|
|
4
|
for (var i = 0; i < instance_number(obj_pippins_enemy); i++)
|
|
5
|
{
|
|
6
|
enemy[i] = instance_find(obj_pippins_enemy, i);
|
|
7
|
if (enemy[i].bet)
|
|
8
|
{
|
|
9
|
with (enemy[i])
|
|
10
|
scr_mercyaddscr_mercyadd
function 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;
with (obj_dmgwriter)
{
if (type == 5 && mercytimer < 8)
_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, 35);
|
|
11
|
}
|
|
12
|
if (enemy[i].fixedbet)
|
|
13
|
{
|
|
14
|
with (enemy[i])
|
|
15
|
scr_mercyaddscr_mercyadd
function 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;
with (obj_dmgwriter)
{
if (type == 5 && mercytimer < 8)
_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, 35);
|
|
16
|
}
|
|
17
|
}
|
|
18
|
instance_destroy();
|
|
19
|
exit;
|
|
20
|
}
|
|
21
|
target = obj_dbulletcontroller.target;
|
|
22
|
if (active == 1)
|
|
23
|
{
|
|
24
|
if (target != 3)
|
|
25
|
scr_damagescr_damage
function scr_damage()
{
if (global.inv < 0)
{
scr_damage_cache();
if (global.chapter == 3)
{
with (obj_tennabattleconvo_controller)
{
damagecount++;
damagecountthisturn++;
}
with (obj_tenna_enemy)
gothit = true;
with (obj_knight_enemy)
progamer = false;
}
var __element = 0;
if (variable_instance_exists(id, "element"))
{
if (is_real(element))
__element = element;
}
if (target < 3)
{
if (global.hp[global.char[target]] <= 0)
{
scr_randomtarget_old();
target = mytarget;
with (global.charinstance[target])
{
image_blend = c_white;
darkify = 0;
}
}
}
var __remtarget = -1;
if (target == 4)
{
__remtarget = 4;
scr_randomtarget_old();
target = mytarget;
if ((global.hp[global.char[target]] / global.maxhp[global.char[target]]) < (scr_party_hpaverage() / 2))
{
scr_randomtarget_old();
target = mytarget;
}
if ((global.hp[global.char[target]] / global.maxhp[global.char[target]]) < (scr_party_hpaverage() / 2))
{
scr_randomtarget_old();
target = mytarget;
}
if (target == 0 && (global.hp[global.char[target]] / global.maxhp[global.char[target]]) < 0.35)
{
scr_randomtarget_old();
target = mytarget;
}
with (global.charinstance[target])
{
image_blend = c_white;
darkify = 0;
}
}
var truedamage = 0;
if ((global.chapter == 3 && i_ex(obj_tenna_enemy) && obj_tenna_enemy.minigameinsanity) || i_ex(obj_knight_roaring2))
truedamage = 1;
chartarget = 3;
if (global.chapter == 3 && i_ex(obj_knight_enemy) && truedamage == 0)
{
if (obj_knight_enemy.aoedamage == false)
{
if (target == 0)
{
if (global.hp[2] > 0 && global.hp[3] > 0)
target = choose(1, 2);
else if (global.hp[2] > 0)
target = 1;
else if (global.hp[3] > 0)
target = 2;
}
if (obj_knight_enemy.myattackchoice != 13)
{
if (global.chararmor1[1] == 23 || global.chararmor2[1] == 23 || global.chararmor1[2] == 23 || global.chararmor2[2] == 23 || global.chararmor1[3] == 23 || global.chararmor2[3] == 23)
{
obj_knight_enemy.damagecounter++;
if (obj_knight_enemy.damagecounter < 3)
{
if (global.hp[1] > 0 && (global.chararmor1[1] == 23 || global.chararmor2[1] == 23))
target = 0;
if (global.hp[2] > 0 && (global.chararmor1[2] == 23 || global.chararmor2[2] == 23))
target = 1;
if (global.hp[3] > 0 && (global.chararmor1[3] == 23 || global.chararmor2[3] == 23))
target = 2;
}
else
{
target = choose(0, 1, 2);
repeat (2)
{
if (global.hp[1] < 1 && target == 0)
target++;
... ();
|
|
26
|
if (target == 3)
|
|
27
|
scr_damage_allscr_damage_all
function scr_damage_all()
{
if (global.inv < 0)
{
remdamage = damage;
_temptarget = target;
for (ti = 0; ti < 3; ti += 1)
{
global.inv = -1;
damage = remdamage;
target = ti;
if (global.hp[global.char[ti]] > 0 && global.char[ti] != 0)
scr_damage();
}
global.inv = global.invc * 30;
target = _temptarget;
}
} ();
|
|
28
|
if (destroyonhit == 1)
|
|
29
|
instance_destroy();
|
|
30
|
}
|