From 1466dea4b358f468036414cfc88a1e3dfd1c6f19 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 26 Jul 2024 14:36:00 -0400 Subject: [PATCH] v2.5.0: adjusted combined lethality, triggering hit can now be regular --- core/src/main/assets/messages/actors/actors.properties | 6 ++---- .../shatteredpixel/shatteredpixeldungeon/actors/Char.java | 8 ++++---- .../shatteredpixeldungeon/actors/hero/Talent.java | 6 ------ .../items/weapon/melee/MeleeWeapon.java | 6 ------ 4 files changed, 6 insertions(+), 20 deletions(-) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index c57fa7d08..02741526a 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -632,9 +632,7 @@ actors.hero.talent$preciseassaulttracker.name=precise assault actors.hero.talent$preciseassaulttracker.desc=The Duelist's next regular melee attack will gain bonus accuracy.\n\nTurns remaining: %s. actors.hero.talent$deadlyfollowuptracker.name=deadly followup actors.hero.talent$deadlyfollowuptracker.desc=The Duelist has recently attacked an enemy with a thrown weapon, her melee attacks against the same target will have boosted damage.\n\nTurns remaining: %s. -actors.hero.talent$combinedlethalitytriggertracker.name=combined lethality -actors.hero.talent$combinedlethalitytriggertracker.executed=executed -actors.hero.talent$combinedlethalitytriggertracker.desc=The Duelist's next attack will execute enemies below a certain health threshold.\n\nTurns remaining: %s. +actors.hero.talent$combinedlethalityabilitytracker.executed=executed #warrior actors.hero.talent.hearty_meal.title=hearty meal @@ -924,7 +922,7 @@ actors.hero.talent.varied_charge.desc=_+1:_ The Champion instantly regains _0.17 actors.hero.talent.twin_upgrades.title=twin upgrades actors.hero.talent.twin_upgrades.desc=_+1:_ If one of the Champion's two equipped weapons has a lower level and is _2 or more tiers lower_ than the other weapon, it will be boosted to the other weapon's level.\n\n_+2:_ If one of the Champion's two equipped weapons has a lower level and is _1 or more tiers lower_ than the other weapon, it will be boosted to the other weapon's level.\n\n_+3:_ If one of the Champion's two equipped weapons has a lower level and is _the same tier or lower_ than the other weapon, it will be boosted to the other weapon's level. actors.hero.talent.combined_lethality.title=combined lethality -actors.hero.talent.combined_lethality.desc=_+1:_ If the Champion uses two different weapon abilities successively, the second ability will execute any non-boss enemy left at _below 13% HP_.\n\n_+2:_ If the Champion uses two different weapon abilities successively, the second ability will execute any non-boss enemy left at _below 27% HP_.\n\n_+3:_ If the Champion uses two different weapon abilities successively, the second ability will execute any non-boss enemy left at _below 40% HP_.\n\nIf the second ability does not contain an attack, this talent will instead trigger on the Champion's next attack within 5 turns. +actors.hero.talent.combined_lethality.desc=_+1:_ If the Champion attacks with a melee weapon immediately after using a different weapon's ability, that attack will execute any non-boss enemy left at _below 13% HP_\n\n_+2:_ If the Champion attacks with a melee weapon immediately after using a different weapon's ability, that attack will execute any non-boss enemy left at _below 27% HP_\n\n_+3:_ If the Champion attacks with a melee weapon immediately after using a different weapon's ability, that attack will execute any non-boss enemy left at _below 40% HP_\n\nThis attack can be a regular melee weapon attack, or part of a weapon ability. actors.hero.talent.unencumbered_spirit.title=unencumbered spirit actors.hero.talent.unencumbered_spirit.desc=_+1:_ The Monk gains _50% more energy_ for each piece of _tier 3 or lower_ equipment she is using.\n\n_+2:_ This talent's effect is increased to _75% more energy_ for each piece of _tier 2 or lower_ equipment the Monk is using.\n\n_+3:_ This talent's effect is increased to _100% more energy_ for each piece of _tier 1_ equipment the Monk is using. She also gains a free cloth armor and studded gloves.\n\nNote that this talent gives no benefit from being unarmed or attacking with a Ring of Force. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index 5915c9a4f..63f2bdc23 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -475,10 +475,10 @@ public abstract class Char extends Actor { } } - Talent.CombinedLethalityTriggerTracker combinedLethality = buff(Talent.CombinedLethalityTriggerTracker.class); - if (combinedLethality != null){ + Talent.CombinedLethalityAbilityTracker combinedLethality = buff(Talent.CombinedLethalityAbilityTracker.class); + if (combinedLethality != null && this instanceof Hero && combinedLethality.weapon != ((Hero) this).belongings.attackingWeapon()){ if ( enemy.isAlive() && enemy.alignment != alignment && !Char.hasProp(enemy, Property.BOSS) - && !Char.hasProp(enemy, Property.MINIBOSS) && this instanceof Hero && + && !Char.hasProp(enemy, Property.MINIBOSS) && (enemy.HP/(float)enemy.HT) <= 0.4f*((Hero)this).pointsInTalent(Talent.COMBINED_LETHALITY)/3f) { enemy.HP = 0; if (!enemy.isAlive()) { @@ -489,7 +489,7 @@ public abstract class Char extends Actor { DeathMark.processFearTheReaper(enemy); } if (enemy.sprite != null) { - enemy.sprite.showStatus(CharSprite.NEGATIVE, Messages.get(Talent.CombinedLethalityTriggerTracker.class, "executed")); + enemy.sprite.showStatus(CharSprite.NEGATIVE, Messages.get(Talent.CombinedLethalityAbilityTracker.class, "executed")); } } combinedLethality.detach(); 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 4668ac4d9..476f72380 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 @@ -360,12 +360,6 @@ public enum Talent { public static class CombinedLethalityAbilityTracker extends FlavourBuff{ public MeleeWeapon weapon; }; - public static class CombinedLethalityTriggerTracker extends FlavourBuff{ - { type = buffType.POSITIVE; } - public int icon() { return BuffIndicator.CORRUPT; } - public void tintIcon(Image icon) { icon.hardlight(0.6f, 0.15f, 0.6f); } - public float iconFadePercent() { return Math.max(0, 1f - (visualcooldown() / 5)); } - }; public static class CombinedEnergyAbilityTracker extends FlavourBuff{ public boolean monkAbilused = false; public boolean wepAbilUsed = false; 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 c0a4b9ce0..32c2d64af 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 @@ -183,12 +183,6 @@ public class MeleeWeapon extends Weapon { hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, Integer.toString(shieldAmt), FloatingText.SHIELDING); } - if (hero.buff(Talent.CombinedLethalityAbilityTracker.class) != null - && hero.buff(Talent.CombinedLethalityAbilityTracker.class).weapon != null - && hero.buff(Talent.CombinedLethalityAbilityTracker.class).weapon != this){ - Buff.affect(hero, Talent.CombinedLethalityTriggerTracker.class, 5f); - } - updateQuickslot(); }