refactor: remove skill system leftovers, migrate click mana to discipline perk
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m30s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m30s
- Simplified getMeditationBonus() to continuous ramp formula - Added click-mana capped perk to Mana Circulation discipline - Removed manaWell/manaFlow/manaSpring skill reads and prestige upgrades - Removed all skill fields from GameState and GameActionType - Updated all call sites and tests (916 tests passing) Closes #174
This commit is contained in:
@@ -10,7 +10,6 @@ import { BASE_GUARDIANS } from '../data/guardian-data';
|
||||
// ─── Damage Calculation Params ──────────────────────────────────────────────
|
||||
|
||||
export interface DamageCalcParams {
|
||||
skills: Record<string, number>;
|
||||
signedPacts: number[];
|
||||
}
|
||||
|
||||
@@ -21,13 +20,11 @@ export interface InsightCalcParams {
|
||||
totalManaGathered: number;
|
||||
signedPacts: number[];
|
||||
prestigeUpgrades: Record<string, number>;
|
||||
skills: Record<string, number>;
|
||||
}
|
||||
|
||||
// ─── DPS Calculation Params ─────────────────────────────────────────────────
|
||||
|
||||
export interface DPSCalcParams {
|
||||
skills: Record<string, number>;
|
||||
signedPacts: number[];
|
||||
equippedInstances: Record<string, string | null>;
|
||||
equipmentInstances: Record<string, EquipmentInstance>;
|
||||
@@ -150,24 +147,21 @@ export function calcDamage(
|
||||
): number {
|
||||
const sp = SPELLS_DEF[spellId];
|
||||
if (!sp) return 5;
|
||||
const skills = state.skills;
|
||||
|
||||
// Base damage: spell base + skill bonus + discipline bonus
|
||||
// Base damage: spell base + discipline bonus
|
||||
const discBaseDmg = discipline?.bonuses?.baseDamageBonus || 0;
|
||||
const baseDmg = sp.dmg + (skills.combatTrain || 0) * 5 + discBaseDmg;
|
||||
const baseDmg = sp.dmg + discBaseDmg;
|
||||
|
||||
// Percentage multiplier
|
||||
const discDmgMult = discipline?.bonuses?.baseDamageMultiplier || 0;
|
||||
const pct = 1 + (skills.arcaneFury || 0) * 0.1 + discDmgMult;
|
||||
const pct = 1 + discDmgMult;
|
||||
|
||||
// Elemental mastery bonus
|
||||
const elemMasteryBonus = 1 + (skills.elementalMastery || 0) * 0.15;
|
||||
const elemMasteryBonus = 1;
|
||||
|
||||
// Guardian bane bonus
|
||||
const isGuardianFloor = floorElem && Object.values(BASE_GUARDIANS).some(g => g.element === floorElem);
|
||||
const guardianBonus = isGuardianFloor
|
||||
? 1 + (skills.guardianBane || 0) * 0.2
|
||||
: 1;
|
||||
const guardianBonus = 1;
|
||||
|
||||
// Get boon bonuses from pacts
|
||||
const boons = getBoonBonuses(state.signedPacts);
|
||||
@@ -177,7 +171,7 @@ export function calcDamage(
|
||||
const elemDamageMult = 1 + boons.elementalDamage / 100;
|
||||
|
||||
// Apply crit chance and damage from boons
|
||||
const critChance = (skills.precision || 0) * 0.05 + boons.critChance / 100;
|
||||
const critChance = boons.critChance / 100;
|
||||
const critDamageMult = 1.5 + boons.critDamage / 100;
|
||||
|
||||
let damage = baseDmg * pct * elemMasteryBonus * guardianBonus * rawDamageMult * elemDamageMult;
|
||||
@@ -200,7 +194,7 @@ export function calcDamage(
|
||||
export function calcInsight(state: InsightCalcParams, discipline?: DisciplineBonuses): number {
|
||||
const pu = state.prestigeUpgrades;
|
||||
const discInsightBonus = discipline?.bonuses?.insightGainBonus || 0;
|
||||
const skillBonus = 1 + (state.skills.insightHarvest || 0) * 0.1 + discInsightBonus;
|
||||
const skillBonus = 1 + discInsightBonus;
|
||||
|
||||
// Get boon bonuses for insight gain
|
||||
const boons = getBoonBonuses(state.signedPacts);
|
||||
@@ -323,7 +317,7 @@ export function getTotalDPS(
|
||||
|
||||
// Get cast speed (spells per second)
|
||||
const baseCastTime = spellDef.baseCastTime || 1.0;
|
||||
const castingSpeedBonus = 1 + (state.skills.castingSpeed || 0) * 0.1;
|
||||
const castingSpeedBonus = 1;
|
||||
const equipmentAttackSpeed = upgradeEffects.attackSpeedMultiplier || 1;
|
||||
const castTime = baseCastTime / (castingSpeedBonus * equipmentAttackSpeed);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user