From fac33bc82aaa8d7282600f6322279612858297ec Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Mon, 4 Jun 2012 11:47:34 -0400 Subject: Added HP gain for growing a level --- src/com/fourisland/frigidearth/MapViewGameState.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/com/fourisland/frigidearth/MapViewGameState.java b/src/com/fourisland/frigidearth/MapViewGameState.java index 3b8489d..0b61a19 100644 --- a/src/com/fourisland/frigidearth/MapViewGameState.java +++ b/src/com/fourisland/frigidearth/MapViewGameState.java @@ -800,6 +800,10 @@ public class MapViewGameState implements GameState level++; experience -= 1000; + int hpGain = Functions.rollDice(6, 2) + 3; + health += hpGain; + maxHealth += hpGain; + printMessage("You grow to level " + level + "!"); } } @@ -953,16 +957,19 @@ public class MapViewGameState implements GameState if (grid[playerx][playery] == Tile.Snow) { health--; - } else if (heartbeat == Functions.random(0, 3)) { - if (health < maxHealth) - { - health++; - } + } + } + + if ((grid[playerx][playery] != Tile.Snow) && ((heartbeat == Functions.random(0, 7)) || (heartbeat == 8))) + { + if (health < maxHealth) + { + health++; } } heartbeat++; - if (heartbeat == 4) heartbeat = 0; + if (heartbeat == 8) heartbeat = 0; // Spawn mobs if (spawnTimer == 10) -- cgit 1.4.1