diff --git a/core/src/main/assets/interfaces/talent_icons.png b/core/src/main/assets/interfaces/talent_icons.png index 3bc548f09..b3c0962df 100644 Binary files a/core/src/main/assets/interfaces/talent_icons.png and b/core/src/main/assets/interfaces/talent_icons.png differ diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 72c78a1de..af22ac8e2 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -809,16 +809,22 @@ actors.hero.talent.aggressive_barrier.meta_desc=_If this talent is gained by a d actors.hero.talent.focused_meal.title=focused meal actors.hero.talent.focused_meal.desc=_+1:_ Eating food takes the Duelist 1 turn and grants her _1 weapon charge_.\n\n_+2:_ Eating food takes the Duelist 1 turn and grants her _1.5 weapon charge_. -actors.hero.talent.focused_meal.meta_desc=_If this talent is gained by a different hero_ it will instead grant bonus damage to their next attack equal to their level/3 at +1, and level/2 at +2. +actors.hero.talent.focused_meal.meta_desc=_If this talent is gained by a different hero_ it will instead grant bonus damage to their next attack equal to their level/3 at +1, or level/2 at +2. actors.hero.talent.restored_agility.title=restored agility actors.hero.talent.restored_agility.desc=_+1:_ The Duelist has _2x evasion_ while drinking potions of healing.\n\n_+2:_ The Duelist has _5x evasion_ while drinking potions of healing.\n\nThis talent also triggers when drinking potions or elixirs based on potions of healing. actors.hero.talent.weapon_recharging.title=weapon recharging actors.hero.talent.weapon_recharging.desc=_+1:_ The Duelist gains one weapon charge every _15 turns_ when under the effect of wand or artifact recharging buffs.\n\n_+2:_ The Duelist gains one weapon charge every _10 turns_ when under the effect of wand or artifact recharging buffs. -actors.hero.talent.weapon_recharging.meta_desc=_If this talent is gained by a different hero_ it will instead cause them to deal +5% melee damage while recharging at +1, and +7.5% melee damage while recharging at +2. +actors.hero.talent.weapon_recharging.meta_desc=_If this talent is gained by a different hero_ it will instead cause them to deal +5% melee damage while recharging at +1, or +7.5% melee damage while recharging at +2. actors.hero.talent.swift_equip.title=swift equip actors.hero.talent.swift_equip.desc=_+1:_ The Duelist can switch her equipped weapon instantly _one time_, with a 50 turn cooldown.\n\n_+2:_ The Duelist can switch her equipped weapon instantly _twice within 5 turns_, with a 50 turn cooldown.\n\nIf the Duelist has this talent and it is not on cooldown, quick-using an unequipped weapon will equip it. +actors.hero.talent.lightweight_charge.title=lightweight charge +actors.hero.talent.lightweight_charge.desc=_+1:_ When the Duelist uses the ability of a tier 1/2/3 melee weapon, it consumes _17/11/8% less charge_.\n\n_+2:_ When the Duelist uses the ability of a tier 1/2/3 melee weapon, it consumes _33/22/17% less charge_.\n\n_+3:_ When the Duelist uses the ability of a tier 1/2/3 melee weapon, it consumes _50/33/25% less charge_. +actors.hero.talent.lightweight_charge.meta_desc=_If this talent is gained by a different hero_ it will instead increase the damage of tier 2/3 melee weapons by 10/5% at +1, 20/10% at +2, or 30/15% at +3. Tier 1 weapons are unaffected. +actors.hero.talent.deadly_followup.title=deadly followup +actors.hero.talent.deadly_followup.desc=_+1:_ When the Duelist hits an enemy with a thrown weapon, she will deal _8% more melee damage_ to them for 5 turns.\n\n_+2:_ When the Duelist hits an enemy with a thrown weapon, she will deal _16% more melee damage_ to them for 5 turns.\n\n_+3:_ When the Duelist hits an enemy with a thrown weapon, she will deal _24% more melee damage_ to them for 5 turns. + #universal actors.hero.talent.heroic_energy.title=heroic energy actors.hero.talent.heroic_energy.rat_title=ratroic energy diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index df1cbd30a..1f25561e8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -119,6 +119,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Flail; 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.melee.Sai; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon; @@ -568,6 +569,17 @@ public class Hero extends Char { if (wep != null) { dmg = wep.damageRoll( this ); + + if (heroClass != HeroClass.DUELIST + && hasTalent(Talent.LIGHTWEIGHT_CHARGE) + && wep instanceof MeleeWeapon) { + if (((MeleeWeapon) wep).tier == 2) { + dmg = Math.round(dmg * (1f + 0.1f*pointsInTalent(Talent.LIGHTWEIGHT_CHARGE))); + } else if (((MeleeWeapon) wep).tier == 3) { + dmg = Math.round(dmg * (1f + 0.05f*pointsInTalent(Talent.LIGHTWEIGHT_CHARGE))); + } + } + if (!(wep instanceof MissileWeapon)) dmg += RingOfForce.armedDamageBonus(this); } else { dmg = RingOfForce.damageRoll(this); @@ -1228,13 +1240,6 @@ public class Hero extends Char { if (wep != null) damage = wep.proc( this, enemy, damage ); - if (buff(Talent.SpiritBladesTracker.class) != null - && Random.Int(10) < 3*pointsInTalent(Talent.SPIRIT_BLADES)){ - SpiritBow bow = belongings.getItem(SpiritBow.class); - if (bow != null) damage = bow.proc( this, enemy, damage ); - buff(Talent.SpiritBladesTracker.class).detach(); - } - damage = Talent.onAttackProc( this, enemy, damage ); switch (subClass) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java index fb544c1fc..dc7284078 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java @@ -54,6 +54,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HornOfPlenty; import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging; import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon; @@ -151,7 +152,7 @@ public enum Talent { //Duelist T2 FOCUSED_MEAL(132), RESTORED_AGILITY(133), WEAPON_RECHARGING(134), DUELIST_T2_4(135), SWIFT_EQUIP(136), //Duelist T3 - DUELIST_T3_1(137, 3), DUELIST_T3_2(138, 3), + LIGHTWEIGHT_CHARGE(137, 3), DEADLY_FOLLOWUP(138, 3), //Duelist S1 T3 DUELIST_S1_1(139, 3), DUELIST_S1_2(140, 3), DUELIST_S1_3(141, 3), //Duelist S2 T3 @@ -254,6 +255,7 @@ public enum Talent { secondUse = bundle.getBoolean(SECOND_USE); } }; + public static class DeadlyFollowupTracker extends FlavourBuff{}; int icon; int maxPoints; @@ -595,6 +597,24 @@ public enum Talent { } } + if (hero.buff(Talent.SpiritBladesTracker.class) != null + && Random.Int(10) < 3*hero.pointsInTalent(Talent.SPIRIT_BLADES)){ + SpiritBow bow = hero.belongings.getItem(SpiritBow.class); + if (bow != null) dmg = bow.proc( hero, enemy, dmg ); + hero.buff(Talent.SpiritBladesTracker.class).detach(); + } + + if (hero.hasTalent(DEADLY_FOLLOWUP)) { + if (hero.belongings.weapon() instanceof MissileWeapon) { + Buff.prolong(enemy, DeadlyFollowupTracker.class, 5f); + } else if (enemy.buff(DeadlyFollowupTracker.class) != null){ + dmg = Math.round(dmg * (1.0f + .08f*hero.pointsInTalent(DEADLY_FOLLOWUP))); + if (!(enemy instanceof Mob) || !((Mob) enemy).surprisedBy(hero)){ + Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG, 0.75f, 1.2f); + } + } + } + return dmg; } @@ -685,7 +705,7 @@ public enum Talent { Collections.addAll(tierTalents, POINT_BLANK, SEER_SHOT); break; case DUELIST: - Collections.addAll(tierTalents, DUELIST_T3_1, DUELIST_T3_2); + Collections.addAll(tierTalents, LIGHTWEIGHT_CHARGE, DEADLY_FOLLOWUP); break; } for (Talent talent : tierTalents){ 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 514589870..8e78fe433 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 @@ -67,8 +67,8 @@ public class AssassinsBlade extends MeleeWeapon { } @Override - public int abilityChargeUse() { - return 2; + public float abilityChargeUse( Hero hero ) { + return 2*super.abilityChargeUse(hero); } @Override 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 e07d48170..5ce791102 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 @@ -80,8 +80,8 @@ public class Dagger extends MeleeWeapon { } @Override - public int abilityChargeUse() { - return 2; + public float abilityChargeUse( Hero hero ) { + return 2*super.abilityChargeUse(hero); } @Override 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 85796b822..9a2df7c1c 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 @@ -67,8 +67,8 @@ public class Dirk extends MeleeWeapon { } @Override - public int abilityChargeUse() { - return 2; + public float abilityChargeUse( Hero hero ) { + return 2*super.abilityChargeUse(hero); } @Override 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 b72b42903..9b8bc8cd0 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 @@ -82,8 +82,8 @@ public class Flail extends MeleeWeapon { } @Override - public int abilityChargeUse() { - return (Dungeon.hero.buff(SpinAbilityTracker.class) == null) ? 2 : 0; + public float abilityChargeUse( Hero hero ) { + return 2*super.abilityChargeUse(hero); } @Override 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 abddf6342..a473da379 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 @@ -38,8 +38,12 @@ public class Greatsword extends MeleeWeapon { } @Override - public int abilityChargeUse() { - return Dungeon.hero.buff(Sword.CleaveTracker.class) != null ? 0 : 1; + public float abilityChargeUse( Hero hero ) { + if (hero.buff(Sword.CleaveTracker.class) != null){ + return 0; + } else { + return super.abilityChargeUse( hero ); + } } @Override 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 a0f7eb107..971e1f5bd 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 @@ -38,8 +38,12 @@ public class Longsword extends MeleeWeapon { } @Override - public int abilityChargeUse() { - return Dungeon.hero.buff(Sword.CleaveTracker.class) != null ? 0 : 1; + public float abilityChargeUse( Hero hero ) { + if (hero.buff(Sword.CleaveTracker.class) != null){ + return 0; + } else { + return super.abilityChargeUse( hero ); + } } @Override 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 e3746eb35..4ade7eeb8 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 @@ -97,7 +97,8 @@ public class MeleeWeapon extends Weapon { } else { GLog.w(Messages.get(this, "ability_need_equip")); } - } else if (Buff.affect(hero, Charger.class).charges < abilityChargeUse()) { + } else if ((Buff.affect(hero, Charger.class).charges + Buff.affect(hero, Charger.class).partialCharge) + < abilityChargeUse(hero)) { GLog.w(Messages.get(this, "ability_no_charge")); usesTargeting = false; } else { @@ -143,8 +144,13 @@ public class MeleeWeapon extends Weapon { //TODO make abstract protected void duelistAbility( Hero hero, Integer target ){} - protected void onAbilityUsed(Hero hero ){ - Buff.affect(hero, Charger.class).charges -= abilityChargeUse(); + protected void onAbilityUsed( Hero hero ){ + Charger charger = Buff.affect(hero, Charger.class); + charger.partialCharge -= abilityChargeUse( hero ); + while (charger.partialCharge < 0){ + charger.charges--; + charger.partialCharge++; + } if (hero.heroClass == HeroClass.DUELIST && hero.hasTalent(Talent.AGGRESSIVE_BARRIER) @@ -155,8 +161,14 @@ public class MeleeWeapon extends Weapon { updateQuickslot(); } - public int abilityChargeUse(){ - return 1; + public float abilityChargeUse( Hero hero ){ + float chargeUse = 1f; + if (hero.hasTalent(Talent.LIGHTWEIGHT_CHARGE) && tier <= 3){ + // T1/2/3 get 50/33/25% charge use reduction at +3 + float chargeUseReduction = 1/(1f+tier) * (hero.pointsInTalent(Talent.LIGHTWEIGHT_CHARGE)/3f); + chargeUse *= 1f - chargeUseReduction; + } + return chargeUse; } public int tier; 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 b187c9576..1f1463b6a 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 @@ -38,8 +38,12 @@ public class Shortsword extends MeleeWeapon { } @Override - public int abilityChargeUse() { - return Dungeon.hero.buff(Sword.CleaveTracker.class) != null ? 0 : 1; + public float abilityChargeUse( Hero hero ) { + if (hero.buff(Sword.CleaveTracker.class) != null){ + return 0; + } else { + return super.abilityChargeUse( hero ); + } } @Override 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 9e5ded61c..9aa580f8b 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 @@ -46,8 +46,12 @@ public class Sword extends MeleeWeapon { } @Override - public int abilityChargeUse() { - return Dungeon.hero.buff(CleaveTracker.class) != null ? 0 : 1; + public float abilityChargeUse( Hero hero ) { + if (hero.buff(Sword.CleaveTracker.class) != null){ + return 0; + } else { + return super.abilityChargeUse( hero ); + } } @Override 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 8c77c964d..26f717430 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 @@ -40,8 +40,12 @@ public class WornShortsword extends MeleeWeapon { } @Override - public int abilityChargeUse() { - return Dungeon.hero.buff(Sword.CleaveTracker.class) != null ? 0 : 1; + public float abilityChargeUse( Hero hero ) { + if (hero.buff(Sword.CleaveTracker.class) != null){ + return 0; + } else { + return super.abilityChargeUse( hero ); + } } @Override