| 1 |
global.player_exp += global.enemy_exp; |
| 2 |
global.player_gold += global.enemy_gold; |
| 3 |
if (global.game_mode == "customs") |
| 4 |
{ |
| 5 |
message[0] = "* YOU WON!#* You earned " + string(global.enemy_exp) + " XP and " + string(global.enemy_gold) + " gold."; |
| 6 |
} |
| 7 |
else if (global.game_mode == "yellow") |
| 8 |
{ |
| 9 |
if (global.battle_enemy_name == "decibat") |
| 10 |
message[0] = "* Sweet silence...#* You earned " + string(global.enemy_exp) + " XP and " + string(global.enemy_gold) + " gold."; |
| 11 |
else |
| 12 |
message[0] = "* YOU WON!#* You earned " + string(global.enemy_exp) + " XP and " + string(global.enemy_gold) + " gold."; |
| 13 |
} |
| 14 |
if (global.player_exp >= global.player_exp_next[global.player_level]) |
| 15 |
{ |
| 16 |
for (var i = global.player_level; i <= 20; i += 1) |
| 17 |
{ |
| 18 |
if (global.player_exp >= global.player_exp_next[i]) |
| 19 |
{ |
| 20 |
global.player_level = i + 1; |
| 21 |
global.max_hp_self = global.player_hp_next[i + 1]; |
| 22 |
global.player_attack = global.player_attack_next[i + 1]; |
| 23 |
global.player_defense = global.player_defense_next[i + 1]; |
| 24 |
} |
| 25 |
else |
| 26 |
{ |
| 27 |
break; |
| 28 |
} |
| 29 |
} |
| 30 |
audio_play_sound(snd_love_increased, 20, 0); |
| 31 |
message[0] = message[0] + "#* Your LOVE increased."; |
| 32 |
} |
| 33 |
message_current = 0; |
| 34 |
message_end = 0; |
| 35 |
message_draw = ""; |
| 36 |
increase = global.text_speed; |
| 37 |
characters = 0; |
| 38 |
hold = 0; |
| 39 |
message_length = string_length(message[message_current]); |
| 40 |
can_check_display_text = false; |
| 41 |
display_text = false; |
| 42 |
alarm[0] = 1; |
| 43 |
moveable = true; |
| 44 |
script_execute(scr_generate_text_counters); |