flyer boss, town

flyer boss adjustments, town addition
This commit is contained in:
2026-10-05 15:04:20 +02:00
parent 73cfd870f6
commit d56540785f
14 changed files with 491 additions and 123 deletions
+17 -6
View File
@@ -289,10 +289,12 @@
}
},
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",
rect: [120, 90], health: 51, 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,
flight_height: 280, bob_amplitude: 20, bob_speed: 2.2, hover_speed: 2.6,
startup_delay: 3.0,
phase2_hp_pct: 0.33, hard_phase3_hp_pct: 0.20,
slam_cd: 9.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
@@ -510,7 +512,8 @@
spawn_id: ex.spawn_id || "",
spawn: Array.isArray(ex.spawn) ? [ +ex.spawn[0]||0, +ex.spawn[1]||0 ] : null,
hint: ex.hint || "",
layer: +(ex.layer||0)
layer: +(ex.layer||0),
requires_boss_dead: !!ex.requires_boss_dead
});
} else {
// editor-native exit
@@ -520,7 +523,8 @@
spawn_id: ex.spawn_id || "",
spawn: Array.isArray(ex.spawn) ? [ +ex.spawn[0]||0, +ex.spawn[1]||0 ] : null,
hint: ex.hint || "",
layer: +(ex.layer||0)
layer: +(ex.layer||0),
requires_boss_dead: !!ex.requires_boss_dead
});
}
}
@@ -2271,6 +2275,9 @@ Cancel = Choose whether to remove without saving`);
<div><div class="mini">to</div><input id="exto" type="text" value="${ex.to||""}" placeholder="room_02"/></div>
<div><div class="mini">spawn_id</div><input id="exsid" type="text" value="${ex.spawn_id||""}" placeholder="from_room_01"/></div>
</div>
<div style="margin-top:8px;">
<label><input id="exbossdead" type="checkbox" ${ex.requires_boss_dead?"checked":""}/> Appears/active only after the room's boss is slain</label>
</div>
<div class="muted" style="margin-top:8px;">Tip: use the Linking panel to set these safely.</div>
<div class="row" style="margin-top:8px;">
<button id="delSel" class="danger">Delete</button>
@@ -2581,6 +2588,9 @@ Cancel = Choose whether to remove without saving`);
const exto=q("exto"); if(exto) exto.addEventListener("change", ()=>pushAnd(()=>{ ex.to = exto.value.trim(); }));
const exsid=q("exsid"); if(exsid) exsid.addEventListener("change", ()=>pushAnd(()=>{ ex.spawn_id = exsid.value.trim(); }));
const exlayer=q("exlayer"); if(exlayer) exlayer.addEventListener("change", ()=>pushAnd(()=>{ ex.layer = Math.round(num(exlayer.value)); }));
const exbossdead=q("exbossdead"); if(exbossdead) exbossdead.addEventListener("change", ()=>pushAnd(()=>{
if(exbossdead.checked){ ex.requires_boss_dead = true; } else { delete ex.requires_boss_dead; }
}));
const del=q("delSel"); if(del) del.addEventListener("click", ()=>pushAnd(()=>{
room.exits.splice(sel.index,1);
state.selection=null;
@@ -3451,7 +3461,7 @@ Cancel = Choose whether to remove without saving`);
return out;
});
// exits back to {rect:[x,y,w,h], to, spawn_id?, spawn:[x,y], hint} (+ layer when set)
// exits back to {rect:[x,y,w,h], to, spawn_id?, spawn:[x,y], hint} (+ layer / requires_boss_dead when set)
const exits = (d.exits || []).map(ex => {
const out = {
rect: [ex.x, ex.y, ex.w, ex.h],
@@ -3461,6 +3471,7 @@ Cancel = Choose whether to remove without saving`);
};
if(ex.spawn_id) out.spawn_id = ex.spawn_id;
if(ex.layer) out.layer = ex.layer;
if(ex.requires_boss_dead) out.requires_boss_dead = true;
return out;
});