Skip to content

Commit

Permalink
more balance and exit message
Browse files Browse the repository at this point in the history
  • Loading branch information
metavee committed Aug 6, 2024
1 parent 457c340 commit 2fc87f2
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions puzdug.asm
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ player_addr: equ entity_arr
player_health_str_addr: equ (hp_str + 4)
enemy_str_addr: equ (enemy_str + 5)

player_start_hp: equ 125
player_start_hp: equ 150
player_atk: equ 20
enemy_start_hp: equ 100
enemy_atk: equ 10
enemy_atk: equ 15

num_start_enemies: equ 9

Expand Down Expand Up @@ -428,8 +428,14 @@ do_lose_wait:
call waiter
loop do_lose_wait
do_exit:
call scroll_cursor
mov bx,exit_str
mov dl,2
mov dh,20
mov ah, 0x0f ; white text black bg
call draw_text
%ifdef DOS
call read_keyboard
call scroll_cursor
int 0x20
%else
jmp $ ; infinite loop
Expand Down Expand Up @@ -724,6 +730,13 @@ game_over_str:
victory_str:
db "VICTORY ATTAINED", 0

exit_str:
%ifdef DOS
db "The game has ended. Press any key to exit", 0
%else
db "The game has ended. You may now power off your computer", 0
%endif

scroll_cursor:
; scroll the screen by typing one page full of newlines in teletype
mov cx, screen_height
Expand Down

0 comments on commit 2fc87f2

Please sign in to comment.