diff options
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/fourisland/frigidearth/MapViewGameState.java | 19 |
1 files 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 | |||
800 | level++; | 800 | level++; |
801 | experience -= 1000; | 801 | experience -= 1000; |
802 | 802 | ||
803 | int hpGain = Functions.rollDice(6, 2) + 3; | ||
804 | health += hpGain; | ||
805 | maxHealth += hpGain; | ||
806 | |||
803 | printMessage("You grow to level " + level + "!"); | 807 | printMessage("You grow to level " + level + "!"); |
804 | } | 808 | } |
805 | } | 809 | } |
@@ -953,16 +957,19 @@ public class MapViewGameState implements GameState | |||
953 | if (grid[playerx][playery] == Tile.Snow) | 957 | if (grid[playerx][playery] == Tile.Snow) |
954 | { | 958 | { |
955 | health--; | 959 | health--; |
956 | } else if (heartbeat == Functions.random(0, 3)) { | 960 | } |
957 | if (health < maxHealth) | 961 | } |
958 | { | 962 | |
959 | health++; | 963 | if ((grid[playerx][playery] != Tile.Snow) && ((heartbeat == Functions.random(0, 7)) || (heartbeat == 8))) |
960 | } | 964 | { |
965 | if (health < maxHealth) | ||
966 | { | ||
967 | health++; | ||
961 | } | 968 | } |
962 | } | 969 | } |
963 | 970 | ||
964 | heartbeat++; | 971 | heartbeat++; |
965 | if (heartbeat == 4) heartbeat = 0; | 972 | if (heartbeat == 8) heartbeat = 0; |
966 | 973 | ||
967 | // Spawn mobs | 974 | // Spawn mobs |
968 | if (spawnTimer == 10) | 975 | if (spawnTimer == 10) |