Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_recreate_heart_battle_menu_text_jandroid_duo

(view raw script w/o annotations or w/e)
1
function scr_recreate_heart_battle_menu_text_jandroid_duo
scr_recreate_heart_battle_menu_text_jandroid_duo

function scr_recreate_heart_battle_menu_text_jandroid_duo() //gml_Script_scr_recreate_heart_battle_menu_text_jandroid_duo { var last_text_move_select = global.last_text_move_select var action_3_selected_count = global.action_3_selected_count var action_3_selected_count_2 = global.action_3_selected_count_2 var heart_position = script_execute(gml_Script_scr_return_heart_battle_menu_position) if (text_deadlock_1 == true) instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), text_deadlock_contents_1) else if (last_text_move_select == 0) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_intro) text_deadlock_contents_1 = 3004 text_deadlock_1 = true } else if (global.battle_menu_number == 1 && ((global.enemy_dead == true && global.fight_number == 1) || (global.enemy_dead_2 == true && global.fight_number == 2))) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_dead) text_deadlock_contents_1 = 3033 text_deadlock_1 = true } else if ((global.enemy_low_hp == true && global.enemy_dead == false && global.enemy_spared == false) || (global.enemy_low_hp_2 == true && global.enemy_dead_2 == false && global.enemy_spared_2 == false)) { var random_number = irandom_range(1, 2) if (random_number == 1) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_low_hp_1) text_deadlock_contents_1 = 3016 } else if (random_number == 2) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_low_hp_1_v2) text_deadlock_contents_1 = 3018 } text_deadlock_1 = true } else if ((global.enemy_sparing == true && global.enemy_dead == false && global.enemy_spared == false) || (global.enemy_sparing_2 == true && global.enemy_dead_2 == false && global.enemy_spared_2 == false)) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_sparing) text_deadlock_contents_1 = 3030 text_deadlock_1 = true } else { if (global.enemy_dead == true || global.enemy_spared == true || global.enemy_sparing_2 == true || global.enemy_dead_2 == true) var random_text_move_select = irandom_range(1, 4) else random_text_move_select = irandom_range(5, 8) if (random_text_move_select == 1) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_1) text_deadlock_contents_1 = 3020 text_deadlock_1 = true } else if (random_text_move_select == 2) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_2) text_deadlock_contents_1 = 3021 text_deadlock_1 = true } else if (random_text_move_select == 3) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_3) text_deadlock_contents_1 = 3022 text_deadlock_1 = true } else if (random_text_move_select == 4) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_4) text_deadlock_contents_1 = 3023 text_deadlock_1 = true } else if (random_text_move_select == 5) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_5) text_deadlock_contents_1 = 3023 text_deadlock_1 = true } else if (random_text_move_select == 6) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_6) text_deadlock_contents_1 = 3023 text_deadlock_1 = true } else if (random_text_move_select == 7) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_7) text_deadlock_contents_1 = 3023 text_deadlock_1 = true } else if (random_text_move_select == 8) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_8) text_deadlock_contents_1 = 3023 text_deadlock_1 = true } } }
() //gml_Script_scr_recreate_heart_battle_menu_text_jandroid_duo
2
{
3
    var last_text_move_select = global.last_text_move_select
4
    var action_3_selected_count = global.action_3_selected_count
5
    var action_3_selected_count_2 = global.action_3_selected_count_2
6
    var heart_position = script_execute(gml_Script_scr_return_heart_battle_menu_position)
7
    if (text_deadlock_1 == true)
8
        instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), text_deadlock_contents_1)
9
    else if (last_text_move_select == 0)
10
    {
11
        instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_intro)
12
        text_deadlock_contents_1 = 3004
13
        text_deadlock_1 = true
14
    }
15
    else if (global.battle_menu_number == 1 && ((global.enemy_dead == true && global.fight_number == 1) || (global.enemy_dead_2 == true && global.fight_number == 2)))
16
    {
17
        instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_dead)
18
        text_deadlock_contents_1 = 3033
19
        text_deadlock_1 = true
20
    }
21
    else if ((global.enemy_low_hp == true && global.enemy_dead == false && global.enemy_spared == false) || (global.enemy_low_hp_2 == true && global.enemy_dead_2 == false && global.enemy_spared_2 == false))
22
    {
23
        var random_number = irandom_range(1, 2)
24
        if (random_number == 1)
25
        {
26
            instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_low_hp_1)
27
            text_deadlock_contents_1 = 3016
28
        }
29
        else if (random_number == 2)
30
        {
31
            instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_low_hp_1_v2)
32
            text_deadlock_contents_1 = 3018
33
        }
34
        text_deadlock_1 = true
35
    }
36
    else if ((global.enemy_sparing == true && global.enemy_dead == false && global.enemy_spared == false) || (global.enemy_sparing_2 == true && global.enemy_dead_2 == false && global.enemy_spared_2 == false))
37
    {
38
        instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_sparing)
39
        text_deadlock_contents_1 = 3030
40
        text_deadlock_1 = true
41
    }
42
    else
43
    {
44
        if (global.enemy_dead == true || global.enemy_spared == true || global.enemy_sparing_2 == true || global.enemy_dead_2 == true)
45
            var random_text_move_select = irandom_range(1, 4)
46
        else
47
            random_text_move_select = irandom_range(5, 8)
48
        if (random_text_move_select == 1)
49
        {
50
            instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_1)
51
            text_deadlock_contents_1 = 3020
52
            text_deadlock_1 = true
53
        }
54
        else if (random_text_move_select == 2)
55
        {
56
            instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_2)
57
            text_deadlock_contents_1 = 3021
58
            text_deadlock_1 = true
59
        }
60
        else if (random_text_move_select == 3)
61
        {
62
            instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_3)
63
            text_deadlock_contents_1 = 3022
64
            text_deadlock_1 = true
65
        }
66
        else if (random_text_move_select == 4)
67
        {
68
            instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_4)
69
            text_deadlock_contents_1 = 3023
70
            text_deadlock_1 = true
71
        }
72
        else if (random_text_move_select == 5)
73
        {
74
            instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_5)
75
            text_deadlock_contents_1 = 3023
76
            text_deadlock_1 = true
77
        }
78
        else if (random_text_move_select == 6)
79
        {
80
            instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_6)
81
            text_deadlock_contents_1 = 3023
82
            text_deadlock_1 = true
83
        }
84
        else if (random_text_move_select == 7)
85
        {
86
            instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_7)
87
            text_deadlock_contents_1 = 3023
88
            text_deadlock_1 = true
89
        }
90
        else if (random_text_move_select == 8)
91
        {
92
            instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_8)
93
            text_deadlock_contents_1 = 3023
94
            text_deadlock_1 = true
95
        }
96
    }
97
}