Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_spellphase_Alarm_0

(view raw script w/o annotations or w/e)
1
for (xyz = 0; xyz < 3; xyz += 1)
2
{
3
    using[xyz] = 0;
4
    gotspell[xyz] = 0;
5
    gotitem[xyz] = 0;
6
    if (global.charaction[xyz] == 2)
7
    {
8
        spelltotal += 1;
9
        using[xyz] = 1;
10
        gotspell[xyz] = 1;
11
        if (castyet == 0)
12
        {
13
            with (global.charinstance[xyz])
14
            {
15
                state = 2;
16
                attacktimer = 0;
17
            }
18
            castyet = 1;
19
            char = xyz + 1;
20
            
scr_spelltext
scr_spelltext

function
scr_spelltext(arg0, arg1)
{ spell = arg0; caster = arg1; star = global.chartarget[arg1]; spelltext = " "; switch (spell) { case 0: break; case 1: global.msg[0] =
scr_84_get_subst_string(
* ~1 cast RUDE BUSTER!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_14_0")
, global.charname[global.char[caster]]);
break; case 2: global.msg[0] =
scr_84_get_subst_string(
* ~1 cast HEAL PRAYER!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_18_0")
, global.charname[global.char[caster]]);
break; case 3: global.msg[0] =
scr_84_get_subst_string(
* ~1 cast PACIFY!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_23_0")
, global.charname[global.char[caster]]);
scr_retarget_spell();
if (global.monster[star] == 1) { if (global.monsterstatus[star] == 1) { } else { global.msg[0] =
scr_84_get_subst_string(
* ~1 cast PACIFY!Delay 11
* But the enemy wasn't TIRED...Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_33_0")
, global.charname[global.char[caster]]);
if (global.mercymod[star] >= 100) global.msg[0] =
scr_84_get_subst_string(
* ~1 cast PACIFY!Delay 11
* But the foe wasn't TIRED... try SPARING!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_36_0")
, global.charname[global.char[caster]]);
} } break; case 4: global.msg[0] =
scr_84_get_subst_string(
* ~1 used RUDE BUSTER!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_43_0")
, global.charname[global.char[caster]]);
break; case 5: global.msg[0] =
scr_84_get_subst_string(
* ~1 used RED BUSTER!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_47_0")
, global.charname[global.char[caster]]);
break; case 6: global.msg[0] =
scr_84_get_subst_string(
* ~1 cast DUAL HEAL!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_51_0")
, global.charname[global.char[caster]]);
break; case 100: cancelattack = 0; global.msg[0] =
scr_84_get_subst_string(
* ~1 spared ~2!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_58_0")
, global.charname[global.char[caster]], global.monstername[star]);
scr_retarget_spell();
if (global.mercymod[star] >= 100) { global.msg[0] =
scr_84_get_subst_string(
* ~1 spared ~2!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_62_0")
, global.charname[global.char[caster]], global.monstername[star]);
} else { global.msg[0] =
scr_84_get_subst_string(
* ~1 spared ~2!Delay 22
* But its name wasn't YELLOW...Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_66_0")
, global.charname[global.char[caster]], global.monstername[star]);
if (global.monsterstatus[star] == 1) { global.msg[0] =
scr_84_get_subst_string(
* ~1 spared ~2!Delay 22
* But its name wasn't YELLOW...Wait for input
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_69_0")
, global.charname[global.char[caster]], global.monstername[star]);
global.msg[1] =
* (Try using Ralsei's PACIFY!)Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_70_0")
;
} } if (cancelattack == 1) global.msg[0] =
scr_84_get_subst_string(
* ~1 spared!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_73_0")
, global.charname[global.char[caster]]);
break; case 201: global.msg[0] =
scr_84_get_subst_string(
* ~1 used the DARK CANDY!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_78_0")
, global.charname[global.char[caster]]);
break; case 202: global.msg[0] =
scr_84_get_subst_string(
* ~1 used the REVIVE MINT!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_82_0")
, global.charname[global.char[caster]]);
break; case 203: global.msg[0] =
scr_84_get_subst_string(
* ~1 used the GLOWSHARD!Wait for input
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_86_0")
, global.charname[global.char[caster]]);
global.msg[1] =
* But nothing happened...Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_87_0")
;
spec_shard = 0; for (_en = 0; _en < 3; _en += 1) { shardtest[_en] = 0; if (global.monster[_en] == 1) { if (global.monstertype[_en] == 5Rudinn) { spec_shard = 1; shardtest[_en] = 1; global.mercymod[_en] = 200; } } } if (spec_shard > 0) {
scr_itemshift(global.bmenucoord[4][arg1], 0);
global.msg[1] = ""; global.msg[2] =
* The GLOWSHARD disappeared!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_109_0")
;
for (_j = 0; _j < 3; _j += 1) { if (shardtest[_j] == 1) global.msg[1] +=
scr_84_get_subst_string(
* ~1 became enraptured!
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_112_0")
, global.monstername[_j]);
} global.msg[1] += "/"; } break; case 204: global.msg[0] =
scr_84_get_subst_string(
* ~1 read the MANUAL!Wait for input
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_122_0")
, global.charname[global.char[caster]]);
global.msg[1] =
* But nothing happened...Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_123_0")
;
spec_shard = 0; ...
(global.charspecial[xyz], xyz);
21
            spellwriter = 
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
22
        }
23
    }
24
    if (global.charaction[xyz] == 4)
25
    {
26
        spelltotal += 1;
27
        using[xyz] = 1;
28
        gotitem[xyz] = 1;
29
        if (castyet == 0)
30
        {
31
            with (global.charinstance[xyz])
32
            {
33
                state = 4;
34
                attacktimer = 0;
35
            }
36
            castyet = 1;
37
            char = xyz + 1;
38
            
scr_spelltext
scr_spelltext

function
scr_spelltext(arg0, arg1)
{ spell = arg0; caster = arg1; star = global.chartarget[arg1]; spelltext = " "; switch (spell) { case 0: break; case 1: global.msg[0] =
scr_84_get_subst_string(
* ~1 cast RUDE BUSTER!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_14_0")
, global.charname[global.char[caster]]);
break; case 2: global.msg[0] =
scr_84_get_subst_string(
* ~1 cast HEAL PRAYER!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_18_0")
, global.charname[global.char[caster]]);
break; case 3: global.msg[0] =
scr_84_get_subst_string(
* ~1 cast PACIFY!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_23_0")
, global.charname[global.char[caster]]);
scr_retarget_spell();
if (global.monster[star] == 1) { if (global.monsterstatus[star] == 1) { } else { global.msg[0] =
scr_84_get_subst_string(
* ~1 cast PACIFY!Delay 11
* But the enemy wasn't TIRED...Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_33_0")
, global.charname[global.char[caster]]);
if (global.mercymod[star] >= 100) global.msg[0] =
scr_84_get_subst_string(
* ~1 cast PACIFY!Delay 11
* But the foe wasn't TIRED... try SPARING!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_36_0")
, global.charname[global.char[caster]]);
} } break; case 4: global.msg[0] =
scr_84_get_subst_string(
* ~1 used RUDE BUSTER!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_43_0")
, global.charname[global.char[caster]]);
break; case 5: global.msg[0] =
scr_84_get_subst_string(
* ~1 used RED BUSTER!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_47_0")
, global.charname[global.char[caster]]);
break; case 6: global.msg[0] =
scr_84_get_subst_string(
* ~1 cast DUAL HEAL!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_51_0")
, global.charname[global.char[caster]]);
break; case 100: cancelattack = 0; global.msg[0] =
scr_84_get_subst_string(
* ~1 spared ~2!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_58_0")
, global.charname[global.char[caster]], global.monstername[star]);
scr_retarget_spell();
if (global.mercymod[star] >= 100) { global.msg[0] =
scr_84_get_subst_string(
* ~1 spared ~2!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_62_0")
, global.charname[global.char[caster]], global.monstername[star]);
} else { global.msg[0] =
scr_84_get_subst_string(
* ~1 spared ~2!Delay 22
* But its name wasn't YELLOW...Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_66_0")
, global.charname[global.char[caster]], global.monstername[star]);
if (global.monsterstatus[star] == 1) { global.msg[0] =
scr_84_get_subst_string(
* ~1 spared ~2!Delay 22
* But its name wasn't YELLOW...Wait for input
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_69_0")
, global.charname[global.char[caster]], global.monstername[star]);
global.msg[1] =
* (Try using Ralsei's PACIFY!)Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_70_0")
;
} } if (cancelattack == 1) global.msg[0] =
scr_84_get_subst_string(
* ~1 spared!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_73_0")
, global.charname[global.char[caster]]);
break; case 201: global.msg[0] =
scr_84_get_subst_string(
* ~1 used the DARK CANDY!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_78_0")
, global.charname[global.char[caster]]);
break; case 202: global.msg[0] =
scr_84_get_subst_string(
* ~1 used the REVIVE MINT!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_82_0")
, global.charname[global.char[caster]]);
break; case 203: global.msg[0] =
scr_84_get_subst_string(
* ~1 used the GLOWSHARD!Wait for input
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_86_0")
, global.charname[global.char[caster]]);
global.msg[1] =
* But nothing happened...Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_87_0")
;
spec_shard = 0; for (_en = 0; _en < 3; _en += 1) { shardtest[_en] = 0; if (global.monster[_en] == 1) { if (global.monstertype[_en] == 5Rudinn) { spec_shard = 1; shardtest[_en] = 1; global.mercymod[_en] = 200; } } } if (spec_shard > 0) {
scr_itemshift(global.bmenucoord[4][arg1], 0);
global.msg[1] = ""; global.msg[2] =
* The GLOWSHARD disappeared!Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_109_0")
;
for (_j = 0; _j < 3; _j += 1) { if (shardtest[_j] == 1) global.msg[1] +=
scr_84_get_subst_string(
* ~1 became enraptured!
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_112_0")
, global.monstername[_j]);
} global.msg[1] += "/"; } break; case 204: global.msg[0] =
scr_84_get_subst_string(
* ~1 read the MANUAL!Wait for input
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_122_0")
, global.charname[global.char[caster]]);
global.msg[1] =
* But nothing happened...Wait for inputClose Message
scr_84_get_lang_string("scr_spelltext_slash_scr_spelltext_gml_123_0")
;
spec_shard = 0; ...
(global.charspecial[xyz], xyz);
39
            spellwriter = 
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
40
        }
41
    }
42
}
43
active = 1;
44
global.spelldelay = 90;