From 65a6c54b98bee4da3f6c73924e99c12965113f4c Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 24 Nov 2020 14:12:42 -0500 Subject: [PATCH] v0.9.1: implemented a T2 item use talent for each hero --- .../main/assets/interfaces/talent_icons.png | Bin 1375 -> 1546 bytes .../assets/messages/actors/actors.properties | 12 ++- .../actors/hero/Talent.java | 89 ++++++++++++++++-- .../items/artifacts/CloakOfShadows.java | 5 + .../items/potions/PotionOfHealing.java | 2 + .../elixirs/ElixirOfAquaticRejuvenation.java | 2 + .../elixirs/ElixirOfHoneyedHealing.java | 2 + .../potions/exotic/PotionOfShielding.java | 2 + .../items/scrolls/ScrollOfUpgrade.java | 3 + .../scrolls/exotic/ScrollOfEnchantment.java | 4 + .../items/spells/MagicalInfusion.java | 4 +- .../items/wands/Wand.java | 9 +- .../items/weapon/melee/MagesStaff.java | 18 ++-- 13 files changed, 127 insertions(+), 25 deletions(-) diff --git a/core/src/main/assets/interfaces/talent_icons.png b/core/src/main/assets/interfaces/talent_icons.png index 073d0be528e9ee57d50b53a48561a96bb7a2349c..f552202deb17cf01c767bebf5f6dc9dcdaa28201 100644 GIT binary patch delta 1528 zcmWlZeN>Ej6vyxHsd+J5&7_yfkR~cts5Bg*X{II&d16_SF_W5k_UZm}?>YB;&pqdJzTex;$+Ic)z;~|< ziwFg}E&`NObkU<$s~v6Yn?F47yjWGy)^r6F)$~TI1uf+d(##J#T<}wEYi0>cOG~pC zxt=}^Knt``(big6SXfX{K>7Paq*q;RowhJKE;6vCrG;vp)zQ&GHNK!=T2B1Tf#N$< zDQMkrH=o;kb@VZmtXRGZBs~u|0WbpPGHFCAid8CQ$i^mYDipW=gx&pgthurAT1uW?{{@87%@TZE1Ua>sfsODYhnD#LFx=gK*_%S*1Q{$o~X?9MxWzy$5 z^UtE;rKLPFU5t@frdd-I3fl^B0V19Hf=;=C-$D{#k7b9!!k3e2;H=Bk=0clf5yXz| zS;K^5c=mx%NM3lsa4JCLn9fE{`J1Rk=5^MD+g>`Qfg#*|Ys z@`Z~DY&s)sJjloqmR+0*DR0znVHP3c57y4dI&>Q0%Jf>(L?m04q+G(BYrMdkE&*kp z3v~YDnmaI?u`{;BiZH*P@tPIQs9S6&y0h@v?r3WUR0cWkUR;fpt73~x;!9EiTW&x% zgYac2@a5+8Y`|=-?@2mrl&vch?GIgSXf&od&arYo`E4a z2Mcub#6Goe%*QSEb+()S7F7v3lX7}+g#$*43$K1R&L*mft;FS$m-UMvx@o<-gfI2R z+>PiPaOO6=;X?ne6kea3wa|!|u;$4}leJzC&N1-H3eE&Jk6=7h{NH=!kv!GS?`abrp< zuWcCW@H}X86rv4s8qA;=RG)yFJ*pr(TA&?Z1zOzhCCb*l( zn$+l0Ktgs~@#kgLkmCs@#72$>#kYP}@6O`+6KBp?qY5}~Dej_Fiug|8;ecy+gKPZ` zA}0t(hYCCyE!1sQ`+j@PM2QFSamO9d*}^f z-=$a&t9C4L-!yQjw+v0b)k{8y$kuD2Kyn}g-TaXN9<>a+J50QRKJOG!!!^gEq{vkg znPIEPI=-~D67O7VeVAL^3Xx&H^#pDLlToq7y zPjEg<#1I5>E|zuM5$F2k2HHqprqV`AOj!iReIoU+Da74uJUPfMFTp&aD_`^kAJ!bF zGsXQ?Dslz=n5qG+wUsHn;&nM7{+93^j*%#FCAu<}T&wVgR5!v{nNq&fF4c?Zod!+1 zzx4Z{jlf`C%pS?`$<>hRHz?kX!<4RdZqJeYa#~88U4tPFWlxyTA~ID&|2<=&kBD8K3W=`m z_Y;cRbEO8=_++Y^U4m6_%M|hQ9EF?!_AU7egA*JSH#iXbEs|oE`>5bcc;uZg0v%_n zaA*qgx!`J4>jNroael@2>IbRlIe_z02gi_mzg&aP8QHj%5xhNy>ebEke+7Bya@o0H GWyb%b=a*Ih delta 1336 zcmV-81;_e|4BrZnBp_o@OjJbx00029005x>|NsC000000003djnVFfU034A)7=M4M z(wdr@hesW%ssI50005Z)|1&cHSSGk)xMx^B%*@Q0k6i!HGXKQo{{SlQlg=+Usq+8; z00DGTPE!Ct=GbNc00gQ@L_t(|0b*caL;(y8fOgG8*L52Rq7dzI!rOaq|NoWIk{W0| zq@{F`z&r2VD+&wsgN0gt-{r}ED0ARd?3=jfBg`F@6`uSei zt+1hh{eBjJ0|F)kNX!C$bIbyesR;Pp(WrnJBVYo6f%(%V=Rb@9rv+I38FogW0^$hv z2@?RH-()1bfZfC-Ag&46Pc$kZssJ!81prF|V&?*4!Y=_%cWwb#6c8r?W`6+v3OI}4 zCI}iJX%~R8ARq#kze53M#`#&~F$l&E9OnEcs3w5*G1qrG1I7f#7=Uvh7r+4&04@;| zKm%zY_4QML`5P7x6IlT4&&9$1fV%)U$-v;eXuSqva9-LM!0C^}1rQ1Wj7|+}0vMed znmh&>U~o&o<^V!%31kCY2!B#v6ToMoW*>zaU@!u)8NiXL05?Gz$Rn*U1<*jly+96N zBR>NGyK=;PcK{@`z7RkIjW$Caw8O0lz!6$s2F4Nkx!!M@9|MoU1dO0S7=*n5VZXwL z0&vMk;kgY)@jd{!bO0>Q^eBMaI4qCf1g!~#z7Hq`L9d1Ct^D_m! z9I;-n_pe9j=Ue6nP+tOG0A7T(dgWCJ!gd0HH=uqByuX`(_xCK|!{Gz~p8%ExfC9co z8WNCt0eruG1GVRXcM5o~3Sj-`Cq5Siq<K%4{^+6;LC&vgN;2Q2@vl0R7RpV!2X8Q5MxtOzhDfIPz}1+X4z z1q>_sL(c!h-wg>c1HhnP33wi1ejA?@@Cg;5`4g6$o1hukUI6=f7z~i|&jRev2?4AJ z>zDJlCx4)P9{}zGY3SxZmjDfsRtOxe00j z3P?je1{s|iRs}!>G1M`0SsqguV<^0)UW uEd9LxpP_m) grassCells = new ArrayList<>(); + for (int i : PathFinder.NEIGHBOURS8){ + grassCells.add(hero.pos+i); + } + Random.shuffle(grassCells); + for (int cell : grassCells){ + Char ch = Actor.findChar(cell); + if (ch != null){ + Buff.affect(ch, Roots.class, 1f + hero.pointsInTalent(RESTORED_NATURE)); + } + if (Dungeon.level.map[cell] == Terrain.EMPTY || + Dungeon.level.map[cell] == Terrain.EMBERS || + Dungeon.level.map[cell] == Terrain.EMPTY_DECO){ + Level.set(cell, Terrain.GRASS); + GameScene.updateMap(cell); + } + CellEmitter.get(cell).burst(LeafParticle.LEVEL_SPECIFIC, 4); + } + if (hero.pointsInTalent(RESTORED_NATURE) == 1){ + grassCells.remove(0); + grassCells.remove(0); + grassCells.remove(0); + } + for (int cell : grassCells){ + if (Dungeon.level.map[cell] == Terrain.EMPTY || + Dungeon.level.map[cell] == Terrain.EMBERS || + Dungeon.level.map[cell] == Terrain.EMPTY_DECO || + Dungeon.level.map[cell] == Terrain.GRASS || + Dungeon.level.map[cell] == Terrain.FURROWED_GRASS){ + Level.set(cell, Terrain.HIGH_GRASS); + GameScene.updateMap(cell); + } + } + Dungeon.observe(); + } + } + + public static void onUpgradeScrollUsed( Hero hero ){ + if (hero.hasTalent(ENERGIZING_UPGRADE)){ + MagesStaff staff = hero.belongings.getItem(MagesStaff.class); + if (staff != null){ + staff.gainCharge( hero.pointsInTalent(ENERGIZING_UPGRADE), true); + ScrollOfRecharging.charge( Dungeon.hero ); + SpellSprite.show( hero, SpellSprite.CHARGE ); + } + } + if (hero.hasTalent(MYSTICAL_UPGRADE)){ + CloakOfShadows cloak = hero.belongings.getItem(CloakOfShadows.class); + if (cloak != null){ + cloak.overCharge(hero.pointsInTalent(MYSTICAL_UPGRADE)); + ScrollOfRecharging.charge( Dungeon.hero ); + SpellSprite.show( hero, SpellSprite.CHARGE ); + } + } + } + public static void onItemEquipped( Hero hero, Item item ){ if (hero.pointsInTalent(ARMSMASTERS_INTUITION) == 2 && (item instanceof Weapon || item instanceof Armor)){ item.identify(); @@ -300,16 +377,16 @@ public enum Talent { //tier 2+ switch (cls){ case WARRIOR: default: - Collections.addAll(tierTalents, IRON_STOMACH, TEST_WARRIOR_T2_2, TEST_WARRIOR_T2_3, TEST_WARRIOR_T2_4, TEST_WARRIOR_T2_5); + Collections.addAll(tierTalents, IRON_STOMACH, RESTORED_WILLPOWER, TEST_WARRIOR_T2_3, TEST_WARRIOR_T2_4, TEST_WARRIOR_T2_5); break; case MAGE: Collections.addAll(tierTalents, ENERGIZING_MEAL, ENERGIZING_UPGRADE, TEST_MAGE_T2_3, TEST_MAGE_T2_4, TEST_MAGE_T2_5); break; case ROGUE: - Collections.addAll(tierTalents, MYSTICAL_MEAL, TEST_ROGUE_T2_2, SILENT_STEPS, ROGUES_FORESIGHT, TEST_ROGUE_T2_5); + Collections.addAll(tierTalents, MYSTICAL_MEAL, MYSTICAL_UPGRADE, SILENT_STEPS, ROGUES_FORESIGHT, TEST_ROGUE_T2_5); break; case HUNTRESS: - Collections.addAll(tierTalents, INVIGORATING_MEAL, TEST_HUNTRESS_T2_2, DURABLE_PROJECTILES, HEIGHTENED_SENSES, TEST_HUNTRESS_T2_5); + Collections.addAll(tierTalents, INVIGORATING_MEAL, RESTORED_NATURE, DURABLE_PROJECTILES, HEIGHTENED_SENSES, TEST_HUNTRESS_T2_5); break; } for (Talent talent : tierTalents){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java index f9fdad0d4..5a1494ede 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java @@ -149,6 +149,11 @@ public class CloakOfShadows extends Artifact { } } } + + public void overCharge(int amount){ + charge = Math.min(charge+amount, chargeCap+amount); + updateQuickslot(); + } @Override public Item upgrade() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfHealing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfHealing.java index 28536d414..fe519434d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfHealing.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfHealing.java @@ -36,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vulnerable; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -53,6 +54,7 @@ public class PotionOfHealing extends Potion { identify(); cure( hero ); heal( hero ); + Talent.onHealingPotionUsed( hero ); } public static void heal( Char ch ){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfAquaticRejuvenation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfAquaticRejuvenation.java index 855d167d6..ce37bb8be 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfAquaticRejuvenation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfAquaticRejuvenation.java @@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Challenges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; import com.shatteredpixel.shatteredpixeldungeon.items.quest.GooBlob; @@ -49,6 +50,7 @@ public class ElixirOfAquaticRejuvenation extends Elixir { PotionOfHealing.pharmacophobiaProc(hero); } else { Buff.affect(hero, AquaHealing.class).set(Math.round(hero.HT * 1.5f)); + Talent.onHealingPotionUsed( hero ); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfHoneyedHealing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfHoneyedHealing.java index 7d6a8658d..2754a942d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfHoneyedHealing.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/elixirs/ElixirOfHoneyedHealing.java @@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bee; import com.shatteredpixel.shatteredpixeldungeon.items.Honeypot; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; @@ -44,6 +45,7 @@ public class ElixirOfHoneyedHealing extends Elixir { public void apply(Hero hero) { PotionOfHealing.cure(hero); PotionOfHealing.heal(hero); + Talent.onHealingPotionUsed( hero ); Buff.affect(hero, Hunger.class).satisfy(Hunger.STARVING/5f); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfShielding.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfShielding.java index 1a21aa80d..32ac397d8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfShielding.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfShielding.java @@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; @@ -44,6 +45,7 @@ public class PotionOfShielding extends ExoticPotion { } else { //~75% of a potion of healing Buff.affect(hero, Barrier.class).setShield((int) (0.6f * hero.HT + 10)); + Talent.onHealingPotionUsed( hero ); } } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java index b32c3459f..549978f54 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfUpgrade.java @@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Item; @@ -102,6 +103,8 @@ public class ScrollOfUpgrade extends InventoryScroll { } else { item.upgrade(); } + + Talent.onUpgradeScrollUsed( Dungeon.hero ); Badges.validateItemLevelAquired( item ); Statistics.upgradesUsed++; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfEnchantment.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfEnchantment.java index 5f1c033dd..70bb9b89f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfEnchantment.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfEnchantment.java @@ -22,6 +22,8 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic; import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.effects.Enchanting; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; @@ -81,6 +83,7 @@ public class ScrollOfEnchantment extends ExoticScroll { Sample.INSTANCE.play( Assets.Sounds.READ ); Enchanting.show(curUser, item); + Talent.onUpgradeScrollUsed( Dungeon.hero ); } } @@ -117,6 +120,7 @@ public class ScrollOfEnchantment extends ExoticScroll { Sample.INSTANCE.play( Assets.Sounds.READ ); Enchanting.show(curUser, item); + Talent.onUpgradeScrollUsed( Dungeon.hero ); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalInfusion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalInfusion.java index b40516577..db7f94a9b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalInfusion.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalInfusion.java @@ -22,7 +22,9 @@ package com.shatteredpixel.shatteredpixeldungeon.items.spells; import com.shatteredpixel.shatteredpixeldungeon.Badges; +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Statistics; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; @@ -54,7 +56,7 @@ public class MagicalInfusion extends InventorySpell { } GLog.p( Messages.get(this, "infuse", item.name()) ); - + Talent.onUpgradeScrollUsed( Dungeon.hero ); Badges.validateItemLevelAquired(item); curUser.sprite.emitter().start(Speck.factory(Speck.UP), 0.2f, 3); 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 bfb3667b8..1420ae377 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 @@ -146,11 +146,16 @@ public abstract class Wand extends Item { return false; } } - + public void gainCharge( float amt ){ + gainCharge( amt, false ); + } + + public void gainCharge( float amt, boolean overcharge ){ partialCharge += amt; while (partialCharge >= 1) { - curCharges = Math.min(maxCharges, curCharges+1); + if (overcharge) curCharges = Math.min(maxCharges+(int)amt, curCharges+1); + else curCharges = Math.min(maxCharges, curCharges+1); partialCharge--; updateQuickslot(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java index 33babc5c1..95fcb1f23 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java @@ -27,8 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; -import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; -import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag; @@ -217,10 +215,14 @@ public class MagesStaff extends MeleeWeapon { return this; } - + public void gainCharge( float amt ){ + gainCharge(amt, false); + } + + public void gainCharge( float amt, boolean overcharge ){ if (wand != null){ - wand.gainCharge(amt); + wand.gainCharge(amt, overcharge); } } @@ -234,14 +236,6 @@ public class MagesStaff extends MeleeWeapon { updateWand(true); - if (wand != null && Dungeon.hero.hasTalent(Talent.ENERGIZING_UPGRADE)){ - wand.curCharges += Dungeon.hero.pointsInTalent(Talent.ENERGIZING_UPGRADE); - wand.curCharges = Math.min( wand.curCharges, wand.maxCharges + Dungeon.hero.pointsInTalent(Talent.ENERGIZING_UPGRADE)); - ScrollOfRecharging.charge( Dungeon.hero ); - SpellSprite.show( curUser, SpellSprite.CHARGE ); - updateQuickslot(); - } - return this; }