diff options
| author | realtradam <[email protected]> | 2020-11-22 06:35:05 -0500 |
|---|---|---|
| committer | realtradam <[email protected]> | 2020-11-22 06:35:05 -0500 |
| commit | 7bf6ab420b27165e8c892f4ecf8eff7e3d990a3e (patch) | |
| tree | ba0365b31891037e9f40daaf6b86fa754b0708b0 | |
| parent | ef1f5eb64e2c10e2cb98ad3b6298578ba76a469e (diff) | |
| download | cyberpunk-red-terminal-sheet-master.tar.gz cyberpunk-red-terminal-sheet-master.zip | |
| -rw-r--r-- | run.rb | 36 |
1 files changed, 35 insertions, 1 deletions
@@ -105,6 +105,18 @@ class Character } sum end + def hitPoints + 10 + (5 * ((@@stats[8][1] + @@stats[5][1])/2.0).ceil) + end + def SWWThreshold + (self.hitPoints.to_f / 2.0).ceil + end + def deathSave + @@stats[8][1] + end + def humanity + @@stats[9][1] * 10 + end def totalSkills sum = 0 @@skills.each do |group| @@ -159,7 +171,7 @@ class Interface Curses.addstr("Points Spent: " + yourStats.totalStats.to_s+ "/62") } end - + #Displaying all stats + the "selector" yourStats.statsVar.each_with_index { |pair,index| Curses.setpos(index + 5, 3) @@ -212,7 +224,29 @@ class Interface } end } + + spacing = 25 + numberSpacing = spacing - 1 + + Curses.setpos(5, spacing) + Curses.addstr(":Hit Points") + Curses.setpos(5, numberSpacing - yourStats.hitPoints.to_s.length) + Curses.addstr(yourStats.hitPoints.to_s) + + Curses.setpos(7, spacing) + Curses.addstr(":Seriously Wounded Wound Threshold") + Curses.setpos(7, numberSpacing - yourStats.SWWThreshold.to_s.length) + Curses.addstr(yourStats.SWWThreshold.to_s) + + Curses.setpos(9, spacing) + Curses.addstr(":Death Save") + Curses.setpos(9, numberSpacing - yourStats.deathSave.to_s.length) + Curses.addstr(yourStats.deathSave.to_s) + Curses.setpos(11, spacing) + Curses.addstr(":Humanity") + Curses.setpos(11, numberSpacing - yourStats.humanity.to_s.length) + Curses.addstr(yourStats.humanity.to_s) Curses.refresh key = Curses.getch #User input |
