v2.0.0: fixed enhanced rings not triggering from toolkit use

This commit is contained in:
Evan Debenham
2022-12-28 13:35:54 -05:00
parent 5be4201cfe
commit 24883323f9

View File

@@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
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.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.Recipe;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy;
@@ -174,6 +175,7 @@ public class AlchemistsToolkit extends Artifact {
public int consumeEnergy(int amount){
int result = amount - charge;
charge = Math.max(0, charge - amount);
Talent.onArtifactUsed(Dungeon.hero);
return Math.max(0, result);
}