v0.6.3: shops now stock two random tipped darts instead of two darts

also reduced the droprate for blandfruit seeds
This commit is contained in:
Evan Debenham 2018-02-13 20:10:21 -05:00 committed by Evan Debenham
parent 0d0f2df689
commit d05315e50a
6 changed files with 22 additions and 6 deletions

View File

@ -406,7 +406,7 @@ public class Generator {
Dreamfoil.Seed.class,
Stormvine.Seed.class,
Starflower.Seed.class};
SEED.probs = new float[]{ 12, 12, 12, 12, 12, 12, 12, 0, 3, 12, 12, 1 };
SEED.probs = new float[]{ 10, 10, 10, 10, 10, 10, 10, 0, 2, 10, 10, 1 };
}
}

View File

@ -130,7 +130,7 @@ public class WandOfRegrowth extends Wand {
Plant.Seed seed = (Plant.Seed) Generator.random(Generator.Category.SEED);
if (seed instanceof BlandfruitBush.Seed) {
if (Random.Int(5) - Dungeon.LimitedDrops.BLANDFRUIT_SEED.count >= 0) {
if (Random.Int(3) - Dungeon.LimitedDrops.BLANDFRUIT_SEED.count >= 0) {
floor.plant(seed, cells.next());
Dungeon.LimitedDrops.BLANDFRUIT_SEED.count++;
}

View File

@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.PinCushion;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.Recipe;
import com.shatteredpixel.shatteredpixeldungeon.plants.Blindweed;
@ -83,6 +84,21 @@ public abstract class TippedDart extends Dart {
types.put(Sungrass.Seed.class, HealingDart.class);
}
public static TippedDart randomTipped(){
Plant.Seed s;
do{
s = (Plant.Seed) Generator.random(Generator.Category.SEED);
} while (!types.containsKey(s.getClass()));
try{
return (TippedDart) types.get(s.getClass()).newInstance().quantity(2);
} catch (Exception e) {
ShatteredPixelDungeon.reportException(e);
return null;
}
}
public static class TipDart extends Recipe{
@Override

View File

@ -69,7 +69,7 @@ public class HighGrass {
Item seed = Generator.random(Generator.Category.SEED);
if (seed instanceof BlandfruitBush.Seed) {
if (Random.Int(5) - Dungeon.LimitedDrops.BLANDFRUIT_SEED.count >= 0) {
if (Random.Int(3) - Dungeon.LimitedDrops.BLANDFRUIT_SEED.count >= 0) {
level.drop(seed, pos).sprite.drop();
Dungeon.LimitedDrops.BLANDFRUIT_SEED.count++;
}

View File

@ -68,8 +68,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.Shuriken;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.ThrowingHammer;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.Tomahawk;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.Trident;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts.Dart;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts.IncendiaryDart;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts.TippedDart;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
@ -202,7 +202,7 @@ public class ShopRoom extends SpecialRoom {
break;
}
itemsToSpawn.add( new Dart().quantity(2) );
itemsToSpawn.add( TippedDart.randomTipped() );
itemsToSpawn.add( new MerchantsBeacon() );

View File

@ -89,7 +89,7 @@ public abstract class Plant implements Bundlable {
Item seed = Generator.random(Generator.Category.SEED);
if (seed instanceof BlandfruitBush.Seed) {
if (Random.Int(5) - Dungeon.LimitedDrops.BLANDFRUIT_SEED.count >= 0) {
if (Random.Int(3) - Dungeon.LimitedDrops.BLANDFRUIT_SEED.count >= 0) {
Dungeon.level.drop(seed, pos).sprite.drop();
Dungeon.LimitedDrops.BLANDFRUIT_SEED.count++;
}