Browse Source

Add a getStat function

tags/v0.1.3
Fen Dweller 5 years ago
parent
commit
5fd3c7392e
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      game.js

+ 4
- 0
game.js View File

@@ -55,6 +55,10 @@ function initGamePostSetup(state) {
createStatDisplays(state.player.stats, "player");
}

function getStat(stat, state) {
return state.palyer.stats[stat].value;
}

function changeStat(stat, amount, state) {
let value = state.player.stats[stat].value;
value += amount;


Loading…
Cancel
Save