1 |
if instance_exists(obj_dialogue_battle_flee) |
2 |
{ |
3 |
switch global.enemy_count |
4 |
{ |
5 |
case 1: |
6 |
if (global.enemy_dead == false) |
7 |
global.enemy_exp = 0 |
8 |
global.player_exp += global.enemy_exp |
9 |
global.player_gold += global.enemy_gold |
10 |
break |
11 |
case 2: |
12 |
if (global.enemy_dead == false) |
13 |
global.enemy_exp = 0 |
14 |
if (global.enemy_dead_2 == false) |
15 |
global.enemy_exp_2 = 0 |
16 |
global.player_exp += (global.enemy_exp + global.enemy_exp_2) |
17 |
global.player_gold += (global.enemy_gold + global.enemy_gold_2) |
18 |
break |
19 |
case 3: |
20 |
if (global.enemy_dead == false) |
21 |
global.enemy_exp = 0 |
22 |
if (global.enemy_dead_2 == false) |
23 |
global.enemy_exp_2 = 0 |
24 |
if (global.enemy_dead_3 == false) |
25 |
global.enemy_exp_3 = 0 |
26 |
global.player_exp += (global.enemy_exp + global.enemy_exp_2 + global.enemy_exp_3) |
27 |
global.player_gold += (global.enemy_gold + global.enemy_gold_2 + global.enemy_gold_3) |
28 |
break |
29 |
} |
30 |
|
31 |
if (global.player_exp >= global.player_exp_next[global.player_level]) |
32 |
{ |
33 |
var i = global.player_level |
34 |
while (i <= 20) |
35 |
{ |
36 |
if (global.player_exp >= global.player_exp_next[i]) |
37 |
{ |
38 |
global.player_level = i + 1 |
39 |
global.max_hp_self = global.player_hp_next[i] |
40 |
global.player_attack = global.player_attack_next[i] |
41 |
global.player_defense = global.player_defense_next[i] |
42 |
i += 1 |
43 |
continue |
44 |
} |
45 |
else |
46 |
break |
47 |
} |
48 |
} |
49 |
} |
50 |
obj_pl.image_alpha = 1 |
51 |
if (global.party_member != noone) |
52 |
global.party_member.image_alpha = 1 |
53 |
scr_cutscene_end() |
54 |
room_goto(asset_get_index(global.current_room_overworld)) |
55 |
fade_out = true |