From 5381809f557d47e6bc25b99ff7296995916d0caa Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 21 Jun 2024 17:09:56 -0400 Subject: [PATCH] v2.5.0: added wndUpgrade info for weapon abilities and augments --- .../assets/messages/items/items.properties | 12 ++++++++ .../items/quest/Pickaxe.java | 5 ++++ .../items/rings/Ring.java | 4 +++ .../items/rings/RingOfForce.java | 11 ++++++++ .../items/weapon/melee/AssassinsBlade.java | 5 ++++ .../items/weapon/melee/BattleAxe.java | 5 ++++ .../items/weapon/melee/Crossbow.java | 5 ++++ .../items/weapon/melee/Dagger.java | 5 ++++ .../items/weapon/melee/Dirk.java | 5 ++++ .../items/weapon/melee/Flail.java | 4 +++ .../items/weapon/melee/Gauntlet.java | 4 +++ .../items/weapon/melee/Glaive.java | 5 ++++ .../items/weapon/melee/Gloves.java | 4 +++ .../items/weapon/melee/Greataxe.java | 5 ++++ .../items/weapon/melee/Greatshield.java | 5 ++++ .../items/weapon/melee/Greatsword.java | 5 ++++ .../items/weapon/melee/HandAxe.java | 5 ++++ .../items/weapon/melee/Katana.java | 5 ++++ .../items/weapon/melee/Longsword.java | 5 ++++ .../items/weapon/melee/Mace.java | 5 ++++ .../items/weapon/melee/MeleeWeapon.java | 4 +++ .../items/weapon/melee/Quarterstaff.java | 5 ++++ .../items/weapon/melee/Rapier.java | 5 ++++ .../items/weapon/melee/RoundShield.java | 5 ++++ .../items/weapon/melee/RunicBlade.java | 5 ++++ .../items/weapon/melee/Sai.java | 4 +++ .../items/weapon/melee/Scimitar.java | 5 ++++ .../items/weapon/melee/Shortsword.java | 5 ++++ .../items/weapon/melee/Sickle.java | 5 ++++ .../items/weapon/melee/Spear.java | 5 ++++ .../items/weapon/melee/Sword.java | 5 ++++ .../items/weapon/melee/WarHammer.java | 5 ++++ .../items/weapon/melee/WarScythe.java | 5 ++++ .../items/weapon/melee/Whip.java | 5 ++++ .../items/weapon/melee/WornShortsword.java | 5 ++++ .../windows/WndUpgrade.java | 28 +++++++++++++++---- 36 files changed, 204 insertions(+), 6 deletions(-) diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index 0691e476f..86f9ba77d 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -877,6 +877,7 @@ items.quest.pickaxe.ac_mine=MINE items.quest.pickaxe.no_vein=There is no dark gold vein near you to mine. items.quest.pickaxe.ability_name=pierce items.quest.pickaxe.ability_desc=The Duelist can _pierce_ an enemy with a pickaxe. This is guaranteed to hit, applies vulnerable for 3 turns, and deals _%1$d-%2$d damage_ to enemies with rigid skin. +items.quest.pickaxe.upgrade_ability_stat_name=Ability Damage items.quest.pickaxe.desc=This is a sturdy and heavy tool for breaking rocks. You don't need to equip the pickaxe to mine with it, but it can probably be equipped as a weapon in a pinch. items.quest.ratskull.name=giant rat skull @@ -961,6 +962,7 @@ items.rings.ringofforce.typical_stats=When unarmed, at your current strength, ty items.rings.ringofforce.combined_stats=Your equipped rings are combining their power, dealing a total of _%1$d-%2$d damage_ without a weapon, or increasing damage by _%3$d_ with one. items.rings.ringofforce.upgrade_stat_name_1=Unarmed Damage items.rings.ringofforce.upgrade_stat_name_2=Armed Damage Boost +items.rings.ringofforce.upgrade_stat_name_3=Ability Damage items.rings.ringofforce.ability_name=brawler's stance items.rings.ringofforce.typical_ability_desc=The Duelist can adopt a _brawler's stance_ with this ring, causing her regular attacks to always use this ring even with a weapon equipped. These attacks will typically deal _%1$d-%2$d damage_ and will also inherit the weapon's enchantment and augmentation. This stance slows weapon recharging speed by 50%%. items.rings.ringofforce.ability_desc=The Duelist can adopt a _brawler's stance_ with this ring, causing her regular attacks to always use this ring even with a weapon equipped. These attacks will deal _%1$d-%2$d damage_ and will also inherit the weapon's enchantment and augmentation. This stance slows weapon recharging speed by 50%%. @@ -1666,6 +1668,7 @@ items.weapon.melee.assassinsblade.stats_desc=This weapon is stronger against una items.weapon.melee.assassinsblade.ability_name=sneak items.weapon.melee.assassinsblade.typical_ability_desc=The Duelist can _sneak_ while wielding an assassin's blade. This ability lets the Duelist instantly blink up to 3 tiles away and typically grants her _%d turns of invisibility._ items.weapon.melee.assassinsblade.ability_desc=The Duelist can _sneak_ while wielding an assassin's blade. This ability lets the Duelist instantly blink up to 3 tiles away and grants her _%d turns of invisibility._ +items.weapon.melee.assassinsblade.upgrade_ability_stat_name=Ability Duration items.weapon.melee.assassinsblade.desc=A small wavy blade made of obsidian, difficult to use despite being lightweight, but deadly if it finds the right mark. items.weapon.melee.battleaxe.name=battle axe @@ -1681,6 +1684,7 @@ items.weapon.melee.crossbow.ability_name=charged shot items.weapon.melee.crossbow.typical_ability_desc=The Duelist can ready a _charged shot_ with a crossbow. This ability activates instantly and causes the next fired dart to always hit, apply on-hit effects to enemies in a 7x7 tile area, and typically last for _%d more uses_ if it is tipped. items.weapon.melee.crossbow.ability_desc=The Duelist can ready a _charged shot_ with a crossbow. This ability activates instantly and causes the next fired dart to always hit, apply on-hit effects to enemies in a 7x7 tile area, and last for _%d more uses_ if it is tipped. items.weapon.melee.crossbow.desc=A fairly intricate weapon which shoots bolts at exceptional speeds. While it isn't designed for it, this crossbow's heft and sturdy construction make it a decent melee weapon as well. +items.weapon.melee.crossbow.upgrade_ability_stat_name=Ability Extra Uses items.weapon.melee.crossbow$chargedshot.name=charged shot items.weapon.melee.crossbow$chargedshot.desc=The Duelist is focusing power into her crossbow. The next dart she fires with it will always hit and apply tipped dart effects and the crossbow's enchantment in a 7x7 area. Positive dart effects will only affect allies, and harmful effects will only apply to enemies.\n\nTipped darts will also have extra uses when fired using a charged shot. The Duelist cannot use this ability to apply positive dart effects to herself. @@ -1689,6 +1693,7 @@ items.weapon.melee.dagger.stats_desc=This weapon is stronger against unaware ene items.weapon.melee.dagger.ability_name=sneak items.weapon.melee.dagger.typical_ability_desc=The Duelist can _sneak_ while wielding a dagger. This ability lets the Duelist instantly blink up to 5 tiles away and typically grants her _%d turns of invisibility._ items.weapon.melee.dagger.ability_desc=The Duelist can _sneak_ while wielding a dagger. This ability lets the Duelist instantly blink up to 5 tiles away and grants her _%d turns of invisibility._ +items.weapon.melee.dagger.upgrade_ability_stat_name=Ability Duration items.weapon.melee.dagger.desc=A simple iron dagger with a worn wooden handle. items.weapon.melee.dirk.name=dirk @@ -1696,6 +1701,7 @@ items.weapon.melee.dirk.stats_desc=This weapon is stronger against unaware enemi items.weapon.melee.dirk.ability_name=sneak items.weapon.melee.dirk.typical_ability_desc=The Duelist can _sneak_ while wielding a dirk. This ability lets the Duelist instantly blink up to 4 tiles away and typically grants her _%d turns of invisibility._ items.weapon.melee.dirk.ability_desc=The Duelist can _sneak_ while wielding a dirk. This ability lets the Duelist instantly blink up to 4 tiles away and grants her _%d turns of invisibility._ +items.weapon.melee.dirk.upgrade_ability_stat_name=Ability Duration items.weapon.melee.dirk.desc=A longer thrusting dagger, gives a bit more steel to plunge into foes. items.weapon.melee.flail.name=flail @@ -1742,6 +1748,7 @@ items.weapon.melee.greatshield.stats_desc=This weapon blocks 0-%d damage. This b items.weapon.melee.greatshield.ability_name=guard items.weapon.melee.greatshield.typical_ability_desc=The Duelist can _guard_ herself with a greatshield, completely negating all physical or magical attacks made against her typically for _%d turns_. Once the Duelist has blocked an attack, attacking back or using magic will end guarding. items.weapon.melee.greatshield.ability_desc=The Duelist can _guard_ herself with a greatshield, completely negating all physical or magical attacks made against her for _%d turns_. Once the Duelist has blocked an attack, attacking back or using magic will end guarding. +items.weapon.melee.greatshield.upgrade_ability_stat_name=Ability Duration items.weapon.melee.greatshield.desc=More like a mobile wall than a shield, this gigantic mass of metal aids defense, but doesn't leave much room for attacking. items.weapon.melee.greatsword.name=greatsword @@ -1809,6 +1816,7 @@ items.weapon.melee.meleeweapon.ability_cant_use=You can't use that ability right items.weapon.melee.meleeweapon.ability_no_target=There is no target there. items.weapon.melee.meleeweapon.ability_target_range=That target isn't in range. items.weapon.melee.meleeweapon.ability_occupied=That location is occupied. +items.weapon.melee.meleeweapon.upgrade_ability_stat_name=Ability Damage items.weapon.melee.meleeweapon.prompt=Select a Target items.weapon.melee.meleeweapon.swap=Swap Weapons items.weapon.melee.meleeweapon.swap_full=You can't do that with a full inventory. @@ -1824,6 +1832,7 @@ items.weapon.melee.quarterstaff.stats_desc=This weapon blocks 0-2 damage. items.weapon.melee.quarterstaff.ability_name=defensive stance items.weapon.melee.quarterstaff.typical_ability_desc=The Duelist can assume a _defensive stance_ with a quarterstaff. This stance takes no times to activate and triples her evasion typically for _%d turns._ items.weapon.melee.quarterstaff.ability_desc=The Duelist can assume a _defensive stance_ with a quarterstaff. This stance takes no times to activate and triples her evasion for _%d turns._ +items.weapon.melee.quarterstaff.upgrade_ability_stat_name=Ability Duration items.weapon.melee.quarterstaff.desc=A staff of hardwood, its ends are shod with iron. items.weapon.melee.quarterstaff$defensivestance.name=defensive stance items.weapon.melee.quarterstaff$defensivestance.desc=The Duelist is using her quarterstaff to deflect incoming blows and projectiles. As long as she is in this stance, her evasion against all attacks is tripled.\n\nTurns remaining: %s. @@ -1841,6 +1850,7 @@ items.weapon.melee.roundshield.stats_desc=This weapon blocks 0-%d damage. This b items.weapon.melee.roundshield.ability_name=guard items.weapon.melee.roundshield.typical_ability_desc=The Duelist can _guard_ herself with a round shield, completely negating all physical or magical attacks made against her typically for _%d turns_. Once the Duelist has blocked an attack, attacking back or using magic will end guarding. items.weapon.melee.roundshield.ability_desc=The Duelist can _guard_ herself with a round shield, completely negating all physical or magical attacks made against her for _%d turns_. Once the Duelist has blocked an attack, attacking back or using magic will end guarding. +items.weapon.melee.roundshield.upgrade_ability_stat_name=Ability Duration items.weapon.melee.roundshield.desc=This large shield effectively blocks attacks and makes a decent weapon in a pinch. items.weapon.melee.roundshield$guardtracker.name=guarding items.weapon.melee.roundshield$guardtracker.guarded=guarded @@ -1851,6 +1861,7 @@ items.weapon.melee.runicblade.stats_desc=This weapon benefits more from upgrades items.weapon.melee.runicblade.ability_name=runic slash items.weapon.melee.runicblade.typical_ability_desc=The Duelist can perform a _runic slash_ with a runic blade. This attack is guaranteed to hit and typically has _+%d%% enchantment power._ items.weapon.melee.runicblade.ability_desc=The Duelist can perform a _runic slash_ with a runic blade. This attack is guaranteed to hit and has _+%d%% enchantment power._ +items.weapon.melee.runicblade.upgrade_ability_stat_name=Ability Power items.weapon.melee.runicblade.desc=A mysterious weapon from a distant land, with a bright blue blade. items.weapon.melee.sai.name=sai @@ -1867,6 +1878,7 @@ items.weapon.melee.scimitar.stats_desc=This is a rather fast weapon. items.weapon.melee.scimitar.ability_name=sword dance items.weapon.melee.scimitar.typical_ability_desc=The Duelist can perform a _sword dance_ with a scimitar. This stance takes no time to activate and grants the Duelist +60%% attack speed and +50%% accuracy typically for _%d turns._ items.weapon.melee.scimitar.ability_desc=The Duelist can perform a _sword dance_ with a scimitar. This stance takes no time to activate and grants the Duelist +60%% attack speed and +50%% accuracy for _%d turns._ +items.weapon.melee.scimitar.upgrade_ability_stat_name=Ability Duration items.weapon.melee.scimitar.desc=A thick curved blade. Its shape allows for faster, yet less powerful attacks. items.weapon.melee.scimitar$sworddance.name=sword dance items.weapon.melee.scimitar$sworddance.desc=The Duelist is making quick momentum based strikes in a sort of dance. While this stance is active, she attacks 60%% faster (enough to attack exactly twice a turn with a scimitar) and has +50%% accuracy.\n\nTurns remaining: %s. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/Pickaxe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/Pickaxe.java index b857d7a72..1562345ef 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/Pickaxe.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/Pickaxe.java @@ -249,6 +249,11 @@ public class Pickaxe extends MeleeWeapon { return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost)); } + public String upgradeAbilityStat(int level){ + int dmgBoost = 8 + 2*level; + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } + private static final String BLOODSTAINED = "bloodStained"; @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java index d0dba84fc..654c6da64 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/Ring.java @@ -195,6 +195,10 @@ public class Ring extends KindofMisc { public String upgradeStat2(int level){ return null; } + + public String upgradeStat3(int level){ + return null; + } @Override public Item upgrade() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfForce.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfForce.java index f005e8b7b..829206612 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfForce.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfForce.java @@ -142,6 +142,17 @@ public class RingOfForce extends Ring { return Integer.toString(level+1); } + @Override + public String upgradeStat3(int level) { + if (Dungeon.hero != null && Dungeon.hero.heroClass == HeroClass.DUELIST){ + float tier = tier(Dungeon.hero != null ? Dungeon.hero.STR() : 10); + int bonus = Math.round(1+tier+((level+1)*((3+tier)/8f))); + return (min(level+1, tier) + bonus) + "-" + (max(level+1, tier) + bonus); + } else { + return null; + } + } + public class Force extends RingBuff { } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/AssassinsBlade.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/AssassinsBlade.java index 72f7535e0..9a876c5d7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/AssassinsBlade.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/AssassinsBlade.java @@ -88,4 +88,9 @@ public class AssassinsBlade extends MeleeWeapon { } } + @Override + public String upgradeAbilityStat(int level) { + return Integer.toString(2+level); + } + } \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/BattleAxe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/BattleAxe.java index d5d2d5f71..816a3d857 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/BattleAxe.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/BattleAxe.java @@ -65,4 +65,9 @@ public class BattleAxe extends MeleeWeapon { } } + public String upgradeAbilityStat(int level){ + int dmgBoost = 5 + Math.round(1.5f*level); + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Crossbow.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Crossbow.java index f6af0709f..de99bb3f1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Crossbow.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Crossbow.java @@ -85,6 +85,11 @@ public class Crossbow extends MeleeWeapon { } } + @Override + public String upgradeAbilityStat(int level) { + return Integer.toString(3 + level); + } + public static class ChargedShot extends Buff{ { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dagger.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dagger.java index 04593e2ab..87b68e766 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dagger.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dagger.java @@ -102,6 +102,11 @@ public class Dagger extends MeleeWeapon { } } + @Override + public String upgradeAbilityStat(int level) { + return Integer.toString(2+level); + } + public static void sneakAbility(Hero hero, Integer target, int maxDist, int invisTurns, MeleeWeapon wep){ if (target == null) { return; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dirk.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dirk.java index ae8689236..e3a64795f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dirk.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dirk.java @@ -88,4 +88,9 @@ public class Dirk extends MeleeWeapon { } } + @Override + public String upgradeAbilityStat(int level) { + return Integer.toString(2+level); + } + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Flail.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Flail.java index 4c0da23ef..01d19c95c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Flail.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Flail.java @@ -134,6 +134,10 @@ public class Flail extends MeleeWeapon { } } + public String upgradeAbilityStat(int level){ + return "+" + augment.damageFactor(8 + 2*level); + } + public static class SpinAbilityTracker extends FlavourBuff { { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Gauntlet.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Gauntlet.java index 0b33c7a8e..a4d5aef6c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Gauntlet.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Gauntlet.java @@ -65,4 +65,8 @@ public class Gauntlet extends MeleeWeapon { } } + public String upgradeAbilityStat(int level){ + return "+" + augment.damageFactor(4 + Math.round(0.75f*level)); + } + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Glaive.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Glaive.java index 7e92a7a13..ae4629141 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Glaive.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Glaive.java @@ -56,6 +56,11 @@ public class Glaive extends MeleeWeapon { Spear.spikeAbility(hero, target, 1, dmgBoost, this); } + public String upgradeAbilityStat(int level){ + int dmgBoost = 12 + 2*level; + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } + @Override public String abilityInfo() { int dmgBoost = levelKnown ? 12 + 2*buffedLvl() : 12; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Gloves.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Gloves.java index 2ab8df9f0..ba11e2e15 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Gloves.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Gloves.java @@ -67,4 +67,8 @@ public class Gloves extends MeleeWeapon { } } + public String upgradeAbilityStat(int level){ + return "+" + augment.damageFactor(2 + Math.round(0.5f*level)); + } + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greataxe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greataxe.java index 59de09c3f..4aaf4a79f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greataxe.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greataxe.java @@ -123,4 +123,9 @@ public class Greataxe extends MeleeWeapon { return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost); } } + + public String upgradeAbilityStat(int level){ + int dmgBoost = 12 + 2*level; + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatshield.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatshield.java index 1639ca7e4..b09f93e35 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatshield.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatshield.java @@ -75,4 +75,9 @@ public class Greatshield extends MeleeWeapon { return Messages.get(this, "typical_ability_desc", 3); } } + + @Override + public String upgradeAbilityStat(int level) { + return Integer.toString(3 + level); + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java index 26a653d3c..37824e84d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java @@ -68,4 +68,9 @@ public class Greatsword extends MeleeWeapon { } } + public String upgradeAbilityStat(int level){ + int dmgBoost = 5 + level; + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/HandAxe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/HandAxe.java index 8bfcd5f69..71547dd90 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/HandAxe.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/HandAxe.java @@ -65,4 +65,9 @@ public class HandAxe extends MeleeWeapon { } } + public String upgradeAbilityStat(int level){ + int dmgBoost = 4 + Math.round(1.5f*level); + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Katana.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Katana.java index 2c02e8a50..4944b6d4c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Katana.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Katana.java @@ -70,4 +70,9 @@ public class Katana extends MeleeWeapon { } } + public String upgradeAbilityStat(int level){ + int dmgBoost = 6 + Math.round(1.5f*level); + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Longsword.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Longsword.java index ac7780cf6..66a748b5c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Longsword.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Longsword.java @@ -67,4 +67,9 @@ public class Longsword extends MeleeWeapon { return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost); } } + + public String upgradeAbilityStat(int level){ + int dmgBoost = 4 + level; + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Mace.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Mace.java index ac826cf63..08564ba8e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Mace.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Mace.java @@ -76,6 +76,11 @@ public class Mace extends MeleeWeapon { } } + public String upgradeAbilityStat(int level){ + int dmgBoost = 5 + Math.round(1.5f*level); + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } + public static void heavyBlowAbility(Hero hero, Integer target, float dmgMulti, int dmgBoost, MeleeWeapon wep){ if (target == null) { return; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MeleeWeapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MeleeWeapon.java index 9958beb3b..aa3fd0584 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MeleeWeapon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MeleeWeapon.java @@ -400,6 +400,10 @@ public class MeleeWeapon extends Weapon { return Messages.get(this, "ability_desc"); } + public String upgradeAbilityStat(int level){ + return null; + } + @Override public String status() { if (isEquipped(Dungeon.hero) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Quarterstaff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Quarterstaff.java index 22501a149..1aaecb474 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Quarterstaff.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Quarterstaff.java @@ -70,6 +70,11 @@ public class Quarterstaff extends MeleeWeapon { } } + @Override + public String upgradeAbilityStat(int level) { + return Integer.toString(4+level); + } + public static class DefensiveStance extends FlavourBuff { { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Rapier.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Rapier.java index 7acb59778..b5917904f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Rapier.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Rapier.java @@ -83,6 +83,11 @@ public class Rapier extends MeleeWeapon { } } + public String upgradeAbilityStat(int level){ + int dmgBoost = 4 + level; + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } + public static void lungeAbility(Hero hero, Integer target, float dmgMulti, int dmgBoost, MeleeWeapon wep){ if (target == null){ return; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RoundShield.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RoundShield.java index 332375c8e..552197f02 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RoundShield.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RoundShield.java @@ -85,6 +85,11 @@ public class RoundShield extends MeleeWeapon { } } + @Override + public String upgradeAbilityStat(int level) { + return Integer.toString(5 + level); + } + public static void guardAbility(Hero hero, int duration, MeleeWeapon wep){ wep.beforeAbilityUsed(hero, null); Buff.prolong(hero, GuardTracker.class, duration).hasBlocked = false; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RunicBlade.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RunicBlade.java index a76f52ed8..d12e2f3d6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RunicBlade.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/RunicBlade.java @@ -112,6 +112,11 @@ public class RunicBlade extends MeleeWeapon { } } + @Override + public String upgradeAbilityStat(int level) { + return "+" + (300+50*level) + "%"; + } + public static class RunicSlashTracker extends FlavourBuff{ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java index 462086d43..e2f871ce0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java @@ -77,6 +77,10 @@ public class Sai extends MeleeWeapon { } } + public String upgradeAbilityStat(int level){ + return "+" + augment.damageFactor(3 + Math.round(0.67f*level)); + } + public static void comboStrikeAbility(Hero hero, Integer target, float multiPerHit, int boostPerHit, MeleeWeapon wep){ if (target == null) { return; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Scimitar.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Scimitar.java index 1dfc2c5f1..4486aaaa7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Scimitar.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Scimitar.java @@ -65,6 +65,11 @@ public class Scimitar extends MeleeWeapon { } } + @Override + public String upgradeAbilityStat(int level) { + return Integer.toString(4+level); + } + public static class SwordDance extends FlavourBuff { { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Shortsword.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Shortsword.java index 64f4ef27d..7e0cac850 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Shortsword.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Shortsword.java @@ -67,4 +67,9 @@ public class Shortsword extends MeleeWeapon { return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost); } } + + public String upgradeAbilityStat(int level){ + int dmgBoost = 3 + level; + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sickle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sickle.java index 78c5a1831..a5dc33519 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sickle.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sickle.java @@ -75,6 +75,11 @@ public class Sickle extends MeleeWeapon { } } + @Override + public String upgradeAbilityStat(int level) { + return Integer.toString(augment.damageFactor(Math.round(15f + 2.5f*level))); + } + public static void harvestAbility(Hero hero, Integer target, float bleedMulti, int bleedBoost, MeleeWeapon wep){ if (target == null) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Spear.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Spear.java index c085b3973..53d8eb1ab 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Spear.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Spear.java @@ -77,6 +77,11 @@ public class Spear extends MeleeWeapon { } } + public String upgradeAbilityStat(int level){ + int dmgBoost = 7 + Math.round(1.5f*level); + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } + public static void spikeAbility(Hero hero, Integer target, float dmgMulti, int dmgBoost, MeleeWeapon wep){ if (target == null) { return; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sword.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sword.java index 32e41d6c6..bc8e2fce4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sword.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sword.java @@ -78,6 +78,11 @@ public class Sword extends MeleeWeapon { } } + public String upgradeAbilityStat(int level){ + int dmgBoost = 4 + level; + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } + public static void cleaveAbility(Hero hero, Integer target, float dmgMulti, int dmgBoost, MeleeWeapon wep){ if (target == null) { return; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WarHammer.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WarHammer.java index 3e8b50371..60138379d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WarHammer.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WarHammer.java @@ -55,6 +55,11 @@ public class WarHammer extends MeleeWeapon { Mace.heavyBlowAbility(hero, target, 1, dmgBoost, this); } + public String upgradeAbilityStat(int level){ + int dmgBoost = 6 + Math.round(1.5f*level); + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } + @Override public String abilityInfo() { int dmgBoost = levelKnown ? 6 + Math.round(1.5f*buffedLvl()) : 6; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WarScythe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WarScythe.java index cecf73cd9..b443234fa 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WarScythe.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WarScythe.java @@ -65,4 +65,9 @@ public class WarScythe extends MeleeWeapon { } } + @Override + public String upgradeAbilityStat(int level) { + return Integer.toString(augment.damageFactor(Math.round(30f + 4.5f*level))); + } + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Whip.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Whip.java index 9e3929b8c..56755c3fa 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Whip.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Whip.java @@ -106,4 +106,9 @@ public class Whip extends MeleeWeapon { return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost); } } + + public String upgradeAbilityStat(int level){ + int dmgBoost = 2 + Math.round(0.5f*level); + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WornShortsword.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WornShortsword.java index a7077304c..ee2b44f9b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WornShortsword.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WornShortsword.java @@ -70,4 +70,9 @@ public class WornShortsword extends MeleeWeapon { } } + public String upgradeAbilityStat(int level){ + int dmgBoost = 3 + level; + return augment.damageFactor(min(level)+dmgBoost) + "-" + augment.damageFactor(max(level)+dmgBoost); + } + } 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 62739b1e6..33a254816 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndUpgrade.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndUpgrade.java @@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.windows; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring; @@ -33,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Greatshield; 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.messages.Languages; @@ -156,17 +158,27 @@ public class WndUpgrade extends Window { //physical damage if (toUpgrade instanceof Weapon){ + Weapon.Augment aug = ((Weapon) toUpgrade).augment; bottom = fillFields(Messages.get(this, "damage"), - ((Weapon) toUpgrade).min(levelFrom) + "-" + ((Weapon) toUpgrade).max(levelFrom), - ((Weapon) toUpgrade).min(levelTo) + "-" + ((Weapon) toUpgrade).max(levelTo), + aug.damageFactor(((Weapon) toUpgrade).min(levelFrom)) + "-" + aug.damageFactor(((Weapon) toUpgrade).max(levelFrom)), + aug.damageFactor(((Weapon) toUpgrade).min(levelTo)) + "-" + aug.damageFactor(((Weapon) toUpgrade).max(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"), + ((MeleeWeapon) toUpgrade).upgradeAbilityStat(levelFrom), + ((MeleeWeapon) toUpgrade).upgradeAbilityStat(levelTo), bottom); } //blocking (armor and shields) if (toUpgrade instanceof Armor){ + Armor.Augment aug = ((Armor) toUpgrade).augment; bottom = fillFields(Messages.get(this, "blocking"), - ((Armor) toUpgrade).DRMin(levelFrom) + "-" + ((Armor) toUpgrade).DRMax(levelFrom), - ((Armor) toUpgrade).DRMin(levelTo) + "-" + ((Armor) toUpgrade).DRMax(levelTo), + ((Armor) toUpgrade).DRMin(levelFrom) + "-" + (((Armor) toUpgrade).DRMax(levelFrom) + aug.defenseFactor(levelFrom)), + ((Armor) toUpgrade).DRMin(levelTo) + "-" + (((Armor) toUpgrade).DRMax(levelFrom) + aug.defenseFactor(levelTo)), bottom); } else if (toUpgrade instanceof RoundShield){ bottom = fillFields(Messages.get(this, "blocking"), @@ -193,8 +205,6 @@ public class WndUpgrade extends Window { bottom); } - //TODO Duelist weapon abilities - //durability if (toUpgrade instanceof MissileWeapon){ //missile weapons are always IDed currently, so we always use true level @@ -257,6 +267,12 @@ public class WndUpgrade extends Window { ((Ring) toUpgrade).upgradeStat2(levelTo), bottom); } + if (((Ring) toUpgrade).upgradeStat3(levelFrom) != null){ + bottom = fillFields(Messages.get(toUpgrade, "upgrade_stat_name_3"), + ((Ring) toUpgrade).upgradeStat3(levelFrom), + ((Ring) toUpgrade).upgradeStat3(levelTo), + bottom); + } } //visual separators for each column