mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-06-09 23:29:37 +00:00
Stamina now immediately increases health. At level-up, stam/2 + 2d6 is added (instead of stam + 2d6)
This commit is contained in:
parent
a6f974da33
commit
d39ef89c86
|
@ -1847,7 +1847,6 @@ end
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
export def soundPlayEmu(numAndFlgs)#0
|
||||
printf1("soundPlayEmu($%x)\n", numAndFlgs)
|
||||
^EMUSOUND_PLAY = numAndFlgs
|
||||
end
|
||||
|
||||
|
@ -3396,7 +3395,7 @@ export def addXP(player, val)#0
|
|||
// Level up!
|
||||
player->b_level++
|
||||
player->b_skillPoints = player->b_skillPoints + callGlobalFunc(GS_LEVEL_S_P, player->b_level, 0, 0)
|
||||
player=>w_maxHealth = player=>w_maxHealth + player->b_stamina + rollDice($2600) // stam + 2d6
|
||||
player=>w_maxHealth = player=>w_maxHealth + ((player->b_stamina+1)>>1) + rollDice($2600) // roundup(stam/2) + 2d6
|
||||
player=>w_health = player=>w_maxHealth // let's make leveling up an extra nice thing
|
||||
needShowParty = TRUE
|
||||
|
||||
|
|
|
@ -266,6 +266,8 @@ end
|
|||
// Returns 1 to redisplay everything, 0 if only minor change
|
||||
def adjustSkill(player, skillNum, dir)#0
|
||||
word p
|
||||
word stamDiff
|
||||
stamDiff = player->b_stamina
|
||||
p = skillPtr[skillNum]
|
||||
if dir < 0 and skillMin[skillNum] == ^p
|
||||
beep; return
|
||||
|
@ -289,6 +291,11 @@ def adjustSkill(player, skillNum, dir)#0
|
|||
if player->b_skillPoints < skillMin[nSkills]; rawDisplayStr("^I"); fin
|
||||
rightJustifyStr(sprintf1(" %d ", player->b_skillPoints), skillX[nSkills]+SKILL_JUST_OFF)
|
||||
rawDisplayStr("^N")
|
||||
|
||||
// Adjusting stamina also immediately affects health
|
||||
stamDiff = player->b_stamina - stamDiff
|
||||
player=>w_maxHealth = max(0, player=>w_maxHealth + stamDiff)
|
||||
player=>w_health = max(0, player=>w_health + stamDiff)
|
||||
end
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue
Block a user