Deltarune script viewer

← back to main script listing

gml_Object_obj_berdlyb2_enemy_Draw_0

(view raw script w/o annotations or w/e)
1
if (state == 3)
2
{
3
    hurttimer -= 1
4
    if (hurttimer < 0 && global.monster[myself] == 1)
5
        state = 0
6
    else
7
    {
8
        if (global.monster[myself] == 0 && (!i_ex(obj_writer)))
9
        {
10
            hurtsprite = spr_berdly_hurt_kneel_battle
11
            if (endbattle == 0)
12
            {
13
                endbattle = 1
14
                if (global.flag[915 snowgrave_plot] == 5 && global.flag[916 snowgrave_fail] == 0)
15
                {
16
                    instance_create(obj_heronoelle.x, obj_heronoelle.y, obj_berdlyb2_postBattle_noelle)
17
                    scr_sideb_fail
scr_sideb_fail

function scr_sideb_fail() //gml_Script_scr_sideb_fail { if (global.flag[916 snowgrave_fail] == 0) { global.flag[916 snowgrave_fail] = 1 if (argument_count > 0 && argument[0] == 1) { if (global.flag[915 snowgrave_plot] > 0) { } } } }
()
18
                }
19
                scr_wincombat
scr_wincombat

function scr_wincombat() //gml_Script_scr_wincombat { if (global.flag[60 dojo_next_encounter] == 0 || global.flag[36 dojo_failure] == 1) { global.myfight = 7 global.mnfight = -1 with (obj_battlecontroller) victory = 1 for (i = 0; i < 3; i += 1) { if (global.monster[i] == 1 && i_ex(global.monsterinstance[i])) { with (global.monsterinstance[i]) scr_monsterdefeat() } } } else { for (i = 0; i < 3; i += 1) { if (global.monster[i] == 1 && i_ex(global.monsterinstance[i])) { with (global.monsterinstance[i]) scr_monsterdefeat() } } global.encounterno = global.flag[60 dojo_next_encounter] scr_encountersetup(global.encounterno) global.flag[60 dojo_next_encounter] = 0 for (__j = 0; __j < 3; __j++) { if (global.monstertype[__j] != 0(None)) { _newmonster = scr_monster_add(global.monstertype[__j], global.monsterinstancetype[__j]) global.monsterinstance[_newmonster].x = camerax() + 800 global.monsterinstance[_newmonster].y = global.monstermakey[__j] with (global.monsterinstance[_newmonster]) scr_move_to_point_over_time(global.monstermakex[myself], global.monstermakey[myself], 10) } } global.myfight = 5 myfightreturntimer = 15 global.mnfight = -1 } }
()
20
            }
21
        }
22
        hurtshake += 1
23
        if (hurtshake > 1)
24
        {
25
            if (shakex > 0)
26
                shakex -= 1
27
            if (shakex < 0)
28
                shakex += 1
29
            shakex = (-shakex)
30
            hurtshake = 0
31
        }
32
        draw_sprite_ext(hurtsprite, 0, (x + shakex + hurtspriteoffx), (y + hurtspriteoffy), 2, 2, 0, image_blend, 1)
33
    }
34
}
35
scr_enemy_drawidle_generic
scr_enemy_drawidle_generic

function scr_enemy_drawidle_generic(argument0) //gml_Script_scr_enemy_drawidle_generic { if (state == 0) { fsiner += 1 siner += argument0 thissprite = idlesprite if (global.mercymod[myself] >= global.mercymax[myself]) thissprite = sparedsprite draw_monster_body_part(thissprite, siner, x, y) } }
(0.16666666666666666)
36
if (becomeflash == 0)
37
    flash = 0
38
becomeflash = 0