about summary refs log tree commit diff stats
path: root/src/com
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2012-06-04 11:47:34 -0400
committerStarla Insigna <hatkirby@fourisland.com>2012-06-04 11:47:34 -0400
commitfac33bc82aaa8d7282600f6322279612858297ec (patch)
tree0a887edfceb5c8b47c1a221fd875d264c1215107 /src/com
parent4c1ce3df77273d198c6d8f42fd0e22b55ec9f3cd (diff)
downloadfrigidearth-fac33bc82aaa8d7282600f6322279612858297ec.tar.gz
frigidearth-fac33bc82aaa8d7282600f6322279612858297ec.tar.bz2
frigidearth-fac33bc82aaa8d7282600f6322279612858297ec.zip
Added HP gain for growing a level
Diffstat (limited to 'src/com')
-rw-r--r--src/com/fourisland/frigidearth/MapViewGameState.java19
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)