Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_martlet_wing_gust_final_object_Create_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
damage_number = scr_determine_damage_number_enemy
scr_determine_damage_number_enemy

function scr_determine_damage_number_enemy(argument0, argument1, argument2) //gml_Script_scr_determine_damage_number_enemy { var enemy_count = global.enemy_count if (global.battle_enemy_name_1 == argument0) return 1; else if (enemy_count >= 2 && global.battle_enemy_name_2 == argument1) return 2; else if (enemy_count >= 3 && global.battle_enemy_name_3 == argument2) return 3; else return 0; }
("martlet", "void", "void")
4
sound_type = 0
5
var random_number = irandom_range(0, 13)
6
switch random_number
7
{
8
    case 0:
9
        sprite_index = spr_battle_enemy_attack_martlet_wing_gust_junk_globe
10
        sound_type = 1
11
        break
12
    case 1:
13
        sprite_index = spr_battle_enemy_attack_martlet_wing_gust_junk_shoe
14
        sound_type = 2
15
        break
16
    case 2:
17
        sprite_index = spr_battle_enemy_attack_martlet_wing_gust_junk_mug
18
        sound_type = 2
19
        break
20
    case 3:
21
        sprite_index = spr_battle_enemy_attack_martlet_wing_gust_junk_can
22
        sound_type = 1
23
        break
24
    case 4:
25
        sprite_index = spr_battle_enemy_attack_martlet_wing_gust_junk_thingy
26
        sound_type = 2
27
        break
28
    case 5:
29
        sprite_index = spr_battle_enemy_attack_martlet_wing_gust_junk_ball
30
        sound_type = 3
31
        break
32
    case 6:
33
        sprite_index = spr_battle_enemy_attack_martlet_wing_gust_junk_glass
34
        sound_type = 2
35
        break
36
    case 7:
37
        sprite_index = spr_battle_enemy_attack_martlet_wing_gust_junk_saw
38
        sound_type = 2
39
        break
40
    case 8:
41
        sprite_index = spr_battle_enemy_attack_martlet_wing_gust_junk_idk
42
        sound_type = 1
43
        break
44
    case 9:
45
        sprite_index = spr_battle_enemy_attack_martlet_wing_gust_junk_nail
46
        sound_type = 2
47
        break
48
    case 10:
49
        sprite_index = spr_battle_enemy_attack_martlet_wing_gust_junk_screw
50
        sound_type = 2
51
        break
52
    case 11:
53
        sprite_index = spr_battle_enemy_attack_martlet_wing_gust_junk_plank
54
        sound_type = 1
55
        break
56
    case 12:
57
        sprite_index = spr_battle_enemy_attack_martlet_wing_gust_junk_radio
58
        sound_type = 3
59
        break
60
    case 13:
61
        sprite_index = spr_battle_enemy_attack_martlet_wing_gust_junk_screwdriver
62
        sound_type = 2
63
        break
64
    default:
65
        sprite_index = spr_battle_enemy_attack_martlet_wing_gust_junk_globe
66
        sound_type = 1
67
}
68
69
image_speed = 0
70
image_index = 0
71
image_alpha = 0
72
image_angle = 0
73
image_xscale = 2
74
image_yscale = 2
75
state = 0
76
fall_speed = 3
77
fall_speed_max = 12
78
can_fade_out = false
79
landing_init = false
80
landing_count = 0
81
no_loop_alarm_fading_in = false
82
while (bbox_left < (obj_dialogue_box_battle_transformation_any.bbox_left + 4))
83
    x += 1
84
while (bbox_right > (obj_dialogue_box_battle_transformation_any.bbox_right - 4))
85
    x -= 1
86
while (bbox_bottom < (obj_dialogue_box_battle_transformation_any.bbox_top - 10))
87
    y += 1
88
while (bbox_bottom > (obj_dialogue_box_battle_transformation_any.bbox_top - 10))
89
    y -= 1