Fix Spire Mode floor rendering and swarm floors (Tasks 5 & 6)
- Added enemy naming system with getEnemyName() function - Updated EnemyState type to include name field - Updated generateSwarmEnemies() and generateFloorState() to assign enemy names - Fixed SpireTab.tsx (both versions) to display: - Floor type (Combat/Swarm/Speed/Guardian/Puzzle) with icons - Named enemies based on element and floor tier - Special floor properties (armor %, dodge chance) - Multiple enemies for swarm floors with individual HP bars - Added ROOM_TYPE_LABELS to constants for display - Verified floor type generation logic works correctly - Build succeeds with npm run build
This commit is contained in:
@@ -32,7 +32,7 @@ export function SpellsTab({ store }: SpellsTabProps) {
|
||||
if (!instance) continue;
|
||||
|
||||
for (const ench of instance.enchantments) {
|
||||
const effectDef = ENCHANTMENT_EFFECTS[ench.effectId];
|
||||
const effectDef = ENCHANTMENT_EFFECTS?.[ench.effectId];
|
||||
if (effectDef?.effect.type === 'spell' && effectDef.effect.spellId) {
|
||||
const spellId = effectDef.effect.spellId;
|
||||
if (!equipmentSpellIds.includes(spellId)) {
|
||||
@@ -48,7 +48,7 @@ export function SpellsTab({ store }: SpellsTabProps) {
|
||||
|
||||
const canCastSpell = (spellId: string): boolean => {
|
||||
const spell = SPELLS_DEF[spellId];
|
||||
if (!spell) return false;
|
||||
if (!spell || !spell.cost) return false;
|
||||
return canAffordSpellCost(spell.cost, store.rawMana, store.elements);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user