v0.9.2: implemented the empowering scrolls talent
This commit is contained in:
parent
eef60d6c7e
commit
b2ad246943
|
@ -365,6 +365,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.empowering_scrolls.title=empowering scrolls
|
||||
actors.hero.talent.empowering_scrolls.desc=_+1:_ When the Mage reads a scroll, his next wand zap within 10 turns will get _+1 level_.\n\n_+2:_ When the Mage reads a scroll, his next wand zap within 10 turns will get _+2 levels_.\n\n_+3:_ When the Mage reads a scroll, his next wand zap within 10 turns will get _+3 levels_.
|
||||
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.mystical_charge.title=mystical charge
|
||||
|
|
|
@ -82,7 +82,7 @@ public enum Talent {
|
|||
//Mage T2
|
||||
ENERGIZING_MEAL(36), ENERGIZING_UPGRADE(37), WAND_PRESERVATION(38), ARCANE_VISION(39), SHIELD_BATTERY(40),
|
||||
//Mage T3
|
||||
MAGE_T3_1(41), MAGE_T3_2(42),
|
||||
MAGE_T3_1(41, 3), EMPOWERING_SCROLLS(42, 3),
|
||||
//Battlemage T3
|
||||
EMPOWERED_STRIKE(43, 3), MYSTICAL_CHARGE(44, 3), BATTLEMAGE_T3_3(45, 3),
|
||||
//Warlock T3
|
||||
|
@ -113,6 +113,13 @@ public enum Talent {
|
|||
public static class ImprovisedProjectileCooldown extends FlavourBuff{};
|
||||
public static class LethalMomentumTracker extends FlavourBuff{};
|
||||
public static class WandPreservationCounter extends CounterBuff{};
|
||||
public static class EmpoweringScrollsTracker extends FlavourBuff{
|
||||
@Override
|
||||
public void detach() {
|
||||
super.detach();
|
||||
Item.updateQuickslot();
|
||||
}
|
||||
};
|
||||
public static class EmpoweredStrikeTracker extends FlavourBuff{};
|
||||
public static class BountyHunterTracker extends FlavourBuff{};
|
||||
public static class RejuvenatingStepsCooldown extends FlavourBuff{};
|
||||
|
@ -424,7 +431,7 @@ public enum Talent {
|
|||
Collections.addAll(tierTalents, STRONGMAN, WARRIOR_T3_2);
|
||||
break;
|
||||
case MAGE:
|
||||
Collections.addAll(tierTalents, MAGE_T3_1, MAGE_T3_2);
|
||||
Collections.addAll(tierTalents, MAGE_T3_1, EMPOWERING_SCROLLS);
|
||||
break;
|
||||
case ROGUE:
|
||||
Collections.addAll(tierTalents, LIGHT_CLOAK, ROGUE_T3_2);
|
||||
|
|
|
@ -23,9 +23,11 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls;
|
|||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.ItemStatusHandler;
|
||||
|
@ -182,6 +184,12 @@ public abstract class Scroll extends Item {
|
|||
curUser.spend( TIME_TO_READ );
|
||||
curUser.busy();
|
||||
((HeroSprite)curUser.sprite).read();
|
||||
|
||||
if (curUser.hasTalent(Talent.EMPOWERING_SCROLLS)){
|
||||
Buff.affect(curUser, Talent.EmpoweringScrollsTracker.class, 10f);
|
||||
updateQuickslot();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean isKnown() {
|
||||
|
|
|
@ -303,6 +303,11 @@ public abstract class Wand extends Item {
|
|||
@Override
|
||||
public int buffedLvl() {
|
||||
int lvl = super.buffedLvl();
|
||||
|
||||
if (charger.target.buff(Talent.EmpoweringScrollsTracker.class) != null){
|
||||
lvl += Dungeon.hero.pointsInTalent(Talent.EMPOWERING_SCROLLS);
|
||||
}
|
||||
|
||||
if (charger != null && charger.target != null) {
|
||||
WandOfMagicMissile.MagicCharge buff = charger.target.buff(WandOfMagicMissile.MagicCharge.class);
|
||||
if (buff != null && buff.level() > lvl){
|
||||
|
@ -356,6 +361,11 @@ public abstract class Wand extends Item {
|
|||
|
||||
curCharges -= cursed ? 1 : chargesPerCast();
|
||||
|
||||
Talent.EmpoweringScrollsTracker tracker = curUser.buff(Talent.EmpoweringScrollsTracker.class);
|
||||
if (tracker != null){
|
||||
tracker.detach();
|
||||
}
|
||||
|
||||
WandOfMagicMissile.MagicCharge buff = curUser.buff(WandOfMagicMissile.MagicCharge.class);
|
||||
if (buff != null && buff.level() > super.buffedLvl()){
|
||||
buff.detach();
|
||||
|
|
Loading…
Reference in New Issue
Block a user