Fix refine-then-sacrifice attepting to refine locked resources

This commit is contained in:
SpectralFlame 2023-04-30 21:18:44 -05:00 committed by cyip92
parent 469b3ad608
commit 85fc04fd29

View File

@ -83,6 +83,7 @@ export const GlyphSacrificeHandler = {
glyphRefinementGain(glyph) {
if (!Ra.unlocks.unlockGlyphAlchemy.canBeApplied || !generatedTypes.includes(glyph.type)) return 0;
const resource = this.glyphAlchemyResource(glyph);
if (!resource.isUnlocked) return 0;
const glyphActualValue = this.glyphRawRefinementGain(glyph);
if (resource.cap === 0) return glyphActualValue;
const amountUntilCap = this.glyphEffectiveCap(glyph) - resource.amount;