Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_martlet_final_act_helper_Alarm_0

(view raw script w/o annotations or w/e)
1
switch (global.last_action_selected)
2
{
3
    case "Action 2 Message 0":
4
        var heal_amount;
5
        with (obj_dialogue_battle_action_selected_action_2)
6
        {
7
            message = 0;
8
            heal_amount = choose(20, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 24, 24, 25);
9
            message[0] = "* Gained " + string(heal_amount) + "HP!";
10
            message_length = string_length(message[message_current]);
11
        }
12
        if (global.current_hp_self < global.max_hp_self)
13
            global.current_hp_self = clamp(global.current_hp_self + heal_amount, 0, global.max_hp_self);
14
        break;
15
}
16
audio_play_sound(snd_battle_item_eat, 1, 0);
17
can_skip = true;