Remove Battle Fury consecutive hit multiplier feature
Some checks failed
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m17s
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:
@@ -42,7 +42,7 @@ const MANA_FLOW_TIER1_UPGRADES_L10: SkillUpgradeChoice[] = [
|
|||||||
// Combat Training Upgrades (+5 base damage per level)
|
// Combat Training Upgrades (+5 base damage per level)
|
||||||
const COMBAT_TRAIN_TIER1_UPGRADES_L5: SkillUpgradeChoice[] = [
|
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_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_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 } },
|
{ id: 'ct_t1_l5_speed', name: 'Quick Strikes', desc: '+20% attack speed', milestone: 5, effect: { type: 'multiplier', stat: 'attackSpeed', value: 1.2 } },
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -259,7 +259,6 @@ function makeInitial(overrides: Partial<GameState> = {}): GameState {
|
|||||||
elementChain: [],
|
elementChain: [],
|
||||||
},
|
},
|
||||||
totalTicks: 0,
|
totalTicks: 0,
|
||||||
consecutiveHits: 0,
|
|
||||||
|
|
||||||
// Loot System
|
// Loot System
|
||||||
lootInventory: {
|
lootInventory: {
|
||||||
@@ -357,9 +356,6 @@ export const useGameStore = create<GameStore>()(
|
|||||||
const state = get();
|
const state = get();
|
||||||
if (state.gameOver || state.paused) return;
|
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)
|
// Compute unified effects (includes skill upgrades AND equipment enchantments)
|
||||||
const effects = getUnifiedEffects(state);
|
const effects = getUnifiedEffects(state);
|
||||||
|
|
||||||
@@ -703,23 +699,14 @@ export const useGameStore = create<GameStore>()(
|
|||||||
dmg *= 1.5;
|
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
|
// COMBO_MASTER: Every 5th attack deals 3x damage
|
||||||
const totalHitsThisLoop = state.totalTicks || 0;
|
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) {
|
if (hasSpecial(effects, SPECIAL_EFFECTS.COMBO_MASTER) && isFifthHit) {
|
||||||
dmg *= 3;
|
dmg *= 3;
|
||||||
log = [`💥 Combo Master! Triple damage!`, ...log.slice(0, 49)];
|
log = [`💥 Combo Master! Triple damage!`, ...log.slice(0, 49)];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Track hits for BATTLE_FURY
|
|
||||||
hitsThisTick++;
|
|
||||||
|
|
||||||
// Familiar bonuses
|
// Familiar bonuses
|
||||||
dmg *= familiarBonuses.damageMultiplier;
|
dmg *= familiarBonuses.damageMultiplier;
|
||||||
dmg *= familiarBonuses.elementalDamageMultiplier;
|
dmg *= familiarBonuses.elementalDamageMultiplier;
|
||||||
@@ -834,9 +821,6 @@ export const useGameStore = create<GameStore>()(
|
|||||||
newCombo.multiplier = 1 + newCombo.count * 0.02;
|
newCombo.multiplier = 1 + newCombo.count * 0.02;
|
||||||
newCombo.elementChain = [];
|
newCombo.elementChain = [];
|
||||||
|
|
||||||
// Reset consecutive hits on floor change
|
|
||||||
set((s) => ({ ...s, consecutiveHits: 0 }));
|
|
||||||
|
|
||||||
// Reset ALL spell progress on floor change
|
// Reset ALL spell progress on floor change
|
||||||
equipmentSpellStates = equipmentSpellStates.map(s => ({ ...s, castProgress: 0 }));
|
equipmentSpellStates = equipmentSpellStates.map(s => ({ ...s, castProgress: 0 }));
|
||||||
spellState = { ...spellState, castProgress: 0 };
|
spellState = { ...spellState, castProgress: 0 };
|
||||||
@@ -972,7 +956,6 @@ export const useGameStore = create<GameStore>()(
|
|||||||
totalDamageDealt,
|
totalDamageDealt,
|
||||||
totalSpellsCast,
|
totalSpellsCast,
|
||||||
familiars,
|
familiars,
|
||||||
consecutiveHits: state.currentAction === 'climb' ? state.consecutiveHits + hitsThisTick : state.consecutiveHits,
|
|
||||||
consecutiveStudyHours,
|
consecutiveStudyHours,
|
||||||
studyStartedAt,
|
studyStartedAt,
|
||||||
...craftingUpdates,
|
...craftingUpdates,
|
||||||
|
|||||||
@@ -491,7 +491,6 @@ export interface GameState {
|
|||||||
// Combo System
|
// Combo System
|
||||||
combo: ComboState;
|
combo: ComboState;
|
||||||
totalTicks: number; // Total ticks this loop (for combo timing)
|
totalTicks: number; // Total ticks this loop (for combo timing)
|
||||||
consecutiveHits: number; // Consecutive hits for BATTLE_FURY tracking
|
|
||||||
|
|
||||||
// Loot System
|
// Loot System
|
||||||
lootInventory: LootInventory;
|
lootInventory: LootInventory;
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ export const SPECIAL_EFFECTS = {
|
|||||||
EMERGENCY_RESERVE: 'emergencyReserve', // Keep 10% mana on new loop
|
EMERGENCY_RESERVE: 'emergencyReserve', // Keep 10% mana on new loop
|
||||||
|
|
||||||
// Combat special effects
|
// Combat special effects
|
||||||
BATTLE_FURY: 'battleFury', // +10% damage per consecutive hit
|
|
||||||
ARMOR_PIERCE: 'armorPierce', // Ignore 10% floor defense
|
ARMOR_PIERCE: 'armorPierce', // Ignore 10% floor defense
|
||||||
OVERPOWER: 'overpower', // +50% damage when mana above 80%
|
OVERPOWER: 'overpower', // +50% damage when mana above 80%
|
||||||
BERSERKER: 'berserker', // +50% damage when below 50% mana
|
BERSERKER: 'berserker', // +50% damage when below 50% mana
|
||||||
@@ -343,17 +342,10 @@ export function computeDynamicDamage(
|
|||||||
baseDamage: number,
|
baseDamage: number,
|
||||||
floorHPPct: number,
|
floorHPPct: number,
|
||||||
currentMana: number,
|
currentMana: number,
|
||||||
maxMana: number,
|
maxMana: number
|
||||||
consecutiveHits: number
|
|
||||||
): number {
|
): number {
|
||||||
let damage = baseDamage * effects.baseDamageMultiplier;
|
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%
|
// Overpower: +50% damage when mana above 80%
|
||||||
if (hasSpecial(effects, SPECIAL_EFFECTS.OVERPOWER) && currentMana >= maxMana * 0.8) {
|
if (hasSpecial(effects, SPECIAL_EFFECTS.OVERPOWER) && currentMana >= maxMana * 0.8) {
|
||||||
damage *= 1.5;
|
damage *= 1.5;
|
||||||
|
|||||||
Reference in New Issue
Block a user