From 65b89da1808c396bb9b62ef9a4eec64681065653 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 16 Dec 2022 13:29:18 -0500 Subject: [PATCH] v2.0.0: implemented the two base T3 talents for the Duelist --- .../main/assets/interfaces/talent_icons.png | Bin 5663 -> 5744 bytes .../assets/messages/actors/actors.properties | 10 ++++++-- .../actors/hero/Hero.java | 19 +++++++++----- .../actors/hero/Talent.java | 24 ++++++++++++++++-- .../items/weapon/melee/AssassinsBlade.java | 4 +-- .../items/weapon/melee/Dagger.java | 4 +-- .../items/weapon/melee/Dirk.java | 4 +-- .../items/weapon/melee/Flail.java | 4 +-- .../items/weapon/melee/Greatsword.java | 8 ++++-- .../items/weapon/melee/Longsword.java | 8 ++++-- .../items/weapon/melee/MeleeWeapon.java | 22 ++++++++++++---- .../items/weapon/melee/Shortsword.java | 8 ++++-- .../items/weapon/melee/Sword.java | 8 ++++-- .../items/weapon/melee/WornShortsword.java | 8 ++++-- 14 files changed, 97 insertions(+), 34 deletions(-) diff --git a/core/src/main/assets/interfaces/talent_icons.png b/core/src/main/assets/interfaces/talent_icons.png index 3bc548f09af3292bd6f1fd80873182553414f909..b3c0962df01143be5e1cc74d64d9f8732995521e 100644 GIT binary patch delta 5464 zcmY+IX*iVo8^?doGn;*;vd5UBIHgi#$u`+e zkYy%BO3}iQWhM%R8T*VGGtb|7`M=+Ouj})@zc23ly01Ieblfy`HRS!=)DS|%=$aP* z04UtuWgnmqb{+#jUA$|nlSdR(odJdQTWW6&8-C-K6_5X7>HABDu@4kE1g|-CkvLef z<9hYcug|MmOQxo$pML-K*O%gtj}DbFXKYnRc)3d@Bf%fGY;k;;z-0b4Jk-WZ91yHR80lSqVwsxwc+*mYK1B(|&AE@ad zh(bR~|H+QgS+7Yo=2$BAB!Cd{lE9vHYsd><(BXqlYE)nw{1$;egm)c`b9t13^d7dV z`1tToX(Z65Ga^rM~(nlw~a~qNwR6|Y&!DS~XFLG4? zT>Npav}61$qC_i=&Fp34_wE+3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CUMqyxZz+~CYYxG2uFX8IS+B+G2=LNii|SiyHd+@qLb zSc;;bk@3%Dh0q_4!PsLrw+rD6(B@#pID`MH3~L%c^aE)C2L`Y%Gfa5%y)`0%bj zG_YS9Eaube$Ll^O{qlnb8+xU-b{PMB?Y!w!+}fd)AB|eW@XV^~?_K)JjbW2}tT@Te z(j|~fddT$a3&P3!v6Fn_%Iqsu{n;;^q4xqPaHBzg@=OSow=!MuWEc6wo>7~`k82KJ z9^|5o<57X>9c5| zpG15SU@g)-$umbwB~to_%BSR++$~HzG$DW-gaOdtZPDgw6-?fq3v$W4EldFQjft9} zcF@G~44TRRQ6=(x!3Oz)apZ9&?aP3+i2aU4JGgi!y+s4k&0E`M4~M~E{KMUdzgAq4 zfk8~o4_+$JrU~&z&v0{G{28B47_yLuL}gnWrGlr*^M zP3`7MhwoNWxB1KO^0hD>*p-7h3t>?IeP^uv%vvn}1^XnlGhy);RUC`MBj7zriRAc!8rG@&5h84<{cEITT@)dQ%`(u%X85V)iBI@#;wrusvzo}gPJPFNGgkg>xiJo zt5ckaM)v?-Ml8<~Vyh%A(+-HZbcZsj+GDffUve0e2}76!EsvHDng@l-RvRp| iC_ncDkN*!R+f-5OsTZF$7w|vyhYlV)P_p0SpZ^0K1S>ND 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