|
1
|
if (!init)
|
|
2
|
{
|
|
3
|
var _char = global.char[target];
|
|
4
|
target_char = global.charinstance[target];
|
|
5
|
alive = global.hp[_char] > 0;
|
|
6
|
starthp = global.hp[_char];
|
|
7
|
if (_char == 1)
|
|
8
|
{
|
|
9
|
xstart += 20;
|
|
10
|
ystart += 10;
|
|
11
|
if (alive)
|
|
12
|
{
|
|
13
|
xoff -= 6;
|
|
14
|
yoff -= 20;
|
|
15
|
}
|
|
16
|
}
|
|
17
|
else if (_char == 2)
|
|
18
|
{
|
|
19
|
xstart += 30;
|
|
20
|
ystart += 20;
|
|
21
|
if (alive)
|
|
22
|
{
|
|
23
|
yoff = -30;
|
|
24
|
}
|
|
25
|
else
|
|
26
|
{
|
|
27
|
yoff = -12;
|
|
28
|
xoff = 8;
|
|
29
|
}
|
|
30
|
}
|
|
31
|
else
|
|
32
|
{
|
|
33
|
xstart += 34;
|
|
34
|
ystart += 26;
|
|
35
|
yoff = -22;
|
|
36
|
xoff = 2;
|
|
37
|
spotlight_height = (ystart - 300) + 360;
|
|
38
|
}
|
|
39
|
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;
if (arg3 == -1)
maxframes = -1;
global.faceaction[myself] = 0;
}
}
} ("ralsei", sing_sprite, 0.25, true);
|
|
40
|
if (!i_ex(obj_flowery_enemy))
|
|
41
|
{
|
|
42
|
with (obj_heroralsei)
|
|
43
|
visible = 0;
|
|
44
|
fn = scr_dark_markerscr_dark_marker
function scr_dark_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
image_xscale = 2;
image_yscale = 2;
}
return thismarker;
} (obj_heroralsei.x, obj_heroralsei.y, sing_sprite);
|
|
45
|
fn.depth = obj_heroralsei.depth - 1;
|
|
46
|
fn.image_speed = 0.25;
|
|
47
|
fn.image_index = 0;
|
|
48
|
}
|
|
49
|
depth = target_char.depth - 20;
|
|
50
|
if (_char == 3)
|
|
51
|
{
|
|
52
|
}
|
|
53
|
var _spamchance = 0;
|
|
54
|
if (global.chapter == 5 && global.flag[309 spamton_plot] >= 9)
|
|
55
|
{
|
|
56
|
if (scr_armorcheck_equippedscr_armorcheck_equipped
function scr_armorcheck_equipped(arg0, arg1)
{
var __wearing = 0;
if (global.chararmor1[arg0] == arg1)
__wearing++;
if (global.chararmor2[arg0] == arg1)
__wearing++;
return __wearing;
} (3, 21))
|
|
57
|
_spamchance = 10;
|
|
58
|
else
|
|
59
|
_spamchance = 2;
|
|
60
|
}
|
|
61
|
if (_spamchance > 0)
|
|
62
|
{
|
|
63
|
if (random(100) <= _spamchance)
|
|
64
|
{
|
|
65
|
spamton = choose(1, 2);
|
|
66
|
sprite_index = spr_ralsei_cherub_peeved;
|
|
67
|
}
|
|
68
|
}
|
|
69
|
init = true;
|
|
70
|
}
|
|
71
|
if (do_heal)
|
|
72
|
{
|
|
73
|
do_heal = false;
|
|
74
|
scr_debug_printscr_debug_print
function scr_debug_print()
{
if (!scr_debug())
exit;
}
function scr_debug_clear_all()
{
} ("do heal");
|
|
75
|
star = target;
|
|
76
|
ha = instance_create(x, y, obj_healanim);
|
|
77
|
ha.target = target_char;
|
|
78
|
var _starthp = global.hp[global.char[target]];
|
|
79
|
var _healnum = healnum;
|
|
80
|
scr_healscr_heal
function scr_heal(arg0, arg1, arg2 = true)
{
abovemaxhp = 0;
belowzero = 0;
hltarget = global.char[arg0];
_curhp = global.hp[hltarget];
if (global.hp[hltarget] <= 0)
belowzero = 1;
if (global.hp[hltarget] > global.maxhp[hltarget])
abovemaxhp = 1;
if (abovemaxhp == 0)
{
global.hp[hltarget] += arg1;
if (global.hp[hltarget] > global.maxhp[hltarget])
global.hp[hltarget] = global.maxhp[hltarget];
}
if (belowzero == 1 && global.hp[hltarget] >= 0 && arg2)
{
if (global.hp[hltarget] < ceil(global.maxhp[hltarget] / 6))
global.hp[hltarget] = ceil(global.maxhp[hltarget] / 6);
scr_revive(arg0);
}
snd_stop(snd_power);
snd_play(snd_power);
return global.hp[hltarget] - _curhp;
} (star, healnum);
|
|
81
|
with (target_char)
|
|
82
|
{
|
|
83
|
dmgwr = scr_dmgwriter_selfcharscr_dmgwriter_selfchar
function scr_dmgwriter_selfchar()
{
if (tu < -1)
tu = -1;
return instance_create(x, (y + myheight) - 40 - 24 - (tu * 20), obj_dmgwriter);
} ();
|
|
84
|
with (dmgwr)
|
|
85
|
{
|
|
86
|
delay = 1;
|
|
87
|
type = 3;
|
|
88
|
}
|
|
89
|
if (global.hp[global.char[myself]] >= global.maxhp[global.char[myself]])
|
|
90
|
{
|
|
91
|
with (dmgwr)
|
|
92
|
specialmessage = 3;
|
|
93
|
}
|
|
94
|
dmgwr.damage = healnum;
|
|
95
|
}
|
|
96
|
var _flash;
|
|
97
|
with (target_char)
|
|
98
|
_flash = scr_oflashscr_oflash
function scr_oflash()
{
_oflash = instance_create(x, y, obj_oflash);
_oflash.image_xscale = image_xscale;
_oflash.image_speed = 0;
_oflash.image_angle = image_angle;
_oflash.image_index = image_index;
_oflash.image_yscale = image_yscale;
_oflash.sprite_index = sprite_index;
_oflash.depth = depth - 1;
_oflash.target = id;
return _oflash;
} ();
|
|
99
|
_flash.depth = depth - 1;
|
|
100
|
}
|