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