diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index a005e6f1e..3f06122e5 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -2193,7 +2193,7 @@ items.weapon.missiles.forcecube.stats_desc=This weapon spreads the force of its items.weapon.missiles.forcecube.desc=These oddly-shaped magical cubes are small enough to hold in your hand, but are incredibly heavy. items.weapon.missiles.heavyboomerang.name=heavy boomerang -items.weapon.missiles.heavyboomerang.stats_desc=This weapon circles back to the location it was thrown from after a few turns. +items.weapon.missiles.heavyboomerang.stats_desc=This weapon circles back to the location it was thrown from after five turns. items.weapon.missiles.heavyboomerang.desc=This large boomerang is difficult to wield effectively, but will deal considerable damage. items.weapon.missiles.javelin.name=javelin @@ -2252,7 +2252,8 @@ items.weapon.missiles.throwingstone.desc=These stones are sanded down to make th items.weapon.missiles.throwingstone.discover_hint=One of the heroes starts with this item. items.weapon.missiles.tomahawk.name=tomahawk -items.weapon.missiles.tomahawk.stats_desc=This weapon inflicts bleed equal to half the damage dealt to its target. +items.weapon.missiles.tomahawk.stats_desc=This weapon inflicts _%1$d-%2$d bleed_ to its target. +items.weapon.missiles.tomahawk.typical_stats_desc=This weapon typically inflicts _%1$d-%2$d bleed_ to its target. items.weapon.missiles.tomahawk.desc=These throwing axes have a serrated edge that tears as they stick to an enemy. items.weapon.missiles.trident.name=trident diff --git a/core/src/main/assets/messages/windows/windows.properties b/core/src/main/assets/messages/windows/windows.properties index e5a5c4b10..18b351669 100644 --- a/core/src/main/assets/messages/windows/windows.properties +++ b/core/src/main/assets/messages/windows/windows.properties @@ -380,6 +380,7 @@ windows.wndupgrade.resin=This wand has been enhanced with arcane resin, normal u windows.wndupgrade.thrown_dust=Weapons from this set that aren't in your inventory will crumble to dust. windows.wndupgrade.damage=Damage windows.wndupgrade.dart_damage=Dart Damage +windows.wndupgrade.bleeding=Bleeding windows.wndupgrade.blocking=Blocking windows.wndupgrade.weight=Weight windows.wndupgrade.durability=Durability diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java index bc4339cea..abfed59b7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java @@ -105,6 +105,10 @@ abstract public class Weapon extends KindOfWeapon { return Math.round(dmg * damageFactor); } + public float damageFactor(float dmg){ + return dmg * damageFactor; + } + public float delayFactor(float dly){ return dly * delayFactor; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/HeavyBoomerang.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/HeavyBoomerang.java index cd57542f5..c44190197 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/HeavyBoomerang.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/HeavyBoomerang.java @@ -45,12 +45,6 @@ public class HeavyBoomerang extends MissileWeapon { baseUses = 5; } - @Override - public int min(int lvl) { - return 2 * (tier-1) + //6 base, down from 8 - 0*lvl; //0 scaling, down from 1 - } - @Override public int max(int lvl) { return 4 * tier + //16 base, down from 20 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 f93dc8d6b..d0938eb82 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 @@ -653,7 +653,7 @@ abstract public class MissileWeapon extends Weapon { } info += "\n\n"; - String statsInfo = Messages.get(this, "stats_desc"); + String statsInfo = statsInfo(); if (!statsInfo.equals("")) info += statsInfo + " "; info += Messages.get(MissileWeapon.class, "distance"); @@ -685,6 +685,10 @@ abstract public class MissileWeapon extends Weapon { return info; } + + public String statsInfo(){ + return Messages.get(this, "stats_desc"); + } @Override public int value() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Tomahawk.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Tomahawk.java index ce001ae74..c779b904d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Tomahawk.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/Tomahawk.java @@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.watabou.utils.Random; @@ -50,11 +51,43 @@ public class Tomahawk extends MissileWeapon { return Math.round(4f * tier) + //16 base, down from 20 (tier-1)*lvl; //3 scaling, down from 4 } + + public float minBleed(){ + return minBleed(buffedLvl()); + } + + public float minBleed(int lvl){ + return 3 + lvl/2f; + } + + public float maxBleed(){ + return maxBleed(buffedLvl()); + } + + public float maxBleed(int lvl){ + return 6 + lvl; + } @Override public int proc( Char attacker, Char defender, int damage ) { //33% damage roll as bleed, but ignores armor and str bonus - Buff.affect( defender, Bleeding.class ).set( Math.round(augment.damageFactor(Random.NormalIntRange(min(), max()))/3f) ); + //currently 2-5.3, plus 0.33-1 per level + //increasing to 40% results in: 2.4-6.4, plus 0.4-1.2 per level + //maybe standardize that to 3-6 plus 0.5-1 per level + Buff.affect( defender, Bleeding.class ).set( augment.damageFactor(Random.NormalFloat(minBleed(), maxBleed())) ); return super.proc( attacker, defender, damage ); } + + public String statsInfo(){ + if (isIdentified()){ + return Messages.get(this, "stats_desc", + Math.round(augment.damageFactor(minBleed())), + Math.round(augment.damageFactor(maxBleed()))); + } else { + return Messages.get(this, "typical_stats_desc", + Math.round(augment.damageFactor(minBleed(0))), + Math.round(augment.damageFactor(maxBleed(0)))); + } + } + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndUpgrade.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndUpgrade.java index 21741f73b..11197c275 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndUpgrade.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndUpgrade.java @@ -38,6 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.RoundShield; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.Tomahawk; import com.shatteredpixel.shatteredpixeldungeon.messages.Languages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; @@ -211,6 +212,14 @@ public class WndUpgrade extends Window { bottom); } + //bleeding (tomahawk) + if (toUpgrade instanceof Tomahawk){ + bottom = fillFields(Messages.get(this, "bleeding"), + Math.round(((Tomahawk) toUpgrade).minBleed(levelFrom)) + "-" + Math.round(((Tomahawk) toUpgrade).maxBleed(levelFrom)), + Math.round(((Tomahawk) toUpgrade).minBleed(levelTo)) + "-" + Math.round(((Tomahawk) toUpgrade).maxBleed(levelTo)), + bottom); + } + if (Dungeon.hero != null && Dungeon.hero.heroClass == HeroClass.DUELIST && toUpgrade instanceof MeleeWeapon && ((MeleeWeapon) toUpgrade).upgradeAbilityStat(levelFrom) != null){ bottom = fillFields(Messages.get(toUpgrade, "upgrade_ability_stat_name"),