Remove Battle Fury consecutive hit multiplier feature
Some checks failed
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m17s

- Remove BATTLE_FURY from SPECIAL_EFFECTS constant
- Remove consecutiveHits from GameState type
- Remove consecutive hit tracking from store.ts
- Replace Battle Fury upgrade with Critical Eye (+10% crit chance)
- Clean up computeDynamicDamage function signature
This commit is contained in:
2026-03-26 13:59:59 +00:00
parent 44d9e0a835
commit c050ca3814
4 changed files with 3 additions and 29 deletions

View File

@@ -42,7 +42,7 @@ const MANA_FLOW_TIER1_UPGRADES_L10: SkillUpgradeChoice[] = [
// Combat Training Upgrades (+5 base damage per level)
const COMBAT_TRAIN_TIER1_UPGRADES_L5: SkillUpgradeChoice[] = [
{ id: 'ct_t1_l5_power', name: 'Raw Power', desc: '+25% base damage', milestone: 5, effect: { type: 'multiplier', stat: 'baseDamage', value: 1.25 } },
{ id: 'ct_t1_l5_fury', name: 'Battle Fury', desc: '+10% damage for each consecutive hit (max 100%)', milestone: 5, effect: { type: 'special', specialId: 'battleFury', specialDesc: 'Combo damage bonus' } },
{ id: 'ct_t1_l5_crit', name: 'Critical Eye', desc: '+10% critical hit chance', milestone: 5, effect: { type: 'bonus', stat: 'critChance', value: 10 } },
{ id: 'ct_t1_l5_armor', name: 'Armor Pierce', desc: 'Attacks ignore 10% of floor defense', milestone: 5, effect: { type: 'special', specialId: 'armorPierce', specialDesc: 'Armor penetration' } },
{ id: 'ct_t1_l5_speed', name: 'Quick Strikes', desc: '+20% attack speed', milestone: 5, effect: { type: 'multiplier', stat: 'attackSpeed', value: 1.2 } },
];

View File

@@ -259,7 +259,6 @@ function makeInitial(overrides: Partial<GameState> = {}): GameState {
elementChain: [],
},
totalTicks: 0,
consecutiveHits: 0,
// Loot System
lootInventory: {
@@ -357,9 +356,6 @@ export const useGameStore = create<GameStore>()(
const state = get();
if (state.gameOver || state.paused) return;
// Track hits this tick for BATTLE_FURY
let hitsThisTick = 0;
// Compute unified effects (includes skill upgrades AND equipment enchantments)
const effects = getUnifiedEffects(state);
@@ -703,23 +699,14 @@ export const useGameStore = create<GameStore>()(
dmg *= 1.5;
}
// BATTLE_FURY: +10% damage per consecutive hit (resets on floor change)
const currentConsecutiveHits = state.consecutiveHits + hitsThisTick;
if (hasSpecial(effects, SPECIAL_EFFECTS.BATTLE_FURY)) {
dmg *= 1 + (currentConsecutiveHits * 0.1);
}
// COMBO_MASTER: Every 5th attack deals 3x damage
const totalHitsThisLoop = state.totalTicks || 0;
const isFifthHit = ((totalHitsThisLoop + hitsThisTick) % 5) === 4; // 5th, 10th, 15th, etc.
const isFifthHit = (totalHitsThisLoop % 5) === 4; // 5th, 10th, 15th, etc.
if (hasSpecial(effects, SPECIAL_EFFECTS.COMBO_MASTER) && isFifthHit) {
dmg *= 3;
log = [`💥 Combo Master! Triple damage!`, ...log.slice(0, 49)];
}
// Track hits for BATTLE_FURY
hitsThisTick++;
// Familiar bonuses
dmg *= familiarBonuses.damageMultiplier;
dmg *= familiarBonuses.elementalDamageMultiplier;
@@ -834,9 +821,6 @@ export const useGameStore = create<GameStore>()(
newCombo.multiplier = 1 + newCombo.count * 0.02;
newCombo.elementChain = [];
// Reset consecutive hits on floor change
set((s) => ({ ...s, consecutiveHits: 0 }));
// Reset ALL spell progress on floor change
equipmentSpellStates = equipmentSpellStates.map(s => ({ ...s, castProgress: 0 }));
spellState = { ...spellState, castProgress: 0 };
@@ -972,7 +956,6 @@ export const useGameStore = create<GameStore>()(
totalDamageDealt,
totalSpellsCast,
familiars,
consecutiveHits: state.currentAction === 'climb' ? state.consecutiveHits + hitsThisTick : state.consecutiveHits,
consecutiveStudyHours,
studyStartedAt,
...craftingUpdates,

View File

@@ -491,7 +491,6 @@ export interface GameState {
// Combo System
combo: ComboState;
totalTicks: number; // Total ticks this loop (for combo timing)
consecutiveHits: number; // Consecutive hits for BATTLE_FURY tracking
// Loot System
lootInventory: LootInventory;

View File

@@ -75,7 +75,6 @@ export const SPECIAL_EFFECTS = {
EMERGENCY_RESERVE: 'emergencyReserve', // Keep 10% mana on new loop
// Combat special effects
BATTLE_FURY: 'battleFury', // +10% damage per consecutive hit
ARMOR_PIERCE: 'armorPierce', // Ignore 10% floor defense
OVERPOWER: 'overpower', // +50% damage when mana above 80%
BERSERKER: 'berserker', // +50% damage when below 50% mana
@@ -343,17 +342,10 @@ export function computeDynamicDamage(
baseDamage: number,
floorHPPct: number,
currentMana: number,
maxMana: number,
consecutiveHits: number
maxMana: number
): number {
let damage = baseDamage * effects.baseDamageMultiplier;
// Battle Fury: +10% damage per consecutive hit (max 100%)
if (hasSpecial(effects, SPECIAL_EFFECTS.BATTLE_FURY)) {
const furyBonus = Math.min(consecutiveHits * 0.1, 1.0);
damage *= (1 + furyBonus);
}
// Overpower: +50% damage when mana above 80%
if (hasSpecial(effects, SPECIAL_EFFECTS.OVERPOWER) && currentMana >= maxMana * 0.8) {
damage *= 1.5;