Make RustRaptor the repository root and track its playable bundle

This commit is contained in:
raptorreplica committed 2026-10-11 16:33:37 +11:00
1 parent 4b1edefeec
commit 8f459796b1
9860 files changed
+21084 -61019

No files matched your search

@@ -0,0 +1,21 @@
fn on_tick(event,state,random) {
// Stop at the interdiction line: an unarmed objective must never escape.
let commands=[];
if event.health>0 && event.y>=44 {
commands.push(#{op:"move",entity:event.entity,x:event.x,y:44});
}
#{commands:commands,state:state}
}
fn on_death(event,state,random) {
let intercepted=if event.objectives.contains("iron_coast_mission_3:convoys_intercepted") {
event.objectives["iron_coast_mission_3:convoys_intercepted"]+1
} else {1};
// Recovered maintenance supplies restore shield directly. No extra item
// slot or trial equipment is needed, even with a full veteran inventory.
#{commands:[
#{op:"objective",key:"iron_coast_mission_3:convoys_intercepted",value:intercepted},
#{op:"shield",amount:15},
#{op:"play_sound",sound:"iron_coast_mission_3:cargo_salvage"}
],state:state}
}
@@ -0,0 +1,51 @@
fn on_mission_start(event, state, random) {
// Reset mission state even when the script was restored from a prior flight.
#{commands:[
#{op:"objective",key:"iron_coast_mission_3:phase",value:1},
#{op:"objective",key:"iron_coast_mission_3:convoys_required",value:3},
#{op:"objective",key:"iron_coast_mission_3:convoys_intercepted",value:0},
#{op:"objective",key:"iron_coast_mission_3:escorts_required",value:2},
#{op:"objective",key:"iron_coast_mission_3:complete",value:0},
#{op:"objective",key:"iron_coast_turret:defeated",value:0},
#{op:"objective",key:"iron_coast_boss_3:defeated",value:0},
#{op:"play_sound",sound:"iron_coast_mission_3:approach"}
],state:#{convoy_alarm:false,boss_alarm:false,complete:false}}
}
fn on_tick(event, state, random) {
let commands=[];
// Essential escort targets cannot scroll away and leave the objectives
// impossible. Hold them below the command cruiser in the firing corridor.
for unit in event.entities {
if unit.definition=="iron_coast_turret:unit" && unit.health>0 && unit.y>=74 {
commands.push(#{op:"move",entity:unit.entity,x:unit.x,y:74});
}
}
if event.tick>=180 && !state.convoy_alarm {
state.convoy_alarm=true;
commands.push(#{op:"objective",key:"iron_coast_mission_3:phase",value:2});
commands.push(#{op:"play_sound",sound:"iron_coast_mission_3:convoy_alarm"});
}
if event.tick>=1100 && !state.boss_alarm {
state.boss_alarm=true;
commands.push(#{op:"objective",key:"iron_coast_mission_3:phase",value:3});
commands.push(#{op:"play_sound",sound:"iron_coast_mission_3:boss_alarm"});
}
let convoys=event.objectives["iron_coast_mission_3:convoys_intercepted"];
let escorts=event.objectives["iron_coast_turret:defeated"];
let boss=event.objectives["iron_coast_boss_3:defeated"];
if convoys>=3 && escorts>=2 && boss>=1 && !state.complete {
state.complete=true;
commands.push(#{op:"objective",key:"iron_coast_mission_3:phase",value:4});
commands.push(#{op:"objective",key:"iron_coast_mission_3:complete",value:1});
commands.push(#{op:"credits",amount:7500});
commands.push(#{op:"play_sound",sound:"iron_coast_mission_3:victory"});
commands.push(#{op:"complete"});
}
#{commands:commands,state:state}
}
fn on_mission_end(event,state,random) {
let debrief=if event.success {1} else {0};
#{commands:[#{op:"objective",key:"iron_coast_mission_3:debrief",value:debrief}],state:state}
}