From 7a109ec515f569be2f2ebaf6758dfa5a9825d4a7 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 10 Jul 2025 14:32:09 -0400 Subject: [PATCH] v3.2.0: balance changes for T1 thrown weapons --- core/src/main/assets/messages/items/items.properties | 12 +++++++----- .../shatteredpixeldungeon/actors/hero/HeroClass.java | 7 ++++--- .../shatteredpixeldungeon/items/LiquidMetal.java | 11 ++++++++--- .../items/weapon/missiles/MissileWeapon.java | 7 +++++-- .../items/weapon/missiles/ThrowingClub.java | 2 +- .../items/weapon/missiles/ThrowingSpike.java | 1 + 6 files changed, 26 insertions(+), 14 deletions(-) diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index 8a662c027..54215d98a 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -2170,10 +2170,11 @@ items.weapon.missiles.javelin.desc=These larger throwing spears are weighted to items.weapon.missiles.kunai.name=kunai items.weapon.missiles.kunai.desc=These small knives are very powerful in the hands of a skilled user. They are most effective against unaware enemies. -items.weapon.missiles.missileweapon.stats_known=This set of _tier-%1$d_ thrown weapons deals _%2$d-%3$d damage_ and requires _%4$d strength_ to use properly. -items.weapon.missiles.missileweapon.stats_unknown=Typically this set of _tier-%1$d_ thrown weapons deals _%2$d-%3$d damage_ and requires _%4$d strength_ to use properly. +items.weapon.missiles.missileweapon.stats_known=This set of _tier-%1$d_ thrown weapons deals _%2$d-%3$d damage_ and requires _%4$d strength_ to use. +items.weapon.missiles.missileweapon.stats_unknown=Typically this set of _tier-%1$d_ thrown weapons deals _%2$d-%3$d damage_ and requires _%4$d strength_ to use. +items.weapon.missiles.missileweapon.stats_desc= items.weapon.missiles.missileweapon.probably_too_heavy=Probably this weapon is too heavy for you. -items.weapon.missiles.missileweapon.distance=Thrown weapons are more accurate against distant enemies, but less accurate at melee range. +items.weapon.missiles.missileweapon.distance=Thrown weapons are more accurate at range, but less accurate up close. items.weapon.missiles.missileweapon.durability=Thrown weapons will wear out and break as they are used. items.weapon.missiles.missileweapon.uses_left=This set of thrown weapons has _%d/%d_ uses left before one breaks. items.weapon.missiles.missileweapon.unlimited_uses=This set is of such high quality that it will effectively last forever. @@ -2194,7 +2195,8 @@ items.weapon.missiles.throwinghammer.name=throwing hammer items.weapon.missiles.throwinghammer.desc=These hefty hammers are designed to be thrown at an enemy. While they are a bit lacking in damage, their smooth all-metal construction means they are quite durable, and won't stick to enemies. items.weapon.missiles.throwingknife.name=throwing knife -items.weapon.missiles.throwingknife.desc=These lightweight knives are balanced to arc through the air right into their target. They are most effective against unaware enemies. +items.weapon.missiles.throwingknife.stats_desc=This weapon is stronger against unaware enemies. +items.weapon.missiles.throwingknife.desc=These lightweight knives are balanced to arc through the air right into their target. items.weapon.missiles.throwingknife.discover_hint=One of the heroes starts with this item. items.weapon.missiles.throwingspear.name=throwing spear @@ -2224,7 +2226,7 @@ items.weapon.spiritbow.discover_hint=One of the heroes starts with this item. items.weapon.weapon.identify=You are now familiar enough with your weapon to identify it. items.weapon.weapon.too_heavy=Because of your inadequate strength this weapon will hinder your attack speed, accuracy, and ability to surprise attack. -items.weapon.weapon.excess_str=Because of your excess strength, you will deal up to _%d bonus damage_ with this weapon. +items.weapon.weapon.excess_str=Because of your excess strength, you will deal _0-%d bonus damage_ with this weapon. items.weapon.weapon.hardening_gone=The hardening on this weapon has worn off! items.weapon.weapon.incompatible=Interaction of different types of magic has negated the enchantment on this weapon! items.weapon.weapon.cursed_worn=Because this weapon is cursed, you are powerless to remove it. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java index b7fba937d..4e7c482a5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java @@ -174,7 +174,8 @@ public enum HeroClass { private static void initWarrior( Hero hero ) { (hero.belongings.weapon = new WornShortsword()).identify(); ThrowingStone stones = new ThrowingStone(); - stones.quantity(3).collect(); + stones.identify().collect(); + Dungeon.quickslot.setSlot(0, stones); if (hero.belongings.armor != null){ @@ -208,7 +209,7 @@ public enum HeroClass { hero.belongings.artifact.activate( hero ); ThrowingKnife knives = new ThrowingKnife(); - knives.quantity(3).collect(); + knives.identify().collect(); Dungeon.quickslot.setSlot(0, cloak); Dungeon.quickslot.setSlot(1, knives); @@ -235,7 +236,7 @@ public enum HeroClass { hero.belongings.weapon.activate(hero); ThrowingSpike spikes = new ThrowingSpike(); - spikes.quantity(2).collect(); + spikes.quantity(2).identify().collect(); //set quantity is 3, but Duelist starts with 2 Dungeon.quickslot.setSlot(0, hero.belongings.weapon); Dungeon.quickslot.setSlot(1, spikes); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/LiquidMetal.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/LiquidMetal.java index b8a4c79db..61398a8c1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/LiquidMetal.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/LiquidMetal.java @@ -211,11 +211,16 @@ public class LiquidMetal extends Item { } private int metalQuantity(MissileWeapon m){ - //TODO a smaller quantity set (if one ever exists) should produce more metal per thrown wep? + float quantityPerWeapon = 5*(m.tier+1); + if (m.defaultQuantity() != 3){ + quantityPerWeapon = 3f / m.defaultQuantity(); + } + quantityPerWeapon += Math.pow(2, Math.min(3, m.level())); + float quantity = m.quantity()-1; quantity += 0.25f + 0.0075f*m.durabilityLeft(); - quantity *= Math.pow(2, Math.min(3, m.level())); - return Math.round((5*(m.tier+1))*quantity); + + return Math.round(quantity * quantityPerWeapon); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java index ac36aa401..0699df8a9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java @@ -77,7 +77,7 @@ abstract public class MissileWeapon extends Weapon { public static final float MAX_DURABILITY = 100; protected float durability = MAX_DURABILITY; - protected float baseUses = 10; + protected float baseUses = 8; public boolean holster; @@ -589,7 +589,10 @@ abstract public class MissileWeapon extends Weapon { info += "\n\n" + Messages.get(Weapon.class, "not_cursed"); } - info += "\n\n" + Messages.get(MissileWeapon.class, "distance"); + info += "\n\n"; + String statsInfo = Messages.get(this, "stats_desc"); + if (!statsInfo.equals("")) info += statsInfo + " "; + info += Messages.get(MissileWeapon.class, "distance"); if (levelKnown) { if (durabilityPerUse() > 0) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/ThrowingClub.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/ThrowingClub.java index 1ae8bfeae..19a2af212 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/ThrowingClub.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/ThrowingClub.java @@ -32,7 +32,7 @@ public class ThrowingClub extends MissileWeapon { hitSoundPitch = 1.1f; tier = 2; - baseUses = 15; + baseUses = 12; sticky = false; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/ThrowingSpike.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/ThrowingSpike.java index a1eb33f2a..c34efc965 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/ThrowingSpike.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/ThrowingSpike.java @@ -33,6 +33,7 @@ public class ThrowingSpike extends MissileWeapon { bones = false; + baseUses = 12; tier = 1; }