|
1
|
if (active == 1)
|
|
2
|
{
|
|
3
|
damage = 50;
|
|
4
|
element = 6;
|
|
5
|
if (obj_rouxls_ch3_enemy.ralseiyarnhp > 0 && global.hp[3] > 0)
|
|
6
|
{
|
|
7
|
damage = floor(global.hp[3] / 2);
|
|
8
|
if (damage > 40)
|
|
9
|
damage = 40;
|
|
10
|
target = 2;
|
|
11
|
}
|
|
12
|
else
|
|
13
|
{
|
|
14
|
target = choose(0, 1);
|
|
15
|
}
|
|
16
|
if (damage != 0)
|
|
17
|
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++;
... ();
|
|
18
|
if (destroyonhit == 1)
|
|
19
|
instance_destroy();
|
|
20
|
if (global.hp[3] > 0)
|
|
21
|
{
|
|
22
|
target = 2;
|
|
23
|
instance_destroy();
|
|
24
|
snd_play(snd_bump);
|
|
25
|
obj_rouxls_ch3_enemy.ralseiyarnhp--;
|
|
26
|
if (obj_rouxls_ch3_enemy.ralseiyarnhp == 1)
|
|
27
|
{
|
|
28
|
}
|
|
29
|
if (obj_rouxls_ch3_enemy.ralseiyarnhp == 0)
|
|
30
|
{
|
|
31
|
scr_battle_sprite_setscr_battle_sprite_set
function scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{
_charactor = arg0;
_charinstance = obj_herokris;
if (_charactor == "noelle")
{
_charinstance = obj_heronoelle;
_charnum = 4;
}
if (_charactor == "ralsei")
{
_charinstance = obj_heroralsei;
_charnum = 3;
}
if (_charactor == "susie")
{
_charinstance = obj_herosusie;
_charnum = 2;
}
if (_charactor == "kris")
{
_charinstance = obj_herokris;
_charnum = 1;
}
if (instance_exists(_charinstance))
{
with (_charinstance)
{
state = 8;
hurt = 0;
attacktimer = 0;
sprite_index = arg1;
image_speed = arg2;
image_index = 0;
if (arg3 == 0)
maxframes = image_number;
global.faceaction[myself] = 0;
}
}
} ("ralsei", spr_ralseib_yarn_2, 0, 0);
|
|
32
|
obj_rouxls_ch3_enemy.shadowmengetfiredcon = 1;
|
|
33
|
obj_rouxls_ch3_enemy.destroywriter = false;
|
|
34
|
with (obj_battlecontroller)
|
|
35
|
noreturn = 1;
|
|
36
|
snd_play_x(snd_awkward, 0.67, 1);
|
|
37
|
scr_shakescreenscr_shakescreen
function scr_shakescreen()
{
instance_create(x, y, obj_shake);
} ();
|
|
38
|
}
|
|
39
|
}
|
|
40
|
else
|
|
41
|
{
|
|
42
|
scr_battle_sprite_resetscr_battle_sprite_reset
function scr_battle_sprite_reset(arg0)
{
_charactor = arg0;
_charinstance = obj_herokris;
if (_charactor == "noelle")
{
_charinstance = obj_heronoelle;
_charnum = 4;
}
if (_charactor == "ralsei")
{
_charinstance = obj_heroralsei;
_charnum = 3;
}
if (_charactor == "susie")
{
_charinstance = obj_herosusie;
_charnum = 2;
}
if (_charactor == "kris")
{
_charinstance = obj_herokris;
_charnum = 1;
}
if (instance_exists(_charinstance))
{
with (_charinstance)
{
state = 0;
hurt = 0;
attacktimer = 0;
attacked = 0;
maxframes = 0;
global.faceaction[myself] = 0;
}
}
} ("ralsei");
|
|
43
|
}
|
|
44
|
}
|