v2.1.0: removed lightweight charge talent, replaced with precise assault

This commit is contained in:
Evan Debenham
2023-05-11 14:04:59 -04:00
parent 279ea21ac0
commit c1f822c223
4 changed files with 35 additions and 21 deletions

View File

@@ -599,6 +599,8 @@ actors.hero.talent$lethalhastecooldown.name=lethal haste cooldown
actors.hero.talent$lethalhastecooldown.desc=You have recently used this talent, and must wait before using it again.\n\nTurns remaining: %s.
actors.hero.talent$swiftequipcooldown.name=swift equip cooldown
actors.hero.talent$swiftequipcooldown.desc=You have recently used this talent, and must wait before using it again.\n\nTurns remaining: %s.
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$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.
@@ -882,9 +884,9 @@ actors.hero.talent.lethal_haste.meta_desc=_If this talent is gained by a differe
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 20 turn cooldown.\n\n_+2:_ The Duelist can switch her equipped weapon instantly _twice within 5 turns_, with a 20 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 _8/7/5% less charge_.\n\n_+2:_ When the Duelist uses the ability of a tier 1/2/3 melee weapon, it consumes _17/13/10% less charge_.\n\n_+3:_ When the Duelist uses the ability of a tier 1/2/3 melee weapon, it consumes _25/20/15% 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 7/5% at +1, 14/10% at +2, or 20/15% at +3. Tier 1 weapons are unaffected.
actors.hero.talent.precise_assault.title=precise assault
actors.hero.talent.precise_assault.desc=_+1:_ When the Duelist uses a weapon ability, she gains _2x accuracy_ on her next melee attack within 5 turns.\n\n_+2:_ When the Duelist uses a weapon ability, she gains _4x accuracy_ on her next melee attack within 5 turns.\n\n_+3:_ When the Duelist uses a weapon ability, she gains _8x accuracy_ on her next melee attack within 5 turns.
actors.hero.talent.precise_assault.meta_desc=_If this talent is gained by a different hero_ it will instead increase overall accuracy by 10% at +1, 20% at +2, or 30% at +3.
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.

View File

@@ -593,16 +593,6 @@ public class Hero extends Char {
if (!RingOfForce.fightingUnarmed(this)) {
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.067f*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);

View File

@@ -155,7 +155,7 @@ public enum Talent {
//Duelist T2
FOCUSED_MEAL(132), RESTORED_AGILITY(133), WEAPON_RECHARGING(134), LETHAL_HASTE(135), SWIFT_EQUIP(136),
//Duelist T3
LIGHTWEIGHT_CHARGE(137, 3), DEADLY_FOLLOWUP(138, 3),
PRECISE_ASSAULT(137, 3), DEADLY_FOLLOWUP(138, 3),
//Champion T3
SECONDARY_CHARGE(139, 3), TWIN_UPGRADES(140, 3), COMBINED_LETHALITY(141, 3),
//Monk T3
@@ -269,6 +269,7 @@ public enum Talent {
}
};
public static class DeadlyFollowupTracker extends FlavourBuff{};
public static class PreciseAssaultTracker extends FlavourBuff{};
public static class CombinedLethalityAbilityTracker extends FlavourBuff{
public MeleeWeapon weapon;
};
@@ -759,7 +760,7 @@ public enum Talent {
Collections.addAll(tierTalents, POINT_BLANK, SEER_SHOT);
break;
case DUELIST:
Collections.addAll(tierTalents, LIGHTWEIGHT_CHARGE, DEADLY_FOLLOWUP);
Collections.addAll(tierTalents, PRECISE_ASSAULT, DEADLY_FOLLOWUP);
break;
}
for (Talent talent : tierTalents){
@@ -874,6 +875,8 @@ public enum Talent {
renamedTalents.put("ARMSMASTERS_INTUITION", "VETERANS_INTUITION");
//v2.0.0 BETA
renamedTalents.put("LIGHTLY_ARMED", "UNENCUMBERED_SPIRIT");
//v2.1.0
renamedTalents.put("LIGHTWEIGHT_CHARGE", "PRECISE_ASSAULT");
}
public static void restoreTalentsFromBundle( Bundle bundle, Hero hero ){

View File

@@ -43,7 +43,6 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.ui.ActionIndicator;
import com.shatteredpixel.shatteredpixeldungeon.ui.AttackIndicator;
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
@@ -219,6 +218,10 @@ public class MeleeWeapon extends Weapon {
Buff.affect(hero, Barrier.class).setShield(3);
}
if (hero.buff(Talent.PreciseAssaultTracker.class) != null) {
hero.buff(Talent.PreciseAssaultTracker.class).detach();
}
if (hero.buff(Talent.CombinedLethalityAbilityTracker.class) != null
&& hero.buff(Talent.CombinedLethalityAbilityTracker.class).weapon != null
&& hero.buff(Talent.CombinedLethalityAbilityTracker.class).weapon != this){
@@ -230,6 +233,9 @@ public class MeleeWeapon extends Weapon {
protected void afterAbilityUsed( Hero hero ){
hero.belongings.abilityWeapon = null;
if (hero.hasTalent(Talent.PRECISE_ASSAULT)){
Buff.affect(hero, Talent.PreciseAssaultTracker.class, hero.cooldown()+4f);
}
if (hero.hasTalent(Talent.COMBINED_LETHALITY)) {
Talent.CombinedLethalityAbilityTracker tracker = hero.buff(Talent.CombinedLethalityAbilityTracker.class);
if (tracker == null || tracker.weapon == this || tracker.weapon == null){
@@ -265,11 +271,6 @@ public class MeleeWeapon extends Weapon {
if (hero.buff(Talent.CounterAbilityTacker.class) != null){
chargeUse = Math.max(0, chargeUse-0.5f*hero.pointsInTalent(Talent.COUNTER_ABILITY));
}
if (hero.hasTalent(Talent.LIGHTWEIGHT_CHARGE) && tier <= 3){
// T1/2/3 get 25/20/15% charge use reduction at +3
float chargeUseReduction = (0.30f-.05f*tier) * (hero.pointsInTalent(Talent.LIGHTWEIGHT_CHARGE)/3f);
chargeUse *= 1f - chargeUseReduction;
}
return chargeUse;
}
@@ -315,6 +316,24 @@ public class MeleeWeapon extends Weapon {
return super.buffedLvl();
}
@Override
public float accuracyFactor(Char owner, Char target) {
float ACC = super.accuracyFactor(owner, target);
if (owner instanceof Hero && ((Hero) owner).hasTalent(Talent.PRECISE_ASSAULT)) {
if (((Hero) owner).heroClass != HeroClass.DUELIST){
//persistent +10%/20%/30% ACC for other heroes
ACC *= 1f + 0.1f*((Hero) owner).pointsInTalent(Talent.PRECISE_ASSAULT);
} else if (owner.buff(Talent.PreciseAssaultTracker.class) != null) {
// 2x/4x/8x ACC for duelist if she just used a weapon ability
ACC *= Math.pow(2, ((Hero) owner).pointsInTalent(Talent.PRECISE_ASSAULT));
owner.buff(Talent.PreciseAssaultTracker.class).detach();
}
}
return ACC;
}
@Override
public int damageRoll(Char owner) {
int damage = augment.damageFactor(super.damageRoll( owner ));