[Change] Cleaned up final mission a litte, I was looking at making it
better, but it'll have to be done through better AI.
This commit is contained in:
parent
4fdda9b388
commit
d004256ebe
@ -88,6 +88,8 @@ function jump()
|
|||||||
sys = space.getSystem()
|
sys = space.getSystem()
|
||||||
|
|
||||||
if misn_stage == 0 then
|
if misn_stage == 0 then
|
||||||
|
offset = 500
|
||||||
|
|
||||||
-- Entering target system?
|
-- Entering target system?
|
||||||
if sys == misn_target_sys then
|
if sys == misn_target_sys then
|
||||||
-- Create big battle.
|
-- Create big battle.
|
||||||
@ -99,9 +101,12 @@ function jump()
|
|||||||
emp_fleets[1] = "Empire Sml Attack"
|
emp_fleets[1] = "Empire Sml Attack"
|
||||||
emp_fleets[2] = "Empire Sml Attack"
|
emp_fleets[2] = "Empire Sml Attack"
|
||||||
emp_fleets[3] = "Draktharr Goddard" -- They help empire.
|
emp_fleets[3] = "Draktharr Goddard" -- They help empire.
|
||||||
|
-- Get position
|
||||||
|
x, y = enter_vect:get()
|
||||||
|
-- Add pilots.
|
||||||
for k,v in ipairs(emp_fleets) do
|
for k,v in ipairs(emp_fleets) do
|
||||||
enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) )
|
spawn_vect:add(rnd.int(-offset, offset), rnd.int(-offset, offset))
|
||||||
pilot.add( v, "def", enter_vect )
|
pilot.add(v, "def", spawn_vect)
|
||||||
end
|
end
|
||||||
-- Collective.
|
-- Collective.
|
||||||
col_fleets = {}
|
col_fleets = {}
|
||||||
@ -110,12 +115,12 @@ function jump()
|
|||||||
col_fleets[3] = "Collective Sml Swarm"
|
col_fleets[3] = "Collective Sml Swarm"
|
||||||
-- Set up position.
|
-- Set up position.
|
||||||
x,y = enter_vect:get()
|
x,y = enter_vect:get()
|
||||||
enter_vect:set(-x, -y)
|
spawn_vect = enter_vect.new(-x, -y)
|
||||||
-- Count amount created
|
-- Count amount created
|
||||||
col_alive = 0
|
col_alive = 0
|
||||||
for k,v in ipairs(col_fleets) do
|
for k,v in ipairs(col_fleets) do
|
||||||
enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) )
|
spawn_vect:add(rnd.int(-offset, offset), rnd.int(-offset, offset))
|
||||||
pilots = pilot.add( v, "def", enter_vect )
|
pilots = pilot.add(v, "def", spawn_vect)
|
||||||
col_alive = col_alive + #pilots
|
col_alive = col_alive + #pilots
|
||||||
for k,v in ipairs(pilots) do
|
for k,v in ipairs(pilots) do
|
||||||
hook.pilot( v, "disable", "col_dead" )
|
hook.pilot( v, "disable", "col_dead" )
|
||||||
@ -137,9 +142,13 @@ function jump()
|
|||||||
emp_fleets[1] = "Empire Lge Attack"
|
emp_fleets[1] = "Empire Lge Attack"
|
||||||
emp_fleets[2] = "Empire Med Attack"
|
emp_fleets[2] = "Empire Med Attack"
|
||||||
emp_fleets[3] = "Draktharr Goddard" -- They help empire.
|
emp_fleets[3] = "Draktharr Goddard" -- They help empire.
|
||||||
|
-- Get position.
|
||||||
|
x, y = enter_vect:get()
|
||||||
|
spawn_vect = enter_vect.new(x, y)
|
||||||
|
-- Add pilots.
|
||||||
for k,v in ipairs(emp_fleets) do
|
for k,v in ipairs(emp_fleets) do
|
||||||
enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) )
|
spawn_vect:add(rnd.int(-offset,offset), rnd.int(-offset, offset))
|
||||||
pilot.add( v, "def", enter_vect )
|
pilot.add(v, "def", spawn_vect)
|
||||||
end
|
end
|
||||||
-- Collective.
|
-- Collective.
|
||||||
col_fleets = {}
|
col_fleets = {}
|
||||||
@ -149,12 +158,14 @@ function jump()
|
|||||||
if var.peek("trinity") == true then
|
if var.peek("trinity") == true then
|
||||||
col_fleets[4] = "Trinity"
|
col_fleets[4] = "Trinity"
|
||||||
end
|
end
|
||||||
|
-- Set up position.
|
||||||
x,y = enter_vect:get()
|
x,y = enter_vect:get()
|
||||||
enter_vect:set(-x, -y)
|
spawn_vect = enter_vect.new(-x, -y)
|
||||||
|
-- Add pilots.
|
||||||
col_alive = 0
|
col_alive = 0
|
||||||
for k,v in ipairs(col_fleets) do
|
for k,v in ipairs(col_fleets) do
|
||||||
enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) )
|
spawn_vect:add(rnd.int(-offset, offset), rnd.int(-offset, offset))
|
||||||
pilots = pilot.add( v, "def", enter_vect )
|
pilots = pilot.add(v, "def", spawn_vect)
|
||||||
|
|
||||||
-- Handle special ships.
|
-- Handle special ships.
|
||||||
if v == "Starfire" then
|
if v == "Starfire" then
|
||||||
|
Loading…
Reference in New Issue
Block a user