v2.5.0: various inventory management changes:

- waterskin now fits in the potion bandolier
- styli now fit in the scroll holder
- dark floors no longer contain torches, +1 vision range
- increased the rate that most enemy equip drops fade (also boosted base rate for DM-200 and Golems)
- bombs no longer damage equipment
- stones of intuition now always get 2 uses
This commit is contained in:
Evan Debenham
2024-08-15 13:45:48 -04:00
parent ae46f7bd24
commit 213f7a2f6a
12 changed files with 54 additions and 45 deletions
@@ -461,13 +461,13 @@ items.artifacts.unstablespellbook.read_empowered=The scroll you added to the spe
items.bags.bag.name=backpack items.bags.bag.name=backpack
items.bags.potionbandolier.name=potion bandolier items.bags.potionbandolier.name=potion bandolier
items.bags.potionbandolier.desc=This thick bandolier fits around your chest like a sash, it has many insulated straps on it to hold potion vials.\n\nWhile inside the bandolier, your potions should be protected from the cold. items.bags.potionbandolier.desc=This thick bandolier fits around your chest like a sash, it has many insulated straps on it to hold potion vials, your waterskin, or liquid metal vials.\n\nWhile inside the bandolier, your potions should be protected from the cold.
items.bags.scrollholder.name=scroll holder items.bags.scrollholder.name=scroll holder
items.bags.scrollholder.desc=This tubular container looks like it would hold an astronomer's tools and charts, but your scrolls will fit just as well. There's even a few side compartments which would nicely fit your spell crystals and powders.\n\nThe holder doesn't look very flammable, so your scrolls should be safe from fire inside it. items.bags.scrollholder.desc=This tubular container looks like it would hold an astronomer's tools and charts, but your scrolls will fit just as well. There's even a few side compartments which would nicely fit spell crystals, arcane styli, and arcane resin.\n\nThe holder doesn't look very flammable, so your scrolls should be safe from fire inside it.
items.bags.velvetpouch.name=velvet pouch items.bags.velvetpouch.name=velvet pouch
items.bags.velvetpouch.desc=This small velvet pouch can store many small items in it, such as seeds and runestones. items.bags.velvetpouch.desc=This small velvet pouch can store many small items in it, such as seeds, runestones, and some alchemy ingredients.
items.bags.magicalholster.name=magical holster items.bags.magicalholster.name=magical holster
items.bags.magicalholster.desc=This slim holster is made from some exotic animal hide, and possesses powerful magic which lets it store a massive amount of ranged weapons.\n\nYou can simply reach into the bag and will always grab the item you were looking for.\n\nDue to the holster's magic, wands will charge slightly faster and thrown weapons will last slightly longer inside of it. items.bags.magicalholster.desc=This slim holster is made from some exotic animal hide, and possesses powerful magic which lets it store a massive amount of ranged weapons.\n\nYou can simply reach into the bag and will always grab the item you were looking for.\n\nDue to the holster's magic, wands will charge slightly faster and thrown weapons will last slightly longer inside of it.
@@ -1306,11 +1306,13 @@ items.stones.stoneofflock.desc=This runestone summons magical sheep for a short
items.stones.stoneofintuition.name=stone of intuition items.stones.stoneofintuition.name=stone of intuition
items.stones.stoneofintuition.inv_title=Select an item items.stones.stoneofintuition.inv_title=Select an item
items.stones.stoneofintuition.desc=This runestone holds a weaker version of the magic found in scrolls of identification. Rather than directly identifying an item, it will work on your intuition, allowing you to attempt to identify the type of a potion, scroll, or ring by guessing. A correct guess will also preserve the magic in the stone, allowing it to be used a second time! items.stones.stoneofintuition.desc=This runestone holds a weaker version of the magic found in scrolls of identification. Rather than directly identifying an item, it will work on your intuition, allowing you to attempt to identify the type of a potion, scroll, or ring by guessing.
items.stones.stoneofintuition.break_info=You can use stones of intuition twice before one breaks, _your next use won't consume a stone_.
items.stones.stoneofintuition.break_warn=You've used a stone of intuition previously, so _your next use will consume a stone_.
items.stones.stoneofintuition$wndguess.text=Guess what the type of the unidentified item is. If you guess correctly, the type will be identified! items.stones.stoneofintuition$wndguess.text=Guess what the type of the unidentified item is. If you guess correctly, the type will be identified!
items.stones.stoneofintuition$wndguess.correct=Correct. The item's type has been identified! items.stones.stoneofintuition$wndguess.correct=Correct. The item's type has been identified!
items.stones.stoneofintuition$wndguess.preserved=Your stone of intuition has been preserved!
items.stones.stoneofintuition$wndguess.incorrect=Your guess was incorrect. items.stones.stoneofintuition$wndguess.incorrect=Your guess was incorrect.
items.stones.stoneofintuition$wndguess.break=Your stone of intuition crumbles to dust...
items.stones.stoneofshock.name=stone of shock items.stones.stoneofshock.name=stone of shock
items.stones.stoneofshock.desc=This runestone unleashes a blast of electrical energy which briefly stuns all nearby targets, and grants the thrower wand charge for each target hit. items.stones.stoneofshock.desc=This runestone unleashes a blast of electrical energy which briefly stuns all nearby targets, and grants the thrower wand charge for each target hit.
@@ -47,7 +47,7 @@ public class DM200 extends Mob {
maxLvl = 17; maxLvl = 17;
loot = Random.oneOf(Generator.Category.WEAPON, Generator.Category.ARMOR); loot = Random.oneOf(Generator.Category.WEAPON, Generator.Category.ARMOR);
lootChance = 0.125f; //initially, see lootChance() lootChance = 0.2f; //initially, see lootChance()
properties.add(Property.INORGANIC); properties.add(Property.INORGANIC);
properties.add(Property.LARGE); properties.add(Property.LARGE);
@@ -72,9 +72,9 @@ public class DM200 extends Mob {
@Override @Override
public float lootChance(){ public float lootChance(){
//each drop makes future drops 1/2 as likely //each drop makes future drops 1/3 as likely
// so loot chance looks like: 1/8, 1/16, 1/32, 1/64, etc. // so loot chance looks like: 1/5, 1/15, 1/45, 1/135, etc.
return super.lootChance() * (float)Math.pow(1/2f, Dungeon.LimitedDrops.DM200_EQUIP.count); return super.lootChance() * (float)Math.pow(1/3f, Dungeon.LimitedDrops.DM200_EQUIP.count);
} }
public Item createLoot() { public Item createLoot() {
@@ -49,7 +49,7 @@ public class Golem extends Mob {
maxLvl = 22; maxLvl = 22;
loot = Random.oneOf(Generator.Category.WEAPON, Generator.Category.ARMOR); loot = Random.oneOf(Generator.Category.WEAPON, Generator.Category.ARMOR);
lootChance = 0.125f; //initially, see lootChance() lootChance = 0.2f; //initially, see lootChance()
properties.add(Property.INORGANIC); properties.add(Property.INORGANIC);
properties.add(Property.LARGE); properties.add(Property.LARGE);
@@ -75,9 +75,9 @@ public class Golem extends Mob {
@Override @Override
public float lootChance() { public float lootChance() {
//each drop makes future drops 1/2 as likely //each drop makes future drops 1/3 as likely
// so loot chance looks like: 1/8, 1/16, 1/32, 1/64, etc. // so loot chance looks like: 1/5, 1/15, 1/45, 1/135, etc.
return super.lootChance() * (float)Math.pow(1/2f, Dungeon.LimitedDrops.GOLEM_EQUIP.count); return super.lootChance() * (float)Math.pow(1/3f, Dungeon.LimitedDrops.GOLEM_EQUIP.count);
} }
@Override @Override
@@ -142,9 +142,9 @@ public class Guard extends Mob {
@Override @Override
public float lootChance() { public float lootChance() {
//each drop makes future drops 1/2 as likely //each drop makes future drops 1/3 as likely
// so loot chance looks like: 1/5, 1/10, 1/20, 1/40, etc. // so loot chance looks like: 1/5, 1/15, 1/45, 1/135, etc.
return super.lootChance() * (float)Math.pow(1/2f, Dungeon.LimitedDrops.GUARD_ARM.count); return super.lootChance() * (float)Math.pow(1/3f, Dungeon.LimitedDrops.GUARD_ARM.count);
} }
@Override @Override
@@ -112,9 +112,9 @@ public class Skeleton extends Mob {
@Override @Override
public float lootChance() { public float lootChance() {
//each drop makes future drops 1/2 as likely //each drop makes future drops 1/3 as likely
// so loot chance looks like: 1/6, 1/12, 1/24, 1/48, etc. // so loot chance looks like: 1/6, 1/18, 1/54, 1/162, etc.
return super.lootChance() * (float)Math.pow(1/2f, Dungeon.LimitedDrops.SKELE_WEP.count); return super.lootChance() * (float)Math.pow(1/3f, Dungeon.LimitedDrops.SKELE_WEP.count);
} }
@Override @Override
@@ -68,9 +68,9 @@ public class Slime extends Mob {
@Override @Override
public float lootChance(){ public float lootChance(){
//each drop makes future drops 1/3 as likely //each drop makes future drops 1/4 as likely
// so loot chance looks like: 1/5, 1/15, 1/45, 1/135, etc. // so loot chance looks like: 1/5, 1/20, 1/80, 1/320, etc.
return super.lootChance() * (float)Math.pow(1/3f, Dungeon.LimitedDrops.SLIME_WEP.count); return super.lootChance() * (float)Math.pow(1/4f, Dungeon.LimitedDrops.SLIME_WEP.count);
} }
@Override @Override
@@ -283,7 +283,7 @@ public class Generator {
static { static {
subOrderings.put(Trinket.class, new ArrayList<>(Arrays.asList(Trinket.class, TrinketCatalyst.class))); subOrderings.put(Trinket.class, new ArrayList<>(Arrays.asList(Trinket.class, TrinketCatalyst.class)));
subOrderings.put(MissileWeapon.class, new ArrayList<>(Arrays.asList(MissileWeapon.class, Bomb.class))); subOrderings.put(MissileWeapon.class, new ArrayList<>(Arrays.asList(MissileWeapon.class, Bomb.class)));
subOrderings.put(Potion.class, new ArrayList<>(Arrays.asList(Potion.class, ExoticPotion.class, Brew.class, Elixir.class, LiquidMetal.class))); subOrderings.put(Potion.class, new ArrayList<>(Arrays.asList(Waterskin.class, Potion.class, ExoticPotion.class, Brew.class, Elixir.class, LiquidMetal.class)));
subOrderings.put(Scroll.class, new ArrayList<>(Arrays.asList(Scroll.class, ExoticScroll.class, Spell.class, ArcaneResin.class))); subOrderings.put(Scroll.class, new ArrayList<>(Arrays.asList(Scroll.class, ExoticScroll.class, Spell.class, ArcaneResin.class)));
} }
@@ -31,7 +31,6 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb; import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb;
import com.shatteredpixel.shatteredpixeldungeon.items.food.ChargrilledMeat; import com.shatteredpixel.shatteredpixeldungeon.items.food.ChargrilledMeat;
@@ -275,8 +274,8 @@ public class Heap implements Bundlable {
for (Item item : items.toArray( new Item[0] )) { for (Item item : items.toArray( new Item[0] )) {
//unique items aren't affect by explosions //unique items and equipment aren't affect by explosions
if (item.unique || (item instanceof Armor && ((Armor) item).checkSeal() != null)){ if (item.unique || item.isUpgradable() || item instanceof EquipableItem){
continue; continue;
} }
@@ -296,8 +295,7 @@ public class Heap implements Bundlable {
return; return;
} }
//upgraded items can endure the blast } else {
} else if (item.level() <= 0) {
items.remove( item ); items.remove( item );
} }
@@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.bags;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.LiquidMetal; import com.shatteredpixel.shatteredpixeldungeon.items.LiquidMetal;
import com.shatteredpixel.shatteredpixeldungeon.items.Waterskin;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion; import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
@@ -34,7 +35,7 @@ public class PotionBandolier extends Bag {
@Override @Override
public boolean canHold( Item item ) { public boolean canHold( Item item ) {
if (item instanceof Potion || item instanceof LiquidMetal){ if (item instanceof Potion || item instanceof LiquidMetal || item instanceof Waterskin){
return super.canHold(item); return super.canHold(item);
} else { } else {
return false; return false;
@@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.bags;
import com.shatteredpixel.shatteredpixeldungeon.items.ArcaneResin; import com.shatteredpixel.shatteredpixeldungeon.items.ArcaneResin;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.Stylus;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.items.spells.BeaconOfReturning; import com.shatteredpixel.shatteredpixeldungeon.items.spells.BeaconOfReturning;
import com.shatteredpixel.shatteredpixeldungeon.items.spells.Spell; import com.shatteredpixel.shatteredpixeldungeon.items.spells.Spell;
@@ -36,7 +37,8 @@ public class ScrollHolder extends Bag {
@Override @Override
public boolean canHold( Item item ) { public boolean canHold( Item item ) {
if (item instanceof Scroll || item instanceof Spell || item instanceof ArcaneResin){ if (item instanceof Scroll || item instanceof Spell
|| item instanceof ArcaneResin || item instanceof Stylus){
return super.canHold(item); return super.canHold(item);
} else { } else {
return false; return false;
@@ -22,6 +22,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.stones; package com.shatteredpixel.shatteredpixeldungeon.items.stones;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.effects.Identification; import com.shatteredpixel.shatteredpixeldungeon.effects.Identification;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
@@ -72,6 +73,19 @@ public class StoneOfIntuition extends InventoryStone {
} }
@Override
public String desc() {
String text = super.desc();
if (Dungeon.hero != null){
if (Dungeon.hero.buff(IntuitionUseTracker.class) == null){
text += "\n\n" + Messages.get(this, "break_info");
} else {
text += "\n\n" + Messages.get(this, "break_warn");
}
}
return text;
}
public static class IntuitionUseTracker extends Buff {{ revivePersists = true; }}; public static class IntuitionUseTracker extends Buff {{ revivePersists = true; }};
private static Class curGuess = null; private static Class curGuess = null;
@@ -109,20 +123,14 @@ public class StoneOfIntuition extends InventoryStone {
} }
GLog.p( Messages.get(WndGuess.class, "correct") ); GLog.p( Messages.get(WndGuess.class, "correct") );
curUser.sprite.parent.add( new Identification( curUser.sprite.center().offset( 0, -16 ) ) ); curUser.sprite.parent.add( new Identification( curUser.sprite.center().offset( 0, -16 ) ) );
} else {
if (curUser.buff(IntuitionUseTracker.class) == null){ GLog.w( Messages.get(WndGuess.class, "incorrect") );
GLog.h( Messages.get(WndGuess.class, "preserved") ); }
Buff.affect(curUser, IntuitionUseTracker.class); if (curUser.buff(IntuitionUseTracker.class) == null){
} else { Buff.affect(curUser, IntuitionUseTracker.class);
curItem.detach( curUser.belongings.backpack );
curUser.buff(IntuitionUseTracker.class).detach();
}
} else { } else {
curItem.detach( curUser.belongings.backpack ); curItem.detach( curUser.belongings.backpack );
if (curUser.buff(IntuitionUseTracker.class) != null) { curUser.buff(IntuitionUseTracker.class).detach();
curUser.buff(IntuitionUseTracker.class).detach();
}
GLog.n( Messages.get(WndGuess.class, "incorrect") );
} }
curGuess = null; curGuess = null;
hide(); hide();
@@ -63,7 +63,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.Stylus; import com.shatteredpixel.shatteredpixeldungeon.items.Stylus;
import com.shatteredpixel.shatteredpixeldungeon.items.Torch;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TalismanOfForesight; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TalismanOfForesight;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass;
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb; import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb;
@@ -260,8 +259,7 @@ public abstract class Level implements Bundlable {
break; break;
case 3: case 3:
feeling = Feeling.DARK; feeling = Feeling.DARK;
addItemToSpawn(new Torch()); viewDistance = Math.round(5*viewDistance/8f);
viewDistance = Math.round(viewDistance/2f);
break; break;
case 4: case 4:
feeling = Feeling.LARGE; feeling = Feeling.LARGE;