v0.9.2: implemented the empowered strike talent

This commit is contained in:
Evan Debenham 2021-02-04 23:43:04 -05:00
parent 5386b2e97e
commit 257b2a4d3f
4 changed files with 19 additions and 8 deletions

View File

@ -359,6 +359,8 @@ actors.hero.talent.arcane_vision.title=arcane vision
actors.hero.talent.arcane_vision.desc=_+1:_ When the Mage zaps an enemy, he gains mind vision on them for _10 turns_.\n\n_+2:_ When the Mage zaps an enemy, he gains mind vision on them for _15 turns_.
actors.hero.talent.shield_battery.title=shield battery
actors.hero.talent.shield_battery.desc=_+1:_ The Mage can self-target with a wand to convert its charges into shielding at a rate of _5% max HP per charge_.\n\n_+2:_ The Mage can self-target with a wand to convert its charges into shielding at a rate of _7.5% max HP per charge_.
actors.hero.talent.empowered_strike.title=empowered strike
actors.hero.talent.empowered_strike.desc=_+1:_ The Battlemage's first melee strike with his staff after zapping with it deals _+17% damage_.\n\n_+2:_ The Battlemage's first melee strike with his staff after zapping with it deals _+33% damage_.\n\n_+3:_ The Battlemage's first melee strike with his staff after zapping with it deals _+50% damage_.
actors.hero.talent.soul_siphon.title=soul siphon
actors.hero.talent.soul_siphon.desc=_+1:_ Melee damage dealt by other characters triggers the Warlock's soul mark at _15% effectiveness_.\n\n_+2:_ Melee damage dealt by other characters triggers the Warlock's soul mark at _30% effectiveness_.\n\n_+3:_ Melee damage dealt by other characters triggers the Warlock's soul mark at _45% effectiveness_.

View File

@ -84,7 +84,7 @@ public enum Talent {
//Mage T3
MAGE_T3_1(41), MAGE_T3_2(42),
//Battlemage T3
BATTLEMAGE_T3_1(43, 3), BATTLEMAGE_T3_2(44, 3), BATTLEMAGE_T3_3(45, 3),
EMPOWERED_STRIKE(43, 3), BATTLEMAGE_T3_2(44, 3), BATTLEMAGE_T3_3(45, 3),
//Warlock T3
SOUL_SIPHON(46, 3), WARLOCK_T3_2(47, 3), WARLOCK_T3_3(48, 3),
@ -113,6 +113,7 @@ public enum Talent {
public static class ImprovisedProjectileCooldown extends FlavourBuff{};
public static class LethalMomentumTracker extends FlavourBuff{};
public static class WandPreservationCounter extends CounterBuff{};
public static class EmpoweredStrikeTracker extends FlavourBuff{};
public static class RejuvenatingStepsCooldown extends FlavourBuff{};
int icon;
@ -462,7 +463,7 @@ public enum Talent {
Collections.addAll(tierTalents, CLEAVE, GLADIATOR_T3_2, GLADIATOR_T3_3);
break;
case BATTLEMAGE:
Collections.addAll(tierTalents, BATTLEMAGE_T3_1, BATTLEMAGE_T3_2, BATTLEMAGE_T3_3);
Collections.addAll(tierTalents, EMPOWERED_STRIKE, BATTLEMAGE_T3_2, BATTLEMAGE_T3_3);
break;
case WARLOCK:
Collections.addAll(tierTalents, SOUL_SIPHON, WARLOCK_T3_2, WARLOCK_T3_3);

View File

@ -362,14 +362,17 @@ public abstract class Wand extends Item {
}
//if the wand is owned by the hero, but not in their inventory, it must be in the staff
if (curCharges == 0
&& charger != null
if (charger != null
&& charger.target == Dungeon.hero
&& !Dungeon.hero.belongings.contains(this)
&& Dungeon.hero.hasTalent(Talent.BACKUP_BARRIER)){
&& !Dungeon.hero.belongings.contains(this)) {
if (curCharges == 0 && Dungeon.hero.hasTalent(Talent.BACKUP_BARRIER)) {
//grants 4/6 shielding
Buff.affect(Dungeon.hero, Barrier.class).setShield(2 + 2 * Dungeon.hero.pointsInTalent(Talent.BACKUP_BARRIER));
}
if (Dungeon.hero.hasTalent(Talent.EMPOWERED_STRIKE)){
Buff.prolong(Dungeon.hero, Talent.EmpoweredStrikeTracker.class, 5f);
}
}
Invisibility.dispel();
updateQuickslot();

View File

@ -146,6 +146,11 @@ public class MagesStaff extends MeleeWeapon {
@Override
public int proc(Char attacker, Char defender, int damage) {
if (attacker.buff(Talent.EmpoweredStrikeTracker.class) != null){
attacker.buff(Talent.EmpoweredStrikeTracker.class).detach();
damage = Math.round( damage * (1f + Dungeon.hero.pointsInTalent(Talent.EMPOWERED_STRIKE)/6f));
}
if (wand != null &&
attacker instanceof Hero && ((Hero)attacker).subClass == HeroSubClass.BATTLEMAGE) {
if (wand.curCharges < wand.maxCharges) wand.partialCharge += 0.5f;