From 935b831af0bfbddf4509a159973a60b2e4b34a31 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 25 Aug 2023 13:15:03 -0400 Subject: [PATCH] v2.2.0: added a new T3 base class talent for the mage --- .../main/assets/messages/actors/actors.properties | 6 +++--- .../shatteredpixeldungeon/actors/hero/Talent.java | 7 ++++--- .../shatteredpixeldungeon/items/wands/Wand.java | 12 ++++++++---- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 133c6a287..568c4890b 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -702,10 +702,10 @@ actors.hero.talent.arcane_vision.desc=_+1:_ When the Mage zaps an enemy, he gain 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 all of its charges into shielding at a rate of _4% max HP per charge_.\n\n_+2:_ The Mage can self-target with a wand to convert all of its charges into shielding at a rate of _6% max HP per charge_. -actors.hero.talent.empowering_scrolls.title=empowering scrolls -actors.hero.talent.empowering_scrolls.desc=_+1:_ When the Mage reads a scroll, his next _one wand zap_ will get +3 levels.\n\n_+2:_ When the Mage reads a scroll, his next _two wand zaps_ will get +3 levels.\n\n_+3:_ When the Mage reads a scroll, his next _three wand zaps_ will get +3 levels. +actors.hero.talent.desperate_power.title=desperate power +actors.hero.talent.desperate_power.desc=_+1:_ The Mage's wands and staff gain _+1 level_ when they are down to their last charge.\n\n_+2:_ The Mage's wands and staff gain _+2 levels_ when they are down to their last charge.\n\n_+3:_ The Mage's wands and staff gain _+3 levels_ when they are down to their last charge. actors.hero.talent.ally_warp.title=ally warp -actors.hero.talent.ally_warp.desc=_+1:_ The Mage can tap an ally to instantly swap places with them, with a _2 tile range_.\n\n_+2:_ The Mage can tap an ally to instantly swap places with them, with a _4 tile range_.\n\n_+3:_ The Mage can tap an ally to instantly swap places with them, with a _6 tile range_.\n\nThe Mage cannot swap places with immobile allies. +actors.hero.talent.ally_warp.desc=_+1:_ The Mage can select an ally to instantly swap places with them, with a _2 tile range_.\n\n_+2:_ The Mage can select an ally to instantly swap places with them, with a _4 tile range_.\n\n_+3:_ The Mage can select an ally to instantly swap places with them, with a _6 tile range_.\n\nThe Mage cannot swap places with immobile allies. 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 _+16% damage_ and the staff's bonus effect gets _+50% power_.\n\n_+2:_ The Battlemage's first melee strike with his staff after zapping with it deals _+33% damage_ and the staff's bonus effect gets _+100% power_.\n\n_+3:_ The Battlemage's first melee strike with his staff after zapping with it deals _+50% damage_ and the staff's bonus effect gets _+150% power_. 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 57fcc30a7..2cd6fa9f4 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 @@ -107,8 +107,7 @@ public enum Talent { //Mage T2 ENERGIZING_MEAL(36), INSCRIBED_POWER(37), WAND_PRESERVATION(38), ARCANE_VISION(39), SHIELD_BATTERY(40), //Mage T3 - //TODO current empowering scrolls does nothing - EMPOWERING_SCROLLS(41, 3), ALLY_WARP(42, 3), + DESPERATE_POWER(41, 3), ALLY_WARP(42, 3), //Battlemage T3 EMPOWERED_STRIKE(43, 3), MYSTICAL_CHARGE(44, 3), EXCESS_CHARGE(45, 3), //Warlock T3 @@ -818,7 +817,7 @@ public enum Talent { Collections.addAll(tierTalents, HOLD_FAST, STRONGMAN); break; case MAGE: - Collections.addAll(tierTalents, EMPOWERING_SCROLLS, ALLY_WARP); + Collections.addAll(tierTalents, DESPERATE_POWER, ALLY_WARP); break; case ROGUE: Collections.addAll(tierTalents, ENHANCED_RINGS, LIGHT_CLOAK); @@ -938,6 +937,8 @@ public enum Talent { private static final HashSet removedTalents = new HashSet<>(); static{ + //v2.2.0 + removedTalents.add("EMPOWERING_SCROLLS"); //v1.4.0 removedTalents.add("BERSERKING_STAMINA"); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java index b211f1097..c4b09158e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java @@ -341,6 +341,14 @@ public abstract class Wand extends Item { lvl = Degrade.reduceLevel(lvl); } + if (charger.target.buff(ScrollEmpower.class) != null){ + lvl += 2; + } + + if (curCharges == 1 && charger.target instanceof Hero && ((Hero)charger.target).hasTalent(Talent.DESPERATE_POWER)){ + lvl += ((Hero)charger.target).pointsInTalent(Talent.DESPERATE_POWER); + } + if (charger.target.buff(WildMagic.WildMagicTracker.class) != null){ int bonus = 4 + ((Hero)charger.target).pointsInTalent(Talent.WILD_POWER); if (Random.Int(2) == 0) bonus++; @@ -352,10 +360,6 @@ public abstract class Wand extends Item { } } - if (charger.target.buff(ScrollEmpower.class) != null){ - lvl += 2; - } - WandOfMagicMissile.MagicCharge buff = charger.target.buff(WandOfMagicMissile.MagicCharge.class); if (buff != null && buff.level() > lvl){ return buff.level();