v1.3.0: buffed the loot from crystal path rooms
This commit is contained in:
committed by
Evan Debenham
parent
0690524ea7
commit
e265363e0a
@@ -27,6 +27,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.keys.CrystalKey;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTransmutation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
||||
@@ -126,25 +128,20 @@ public class CrystalPathRoom extends SpecialRoom {
|
||||
Item item;
|
||||
switch (i){
|
||||
case 0: default:
|
||||
item = new Gold(Random.NormalIntRange(5, 12));
|
||||
item = new Gold().random();
|
||||
break;
|
||||
case 1:
|
||||
item = Generator.random(Random.oneOf(
|
||||
Generator.Category.SEED,
|
||||
Generator.Category.STONE)
|
||||
);
|
||||
item = Generator.random(Generator.Category.POTION);
|
||||
break;
|
||||
case 2:
|
||||
item = Generator.random(Random.oneOf(
|
||||
Generator.Category.POTION,
|
||||
Generator.Category.SCROLL)
|
||||
);
|
||||
item = Generator.random(Generator.Category.SCROLL);
|
||||
break;
|
||||
case 3:
|
||||
item = Generator.random(Random.oneOf(
|
||||
Generator.Category.WEAPON,
|
||||
Generator.Category.ARMOR)
|
||||
);
|
||||
if (Random.Int(3) == 0){
|
||||
item = new ScrollOfTransmutation();
|
||||
} else {
|
||||
item = new PotionOfExperience();
|
||||
}
|
||||
break;
|
||||
}
|
||||
level.drop(item, pos);
|
||||
|
||||
@@ -79,19 +79,18 @@ public abstract class SpecialRoom extends Room {
|
||||
}
|
||||
}
|
||||
|
||||
//10 special rooms which give equipment more often than consumables (or as often as)
|
||||
//9 special rooms which give equipment more often than consumables (or as often as)
|
||||
private static final ArrayList<Class<? extends SpecialRoom>> EQUIP_SPECIALS = new ArrayList<>( Arrays.asList(
|
||||
WeakFloorRoom.class, CryptRoom.class, PoolRoom.class, ArmoryRoom.class, SentryRoom.class,
|
||||
StatueRoom.class, CrystalVaultRoom.class, CrystalPathRoom.class, CrystalChoiceRoom.class,
|
||||
SacrificeRoom.class
|
||||
StatueRoom.class, CrystalVaultRoom.class, CrystalChoiceRoom.class, SacrificeRoom.class
|
||||
));
|
||||
|
||||
//9 special rooms which give consumables more often than equipment
|
||||
//10 special rooms which give consumables more often than equipment
|
||||
//note that alchemy rooms are spawned separately
|
||||
private static final ArrayList<Class<? extends SpecialRoom>> CONSUMABLE_SPECIALS = new ArrayList<>( Arrays.asList(
|
||||
RunestoneRoom.class, GardenRoom.class, LibraryRoom.class, StorageRoom.class,
|
||||
TreasuryRoom.class, MagicWellRoom.class, ToxicGasRoom.class, MagicalFireRoom.class,
|
||||
TrapsRoom.class
|
||||
TrapsRoom.class, CrystalPathRoom.class
|
||||
) );
|
||||
|
||||
//only one special that uses crystal keys per floor
|
||||
@@ -118,10 +117,8 @@ public abstract class SpecialRoom extends Room {
|
||||
Random.shuffle(runEquipSpecials);
|
||||
Random.shuffle(runConsSpecials);
|
||||
|
||||
// TODO currently always an equip special first as there's 1 more of them, adjust as needed if adding more
|
||||
/*if (Random.Int(2) == 0){
|
||||
runSpecials.add(runConsSpecials.remove(0));
|
||||
}*/
|
||||
// TODO currently always a consumable special first as there's 1 more of them, adjust as needed if adding more
|
||||
runSpecials.add(runConsSpecials.remove(0));
|
||||
|
||||
while (!runEquipSpecials.isEmpty() || !runConsSpecials.isEmpty()){
|
||||
if (!runEquipSpecials.isEmpty()) runSpecials.add(runEquipSpecials.remove(0));
|
||||
|
||||
Reference in New Issue
Block a user