From 92923111e11459d0c907ea6efde23d30190e91b8 Mon Sep 17 00:00:00 2001 From: Allanis Date: Fri, 6 Dec 2013 20:25:59 +0000 Subject: [PATCH] [Add] Fleets and ai for Detour Liberation Front, along with a few generic ai changes. --- dat/fleet.xml | 56 ++++++++++++++++++++++++++++++++++++++++++- scripts/ai/dlf.lua | 35 +++++++++++++++++++++++++++ scripts/ai/empire.lua | 27 +++++++++++++++------ 3 files changed, 110 insertions(+), 8 deletions(-) create mode 100644 scripts/ai/dlf.lua diff --git a/dat/fleet.xml b/dat/fleet.xml index ddf1a75..ef35075 100644 --- a/dat/fleet.xml +++ b/dat/fleet.xml @@ -30,7 +30,61 @@ Mule Mule - + + + dlf + DLF + + Pacifier + + + + dlf + DLF + + Vendetta + + + + dlf + DLF + + Hyena + Hyena + Admonisher + Vandetta + + + + dlf + DLF + + Hyena + Hyena + Hyena + Admonisher + Vendetta + Vendetta + Pacifier + + + + dlf> + DLF + + Hyena + Hyena + Hyena + Hyena + Admonisher + Admonisher + Vendetta + Vendetta + Vendetta + Pacifier + Hawking + + pirate Pirate diff --git a/scripts/ai/dlf.lua b/scripts/ai/dlf.lua new file mode 100644 index 0000000..1971996 --- /dev/null +++ b/scripts/ai/dlf.lua @@ -0,0 +1,35 @@ +include("../scripts/ai/tpl/generic.lua") + +-- Settings. +aggressive = true +safe_distance = 300 +armour_run = 100 +shield_return = 20 +land_planet = false + +function create() + ai.setcredits(ai.shipprice()/1000, ai.shipprice()/100) +end + +function taunt(target, offence) + -- Only 50% of actual taunting. + if rnd.int(0, 1) == 0 then + return + end + + -- Taunt. + if offence then + taunts = { + "For the Frontiier!", + "You'll make great target practice!", + "Purge the oppressors!" + } else + taunts = { + "You are no match for the DLF!", + "I've killed scum much more dangerous than you!" + } + end + + ai.comm(target, taunts[rnd.int(1, #taunts)]) +end + diff --git a/scripts/ai/empire.lua b/scripts/ai/empire.lua index c7901f1..9b43c36 100644 --- a/scripts/ai/empire.lua +++ b/scripts/ai/empire.lua @@ -12,13 +12,26 @@ function create() end end -function taunt(target) - taunts = { - "How dare you attack me!?", - "You can not defeat the Empire!", - "You will hang for this!", - "DIE!!" - } +function taunt(target, offence) + -- Only 50% of actual taunting. + if rnd.int(0, 1) == 0 then + return + end + + -- Taunt. + if offence then + taunts = { + "There is no room in this universe for scum like you!", + "The Empire will enjoy your death!", + "Your head will make a fine gift for the Emperor!" + } else + taunts = { + "You dare attack me!" + "You are no match for the Empire!", + "You'll regret this!" + } + end + ai.comm(target, taunts[rnd.int(1, #taunts)]) end