Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_bullet_knife_Other_15

related scripts: Alarm_0Create_0Draw_0Other_15 Step_0

(view raw script w/o annotations or w/e)
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_mercyadd
scr_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_damage
scr_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)) { var dam_reduction = 0; if (global.tempflag[74] == 7) dam_reduction = -0.05; if (global.tempflag[74] == 8) dam_reduction = -0.1; if (global.tempflag[74] == 9) dam_reduction = -0.12; if (global.tempflag[74] == 10) dam_reduction = -0.15; if (global.tempflag[74] == 11) dam_reduction = -0.18; if (global.tempflag[74] == 12) dam_reduction = -0.21; if (global.tempflag[74] >= 13) dam_reduction = -0.25; if (obj_flowery_enemy.partydefenselowered == true) { damage = ceil(damage * (1.1 + dam_reduction)); dam_reduction = 0; } if (obj_flowery_enemy.remove_ralsei_con > 0) { damage = ceil(damage * (0.8 + dam_reduction)); dam_reduction = 0; } if (dam_reduction != 0) damage = ceil(damage * (1 + dam_reduction)); 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++; } if (global.chapter == 5 && i_ex(obj_pink_enemy) && global.flag[1914] == 2) damage = round(damage * 1.21); tdamage = damage; var oldcalculation = 0; if (target < 3) { chartarget = global.char[target]; if (global.ignoredefense == true) { tdamage = ceil(tdamage); ...
();
46
    if (target == 3)
47
        
scr_damage_all
scr_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
}