SkillsTab Modifications (Bugs 9,11,12,13)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m12s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m12s
This commit is contained in:
@@ -139,8 +139,7 @@ export function EnchantmentPreparer({
|
||||
const manaCost = instance.totalCapacity * 10;
|
||||
|
||||
// Calculate disenchant recovery
|
||||
const disenchantLevel = skills.disenchanting || 0;
|
||||
const recoveryRate = 0.1 + disenchantLevel * 0.2;
|
||||
const recoveryRate = 0.1; // Base recovery rate (disenchanting skill removed)
|
||||
const totalRecoverable = instance.enchantments.reduce(
|
||||
(sum, e) => sum + Math.floor(e.actualCost * recoveryRate),
|
||||
0
|
||||
|
||||
@@ -30,7 +30,7 @@ export function SkillDebug({ store }: SkillDebugProps) {
|
||||
variant="outline"
|
||||
onClick={() => {
|
||||
// Level up all enchanting skills by 1
|
||||
const enchantSkills = ['enchanting', 'efficientEnchant', 'disenchanting', 'enchantSpeed','essenceRefining'];
|
||||
const enchantSkills = ['enchanting', 'efficientEnchant', 'enchantSpeed','essenceRefining'];
|
||||
enchantSkills.forEach(skillId => {
|
||||
if (store.skills[skillId] !== undefined) {
|
||||
store.skills[skillId] = Math.min((store.skills[skillId] || 0) + 1, 10);
|
||||
@@ -47,7 +47,7 @@ export function SkillDebug({ store }: SkillDebugProps) {
|
||||
variant="outline"
|
||||
onClick={() => {
|
||||
// Max all enchanting skills
|
||||
const enchantSkills = ['enchanting', 'efficientEnchant', 'disenchanting', 'enchantSpeed','essenceRefining'];
|
||||
const enchantSkills = ['enchanting', 'efficientEnchant', 'enchantSpeed','essenceRefining'];
|
||||
enchantSkills.forEach(skillId => {
|
||||
store.skills[skillId] = 10;
|
||||
});
|
||||
@@ -66,7 +66,7 @@ export function SkillDebug({ store }: SkillDebugProps) {
|
||||
size="sm"
|
||||
variant="outline"
|
||||
onClick={() => {
|
||||
const manaSkills = ['manaWell', 'manaFlow', 'elemAttune', 'manaOverflow'];
|
||||
const manaSkills = ['manaWell', 'manaFlow', 'manaOverflow', 'fireManaCap', 'waterManaCap', 'airManaCap', 'earthManaCap', 'lightManaCap', 'darkManaCap', 'deathManaCap', 'metalManaCap', 'sandManaCap', 'lightningManaCap', 'transferenceManaCap'];
|
||||
manaSkills.forEach(skillId => {
|
||||
if (store.skills[skillId] !== undefined) {
|
||||
store.skills[skillId] = Math.min((store.skills[skillId] || 0) + 1, 10);
|
||||
@@ -82,7 +82,7 @@ export function SkillDebug({ store }: SkillDebugProps) {
|
||||
size="sm"
|
||||
variant="outline"
|
||||
onClick={() => {
|
||||
const manaSkills = ['manaWell', 'manaFlow', 'elemAttune', 'manaOverflow'];
|
||||
const manaSkills = ['manaWell', 'manaFlow', 'manaOverflow', 'fireManaCap', 'waterManaCap', 'airManaCap', 'earthManaCap', 'lightManaCap', 'darkManaCap', 'deathManaCap', 'metalManaCap', 'sandManaCap', 'lightningManaCap', 'transferenceManaCap'];
|
||||
manaSkills.forEach(skillId => {
|
||||
store.skills[skillId] = 10;
|
||||
});
|
||||
|
||||
@@ -195,14 +195,14 @@ export function AttunementsTab({ store }: AttunementsTabProps) {
|
||||
{def.capabilities.map(cap => (
|
||||
<Badge key={cap} variant="outline" className="text-xs">
|
||||
{cap === 'enchanting' && '✨ Enchanting'}
|
||||
{cap === 'disenchanting' && '🔄 Disenchant'}
|
||||
{cap === 'disenchanting' && '🔄 Disenchant'} // TODO: Remove after bug 13 complete
|
||||
{cap === 'pacts' && '🤝 Pacts'}
|
||||
{cap === 'guardianPowers' && '💜 Guardian Powers'}
|
||||
{cap === 'elementalMastery' && '🌟 Elem. Mastery'}
|
||||
{cap === 'golemCrafting' && '🗿 Golems'}
|
||||
{cap === 'gearCrafting' && '⚒️ Gear'}
|
||||
{cap === 'earthShaping' && '⛰️ Earth Shaping'}
|
||||
{!['enchanting', 'disenchanting', 'pacts', 'guardianPowers',
|
||||
{!['enchanting', 'pacts', 'guardianPowers',
|
||||
'elementalMastery', 'golemCrafting', 'gearCrafting', 'earthShaping'].includes(cap) && cap}
|
||||
</Badge>
|
||||
))}
|
||||
@@ -246,7 +246,7 @@ export function AttunementsTab({ store }: AttunementsTabProps) {
|
||||
>
|
||||
{cat === 'mana' && '💧 Mana'}
|
||||
{cat === 'study' && '📚 Study'}
|
||||
{cat === 'research' && '🔮 Research'}
|
||||
{cat === 'research' && '🔮 Research'} // TODO: Remove after Bug 12 - research moved to mana
|
||||
{cat === 'ascension' && '⭐ Ascension'}
|
||||
{cat === 'enchant' && '✨ Enchanting'}
|
||||
{cat === 'effectResearch' && '🔬 Effect Research'}
|
||||
|
||||
@@ -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) &&
|
||||
|
||||
@@ -354,7 +354,8 @@ describe('Enchanter Skills', () => {
|
||||
|
||||
describe('Disenchanting (Recover mana from removed enchantments)', () => {
|
||||
it('skill definition should exist', () => {
|
||||
expect(SKILLS_DEF.disenchanting).toBeDefined();
|
||||
// disenchanting skill removed - see Bug 13
|
||||
expect(SKILLS_DEF.disenchanting).toBeUndefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -131,15 +131,7 @@ export const ATTUNEMENTS: Record<AttunementType, AttunementDef> = {
|
||||
studyTime: 12,
|
||||
req: { enchanting: 3 },
|
||||
},
|
||||
disenchanting: {
|
||||
name: 'Disenchanting',
|
||||
desc: 'Remove enchantments and recover some mana',
|
||||
cat: 'enchanter',
|
||||
max: 5,
|
||||
base: 150,
|
||||
studyTime: 10,
|
||||
req: { enchanting: 2 },
|
||||
},
|
||||
|
||||
enchantSpeed: {
|
||||
name: 'Swift Enchanting',
|
||||
desc: 'Faster enchantment application',
|
||||
|
||||
@@ -5,19 +5,32 @@ export const SKILLS_DEF: Record<string, SkillDef> = {
|
||||
// Mana Skills (4-8 hours study) - Core, no attunement required
|
||||
manaWell: { name: "Mana Well", desc: "+100 max mana", cat: "mana", max: 10, base: 100, studyTime: 4 },
|
||||
manaFlow: { name: "Mana Flow", desc: "+1 regen/hr", cat: "mana", max: 10, base: 150, studyTime: 5 },
|
||||
elemAttune: { name: "Elem. Attunement", desc: "+50 elem mana cap", cat: "mana", max: 10, base: 200, studyTime: 4 },
|
||||
// Per-mana-type capacity upgrades (Bug 9)
|
||||
fireManaCap: { name: "Fire Mana Capacity +10%", desc: "+10% fire mana capacity", cat: "mana", max: 10, base: 200, studyTime: 4, cost: { type: 'element', element: 'fire', amount: 100 } },
|
||||
waterManaCap: { name: "Water Mana Capacity +10%", desc: "+10% water mana capacity", cat: "mana", max: 10, base: 200, studyTime: 4, cost: { type: 'element', element: 'water', amount: 100 } },
|
||||
airManaCap: { name: "Air Mana Capacity +10%", desc: "+10% air mana capacity", cat: "mana", max: 10, base: 200, studyTime: 4, cost: { type: 'element', element: 'air', amount: 100 } },
|
||||
earthManaCap: { name: "Earth Mana Capacity +10%", desc: "+10% earth mana capacity", cat: "mana", max: 10, base: 200, studyTime: 4, cost: { type: 'element', element: 'earth', amount: 100 } },
|
||||
lightManaCap: { name: "Light Mana Capacity +10%", desc: "+10% light mana capacity", cat: "mana", max: 10, base: 250, studyTime: 5, cost: { type: 'element', element: 'light', amount: 150 } },
|
||||
darkManaCap: { name: "Dark Mana Capacity +10%", desc: "+10% dark mana capacity", cat: "mana", max: 10, base: 250, studyTime: 5, cost: { type: 'element', element: 'dark', amount: 150 } },
|
||||
deathManaCap: { name: "Death Mana Capacity +10%", desc: "+10% death mana capacity", cat: "mana", max: 10, base: 300, studyTime: 6, cost: { type: 'element', element: 'death', amount: 200 } },
|
||||
// Composite element capacity upgrades
|
||||
metalManaCap: { name: "Metal Mana Capacity +10%", desc: "+10% metal mana capacity", cat: "mana", max: 10, base: 350, studyTime: 6, cost: { type: 'element', element: 'metal', amount: 250 } },
|
||||
sandManaCap: { name: "Sand Mana Capacity +10%", desc: "+10% sand mana capacity", cat: "mana", max: 10, base: 350, studyTime: 6, cost: { type: 'element', element: 'sand', amount: 250 } },
|
||||
lightningManaCap: { name: "Lightning Mana Capacity +10%", desc: "+10% lightning mana capacity", cat: "mana", max: 10, base: 350, studyTime: 6, cost: { type: 'element', element: 'lightning', amount: 250 } },
|
||||
// Utility mana capacity upgrades
|
||||
transferenceManaCap: { name: "Transference Mana Capacity +10%", desc: "+10% transference mana capacity", cat: "mana", max: 10, base: 200, studyTime: 4, cost: { type: 'element', element: 'transference', amount: 100 } },
|
||||
manaOverflow: { name: "Mana Overflow", desc: "+25% mana from clicks", cat: "mana", max: 5, base: 400, req: { manaWell: 3 }, studyTime: 6 },
|
||||
|
||||
// Study Skills (3-6 hours study) - Core, no attunement required
|
||||
quickLearner: { name: "Quick Learner", desc: "+10% study speed", cat: "study", max: 10, base: 250, studyTime: 4 },
|
||||
focusedMind: { name: "Focused Mind", desc: "-5% study mana cost", cat: "study", max: 10, base: 300, studyTime: 5 },
|
||||
meditation: { name: "Meditation Focus", desc: "Up to 2.5x regen after 4hrs meditating", cat: "study", max: 1, base: 400, studyTime: 6 },
|
||||
meditation: { name: "Meditation Focus", desc: "Up to 2.5x regen after 4hrs meditating", cat: "mana", max: 1, base: 400, studyTime: 6 },
|
||||
knowledgeRetention: { name: "Knowledge Retention", desc: "+20% study progress saved on cancel", cat: "study", max: 3, base: 350, studyTime: 5 },
|
||||
|
||||
// Enchanting Skills (4-8 hours study) - Requires Enchanter attunement levels
|
||||
enchanting: { name: "Enchanting", desc: "Unlocks enchantment design", cat: "enchant", max: 10, base: 200, studyTime: 5, attunement: 'enchanter', attunementReq: { enchanter: 1 } },
|
||||
efficientEnchant:{ name: "Efficient Enchant", desc: "-5% enchantment capacity cost", cat: "enchant", max: 5, base: 350, studyTime: 6, req: { enchanting: 3 }, attunementReq: { enchanter: 2 } },
|
||||
disenchanting: { name: "Disenchanting", desc: "Recover 20% mana from removed enchantments", cat: "enchant", max: 3, base: 400, studyTime: 6, req: { enchanting: 2 }, attunementReq: { enchanter: 1 } },
|
||||
|
||||
enchantSpeed: { name: "Enchant Speed", desc: "-10% enchantment time", cat: "enchant", max: 5, base: 300, studyTime: 4, req: { enchanting: 2 }, attunementReq: { enchanter: 1 } },
|
||||
essenceRefining: { name: "Essence Refining", desc: "+10% enchantment effect power", cat: "enchant", max: 1, base: 450, studyTime: 7, req: { enchanting: 4 }, attunementReq: { enchanter: 2 } },
|
||||
|
||||
@@ -28,27 +41,27 @@ export const SKILLS_DEF: Record<string, SkillDef> = {
|
||||
|
||||
// Effect Research Skills (unlock enchantment effects for designing) - Requires Enchanter
|
||||
// Tier 1 - Basic Spell Effects
|
||||
researchManaSpells: { name: "Mana Spell Research", desc: "Unlock Mana Strike spell enchantment", cat: "effectResearch", max: 1, base: 200, studyTime: 4, req: { enchanting: 1 }, attunementReq: { enchanter: 1 } },
|
||||
researchFireSpells: { name: "Fire Spell Research", desc: "Unlock Ember Shot, Fireball spell enchantments", cat: "effectResearch", max: 1, base: 300, studyTime: 6, req: { enchanting: 2 }, attunementReq: { enchanter: 1 } },
|
||||
researchWaterSpells: { name: "Water Spell Research", desc: "Unlock Water Jet, Ice Shard spell enchantments", cat: "effectResearch", max: 1, base: 300, studyTime: 6, req: { enchanting: 2 }, attunementReq: { enchanter: 1 } },
|
||||
researchAirSpells: { name: "Air Spell Research", desc: "Unlock Gust, Wind Slash spell enchantments", cat: "effectResearch", max: 1, base: 300, studyTime: 6, req: { enchanting: 2 }, attunementReq: { enchanter: 1 } },
|
||||
researchEarthSpells: { name: "Earth Spell Research", desc: "Unlock Stone Bullet, Rock Spike spell enchantments", cat: "effectResearch", max: 1, base: 350, studyTime: 6, req: { enchanting: 2 }, attunementReq: { enchanter: 1 } },
|
||||
researchLightSpells: { name: "Light Spell Research", desc: "Unlock Light Lance, Radiance spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 8, req: { enchanting: 3 }, attunementReq: { enchanter: 2 } },
|
||||
researchDarkSpells: { name: "Dark Spell Research", desc: "Unlock Shadow Bolt, Dark Pulse spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 8, req: { enchanting: 3 }, attunementReq: { enchanter: 2 } },
|
||||
researchLifeDeathSpells: { name: "Death Research", desc: "Unlock Drain spell enchantment", cat: "effectResearch", max: 1, base: 400, studyTime: 8, req: { enchanting: 3 }, attunementReq: { enchanter: 2 } },
|
||||
researchManaSpells: { name: "Mana Spell Research", desc: "Unlock Mana Strike spell enchantment", cat: "effectResearch", max: 1, base: 200, studyTime: 4, req: { enchanting: 1 }, cost: { type: 'element', element: 'transference', amount: 100 }, attunementReq: { enchanter: 1 } },
|
||||
researchFireSpells: { name: "Fire Spell Research", desc: "Unlock Ember Shot, Fireball spell enchantments", cat: "effectResearch", max: 1, base: 300, studyTime: 6, req: { enchanting: 2 }, cost: { type: 'element', element: 'fire', amount: 100 }, attunementReq: { enchanter: 1 } },
|
||||
researchWaterSpells: { name: "Water Spell Research", desc: "Unlock Water Jet, Ice Shard spell enchantments", cat: "effectResearch", max: 1, base: 300, studyTime: 6, req: { enchanting: 2 }, cost: { type: 'element', element: 'water', amount: 100 }, attunementReq: { enchanter: 1 } },
|
||||
researchAirSpells: { name: "Air Spell Research", desc: "Unlock Gust, Wind Slash spell enchantments", cat: "effectResearch", max: 1, base: 300, studyTime: 6, req: { enchanting: 2 }, cost: { type: 'element', element: 'air', amount: 100 }, attunementReq: { enchanter: 1 } },
|
||||
researchEarthSpells: { name: "Earth Spell Research", desc: "Unlock Stone Bullet, Rock Spike spell enchantments", cat: "effectResearch", max: 1, base: 350, studyTime: 6, req: { enchanting: 2 }, cost: { type: 'element', element: 'earth', amount: 100 }, attunementReq: { enchanter: 1 } },
|
||||
researchLightSpells: { name: "Light Spell Research", desc: "Unlock Light Lance, Radiance spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 8, req: { enchanting: 3 }, cost: { type: 'element', element: 'light', amount: 100 }, attunementReq: { enchanter: 2 } },
|
||||
researchDarkSpells: { name: "Dark Spell Research", desc: "Unlock Shadow Bolt, Dark Pulse spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 8, req: { enchanting: 3 }, cost: { type: 'element', element: 'dark', amount: 100 }, attunementReq: { enchanter: 2 } },
|
||||
researchLifeDeathSpells: { name: "Death Research", desc: "Unlock Drain spell enchantment", cat: "effectResearch", max: 1, base: 400, studyTime: 8, req: { enchanting: 3 , cost: { type: 'element', element: 'death', amount: 100 }}, attunementReq: { enchanter: 2 } },
|
||||
|
||||
// Tier 2 - Advanced Spell Effects - Require Enchanter 3
|
||||
researchAdvancedFire: { name: "Advanced Fire Research", desc: "Unlock Inferno, Flame Wave spell enchantments", cat: "effectResearch", max: 1, base: 600, studyTime: 12, req: { researchFireSpells: 1, enchanting: 4 }, attunementReq: { enchanter: 3 } },
|
||||
researchAdvancedWater: { name: "Advanced Water Research", desc: "Unlock Tidal Wave, Ice Storm spell enchantments", cat: "effectResearch", max: 1, base: 600, studyTime: 12, req: { researchWaterSpells: 1, enchanting: 4 }, attunementReq: { enchanter: 3 } },
|
||||
researchAdvancedAir: { name: "Advanced Air Research", desc: "Unlock Hurricane, Wind Blade spell enchantments", cat: "effectResearch", max: 1, base: 600, studyTime: 12, req: { researchAirSpells: 1, enchanting: 4 }, attunementReq: { enchanter: 3 } },
|
||||
researchAdvancedEarth: { name: "Advanced Earth Research", desc: "Unlock Earthquake, Stone Barrage spell enchantments", cat: "effectResearch", max: 1, base: 600, studyTime: 12, req: { researchEarthSpells: 1, enchanting: 4 }, attunementReq: { enchanter: 3 } },
|
||||
researchAdvancedLight: { name: "Advanced Light Research", desc: "Unlock Solar Flare, Divine Smite spell enchantments", cat: "effectResearch", max: 1, base: 700, studyTime: 14, req: { researchLightSpells: 1, enchanting: 5 }, attunementReq: { enchanter: 4 } },
|
||||
researchAdvancedDark: { name: "Advanced Dark Research", desc: "Unlock Void Rift, Shadow Storm spell enchantments", cat: "effectResearch", max: 1, base: 700, studyTime: 14, req: { researchDarkSpells: 1, enchanting: 5 }, attunementReq: { enchanter: 4 } },
|
||||
researchAdvancedFire: { name: "Advanced Fire Research", desc: "Unlock Inferno, Flame Wave spell enchantments", cat: "effectResearch", max: 1, base: 600, studyTime: 12, req: { researchFireSpells: 1, enchanting: 4 , cost: { type: 'element', element: 'fire', amount: 100 }}, attunementReq: { enchanter: 3 } },
|
||||
researchAdvancedWater: { name: "Advanced Water Research", desc: "Unlock Tidal Wave, Ice Storm spell enchantments", cat: "effectResearch", max: 1, base: 600, studyTime: 12, req: { researchWaterSpells: 1, enchanting: 4 , cost: { type: 'element', element: 'water', amount: 100 }}, attunementReq: { enchanter: 3 } },
|
||||
researchAdvancedAir: { name: "Advanced Air Research", desc: "Unlock Hurricane, Wind Blade spell enchantments", cat: "effectResearch", max: 1, base: 600, studyTime: 12, req: { researchAirSpells: 1, enchanting: 4 , cost: { type: 'element', element: 'air', amount: 100 }}, attunementReq: { enchanter: 3 } },
|
||||
researchAdvancedEarth: { name: "Advanced Earth Research", desc: "Unlock Earthquake, Stone Barrage spell enchantments", cat: "effectResearch", max: 1, base: 600, studyTime: 12, req: { researchEarthSpells: 1, enchanting: 4 , cost: { type: 'element', element: 'earth', amount: 100 }}, attunementReq: { enchanter: 3 } },
|
||||
researchAdvancedLight: { name: "Advanced Light Research", desc: "Unlock Solar Flare, Divine Smite spell enchantments", cat: "effectResearch", max: 1, base: 700, studyTime: 14, req: { researchLightSpells: 1, enchanting: 5 , cost: { type: 'element', element: 'light', amount: 100 }}, attunementReq: { enchanter: 4 } },
|
||||
researchAdvancedDark: { name: "Advanced Dark Research", desc: "Unlock Void Rift, Shadow Storm spell enchantments", cat: "effectResearch", max: 1, base: 700, studyTime: 14, req: { researchDarkSpells: 1, enchanting: 5 , cost: { type: 'element', element: 'dark', amount: 100 }}, attunementReq: { enchanter: 4 } },
|
||||
|
||||
// Tier 3 - Master Spell Effects - Require Enchanter 5
|
||||
researchMasterFire: { name: "Master Fire Research", desc: "Unlock Pyroclasm spell enchantment", cat: "effectResearch", max: 1, base: 1200, studyTime: 24, req: { researchAdvancedFire: 1, enchanting: 7 }, attunementReq: { enchanter: 5 } },
|
||||
researchMasterWater: { name: "Master Water Research", desc: "Unlock Tsunami spell enchantment", cat: "effectResearch", max: 1, base: 1200, studyTime: 24, req: { researchAdvancedWater: 1, enchanting: 7 }, attunementReq: { enchanter: 5 } },
|
||||
researchMasterEarth: { name: "Master Earth Research", desc: "Unlock Meteor Strike spell enchantment", cat: "effectResearch", max: 1, base: 1300, studyTime: 26, req: { researchAdvancedEarth: 1, enchanting: 8 }, attunementReq: { enchanter: 5 } },
|
||||
researchMasterFire: { name: "Master Fire Research", desc: "Unlock Pyroclasm spell enchantment", cat: "effectResearch", max: 1, base: 1200, studyTime: 24, req: { researchAdvancedFire: 1, enchanting: 7 , cost: { type: 'element', element: 'fire', amount: 200 }}, attunementReq: { enchanter: 5 } },
|
||||
researchMasterWater: { name: "Master Water Research", desc: "Unlock Tsunami spell enchantment", cat: "effectResearch", max: 1, base: 1200, studyTime: 24, req: { researchAdvancedWater: 1, enchanting: 7 , cost: { type: 'element', element: 'water', amount: 200 }}, attunementReq: { enchanter: 5 } },
|
||||
researchMasterEarth: { name: "Master Earth Research", desc: "Unlock Meteor Strike spell enchantment", cat: "effectResearch", max: 1, base: 1300, studyTime: 26, req: { researchAdvancedEarth: 1, enchanting: 8 , cost: { type: 'element', element: 'earth', amount: 200 }}, attunementReq: { enchanter: 5 } },
|
||||
|
||||
// Combat Effect Research
|
||||
researchDamageEffects: { name: "Damage Effect Research", desc: "Unlock Minor/Moderate Power, Amplification effects", cat: "effectResearch", max: 1, base: 250, studyTime: 5, req: { enchanting: 1 }, attunementReq: { enchanter: 1 } },
|
||||
@@ -70,19 +83,19 @@ export const SKILLS_DEF: Record<string, SkillDef> = {
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
|
||||
// Tier 1 - Basic Compound Spells
|
||||
researchMetalSpells: { name: "Metal Spell Research", desc: "Unlock Metal Shard, Iron Fist spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 6, req: { researchFireSpells: 1, researchEarthSpells: 1, enchanting: 3 }, attunementReq: { enchanter: 2 } },
|
||||
researchSandSpells: { name: "Sand Spell Research", desc: "Unlock Sand Blast, Sandstorm spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 6, req: { researchEarthSpells: 1, researchWaterSpells: 1, enchanting: 3 }, attunementReq: { enchanter: 2 } },
|
||||
researchLightningSpells: { name: "Lightning Spell Research", desc: "Unlock Spark, Lightning Bolt spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 6, req: { researchFireSpells: 1, researchAirSpells: 1, enchanting: 3 }, attunementReq: { enchanter: 2 } },
|
||||
researchMetalSpells: { name: "Metal Spell Research", desc: "Unlock Metal Shard, Iron Fist spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 6, req: { researchFireSpells: 1, researchEarthSpells: 1, enchanting: 3 , cost: { type: 'element', element: 'metal', amount: 100 }}, attunementReq: { enchanter: 2 } },
|
||||
researchSandSpells: { name: "Sand Spell Research", desc: "Unlock Sand Blast, Sandstorm spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 6, req: { researchEarthSpells: 1, researchWaterSpells: 1, enchanting: 3 , cost: { type: 'element', element: 'sand', amount: 100 }}, attunementReq: { enchanter: 2 } },
|
||||
researchLightningSpells: { name: "Lightning Spell Research", desc: "Unlock Spark, Lightning Bolt spell enchantments", cat: "effectResearch", max: 1, base: 400, studyTime: 6, req: { researchFireSpells: 1, researchAirSpells: 1, enchanting: 3 , cost: { type: 'element', element: 'lightning', amount: 100 }}, attunementReq: { enchanter: 2 } },
|
||||
|
||||
// Tier 2 - Advanced Compound Spells
|
||||
researchAdvancedMetal: { name: "Advanced Metal Research", desc: "Unlock Steel Tempest spell enchantment", cat: "effectResearch", max: 1, base: 700, studyTime: 12, req: { researchMetalSpells: 1, enchanting: 5 }, attunementReq: { enchanter: 3 } },
|
||||
researchAdvancedSand: { name: "Advanced Sand Research", desc: "Unlock Desert Wind spell enchantment", cat: "effectResearch", max: 1, base: 700, studyTime: 12, req: { researchSandSpells: 1, enchanting: 5 }, attunementReq: { enchanter: 3 } },
|
||||
researchAdvancedLightning: { name: "Advanced Lightning Research", desc: "Unlock Chain Lightning, Storm Call spell enchantments", cat: "effectResearch", max: 1, base: 700, studyTime: 12, req: { researchLightningSpells: 1, enchanting: 5 }, attunementReq: { enchanter: 3 } },
|
||||
researchAdvancedMetal: { name: "Advanced Metal Research", desc: "Unlock Steel Tempest spell enchantment", cat: "effectResearch", max: 1, base: 700, studyTime: 12, req: { researchMetalSpells: 1, enchanting: 5 , cost: { type: 'element', element: 'metal', amount: 100 }}, attunementReq: { enchanter: 3 } },
|
||||
researchAdvancedSand: { name: "Advanced Sand Research", desc: "Unlock Desert Wind spell enchantment", cat: "effectResearch", max: 1, base: 700, studyTime: 12, req: { researchSandSpells: 1, enchanting: 5 , cost: { type: 'element', element: 'sand', amount: 100 }}, attunementReq: { enchanter: 3 } },
|
||||
researchAdvancedLightning: { name: "Advanced Lightning Research", desc: "Unlock Chain Lightning, Storm Call spell enchantments", cat: "effectResearch", max: 1, base: 700, studyTime: 12, req: { researchLightningSpells: 1, enchanting: 5 , cost: { type: 'element', element: 'lightning', amount: 100 }}, attunementReq: { enchanter: 3 } },
|
||||
|
||||
// Tier 3 - Master Compound Spells
|
||||
researchMasterMetal: { name: "Master Metal Research", desc: "Unlock Furnace Blast spell enchantment", cat: "effectResearch", max: 1, base: 1300, studyTime: 26, req: { researchAdvancedMetal: 1, enchanting: 7 }, attunementReq: { enchanter: 5 } },
|
||||
researchMasterSand: { name: "Master Sand Research", desc: "Unlock Dune Collapse spell enchantment", cat: "effectResearch", max: 1, base: 1300, studyTime: 26, req: { researchAdvancedSand: 1, enchanting: 7 }, attunementReq: { enchanter: 5 } },
|
||||
researchMasterLightning: { name: "Master Lightning Research", desc: "Unlock Thunder Strike spell enchantment", cat: "effectResearch", max: 1, base: 1300, studyTime: 26, req: { researchAdvancedLightning: 1, enchanting: 7 }, attunementReq: { enchanter: 5 } },
|
||||
researchMasterMetal: { name: "Master Metal Research", desc: "Unlock Furnace Blast spell enchantment", cat: "effectResearch", max: 1, base: 1300, studyTime: 26, req: { researchAdvancedMetal: 1, enchanting: 7 , cost: { type: 'element', element: 'metal', amount: 200 }}, attunementReq: { enchanter: 5 } },
|
||||
researchMasterSand: { name: "Master Sand Research", desc: "Unlock Dune Collapse spell enchantment", cat: "effectResearch", max: 1, base: 1300, studyTime: 26, req: { researchAdvancedSand: 1, enchanting: 7 , cost: { type: 'element', element: 'sand', amount: 200 }}, attunementReq: { enchanter: 5 } },
|
||||
researchMasterLightning: { name: "Master Lightning Research", desc: "Unlock Thunder Strike spell enchantment", cat: "effectResearch", max: 1, base: 1300, studyTime: 26, req: { researchAdvancedLightning: 1, enchanting: 7 , cost: { type: 'element', element: 'lightning', amount: 200 }}, attunementReq: { enchanter: 5 } },
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// UTILITY MANA SPELL RESEARCH - Transference
|
||||
@@ -98,11 +111,11 @@ export const SKILLS_DEF: Record<string, SkillDef> = {
|
||||
researchMasterTransference: { name: "Master Transference Research", desc: "Unlock Soul Transfer spell enchantment", cat: "effectResearch", max: 1, base: 1300, studyTime: 26, req: { researchAdvancedTransference: 1, enchanting: 7 }, attunementReq: { enchanter: 5 } },
|
||||
|
||||
// Research Skills (longer study times: 12-72 hours) - Core skills, any attunement level 3
|
||||
manaTap: { name: "Mana Tap", desc: "+1 mana/click", cat: "research", max: 1, base: 300, studyTime: 12 },
|
||||
manaSurge: { name: "Mana Surge", desc: "+3 mana/click", cat: "research", max: 1, base: 800, studyTime: 36, req: { manaTap: 1 } },
|
||||
manaSpring: { name: "Mana Spring", desc: "+2 mana regen", cat: "research", max: 1, base: 600, studyTime: 24 },
|
||||
deepTrance: { name: "Deep Trance", desc: "Extend meditation bonus to 6hrs for 3x", cat: "research", max: 1, base: 900, studyTime: 48, req: { meditation: 1 } },
|
||||
voidMeditation:{ name: "Void Meditation", desc: "Extend meditation bonus to 8hrs for 5x", cat: "research", max: 1, base: 1500, studyTime: 72, req: { deepTrance: 1 } },
|
||||
manaTap: { name: "Mana Tap", desc: "+1 mana/click", cat: "mana", max: 1, base: 300, studyTime: 12 },
|
||||
manaSurge: { name: "Mana Surge", desc: "+3 mana/click", cat: "mana", max: 1, base: 800, studyTime: 36, req: { manaTap: 1 } },
|
||||
manaSpring: { name: "Mana Spring", desc: "+2 mana regen", cat: "mana", max: 1, base: 600, studyTime: 24 },
|
||||
deepTrance: { name: "Deep Trance", desc: "Extend meditation bonus to 6hrs for 3x", cat: "mana", max: 1, base: 900, studyTime: 48, req: { meditation: 1 } },
|
||||
voidMeditation:{ name: "Void Meditation", desc: "Extend meditation bonus to 8hrs for 5x", cat: "mana", max: 1, base: 1500, studyTime: 72, req: { deepTrance: 1 } },
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// INVOKER SKILLS - Require Invoker attunement
|
||||
@@ -189,7 +202,7 @@ export const SKILL_CATEGORIES = [
|
||||
// Core categories (always available)
|
||||
{ id: 'mana', name: 'Mana', icon: '💧', attunement: null },
|
||||
{ id: 'study', name: 'Study', icon: '📚', attunement: null },
|
||||
{ id: 'research', name: 'Research', icon: '🔮', attunement: null },
|
||||
// Research category moved to Mana (Bug 12)
|
||||
|
||||
// Enchanter attunement (Right Hand)
|
||||
{ id: 'enchant', name: 'Enchanting', icon: '✨', attunement: 'enchanter' },
|
||||
|
||||
@@ -526,7 +526,7 @@ export function createCraftingSlice(
|
||||
const instance = state.equipmentInstances[instanceId];
|
||||
if (!instance || instance.enchantments.length === 0) return;
|
||||
|
||||
const disenchantLevel = state.skills.disenchanting || 0;
|
||||
const disenchantLevel = 0; // disenchanting skill removed (Bug 13)
|
||||
const recoveryRate = 0.1 + disenchantLevel * 0.2; // 10% base + 20% per level
|
||||
|
||||
let totalRecovered = 0;
|
||||
@@ -828,8 +828,8 @@ export function processCraftingTick(
|
||||
let totalRecovered = 0;
|
||||
|
||||
if (instance) {
|
||||
// Calculate mana recovery from disenchanting
|
||||
const disenchantLevel = (state.skills as Record<string, number>).disenchanting || 0;
|
||||
// Calculate mana recovery - disenchanting skill removed (Bug 13)
|
||||
const disenchantLevel = 0;
|
||||
const recoveryRate = 0.1 + disenchantLevel * 0.2; // 10% base + 20% per level
|
||||
for (const ench of instance.enchantments) {
|
||||
totalRecovered += Math.floor(ench.actualCost * recoveryRate);
|
||||
|
||||
@@ -31,7 +31,7 @@ export const ATTUNEMENTS_DEF: Record<string, AttunementDef> = {
|
||||
rawManaRegen: 0.5,
|
||||
conversionRate: 0.2, // Converts 0.2 raw mana to transference per hour
|
||||
unlocked: true, // Starting attunement
|
||||
capabilities: ['enchanting', 'disenchanting'],
|
||||
capabilities: ['enchanting'],
|
||||
skillCategories: ['enchant', 'effectResearch'],
|
||||
},
|
||||
|
||||
|
||||
Executable → Regular
+3
-154
@@ -977,156 +977,8 @@ const EFFICIENT_ENCHANT_TIERS: SkillTierDef[] = [
|
||||
];
|
||||
|
||||
// ─── DISENCHANTING TALENT TREE ────────────────────────────────────────────────
|
||||
// Base: Recover Mana from Removed Enchantments
|
||||
// Paths: A = The Reclaimer (Mana Recovery), B = The Salvager (Efficiency), C = The Transmuter (Bonus Effects)
|
||||
|
||||
const DISENCHANTING_TIERS: SkillTierDef[] = [
|
||||
// TIER 1
|
||||
{
|
||||
tier: 1,
|
||||
skillId: 'disenchanting',
|
||||
name: 'Disenchanting',
|
||||
multiplier: 1,
|
||||
l5Perks: [
|
||||
createPerk('de_t1_l5_a', 'Reclaimer', '+15% Mana Recovery', 'A',
|
||||
{ type: 'multiplier', stat: 'disenchantRecovery', value: 0.15 }, false, 1.5, 5),
|
||||
createPerk('de_t1_l5_b', 'Swift Salvage', '-10% Disenchant Time', 'B',
|
||||
{ type: 'multiplier', stat: 'disenchantTime', value: -0.10 }, false, 1.5, 5),
|
||||
createPerk('de_t1_l5_c', 'Efficient Return', '+5% Enchantment Power', 'C',
|
||||
{ type: 'multiplier', stat: 'enchantPower', value: 0.05 }, false, 1.5, 5),
|
||||
],
|
||||
l10Perks: [
|
||||
createPerk('de_t1_l10_a', 'Greater Reclaimer', '+20% Mana Recovery', 'A',
|
||||
{ type: 'multiplier', stat: 'disenchantRecovery', value: 0.20 }, false, 2.0, 10),
|
||||
createPerk('de_t1_l10_b', 'Rapid Salvage', '-15% Disenchant Time', 'B',
|
||||
{ type: 'multiplier', stat: 'disenchantTime', value: -0.15 }, false, 2.0, 10),
|
||||
createPerk('de_t1_l10_c', 'Superior Return', '+10% Enchantment Power', 'C',
|
||||
{ type: 'multiplier', stat: 'enchantPower', value: 0.10 }, false, 2.0, 10),
|
||||
],
|
||||
},
|
||||
// TIER 2
|
||||
{
|
||||
tier: 2,
|
||||
skillId: 'disenchanting_t2',
|
||||
name: 'Greater Disenchanting',
|
||||
multiplier: 10,
|
||||
l5Perks: [
|
||||
createPerk('de_t2_l5_a', 'Master Reclaimer', '+25% Mana Recovery', 'A',
|
||||
{ type: 'multiplier', stat: 'disenchantRecovery', value: 0.25 }, false, 2.0, 5),
|
||||
createPerk('de_t2_l5_b', 'Expert Salvage', '-20% Disenchant Time', 'B',
|
||||
{ type: 'multiplier', stat: 'disenchantTime', value: -0.20 }, false, 2.0, 5),
|
||||
createPerk('de_t2_l5_c', 'Transmute Power', '+15% Enchantment Power', 'C',
|
||||
{ type: 'multiplier', stat: 'enchantPower', value: 0.15 }, false, 2.0, 5),
|
||||
],
|
||||
l10Perks: [
|
||||
createPerk('de_t2_l10_a', 'Ultimate Reclaimer', '+30% Mana Recovery', 'A',
|
||||
{ type: 'multiplier', stat: 'disenchantRecovery', value: 0.30 }, false, 2.5, 10),
|
||||
createPerk('de_t2_l10_b', 'Lightning Salvage', '-25% Disenchant Time', 'B',
|
||||
{ type: 'multiplier', stat: 'disenchantTime', value: -0.25 }, false, 2.5, 10),
|
||||
createPerk('de_t2_l10_c', 'Divine Transmute', '+20% Enchantment Power', 'C',
|
||||
{ type: 'multiplier', stat: 'enchantPower', value: 0.20 }, false, 2.5, 10),
|
||||
],
|
||||
},
|
||||
// TIER 3
|
||||
{
|
||||
tier: 3,
|
||||
skillId: 'disenchanting_t3',
|
||||
name: 'Perfect Disenchanting',
|
||||
multiplier: 100,
|
||||
l5Perks: [
|
||||
createPerk('de_t3_l5_a', 'Cosmic Reclaimer', '+40% Mana Recovery', 'A',
|
||||
{ type: 'multiplier', stat: 'disenchantRecovery', value: 0.40 }, false, 3.0, 5),
|
||||
createPerk('de_t3_l5_b', 'Instant Salvage', '-30% Disenchant Time', 'B',
|
||||
{ type: 'multiplier', stat: 'disenchantTime', value: -0.30 }, false, 3.0, 5),
|
||||
createPerk('de_t3_l5_c', 'Transcendent Transmute', '+25% Enchantment Power', 'C',
|
||||
{ type: 'multiplier', stat: 'enchantPower', value: 0.25 }, false, 3.0, 5),
|
||||
],
|
||||
l10Perks: [
|
||||
createPerk('de_t3_l10_a', '[ELITE] OMNI-RECLAIMER', 'Mana Recovery is 50%', 'A',
|
||||
{ type: 'special', specialId: 'omniReclaimer', specialDesc: '50% mana recovery' }, true, 5.0, 10),
|
||||
createPerk('de_t3_l10_b', '[ELITE] OMNI-SALVAGE', 'Disenchant Time is halved', 'B',
|
||||
{ type: 'special', specialId: 'omniSalvage', specialDesc: '50% less time' }, true, 5.0, 10),
|
||||
createPerk('de_t3_l10_c', '[ELITE] OMNI-TRANSMUTE', 'Enchantment Power is 2x', 'C',
|
||||
{ type: 'special', specialId: 'omniTransmute', specialDesc: '2x enchantment power' }, true, 5.0, 10),
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
// ─── ENCHANT SPEED TALENT TREE ────────────────────────────────────────────────
|
||||
// Base: Reduces Enchantment Time
|
||||
// Paths: A = The Swift (Speed), B = The Efficient (Capacity), C = The Rapid (Bonus Effects)
|
||||
|
||||
const ENCHANT_SPEED_TIERS: SkillTierDef[] = [
|
||||
// TIER 1
|
||||
{
|
||||
tier: 1,
|
||||
skillId: 'enchantSpeed',
|
||||
name: 'Enchant Speed',
|
||||
multiplier: 1,
|
||||
l5Perks: [
|
||||
createPerk('es_t1_l5_a', 'Swift Craft', '-15% Enchantment Time', 'A',
|
||||
{ type: 'multiplier', stat: 'enchantTime', value: -0.15 }, false, 1.5, 5),
|
||||
createPerk('es_t1_l5_b', 'Efficient Design', '-10% Enchantment Capacity Cost', 'B',
|
||||
{ type: 'multiplier', stat: 'enchantCost', value: -0.10 }, false, 1.5, 5),
|
||||
createPerk('es_t1_l5_c', 'Quick Work', '+5% Enchantment Power', 'C',
|
||||
{ type: 'multiplier', stat: 'enchantPower', value: 0.05 }, false, 1.5, 5),
|
||||
],
|
||||
l10Perks: [
|
||||
createPerk('es_t1_l10_a', 'Faster Craft', '-20% Enchantment Time', 'A',
|
||||
{ type: 'multiplier', stat: 'enchantTime', value: -0.20 }, false, 2.0, 10),
|
||||
createPerk('es_t1_l10_b', 'Thrifty Design', '-15% Enchantment Capacity Cost', 'B',
|
||||
{ type: 'multiplier', stat: 'enchantCost', value: -0.15 }, false, 2.0, 10),
|
||||
createPerk('es_t1_l10_c', 'Superior Work', '+10% Enchantment Power', 'C',
|
||||
{ type: 'multiplier', stat: 'enchantPower', value: 0.10 }, false, 2.0, 10),
|
||||
],
|
||||
},
|
||||
// TIER 2
|
||||
{
|
||||
tier: 2,
|
||||
skillId: 'enchantSpeed_t2',
|
||||
name: 'Greater Speed',
|
||||
multiplier: 10,
|
||||
l5Perks: [
|
||||
createPerk('es_t2_l5_a', 'Rapid Craft', '-25% Enchantment Time', 'A',
|
||||
{ type: 'multiplier', stat: 'enchantTime', value: -0.25 }, false, 2.0, 5),
|
||||
createPerk('es_t2_l5_b', 'Master Design', '-20% Enchantment Capacity Cost', 'B',
|
||||
{ type: 'multiplier', stat: 'enchantCost', value: -0.20 }, false, 2.0, 5),
|
||||
createPerk('es_t2_l5_c', 'Expert Work', '+15% Enchantment Power', 'C',
|
||||
{ type: 'multiplier', stat: 'enchantPower', value: 0.15 }, false, 2.0, 5),
|
||||
],
|
||||
l10Perks: [
|
||||
createPerk('es_t2_l10_a', 'Lightning Craft', '-30% Enchantment Time', 'A',
|
||||
{ type: 'multiplier', stat: 'enchantTime', value: -0.30 }, false, 2.5, 10),
|
||||
createPerk('es_t2_l10_b', 'Ultimate Design', '-25% Enchantment Capacity Cost', 'B',
|
||||
{ type: 'multiplier', stat: 'enchantCost', value: -0.25 }, false, 2.5, 10),
|
||||
createPerk('es_t2_l10_c', 'Master Work', '+20% Enchantment Power', 'C',
|
||||
{ type: 'multiplier', stat: 'enchantPower', value: 0.20 }, false, 2.5, 10),
|
||||
],
|
||||
},
|
||||
// TIER 3
|
||||
{
|
||||
tier: 3,
|
||||
skillId: 'enchantSpeed_t3',
|
||||
name: 'Perfect Speed',
|
||||
multiplier: 100,
|
||||
l5Perks: [
|
||||
createPerk('es_t3_l5_a', 'Instant Craft', '-40% Enchantment Time', 'A',
|
||||
{ type: 'multiplier', stat: 'enchantTime', value: -0.40 }, false, 3.0, 5),
|
||||
createPerk('es_t3_l5_b', 'Cosmic Design', '-30% Enchantment Capacity Cost', 'B',
|
||||
{ type: 'multiplier', stat: 'enchantCost', value: -0.30 }, false, 3.0, 5),
|
||||
createPerk('es_t3_l5_c', 'Divine Work', '+25% Enchantment Power', 'C',
|
||||
{ type: 'multiplier', stat: 'enchantPower', value: 0.25 }, false, 3.0, 5),
|
||||
],
|
||||
l10Perks: [
|
||||
createPerk('es_t3_l10_a', '[ELITE] OMNI-SPEED', 'Enchantment Time is halved', 'A',
|
||||
{ type: 'special', specialId: 'omniSpeedEnchant', specialDesc: '50% less time' }, true, 5.0, 10),
|
||||
createPerk('es_t3_l10_b', '[ELITE] OMNI-DESIGN', 'Enchantment Capacity Cost is halved', 'B',
|
||||
{ type: 'special', specialId: 'omniDesign', specialDesc: '50% less capacity cost' }, true, 5.0, 10),
|
||||
createPerk('es_t3_l10_c', '[ELITE] OMNI-WORK', 'Enchantment Power is 2x', 'C',
|
||||
{ type: 'special', specialId: 'omniWork', specialDesc: '2x enchantment power' }, true, 5.0, 10),
|
||||
],
|
||||
},
|
||||
];
|
||||
// Disenchanting skill removed - see Bug 13
|
||||
const DISENCHANTING_TIERS: SkillTierDef[] = []; // Empty - skill removed
|
||||
|
||||
// ─── INVOCATION TALENT TREE (Invoker Attunement) ──────────────────────────────
|
||||
// Base: Enhances spell invocation and guardian pacts
|
||||
@@ -2046,10 +1898,7 @@ export const SKILL_EVOLUTION_PATHS: Record<string, SkillEvolutionPath> = {
|
||||
baseSkillId: 'efficientEnchant',
|
||||
tiers: EFFICIENT_ENCHANT_TIERS,
|
||||
},
|
||||
disenchanting: {
|
||||
baseSkillId: 'disenchanting',
|
||||
tiers: DISENCHANTING_TIERS,
|
||||
},
|
||||
// disenchanting removed - see Bug 13
|
||||
enchantSpeed: {
|
||||
baseSkillId: 'enchantSpeed',
|
||||
tiers: ENCHANT_SPEED_TIERS,
|
||||
|
||||
@@ -348,7 +348,8 @@ describe('Enchanter Skills', () => {
|
||||
|
||||
describe('Disenchanting (Recover mana from removed enchantments)', () => {
|
||||
it('skill definition should exist', () => {
|
||||
expect(SKILLS_DEF.disenchanting).toBeDefined();
|
||||
// disenchanting skill removed - see Bug 13
|
||||
expect(SKILLS_DEF.disenchanting).toBeUndefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
+31
-3
@@ -1797,10 +1797,38 @@ export const useGameStore = create<GameStore>()(
|
||||
}
|
||||
}
|
||||
|
||||
// Check mana cost (with focused mind reduction)
|
||||
// Check raw mana cost (with focused mind reduction)
|
||||
const costMult = getStudyCostMultiplier(state.skills);
|
||||
const cost = Math.floor(sk.base * (currentLevel + 1) * costMult);
|
||||
if (state.rawMana < cost) return;
|
||||
if (state.rawMana < cost) {
|
||||
set({
|
||||
log: [`❌ Not enough raw mana to study ${sk.name}.`, ...state.log.slice(0, 49)],
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// Check additional cost (e.g., element mana for Bug 9, 11)
|
||||
if (sk.cost) {
|
||||
if (sk.cost.type === 'element') {
|
||||
const element = state.elements[sk.cost.element];
|
||||
if (!element || element.current < sk.cost.amount) {
|
||||
set({
|
||||
log: [`❌ Need ${sk.cost.amount} ${sk.cost.element} mana to study ${sk.name}.`, ...state.log.slice(0, 49)],
|
||||
});
|
||||
return;
|
||||
}
|
||||
// Deduct element mana
|
||||
set({
|
||||
elements: {
|
||||
...state.elements,
|
||||
[sk.cost.element]: {
|
||||
...state.elements[sk.cost.element],
|
||||
current: state.elements[sk.cost.element].current - sk.cost.amount,
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Start studying
|
||||
set({
|
||||
@@ -2522,7 +2550,7 @@ export const useGameStore = create<GameStore>()(
|
||||
const instance = state.equipmentInstances[instanceId];
|
||||
if (!instance || instance.enchantments.length === 0) return;
|
||||
|
||||
const disenchantLevel = state.skills.disenchanting || 0;
|
||||
const disenchantLevel = 0; // disenchanting skill removed (Bug 13)
|
||||
const recoveryRate = 0.1 + disenchantLevel * 0.2; // 10% base + 20% per level
|
||||
|
||||
let totalRecovered = 0;
|
||||
|
||||
@@ -99,6 +99,7 @@ export function createEquipmentInstance(typeId: string, name?: string): Equipmen
|
||||
totalCapacity: typeDef.baseCapacity,
|
||||
rarity: 'common',
|
||||
quality: 100, // Full quality for new items
|
||||
tags: [], // Initialize with empty tags array
|
||||
};
|
||||
}
|
||||
|
||||
@@ -466,7 +467,7 @@ export const createCraftingSlice: StateCreator<CraftingStore, [], [], CraftingSt
|
||||
const newProgress = progress.progress + hours;
|
||||
|
||||
if (newProgress >= progress.required) {
|
||||
// Preparation complete - clear enchantments
|
||||
// Preparation complete - clear enchantments and add 'Ready for Enchantment' tag
|
||||
set((state) => ({
|
||||
preparationProgress: null,
|
||||
equipmentInstances: {
|
||||
@@ -476,6 +477,7 @@ export const createCraftingSlice: StateCreator<CraftingStore, [], [], CraftingSt
|
||||
enchantments: [],
|
||||
usedCapacity: 0,
|
||||
rarity: 'common',
|
||||
tags: [...(instance.tags || []), 'Ready for Enchantment'],
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
// ─── Skill Types ───────────────────────────────────────────────────────────
|
||||
|
||||
export interface SkillCost {
|
||||
type: 'raw' | 'element';
|
||||
element?: string; // For element type costs
|
||||
amount: number;
|
||||
}
|
||||
|
||||
export interface SkillDef {
|
||||
name: string;
|
||||
desc: string;
|
||||
cat: string;
|
||||
attunement?: string; // Which attunement this skill belongs to (null = core)
|
||||
max: number;
|
||||
base: number; // Mana cost to start studying
|
||||
base: number; // Mana cost to start studying (raw mana)
|
||||
cost?: SkillCost; // Additional cost (e.g., element mana)
|
||||
req?: Record<string, number>; // Skill prerequisites
|
||||
attunementReq?: Record<string, number>; // Attunement level requirements (attunement id -> min level)
|
||||
studyTime: number; // Hours needed to study
|
||||
|
||||
Reference in New Issue
Block a user