v0.2.3: refactored item dropping, added to/refactored drop limiter variables. Health potions are no longer farmable. This needs testing!
This commit is contained in:
@@ -190,15 +190,15 @@ public abstract class Level implements Bundlable {
|
||||
addItemToSpawn( Generator.random( Generator.Category.FOOD ) );
|
||||
if (Dungeon.posNeeded()) {
|
||||
addItemToSpawn( new PotionOfStrength() );
|
||||
Dungeon.potionOfStrength++;
|
||||
Dungeon.limitedDrops.strengthPotions.count++;
|
||||
}
|
||||
if (Dungeon.soeNeeded()) {
|
||||
addItemToSpawn( new ScrollOfUpgrade() );
|
||||
Dungeon.scrollsOfUpgrade++;
|
||||
Dungeon.limitedDrops.upgradeScrolls.count++;
|
||||
}
|
||||
if (Dungeon.asNeeded()) {
|
||||
addItemToSpawn( new Stylus() );
|
||||
Dungeon.arcaneStyli++;
|
||||
Dungeon.limitedDrops.arcaneStyli.count++;
|
||||
}
|
||||
|
||||
int bonus = 0;
|
||||
@@ -571,7 +571,8 @@ public abstract class Level implements Bundlable {
|
||||
if ((Dungeon.isChallenged( Challenges.NO_FOOD ) && (item instanceof Food || item instanceof BlandfruitBush.Seed)) ||
|
||||
(Dungeon.isChallenged( Challenges.NO_ARMOR ) && item instanceof Armor) ||
|
||||
(Dungeon.isChallenged( Challenges.NO_HEALING ) && item instanceof PotionOfHealing) ||
|
||||
(Dungeon.isChallenged( Challenges.NO_HERBALISM ) && (item instanceof Plant.Seed || item instanceof Dewdrop))) {
|
||||
(Dungeon.isChallenged( Challenges.NO_HERBALISM ) && (item instanceof Plant.Seed || item instanceof Dewdrop)) ||
|
||||
item == null) {
|
||||
|
||||
Heap heap = new Heap();
|
||||
GameScene.add( heap );
|
||||
|
||||
@@ -28,9 +28,12 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.LeafParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Dewdrop;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.SandalsOfNature;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.plants.BlandfruitBush;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
@@ -59,7 +62,15 @@ public class HighGrass {
|
||||
if (naturalismLevel >= 0) {
|
||||
// Seed
|
||||
if (Random.Int(18 - ((int) (naturalismLevel * 3.34))) == 0) {
|
||||
level.drop(Generator.random(Generator.Category.SEED), pos).sprite.drop();
|
||||
Item seed = Generator.random(Generator.Category.SEED);
|
||||
|
||||
if (seed instanceof BlandfruitBush.Seed) {
|
||||
if (Random.Int(15) - Dungeon.limitedDrops.blandfruitSeed.count >= 0) {
|
||||
level.drop(seed, pos).sprite.drop();
|
||||
Dungeon.limitedDrops.blandfruitSeed.count++;
|
||||
}
|
||||
} else
|
||||
level.drop(seed, pos).sprite.drop();
|
||||
}
|
||||
|
||||
// Dew
|
||||
|
||||
Reference in New Issue
Block a user