From ff100d50d611db8ae0541e67c652c7cfe63c3d1c Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Mon, 4 Jun 2012 12:56:50 -0400 Subject: Tweaked battle system There is now an upper limit on mobs in a level, experience gained is now inversely proportional to the level SQUARED, and the player's attack power is now the square root of their level. --- src/com/fourisland/frigidearth/MapViewGameState.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/com/fourisland') diff --git a/src/com/fourisland/frigidearth/MapViewGameState.java b/src/com/fourisland/frigidearth/MapViewGameState.java index 0b61a19..64ac2de 100644 --- a/src/com/fourisland/frigidearth/MapViewGameState.java +++ b/src/com/fourisland/frigidearth/MapViewGameState.java @@ -787,12 +787,12 @@ public class MapViewGameState implements GameState if (mob.getPosition().equals(to)) { printMessage("You hit the " + mob.getName().toLowerCase()); - mob.health -= level; + mob.health -= (int) (Math.floor(Math.sqrt(level))); if (mob.health <= 0) { printMessage("You killed the " + mob.getName().toLowerCase() + "!"); - experience += (mob.getBaseExperience()/level); + experience += (mob.getBaseExperience()/(level*level)); mobs.remove(mob); if (experience >= 1000) @@ -976,13 +976,16 @@ public class MapViewGameState implements GameState { spawnTimer = 0; - Room r = rooms.get(Functions.random(0, rooms.size()-1)); - if (r.canGenerateMonsters()) + if (mobs.size() < (rooms.size()*2)) { - Mob m = createInDepthMonster(r); - if (!gridLighting[m.x][m.y]) + Room r = rooms.get(Functions.random(0, rooms.size()-1)); + if (r.canGenerateMonsters()) { - mobs.add(m); + Mob m = createInDepthMonster(r); + if (!gridLighting[m.x][m.y]) + { + mobs.add(m); + } } } } else { -- cgit 1.4.1