From 289a43defb339318de8b49ad6156c850ed963d4a Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 10 Apr 2024 13:47:24 -0400 Subject: [PATCH] v2.4.0: added scaling to all non-damage based duelist abilities --- .../assets/messages/items/items.properties | 30 ++++++++++++------- .../items/weapon/Weapon.java | 2 +- .../items/weapon/melee/AssassinsBlade.java | 11 ++++++- .../items/weapon/melee/Crossbow.java | 9 ++++++ .../items/weapon/melee/Dagger.java | 15 ++++++++-- .../items/weapon/melee/Dirk.java | 11 ++++++- .../items/weapon/melee/Greatshield.java | 11 ++++++- .../items/weapon/melee/Quarterstaff.java | 15 ++++++++-- .../items/weapon/melee/RoundShield.java | 13 ++++++-- .../items/weapon/melee/RunicBlade.java | 17 ++++++++++- .../items/weapon/melee/Scimitar.java | 15 ++++++++-- .../items/weapon/melee/Whip.java | 8 +++++ .../items/weapon/missiles/darts/Dart.java | 2 +- .../weapon/missiles/darts/TippedDart.java | 4 +-- 14 files changed, 136 insertions(+), 27 deletions(-) diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index d27761dd6..0a44b1a40 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -1589,7 +1589,8 @@ items.weapon.enchantments.vampiric.elestrike_desc=An elemental strike with a vam items.weapon.melee.assassinsblade.name=assassin's blade items.weapon.melee.assassinsblade.stats_desc=This weapon is stronger against unaware enemies. items.weapon.melee.assassinsblade.ability_name=sneak -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 4 tiles away and grants her 1 turn of invisibility, but costs 2 charges. +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,_ but costs 2 charges. +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,_ but costs 2 charges. 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 @@ -1602,7 +1603,8 @@ items.weapon.melee.battleaxe.desc=The enormous steel head of this battle axe put items.weapon.melee.crossbow.name=crossbow items.weapon.melee.crossbow.stats_desc=This weapon enhances the damage of thrown darts when equipped, and will even grant its enchantment to them. items.weapon.melee.crossbow.ability_name=charged shot -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 5x5 tile area, and last longer if it is tipped. +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 5x5 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 5x5 tile area, and last 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$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 5x5 area. Positive dart effects will only affect allies, and harmful effects will only apply to enemies.\n\nTipped darts will also have four extra uses when fired using a charged shot. The Duelist cannot use this ability to apply positive dart effects to herself. @@ -1610,13 +1612,15 @@ items.weapon.melee.crossbow$chargedshot.desc=The Duelist is focusing power into items.weapon.melee.dagger.name=dagger items.weapon.melee.dagger.stats_desc=This weapon is stronger against unaware enemies. items.weapon.melee.dagger.ability_name=sneak -items.weapon.melee.dagger.ability_desc=The Duelist can _sneak_ while wielding a dagger. This ability lets the Duelist instantly blink up to 6 tiles away and grants her 1 turn of invisibility, but costs 2 charges. +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_, but costs 2 charges. +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_, but costs 2 charges. items.weapon.melee.dagger.desc=A simple iron dagger with a worn wooden handle. items.weapon.melee.dirk.name=dirk items.weapon.melee.dirk.stats_desc=This weapon is stronger against unaware enemies. items.weapon.melee.dirk.ability_name=sneak -items.weapon.melee.dirk.ability_desc=The Duelist can _sneak_ while wielding a dirk. This ability lets the Duelist instantly blink up to 5 tiles away and grants her 1 turn of invisibility, but costs 2 charges. +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_, but costs 2 charges. +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_, but costs 2 charges. items.weapon.melee.dirk.desc=A longer thrusting dagger, gives a bit more steel to plunge into foes. items.weapon.melee.flail.name=flail @@ -1661,7 +1665,8 @@ items.weapon.melee.greatshield.name=greatshield items.weapon.melee.greatshield.typical_stats_desc=Typically this weapon blocks 0-%d damage. This blocking scales with upgrades. items.weapon.melee.greatshield.stats_desc=This weapon blocks 0-%d damage. This blocking scales with upgrades. items.weapon.melee.greatshield.ability_name=guard -items.weapon.melee.greatshield.ability_desc=The Duelist can _guard_ herself with a greatshield, completely negating the next physical or magical attack made against her within 6 turns. +items.weapon.melee.greatshield.typical_ability_desc=The Duelist can _guard_ herself with a greatshield, completely negating the next physical or magical attack made against her typically within _%d turns_. +items.weapon.melee.greatshield.ability_desc=The Duelist can _guard_ herself with a greatshield, completely negating the next physical or magical attack made against her within _%d turns_. 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 @@ -1741,7 +1746,8 @@ items.weapon.melee.shortsword.desc=A quite short sword, only a few inches longer items.weapon.melee.quarterstaff.name=quarterstaff items.weapon.melee.quarterstaff.stats_desc=This weapon blocks 0-2 damage. items.weapon.melee.quarterstaff.ability_name=defensive stance -items.weapon.melee.quarterstaff.ability_desc=The Duelist can assume a _defensive stance_ with a quarterstaff. This stance triples her evasion for 5 turns and takes no time to activate, but costs 2 charges. +items.weapon.melee.quarterstaff.typical_ability_desc=The Duelist can assume a _defensive stance_ with a quarterstaff. This stance triples her evasion typically for _%d turns_ and takes no time to activate, but costs 2 charges. +items.weapon.melee.quarterstaff.ability_desc=The Duelist can assume a _defensive stance_ with a quarterstaff. This stance triples her evasion for _%d turns_ and takes no time to activate, but costs 2 charges. 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. @@ -1757,7 +1763,8 @@ items.weapon.melee.roundshield.name=round shield items.weapon.melee.roundshield.typical_stats_desc=Typically this weapon blocks 0-%d damage. This blocking scales with upgrades. items.weapon.melee.roundshield.stats_desc=This weapon blocks 0-%d damage. This blocking scales with upgrades. items.weapon.melee.roundshield.ability_name=guard -items.weapon.melee.roundshield.ability_desc=The Duelist can _guard_ herself with a round shield, completely negating the next physical or magical attack made against her within 8 turns. +items.weapon.melee.roundshield.typical_ability_desc=The Duelist can _guard_ herself with a round shield, completely negating the next physical or magical attack made against her typically within _%d turns_. +items.weapon.melee.roundshield.ability_desc=The Duelist can _guard_ herself with a round shield, completely negating the next physical or magical attack made against her within _%d turns_. 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 @@ -1766,7 +1773,8 @@ items.weapon.melee.roundshield$guardtracker.desc=The Duelist has readied her shi items.weapon.melee.runicblade.name=runic blade items.weapon.melee.runicblade.stats_desc=This weapon benefits more from upgrades. items.weapon.melee.runicblade.ability_name=runic slash -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 +300% enchantment power. +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.desc=A mysterious weapon from a distant land, with a bright blue blade. items.weapon.melee.sai.name=sai @@ -1781,7 +1789,8 @@ items.weapon.melee.sai$combostriketracker.desc=The Duelist is building combo tha items.weapon.melee.scimitar.name=scimitar items.weapon.melee.scimitar.stats_desc=This is a rather fast weapon. items.weapon.melee.scimitar.ability_name=sword dance -items.weapon.melee.scimitar.ability_desc=The Duelist can perform a _sword dance_ with a scimitar. This stance grants the Duelist +60% attack speed and +25% accuracy for 5 turns, takes no time to activate, and costs 2 charges. +items.weapon.melee.scimitar.typical_ability_desc=The Duelist can perform a _sword dance_ with a scimitar. This stance grants the Duelist +60%% attack speed and +25%% accuracy typically for _%d turns_, takes no time to activate, and costs 2 charges. +items.weapon.melee.scimitar.ability_desc=The Duelist can perform a _sword dance_ with a scimitar. This stance grants the Duelist +60%% attack speed and +25%% accuracy for _%d turns_, takes no time to activate, and costs 2 charges. 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 +25%% accuracy.\n\nTurns remaining: %s. @@ -1825,7 +1834,8 @@ items.weapon.melee.warscythe.desc=This large and unwieldy tool has been reinforc items.weapon.melee.whip.name=whip items.weapon.melee.whip.stats_desc=This weapon has tremendous reach. items.weapon.melee.whip.ability_name=lash -items.weapon.melee.whip.ability_desc=The Duelist can _lash_ all enemies around her with a whip. This ability performs a normal attack against all enemies within attack range and is guaranteed to hit the closest target. +items.weapon.melee.whip.typical_ability_desc=The Duelist can _lash_ all enemies around her with a whip. This ability attacks all enemies within attack range, typically dealing _%1$d-%2$d damage_ and is guaranteed to hit the closest target. +items.weapon.melee.whip.ability_desc=The Duelist can _lash_ all enemies around her with a whip. This ability attacks all enemies within attack range, dealing _%1$d-%2$d damage_ and is guaranteed to hit the closest target. items.weapon.melee.whip.desc=While the barbed length of rope at the end of this weapon deals poor damage, its reach cannot be matched. items.weapon.melee.wornshortsword.name=worn shortsword 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 a44eb442a..3a25ec443 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 @@ -398,7 +398,7 @@ abstract public class Weapon extends KindOfWeapon { } if (attacker.buff(RunicBlade.RunicSlashTracker.class) != null){ - multi += 3f; + multi += attacker.buff(RunicBlade.RunicSlashTracker.class).boost; attacker.buff(RunicBlade.RunicSlashTracker.class).detach(); } 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 5d9d8c49f..0b221f1be 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 @@ -81,7 +81,16 @@ public class AssassinsBlade extends MeleeWeapon { @Override protected void duelistAbility(Hero hero, Integer target) { - Dagger.sneakAbility(hero, target, 4, this); + Dagger.sneakAbility(hero, target, 3, 2+buffedLvl(), this); + } + + @Override + public String abilityInfo() { + if (levelKnown){ + return Messages.get(this, "ability_desc", 2+buffedLvl()); + } else { + return Messages.get(this, "typical_ability_desc", 2); + } } } \ No newline at end of file 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 9c7ae259c..82a322edb 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 @@ -76,6 +76,15 @@ public class Crossbow extends MeleeWeapon { afterAbilityUsed(hero); } + @Override + public String abilityInfo() { + if (levelKnown){ + return Messages.get(this, "ability_desc", 2+buffedLvl()); + } else { + return Messages.get(this, "typical_ability_desc", 2); + } + } + 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 ecfe60298..61fc877a8 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 @@ -95,10 +95,19 @@ public class Dagger extends MeleeWeapon { @Override protected void duelistAbility(Hero hero, Integer target) { - sneakAbility(hero, target, 6, this); + sneakAbility(hero, target, 5, 2+buffedLvl(), this); } - public static void sneakAbility(Hero hero, Integer target, int maxDist, MeleeWeapon wep){ + @Override + public String abilityInfo() { + if (levelKnown){ + return Messages.get(this, "ability_desc", 2+buffedLvl()); + } else { + return Messages.get(this, "typical_ability_desc", 2); + } + } + + public static void sneakAbility(Hero hero, Integer target, int maxDist, int invisTurns, MeleeWeapon wep){ if (target == null) { return; } @@ -116,7 +125,7 @@ public class Dagger extends MeleeWeapon { } wep.beforeAbilityUsed(hero, null); - Buff.affect(hero, Invisibility.class); + Buff.affect(hero, Invisibility.class, invisTurns-1); //1 fewer turns as ability is instant hero.next(); Dungeon.hero.sprite.turnTo( Dungeon.hero.pos, target); 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 c38b394bc..87fe8fc31 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 @@ -81,7 +81,16 @@ public class Dirk extends MeleeWeapon { @Override protected void duelistAbility(Hero hero, Integer target) { - Dagger.sneakAbility(hero, target, 5, this); + Dagger.sneakAbility(hero, target, 4, 2+buffedLvl(), this); + } + + @Override + public String abilityInfo() { + if (levelKnown){ + return Messages.get(this, "ability_desc", 2+buffedLvl()); + } else { + return Messages.get(this, "typical_ability_desc", 2); + } } } 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 45a9106fc..a08ef46c6 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 @@ -55,6 +55,15 @@ public class Greatshield extends MeleeWeapon { @Override protected void duelistAbility(Hero hero, Integer target) { - RoundShield.guardAbility(hero, 6, this); + RoundShield.guardAbility(hero, 5+buffedLvl(), this); + } + + @Override + public String abilityInfo() { + if (levelKnown){ + return Messages.get(this, "ability_desc", 5+buffedLvl()); + } else { + return Messages.get(this, "typical_ability_desc", 5); + } } } 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 2e8d9d867..2e3bf2ad6 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 @@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; @@ -58,12 +59,22 @@ public class Quarterstaff extends MeleeWeapon { @Override protected void duelistAbility(Hero hero, Integer target) { beforeAbilityUsed(hero, null); - Buff.prolong(hero, DefensiveStance.class, 4f); //4 turns as using the ability is instant + //1 turn less as using the ability is instant + Buff.prolong(hero, DefensiveStance.class, 3 + buffedLvl()); hero.sprite.operate(hero.pos); hero.next(); afterAbilityUsed(hero); } + @Override + public String abilityInfo() { + if (levelKnown){ + return Messages.get(this, "ability_desc", 4+buffedLvl()); + } else { + return Messages.get(this, "typical_ability_desc", 4); + } + } + public static class DefensiveStance extends FlavourBuff { { @@ -78,7 +89,7 @@ public class Quarterstaff extends MeleeWeapon { @Override public float iconFadePercent() { - return Math.max(0, (5 - visualcooldown()) / 5); + return Math.max(0, (4 - visualcooldown()) / 4); } } 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 f55b12dfb..7086a5194 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 @@ -62,7 +62,16 @@ public class RoundShield extends MeleeWeapon { @Override protected void duelistAbility(Hero hero, Integer target) { - RoundShield.guardAbility(hero, 8, this); + RoundShield.guardAbility(hero, 8+buffedLvl(), this); + } + + @Override + public String abilityInfo() { + if (levelKnown){ + return Messages.get(this, "ability_desc", 8+buffedLvl()); + } else { + return Messages.get(this, "typical_ability_desc", 8); + } } public static void guardAbility(Hero hero, int duration, MeleeWeapon wep){ @@ -87,7 +96,7 @@ public class RoundShield extends MeleeWeapon { @Override public float iconFadePercent() { - return Math.max(0, (7 - visualcooldown()) / 7); + return Math.max(0, (5 - visualcooldown()) / 5); } } } \ No newline at end of file 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 0747199ff..ec70f03d0 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 @@ -74,6 +74,7 @@ public class RunicBlade extends MeleeWeapon { //we apply here because of projecting RunicSlashTracker tracker = Buff.affect(hero, RunicSlashTracker.class); + tracker.boost = 2f + 0.25f*buffedLvl(); hero.belongings.abilityWeapon = this; if (!hero.canAttack(enemy)){ GLog.w(Messages.get(this, "ability_bad_position")); @@ -102,6 +103,20 @@ public class RunicBlade extends MeleeWeapon { }); } - public static class RunicSlashTracker extends FlavourBuff{}; + @Override + public String abilityInfo() { + if (levelKnown){ + return Messages.get(this, "ability_desc", 200+25*buffedLvl()); + } else { + return Messages.get(this, "typical_ability_desc", 200); + } + } + + + public static class RunicSlashTracker extends FlavourBuff{ + + public float boost = 2f; + + }; } 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 4aca9af5a..f6537d4a3 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 @@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; @@ -54,12 +55,22 @@ public class Scimitar extends MeleeWeapon { @Override protected void duelistAbility(Hero hero, Integer target) { beforeAbilityUsed(hero, null); - Buff.prolong(hero, SwordDance.class, 4f); //4 turns as using the ability is instant + //1 turn less as using the ability is instant + Buff.prolong(hero, SwordDance.class, 3+buffedLvl()); hero.sprite.operate(hero.pos); hero.next(); afterAbilityUsed(hero); } + @Override + public String abilityInfo() { + if (levelKnown){ + return Messages.get(this, "ability_desc", 4+buffedLvl()); + } else { + return Messages.get(this, "typical_ability_desc", 4); + } + } + public static class SwordDance extends FlavourBuff { { @@ -74,7 +85,7 @@ public class Scimitar extends MeleeWeapon { @Override public float iconFadePercent() { - return Math.max(0, (5 - visualcooldown()) / 5); + return Math.max(0, (4 - visualcooldown()) / 4); } } 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 40f378e32..57806a251 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 @@ -95,4 +95,12 @@ public class Whip extends MeleeWeapon { }); } + @Override + public String abilityInfo() { + if (levelKnown) { + return Messages.get(this, "ability_desc", augment.damageFactor(min()), augment.damageFactor(max())); + } else { + return Messages.get(this, "typical_ability_desc", min(0), max(0)); + } + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/Dart.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/Dart.java index d84b1458e..346d7c768 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/Dart.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/Dart.java @@ -97,7 +97,7 @@ public class Dart extends MissileWeapon { } } - private static Crossbow bow; + protected static Crossbow bow; private void updateCrossbow(){ if (Dungeon.hero.belongings.weapon() instanceof Crossbow){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/TippedDart.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/TippedDart.java index d56eabd28..19a688b84 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/TippedDart.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/TippedDart.java @@ -182,8 +182,8 @@ public abstract class TippedDart extends Dart { float usages = Math.round(MAX_DURABILITY/use); //grants 4 extra uses with charged shot - if (Dungeon.hero.buff(Crossbow.ChargedShot.class) != null){ - usages += 4; + if (bow != null && Dungeon.hero.buff(Crossbow.ChargedShot.class) != null){ + usages += 2 + bow.buffedLvl(); } //at 100 uses, items just last forever.