mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-12-22 22:30:32 +00:00
Made death and combat win configurable instead of hard coded.
This commit is contained in:
parent
2c50d19c48
commit
2499d41461
@ -488,9 +488,13 @@ def startCombat(mapCode)
|
||||
elsif n == 'F'
|
||||
displayStr("\n\nFleeing... \n")
|
||||
return 0
|
||||
// Secret option for testing: just win
|
||||
// Secret option for testing: just die
|
||||
elsif n == '#' and global->b_godmode
|
||||
displayStr("\n\n")
|
||||
return 99
|
||||
elsif n == '*' and global->b_godmode
|
||||
displayStr("\n\n")
|
||||
return -99
|
||||
fin
|
||||
beep()
|
||||
loop
|
||||
@ -521,13 +525,14 @@ end
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Returns: zero if fled, non-zero if won
|
||||
def _combat_zoneEncounter(s_encZone)
|
||||
word p, l
|
||||
byte answer
|
||||
word p, l, answer
|
||||
|
||||
// Show portrait and threat details, find out if player wants to fight (vs. run)
|
||||
answer = startCombat(s_encZone)
|
||||
if answer == 99
|
||||
killAllEnemies()
|
||||
elsif answer == -99
|
||||
return answer // special code for death
|
||||
elsif !answer
|
||||
isFleeing = TRUE
|
||||
fin
|
||||
@ -547,7 +552,6 @@ def _combat_zoneEncounter(s_encZone)
|
||||
p = global=>p_combatFirst
|
||||
while p
|
||||
if !nPlayersFighting
|
||||
callGlobalFunc(GS_DEATH, 0, 0, 0)
|
||||
return -99 // special code for death
|
||||
elsif !nEnemiesFighting
|
||||
callGlobalFunc(GS_COMBAT_WIN, 0, 0, 0)
|
||||
|
@ -2230,9 +2230,7 @@ end
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
def playerDeath()
|
||||
displayStr("\nYou have died. Press any key to reload.")
|
||||
setPortrait(POdeath)
|
||||
getUpperKey()
|
||||
callGlobalFunc(GS_DEATH, 0, 0, 0)
|
||||
startGame(FALSE) // don't ask, just load
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user