[Add] Allow Draktharr to get cargo missions, but with 50% frequency.

This commit is contained in:
Allanis 2013-12-17 11:48:29 +00:00
parent 571b801a49
commit 517a9dd0e8
2 changed files with 10 additions and 3 deletions

View File

@ -17,6 +17,7 @@
<faction>Independent</faction>
<faction>Empire</faction>
<faction>Soromid</faction>
<faction>Draktharr</faction>
</avail>
</mission>
<mission name="Empire Recruitment">

View File

@ -39,10 +39,16 @@ end
-- Create the mission.
function create()
local landed = space.getPlanet() -- Get landed planet.
landed = space.getPlanet() -- Get landed planet.
-- Only 50% chance of appearing on Draktharr systems.
dv = faction.get("Draktharr")
if landed:faction() == dv and rnd.int(1) == 0 then
misn.finish(false)
end
-- Target destination.
local i = 0
i = 0
repeat
planet, system = space.getPlanet(misn.factions())
i = i + 1
@ -147,7 +153,7 @@ end
-- Land hook.
function land()
local landed = space.getPlanet()
landed = space.getPlanet()
if landed == planet then
if player.rmCargo(carg_id) then
player.pay( reward )