refactor: Redesign Invoker disciplines for pact bonuses and guardian boons
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
- Replace generic spell-casting/void-manipulation with pact-focused disciplines - Add Pact Attunement (light): reduces pact signing time, boosts pact affinity - Add Guardian's Boon (dark): amplifies all guardian unique perks - Add pactAffinityBonus and guardianBoonMultiplier stat keys to effect system - Apply pactAffinityBonus in pact signing time calculation (gameStore) - Scale guardian boon values by guardianBoonMultiplier (combat-utils) - Guard Invoker discipline activation behind signedPacts.length > 0 - Add 'Signed guardian pact' prerequisite display in discipline-math
This commit is contained in:
@@ -46,7 +46,7 @@ export interface DisciplineStoreState {
|
||||
}
|
||||
|
||||
export interface DisciplineStoreActions {
|
||||
activate: (id: string, gameState?: { elements?: Record<string, ElementState> }) => void;
|
||||
activate: (id: string, gameState?: { elements?: Record<string, ElementState>; signedPacts?: number[] }) => void;
|
||||
deactivate: (id: string) => void;
|
||||
processTick: (mana: { rawMana: number; elements: Record<string, ElementState> }) => {
|
||||
rawMana: number;
|
||||
@@ -90,6 +90,12 @@ export const useDisciplineStore = create<DisciplineStore>()(
|
||||
if (nonPaused >= s.concurrentLimit) return s;
|
||||
if (!canProceedDiscipline(def, existing, gameState)) return s;
|
||||
|
||||
// Invoker disciplines require at least one signed guardian pact
|
||||
if (def.attunement === 'invoker') {
|
||||
const signedPacts = gameState?.signedPacts || [];
|
||||
if (signedPacts.length === 0) return s;
|
||||
}
|
||||
|
||||
// Check discipline prerequisites (requires field → discipline XP)
|
||||
const prereqCheck = checkDisciplinePrerequisites(def, s.disciplines, ALL_DISCIPLINES);
|
||||
if (!prereqCheck.canProceed) return s;
|
||||
|
||||
@@ -223,11 +223,11 @@ export const useGameStore = create<GameCoordinatorStore>()(
|
||||
if (ctx.prestige.pactRitualFloor !== null) {
|
||||
const guardian = getGuardianForFloor(ctx.prestige.pactRitualFloor);
|
||||
if (guardian) {
|
||||
const pactAffinityBonus = 1 - (ctx.prestige.prestigeUpgrades.pactAffinity || 0) * 0.1;
|
||||
const requiredTime = guardian.pactTime * pactAffinityBonus;
|
||||
const newProgress = ctx.prestige.pactRitualProgress + HOURS_PER_TICK;
|
||||
const pactAffinity = Math.min(0.9,
|
||||
(ctx.prestige.prestigeUpgrades.pactAffinity || 0) * 0.1 + (disciplineEffects.bonuses.pactAffinityBonus || 0));
|
||||
const requiredTime = guardian.pactTime * (1 - pactAffinity);
|
||||
|
||||
if (newProgress >= requiredTime) {
|
||||
if (ctx.prestige.pactRitualProgress + HOURS_PER_TICK >= requiredTime) {
|
||||
addLog(`📜 Pact signed with ${guardian.name}! You have gained their boons.`);
|
||||
|
||||
// Unlock mana types granted by this guardian
|
||||
|
||||
Reference in New Issue
Block a user