flying boss

boss addtion, small editor changes
This commit is contained in:
2026-10-02 10:56:51 +02:00
parent c7558a3947
commit 73cfd870f6
8 changed files with 742 additions and 20 deletions
+20 -13
View File
@@ -88,10 +88,10 @@
<div class="row">
<button id="downloadActiveBtn" class="good">Download Active</button>
<button id="downloadCheckedBtn">Download Checked</button>
<button id="downloadAllBtn">Download All</button>
<button id="downloadAllBtn">Download Modified</button>
</div>
<div class="muted" style="margin-top:6px;">
Downloads are per-room. Checked download saves one file per checked room; Download All saves every loaded room.
Downloads are per-room. Checked download saves one file per checked room; Download Modified saves every room you've changed.
</div>
</div>
@@ -176,7 +176,7 @@
</div> <div class="row" style="margin-bottom:8px;">
<label class="muted" style="display:flex; align-items:center; gap:8px;">
<input type="checkbox" id="showLinksChk"/>
Draw link lines (auto-enables Compare)
Draw link lines
</label>
</div>
@@ -288,6 +288,17 @@
dash_duration: 0.7, attack_cooldown: 1.8, above_y: 40
}
},
boss_flyer: {
rect: [120, 90], health: 26, speed: 3.0, air_speed: 3.0, detection_range: 620, contact_damage: 3, drop_profile: "boss", behavior: "flyer",
flyer: {
flight_height: 220, bob_amplitude: 20, bob_speed: 2.2, hover_speed: 2.6,
slam_cd: 6.0, slam_dive_vel: 16.0, ground_time: 2.0,
summon_cd: 8.0, summon_max: 3, summon_type: "boss_minion", summon_life: 6.0, summon_heal: 4, summon_damage: 3,
aoe_cd: 9.0, aoe_radius: 300, aoe_damage: 1, aoe_duration: 0.9,
shot_cd: 5.0, shot_damage: 5, shot_speed: 300, shot_lifetime: 2.2, shot_homing: 1.8
}
},
boss_minion: { rect: [34, 50], health: 4, speed: 2.4, air_speed: 2.2, detection_range: 320, contact_damage: 1, drop_profile: "normal" },
};
function seedDefaultObjectCatalog(){
@@ -2317,6 +2328,7 @@ Cancel = Choose whether to remove without saving`);
<option value="" ${beh===""?"selected":""}>default (from enemy type)</option>
<option value="shockwave" ${beh==="shockwave"?"selected":""}>shockwave (slam + shockwave)</option>
<option value="charger" ${beh==="charger"?"selected":""}>charger (retreat-charge + dash)</option>
<option value="flyer" ${beh==="flyer"?"selected":""}>flyer (air boss: slam, minions, aoe, homing shot)</option>
</select>
</div>
` : ""}
@@ -3783,14 +3795,9 @@ Cancel = Choose whether to remove without saving`);
refreshUI();
});
els.showLinksChk.checked = false; // always start unchecked (no auto Compare)
els.showLinksChk.addEventListener("change", ()=>{
if(els.showLinksChk.checked){
if(!state.compareEnabled){
state.compareEnabled = true;
const other = [...state.rooms.keys()].find(k => k !== state.activeId);
state.compareId = other || state.activeId;
}
}
// Lines only draw while Compare is on too (see drawLinkLinesForCanvas).
// overlay updates in render loop
refreshUI();
});
@@ -3850,8 +3857,8 @@ els.compareRoomSelect.addEventListener("change", ()=>{
});
els.downloadAllBtn.addEventListener("click", async ()=>{
const rooms = [...state.rooms.values()];
if(!rooms.length){ setStatus("No rooms loaded."); return; }
const rooms = [...state.rooms.values()].filter(r=>r.dirty);
if(!rooms.length){ setStatus("No modified rooms."); return; }
let i=0;
for(const r of rooms){
downloadText(r.filename || (r.data.name + ".json"), serializeRoom(r));
@@ -3860,7 +3867,7 @@ els.compareRoomSelect.addEventListener("change", ()=>{
await new Promise(res=>setTimeout(res, 250));
}
refreshRoomsList();
setStatus(`Downloaded ${i} room(s).`);
setStatus(`Downloaded ${i} modified room(s).`);
});
// canvas pointer handlers