about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/com/fourisland/frigidearth/MapViewGameState.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/com/fourisland/frigidearth/MapViewGameState.java b/src/com/fourisland/frigidearth/MapViewGameState.java index 71f803a..30a2c93 100644 --- a/src/com/fourisland/frigidearth/MapViewGameState.java +++ b/src/com/fourisland/frigidearth/MapViewGameState.java
@@ -813,9 +813,9 @@ public class MapViewGameState implements GameState
813 if (mob.health <= 0) 813 if (mob.health <= 0)
814 { 814 {
815 printMessage("You killed the " + mob.getName().toLowerCase() + "!"); 815 printMessage("You killed the " + mob.getName().toLowerCase() + "!");
816 Main.currentGame.experience += (mob.getBaseExperience()/(Main.currentGame.level*Main.currentGame.level));
817 mobs.remove(mob); 816 mobs.remove(mob);
818 817
818 Main.currentGame.experience += (mob.getBaseExperience()/(Main.currentGame.level*Main.currentGame.level));
819 if (Main.currentGame.experience >= 1000) 819 if (Main.currentGame.experience >= 1000)
820 { 820 {
821 Main.currentGame.level++; 821 Main.currentGame.level++;
@@ -827,6 +827,16 @@ public class MapViewGameState implements GameState
827 827
828 printMessage("You grow to level " + Main.currentGame.level + "!"); 828 printMessage("You grow to level " + Main.currentGame.level + "!");
829 } 829 }
830
831 if (Functions.random(0, 1000) < (mob.getBaseExperience() / (floor*floor)))
832 {
833 ItemInstance ii = new ItemInstance();
834 ii.item = Item.getWeightedRandomItem();
835 ii.x = mob.x;
836 ii.y = mob.y;
837
838 items.add(ii);
839 }
830 } 840 }
831 841
832 foundMob = true; 842 foundMob = true;