mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-03-01 18:29:12 +00:00
Advance time a little after combat.
This commit is contained in:
parent
7c911c34c3
commit
a520c90646
@ -374,7 +374,7 @@ def checkMarks()#0
|
||||
if fieldLen <> ^($200 + mapNum); err = 'C'; break; fin
|
||||
sp = sp + fieldLen
|
||||
loop
|
||||
if sp <> limit; err = 'D'; fin
|
||||
if !err and sp <> limit; err = 'D'; fin
|
||||
if err; printf1("code=%c\n", err); fatal("corrupt automap"); fin
|
||||
|
||||
// Print out the heap fullness, for later debugging
|
||||
|
@ -27,6 +27,10 @@ const CLOCK_ADV_3D_HOURS = 0
|
||||
const CLOCK_ADV_3D_MINS = 0
|
||||
const CLOCK_ADV_3D_SECS = 30
|
||||
|
||||
const CLOCK_ADV_COMBAT_HOURS = 0
|
||||
const CLOCK_ADV_COMBAT_MINS = 10
|
||||
const CLOCK_ADV_COMBAT_SECS = 0
|
||||
|
||||
// Raycaster tables - must match values in render.i
|
||||
const RAY_TABLE_START = $A800
|
||||
const RAY_TABLE_SIZE = $1781
|
||||
@ -2165,7 +2169,7 @@ def advTime(hours, mins, secs)#0
|
||||
if (prevHour / 12) <> (global->b_hour / 12)
|
||||
player = global=>p_players
|
||||
while player
|
||||
add = (rand16 % player->b_stamina)/3
|
||||
add = (rand16 % (player->b_stamina+1))/3
|
||||
setStat(player, @S_HEALTH, player=>w_health + add)
|
||||
player = player=>p_nextObj
|
||||
loop
|
||||
@ -2852,6 +2856,9 @@ def doCombat(mapCode, backUpOnFlee)#1
|
||||
fin
|
||||
returnFromEngine(!inScript) // only re-render if outside script
|
||||
|
||||
// Advance time a little. It's tricky advancing during combat; this is an ok substitute.
|
||||
advTime(CLOCK_ADV_COMBAT_HOURS, CLOCK_ADV_COMBAT_MINS, CLOCK_ADV_COMBAT_SECS)
|
||||
|
||||
// If the party fled the combat instead of winning, back up to previous square.
|
||||
if !result and backUpOnFlee
|
||||
moveWayBackward()
|
||||
|
Loading…
x
Reference in New Issue
Block a user