Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_masterswordremix_body_a_Step_2

(view raw script w/o annotations or w/e)
1
if (transformed == true)
2
{
3
    if (sprite_index != spr_crispy_scroll_spared)
4
        sprite_index = spr_crispy_scroll_spared
5
    x += transformed_speed
6
    image_angle += transformed_rotation_speed
7
    if (x <= (0 - sprite_width / 2))
8
    {
9
        global.enemy_sparing = true
10
        if (global.enemy_count == 1)
11
            instance_create(0, 0, obj_dialogue_battle_win_enemy)
12
        else if (global.enemy_count == 2 && (global.enemy_dead_2 + global.enemy_spared_2) >= 1)
13
            instance_create(0, 0, obj_dialogue_battle_win_enemy)
14
        else if (global.enemy_count == 3 && (global.enemy_dead_2 + global.enemy_spared_2 + global.enemy_dead_3 + global.enemy_spared_3) >= 2)
15
            instance_create(0, 0, obj_dialogue_battle_win_enemy)
16
        else
17
        {
18
            global.important_cutscene = script_execute(gml_Script_scr_determine_important_cutscene_attacking)
19
            global.can_attack = script_execute(gml_Script_scr_determine_can_attack_attacking)
20
            if (global.important_cutscene == false && global.can_attack == true)
21
                global.enemy_attacking = true
22
            if (global.can_attack == false)
23
            {
24
                with (obj_dialogue_box_battle)
25
                    no_loop_can_attack = false
26
            }
27
        }
28
        global.enemy_spared = true
29
        instance_destroy()
30
    }
31
}