|
1
|
if (active == 1)
|
|
2
|
{
|
|
3
|
damage = 109;
|
|
4
|
if (global.encounterno == 220)
|
|
5
|
{
|
|
6
|
damage = 62;
|
|
7
|
if (global.tempflag[51] > 7)
|
|
8
|
damage -= 5;
|
|
9
|
if (global.tempflag[51] > 8)
|
|
10
|
damage -= 5;
|
|
11
|
if (global.tempflag[51] > 9)
|
|
12
|
damage -= 5;
|
|
13
|
if (global.tempflag[51] > 10)
|
|
14
|
damage -= 5;
|
|
15
|
}
|
|
16
|
if (i_ex(obj_netskie_enemy))
|
|
17
|
{
|
|
18
|
target = 4;
|
|
19
|
damage = 92;
|
|
20
|
}
|
|
21
|
if (netskie == 1)
|
|
22
|
{
|
|
23
|
instance_destroy();
|
|
24
|
with (obj_netskie_enemy)
|
|
25
|
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]++;
return __mercydmgwriter;
} (myself, 4);
|
|
26
|
exit;
|
|
27
|
}
|
|
28
|
with (obj_aqua_enemy)
|
|
29
|
{
|
|
30
|
if (fight_type == "solo")
|
|
31
|
{
|
|
32
|
if (myattackchoice == 0)
|
|
33
|
attack_chain_hits++;
|
|
34
|
if (myattackchoice == 1)
|
|
35
|
attack_fan_hits++;
|
|
36
|
if (myattackchoice == 2)
|
|
37
|
attack_petal_hits++;
|
|
38
|
if (myattackchoice == 3)
|
|
39
|
attack_omega_hits++;
|
|
40
|
}
|
|
41
|
if (fight_type == "seth")
|
|
42
|
phasehit = true;
|
|
43
|
}
|
|
44
|
if (target != 3)
|
|
45
|
scr_damagescr_damage
function scr_damage(arg0 = true)
{
if (global.inv < 0)
{
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;
}
}
chartarget = 3;
if (global.chapter == 5 && i_ex(obj_flowery_enemy))
{
if (obj_flowery_enemy.partydefenselowered == true)
damage = ceil(damage * 1.1);
if (obj_flowery_enemy.remove_ralsei_con > 0)
damage = ceil(damage * 0.8);
if (obj_flowery_enemy.ralsei_removed == true && target == 2)
{
target = choose(0, 1);
if (global.hp[1] < 1)
target = 1;
if (global.hp[2] < 1)
target = 0;
}
if (i_ex(obj_dbulletcontroller) && obj_dbulletcontroller.type == 637)
obj_flowery_enemy.damage_taken_during_tutorial++;
}
tdamage = damage;
var oldcalculation = 0;
if (target < 3)
{
chartarget = global.char[target];
if (global.ignoredefense == true)
{
tdamage = ceil(tdamage);
}
else
{
if (oldcalculation)
tdamage = ceil(tdamage - (global.battledf[target] * 3));
else
tdamage = scr_damage_calculation(tdamage, target);
if (global.charaction[target] == 10)
tdamage = ceil((2 * tdamage) / 3);
tdamage = ceil(tdamage * scr_element_damage_reduction(__element, global.char[target]));
debug_message("The element is: " + string(__element));
if (tdamage < 1)
tdamage = 1;
}
}
if (!instance_exists(obj_shake))
instance_create(0, 0, obj_shake);
with (global.charinstance[target])
{
hurt = 1;
hurttimer = 0;
}
if (!arg0)
tdamage = min(tdamage, global.hp[chartarget] - 1);
hpdiff = tdamage;
... ();
|
|
46
|
if (target == 3)
|
|
47
|
scr_damage_allscr_damage_all
function scr_damage_all(arg0 = 0, arg1 = true)
{
if (global.inv < 0)
{
remdamage = damage;
_temptarget = target;
for (ti = 0; ti < 3; ti++)
{
global.inv = -1;
if (argument_count == 0)
{
damage = remdamage;
}
else
{
damage = arg0;
remdamage = arg0;
}
target = ti;
if (global.hp[global.char[ti]] > 0 && global.char[ti] != 0)
scr_damage(arg1);
}
global.inv = global.invc * 40;
target = _temptarget;
}
} ();
|
|
48
|
if (destroyonhit == 1)
|
|
49
|
instance_destroy();
|
|
50
|
}
|