diff --git a/index.html b/index.html index d9ffa49..010e301 100644 --- a/index.html +++ b/index.html @@ -9769,7 +9769,7 @@ const type = MONSTER_TYPES[m.type] || { name: 'Unknown', icon: '👹' }; monstersHtml += `
- ${type.name} + ${type.name} Lv${m.level} ${type.name} ${m.hp}/${m.maxHp} HP
@@ -10165,12 +10165,12 @@ // Use selected icon or default to '00' (use 100px, CSS scales to 50) const iconId = playerStats.homeBaseIcon || '00'; - const iconSrc = `/mapgameimgs/homebase${iconId}-100.png`; + const iconSrc = `/mapgameimgs/bases/homebase${iconId}-100.png`; const iconHtml = `
Home Base + onerror="this.src='/mapgameimgs/monsters/default50.png'">
`; @@ -10288,7 +10288,7 @@ onclick="selectHomebaseIcon('${icon.id}')" data-icon-id="${icon.id}"> Homebase ${icon.id} + onerror="this.src='/mapgameimgs/monsters/default50.png'"> `).join(''); } catch (err) { @@ -10800,8 +10800,8 @@ const iconHtml = `
- ${monsterType.name} + ${monsterType.name}
`; @@ -11033,11 +11033,11 @@ // Check for buffs (defense, generic, etc.) if (monster.buffs.defense && monster.buffs.defense.turnsLeft > 0) { - html += `Defense Up`; } else if (monster.buffs.generic && monster.buffs.generic.turnsLeft > 0) { - html += `Buff`; } @@ -11045,8 +11045,8 @@ if (monster.statusEffects) { monster.statusEffects.forEach(effect => { const effectType = effect.type || 'status'; - html += `${effectType}`; }); } @@ -11061,8 +11061,8 @@ // Check for player defense buff if (combatState.defenseBuffTurns > 0) { - html += `Defense Up`; } @@ -11070,8 +11070,8 @@ if (combatState.playerStatusEffects && combatState.playerStatusEffects.length > 0) { combatState.playerStatusEffects.forEach(effect => { const effectType = effect.type || 'status'; - html += `${effectType}`; }); } @@ -11113,8 +11113,8 @@
${index === combatState.selectedTargetIndex ? 'â–¶' : ''}
- ${monster.data.name} + ${monster.data.name}
${monsterOverlayHtml}
${monster.data.name} Lv.${monster.level} diff --git a/mapgameimgs/bases/homebase00-100.png b/mapgameimgs/bases/homebase00-100.png new file mode 100755 index 0000000..3fc0481 Binary files /dev/null and b/mapgameimgs/bases/homebase00-100.png differ diff --git a/mapgameimgs/bases/homebase01-100.png b/mapgameimgs/bases/homebase01-100.png new file mode 100755 index 0000000..a0c2b3c Binary files /dev/null and b/mapgameimgs/bases/homebase01-100.png differ diff --git a/mapgameimgs/default_buff100.png b/mapgameimgs/effects/default_buff100.png similarity index 100% rename from mapgameimgs/default_buff100.png rename to mapgameimgs/effects/default_buff100.png diff --git a/mapgameimgs/default_status100.png b/mapgameimgs/effects/default_status100.png similarity index 100% rename from mapgameimgs/default_status100.png rename to mapgameimgs/effects/default_status100.png diff --git a/mapgameimgs/defense100.png b/mapgameimgs/effects/defense100.png similarity index 100% rename from mapgameimgs/defense100.png rename to mapgameimgs/effects/defense100.png diff --git a/mapgameimgs/defense_up100.png b/mapgameimgs/effects/defense_up100.png similarity index 100% rename from mapgameimgs/defense_up100.png rename to mapgameimgs/effects/defense_up100.png diff --git a/mapgameimgs/poison100.png b/mapgameimgs/effects/poison100.png similarity index 100% rename from mapgameimgs/poison100.png rename to mapgameimgs/effects/poison100.png diff --git a/mapgameimgs/default100.png b/mapgameimgs/monsters/default100.png similarity index 100% rename from mapgameimgs/default100.png rename to mapgameimgs/monsters/default100.png diff --git a/mapgameimgs/default50.png b/mapgameimgs/monsters/default50.png similarity index 100% rename from mapgameimgs/default50.png rename to mapgameimgs/monsters/default50.png diff --git a/mapgameimgs/moop_fanciest100.png b/mapgameimgs/monsters/moop_fanciest100.png similarity index 100% rename from mapgameimgs/moop_fanciest100.png rename to mapgameimgs/monsters/moop_fanciest100.png diff --git a/mapgameimgs/moop_fanciest50.png b/mapgameimgs/monsters/moop_fanciest50.png similarity index 100% rename from mapgameimgs/moop_fanciest50.png rename to mapgameimgs/monsters/moop_fanciest50.png diff --git a/mapgameimgs/moop_fancy100.png b/mapgameimgs/monsters/moop_fancy100.png similarity index 100% rename from mapgameimgs/moop_fancy100.png rename to mapgameimgs/monsters/moop_fancy100.png diff --git a/mapgameimgs/moop_fancy50.png b/mapgameimgs/monsters/moop_fancy50.png similarity index 100% rename from mapgameimgs/moop_fancy50.png rename to mapgameimgs/monsters/moop_fancy50.png diff --git a/mapgameimgs/moop_sub_par100.png b/mapgameimgs/monsters/moop_sub_par100.png similarity index 100% rename from mapgameimgs/moop_sub_par100.png rename to mapgameimgs/monsters/moop_sub_par100.png diff --git a/mapgameimgs/moop_sub_par50.png b/mapgameimgs/monsters/moop_sub_par50.png similarity index 100% rename from mapgameimgs/moop_sub_par50.png rename to mapgameimgs/monsters/moop_sub_par50.png diff --git a/mapgameimgs/playerattack50.png b/mapgameimgs/player/playerattack50.png similarity index 100% rename from mapgameimgs/playerattack50.png rename to mapgameimgs/player/playerattack50.png diff --git a/server.js b/server.js index b28b73d..cb23723 100644 --- a/server.js +++ b/server.js @@ -887,14 +887,14 @@ app.post('/api/user/home-base', authenticateToken, (req, res) => { } }); -// Get available homebase icons (auto-detected from mapgameimgs directory) +// Get available homebase icons (auto-detected from mapgameimgs/bases directory) app.get('/api/homebase-icons', (req, res) => { try { const fs = require('fs'); - const imagesDir = path.join(__dirname, 'mapgameimgs'); + const basesDir = path.join(__dirname, 'mapgameimgs', 'bases'); // Read directory and find homebaseXX-100.png files - const files = fs.readdirSync(imagesDir); + const files = fs.readdirSync(basesDir); const iconPattern = /^homebase(\d+)-100\.png$/; const icons = files @@ -904,8 +904,8 @@ app.get('/api/homebase-icons', (req, res) => { return { id: match[1], filename: file, - preview: `/mapgameimgs/${file}`, // Use 100px, CSS scales down - full: `/mapgameimgs/${file}` + preview: `/mapgameimgs/bases/${file}`, // Use 100px, CSS scales down + full: `/mapgameimgs/bases/${file}` }; } return null; @@ -1216,11 +1216,11 @@ app.post('/api/admin/monster-types', adminOnly, async (req, res) => { db.createMonsterType(data); // Copy default images for the new monster - const imgDir = path.join(__dirname, 'mapgameimgs'); + const monstersDir = path.join(__dirname, 'mapgameimgs', 'monsters'); const sizes = ['50', '100']; for (const size of sizes) { - const defaultImg = path.join(imgDir, `default${size}.png`); - const newImg = path.join(imgDir, `${monsterId}${size}.png`); + const defaultImg = path.join(monstersDir, `default${size}.png`); + const newImg = path.join(monstersDir, `${monsterId}${size}.png`); try { // Only copy if the new image doesn't already exist await fs.access(newImg);