SkillsTab Modifications (Bugs 9,11,12,13)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m12s

This commit is contained in:
Refactoring Agent
2026-04-27 13:26:02 +02:00
parent 749321d2cb
commit eeb1e3c784
20 changed files with 828 additions and 237 deletions
+18 -2
View File
@@ -211,8 +211,19 @@ export function SkillsTab({ store }: SkillsTabProps) {
const baseCost = def.base * (level + 1) * currentTier;
const cost = Math.floor(baseCost * costMult);
// Additional cost (element mana)
const additionalCost = def.cost;
// Can start studying?
const canStudy = !maxed && prereqMet && store.rawMana >= cost && !isStudying;
let canStudy = !maxed && prereqMet && store.rawMana >= cost && !isStudying;
// Check additional cost (element mana)
if (def.cost && def.cost.type === 'element') {
const element = store.elements[def.cost.element];
if (!element || element.current < def.cost.amount) {
canStudy = false;
}
}
// Check for milestone upgrades
const milestoneInfo = hasMilestoneUpgrade(tieredSkillId, level, store.skillTiers || {}, store.skillUpgrades);
@@ -266,6 +277,11 @@ export function SkillsTab({ store }: SkillsTabProps) {
{' • '}
<span className={costMult < 1 ? 'text-green-400' : ''}>
Cost: {fmt(cost)} mana{costMult < 1 && <span className="text-xs ml-1">({Math.round(costMult * 100)}% cost)</span>}
{additionalCost && additionalCost.type === 'element' && (
<span className="ml-2" style={{ color: ELEMENTS[additionalCost.element]?.color }}>
+ {additionalCost.amount} {ELEMENTS[additionalCost.element]?.sym} {additionalCost.element}
</span>
)}
</span>
</div>
@@ -325,7 +341,7 @@ export function SkillsTab({ store }: SkillsTabProps) {
className={canStudy ? 'bg-purple-600 hover:bg-purple-700' : 'opacity-50'}
onClick={() => store.startStudyingSkill(tieredSkillId)}
>
Study ({fmt(cost)})
Study ({fmt(cost)}{additionalCost && additionalCost.type === 'element' && ` + ${additionalCost.amount} ${ELEMENTS[additionalCost.element]?.sym}`}
</Button>
{/* Parallel Study button */}
{hasSpecial(upgradeEffects, SPECIAL_EFFECTS.PARALLEL_STUDY) &&