v2.0.0: fixed enhanced rings not triggering from toolkit use
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user