|
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
|
with (obj_aqua_enemy)
|
|
22
|
{
|
|
23
|
if (fight_type == "solo")
|
|
24
|
{
|
|
25
|
if (myattackchoice == 0)
|
|
26
|
attack_chain_hits++;
|
|
27
|
if (myattackchoice == 1)
|
|
28
|
attack_fan_hits++;
|
|
29
|
if (myattackchoice == 2)
|
|
30
|
attack_petal_hits++;
|
|
31
|
if (myattackchoice == 3)
|
|
32
|
attack_omega_hits++;
|
|
33
|
}
|
|
34
|
if (fight_type == "seth")
|
|
35
|
phasehit = true;
|
|
36
|
}
|
|
37
|
if (target != 3)
|
|
38
|
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;
... ();
|
|
39
|
if (target == 3)
|
|
40
|
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;
}
} ();
|
|
41
|
if (destroyonhit == 1)
|
|
42
|
instance_destroy();
|
|
43
|
}
|