From 08271837b711c24f41691857622a68a62617093a Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 9 Dec 2014 15:17:51 -0500 Subject: [PATCH] v0.2.3: tweaks to generator removing artifacts from spawn chances --- .../shatteredpixeldungeon/items/Generator.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java index ab2dc76ec..8f13a3672 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java @@ -19,7 +19,6 @@ package com.shatteredpixel.shatteredpixeldungeon.items; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Wandmaker.Rotberry; import com.shatteredpixel.shatteredpixeldungeon.items.armor.*; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.*; @@ -338,9 +337,12 @@ public class Generator { Category cat = Category.ARTIFACT; for (int i = 0; i < cat.classes.length; i++) if (cat.classes[i].equals(artifact.getClass())) { - cat.probs[i] = 0; - spawnedArtifacts.add(artifact.getClass().getSimpleName()); - return true; + if (cat.probs[i] == 1){ + cat.probs[i] = 0; + spawnedArtifacts.add(artifact.getClass().getSimpleName()); + return true; + } else + return false; } return false;