[Add] Draktharr skins. [Fix] taunt() bug in ai.
This commit is contained in:
parent
7ab1f94196
commit
9c8ab865ab
@ -70,6 +70,13 @@
|
|||||||
<pilot name="Vendetta" chance="100">Pirate Vendetta</pilot>
|
<pilot name="Vendetta" chance="100">Pirate Vendetta</pilot>
|
||||||
</pilots>
|
</pilots>
|
||||||
</fleet>
|
</fleet>
|
||||||
|
<fleet name="Pirate Ancestor">
|
||||||
|
<ai>pirate</ai>
|
||||||
|
<faction>Pirate</faction>
|
||||||
|
<pilots>
|
||||||
|
<pilot name="Ancestor" chance="100">Pirate Ancestor</pilot>
|
||||||
|
</pilots>
|
||||||
|
</fleet>
|
||||||
<fleet name="Collective Drone">
|
<fleet name="Collective Drone">
|
||||||
<ai>collective</ai>
|
<ai>collective</ai>
|
||||||
<faction>Collective</faction>
|
<faction>Collective</faction>
|
||||||
@ -89,6 +96,40 @@
|
|||||||
<pilot chance="50">Drone</pilot>
|
<pilot chance="50">Drone</pilot>
|
||||||
</pilots>
|
</pilots>
|
||||||
</fleet>
|
</fleet>
|
||||||
|
<fleet name="Draktharr Vendetta">
|
||||||
|
<ai>draktharr</ai>
|
||||||
|
<faction>Draktharr</faction>
|
||||||
|
<pilots>
|
||||||
|
<pilot name="Vendetta" chance="100">Draktharr Vendetta</pilot>
|
||||||
|
</pilots>
|
||||||
|
</fleet>
|
||||||
|
<fleet name="Draktharr Ancestor">
|
||||||
|
<ai>draktharr</ai>
|
||||||
|
<faction>Draktharr</faction>
|
||||||
|
<pilots>
|
||||||
|
<pilot name="Ancestor" chance="100">Draktharr Ancestor</pilot>
|
||||||
|
</pilots>
|
||||||
|
</fleet>
|
||||||
|
<fleet name="Draktharr Goddard">
|
||||||
|
<ai>draktharr</ai>
|
||||||
|
<faction>Draktharr</faction>
|
||||||
|
<pilots>
|
||||||
|
<pilot name="Goddard" chance="100">Draktharr Goddard</pilot>
|
||||||
|
<pilot name="Ancestor" chance="80">Draktharr Ancestor</pilot>
|
||||||
|
<pilot name="Ancestor" chance="80">Draktharr Ancestor</pilot>
|
||||||
|
</pilots>
|
||||||
|
</fleet>
|
||||||
|
<fleet name="Draktharr Sml Force">
|
||||||
|
<ai>draktharr</ai>
|
||||||
|
<faction>Draktharr</faction>
|
||||||
|
<pilots>
|
||||||
|
<pilot name="Vendetta" chance="100">Draktharr Vendetta</pilot>
|
||||||
|
<pilot name="Vendetta" chance="80">Draktharr Vendetta</pilot>
|
||||||
|
<pilot name="Ancestor" chance="60">Draktharr Ancestor</pilot>
|
||||||
|
<pilot name="Ancestor" chance="40">Draktharr Ancestor</pilot>
|
||||||
|
<pilot name="Goddard" chance="20">Draktharr Goddard</pilot>
|
||||||
|
</pilots>
|
||||||
|
</fleet>
|
||||||
<fleet name="Empire Lancelot">
|
<fleet name="Empire Lancelot">
|
||||||
<ai>empire</ai>
|
<ai>empire</ai>
|
||||||
<faction>Empire</faction>
|
<faction>Empire</faction>
|
||||||
|
107
dat/ship.xml
107
dat/ship.xml
@ -307,6 +307,41 @@
|
|||||||
<outfit quantity="40">Headhunter</outfit>
|
<outfit quantity="40">Headhunter</outfit>
|
||||||
</outfits>
|
</outfits>
|
||||||
</ship>
|
</ship>
|
||||||
|
<ship name="Draktharr Goddard">
|
||||||
|
<GFX target="goddard">goddard_draktharr</GFX>
|
||||||
|
<GUI>minimal</GUI>
|
||||||
|
<sound>engine</sound>
|
||||||
|
<class>3</class>
|
||||||
|
<price>11500000</price>
|
||||||
|
<fabricator>House Goddard</fabricator>
|
||||||
|
<tech>9999</tech>
|
||||||
|
<description>A Dvaered Goddard.</description>
|
||||||
|
<movement>
|
||||||
|
<thrust>100</thrust>
|
||||||
|
<turn>80</turn>
|
||||||
|
<speed>130</speed>
|
||||||
|
</movement>
|
||||||
|
<health>
|
||||||
|
<shield>800</shield>
|
||||||
|
<armour>500</armour>
|
||||||
|
<energy>2000</energy>
|
||||||
|
<shield_regen>330</shield_regen>
|
||||||
|
<armour_regen>90</armour_regen>
|
||||||
|
<energy_regen>1700</energy_regen>
|
||||||
|
</health>
|
||||||
|
<characteristics>
|
||||||
|
<crew>52</crew>
|
||||||
|
<mass>4350</mass>
|
||||||
|
<fuel>500</fuel>
|
||||||
|
<cap_weapon>250</cap_weapon>
|
||||||
|
<cap_cargo>60</cap_cargo>
|
||||||
|
</characteristics>
|
||||||
|
<outfits>
|
||||||
|
<outfit quantity="4">Laser Turret</outfit>
|
||||||
|
<outfit quantity="2">Missile Launcher</outfit>
|
||||||
|
<outfit quantity="40">Missile</outfit>
|
||||||
|
</outfits>
|
||||||
|
</ship>
|
||||||
<ship name="Admonisher">
|
<ship name="Admonisher">
|
||||||
<GFX>admonisher</GFX>
|
<GFX>admonisher</GFX>
|
||||||
<GUI>minimal</GUI>
|
<GUI>minimal</GUI>
|
||||||
@ -445,6 +480,39 @@
|
|||||||
<outfit quantity="6">Laser Cannon</outfit>
|
<outfit quantity="6">Laser Cannon</outfit>
|
||||||
</outfits>
|
</outfits>
|
||||||
</ship>
|
</ship>
|
||||||
|
<ship name="Draktharr Vendetta">
|
||||||
|
<GFX target="vendetta">vendetta_draktharr</GFX>
|
||||||
|
<GUI>minimal</GUI>
|
||||||
|
<sound>engine</sound>
|
||||||
|
<class>1</class>
|
||||||
|
<price>400000</price>
|
||||||
|
<fabricator>House Draktharr</fabricator>
|
||||||
|
<tech>9999</tech>
|
||||||
|
<description>A Draktharr Vendetta.</description>
|
||||||
|
<movement>
|
||||||
|
<thrust>200</thrust>
|
||||||
|
<turn>125</turn>
|
||||||
|
<speed>180</speed>
|
||||||
|
</movement>
|
||||||
|
<health>
|
||||||
|
<shield>70</shield>
|
||||||
|
<armour>160</armour>
|
||||||
|
<energy>500</energy>
|
||||||
|
<shield_regen>90</shield_regen>
|
||||||
|
<armour_regen>30</armour_regen>
|
||||||
|
<energy_regen>600</energy_regen>
|
||||||
|
</health>
|
||||||
|
<characteristics>
|
||||||
|
<crew>4</crew>
|
||||||
|
<mass>67</mass>
|
||||||
|
<fuel>300</fuel>
|
||||||
|
<cap_weapon>60</cap_weapon>
|
||||||
|
<cap_cargo>5</cap_cargo>
|
||||||
|
</characteristics>
|
||||||
|
<outfits>
|
||||||
|
<outfit quantity="6">Laser Cannon</outfit>
|
||||||
|
</outfits>
|
||||||
|
</ship>
|
||||||
<ship name="Pirate Vendetta">
|
<ship name="Pirate Vendetta">
|
||||||
<GFX target="vendetta">vendetta_pirate</GFX>
|
<GFX target="vendetta">vendetta_pirate</GFX>
|
||||||
<GUI>minimal</GUI>
|
<GUI>minimal</GUI>
|
||||||
@ -485,9 +553,44 @@
|
|||||||
<sound>engine</sound>
|
<sound>engine</sound>
|
||||||
<class>1</class>
|
<class>1</class>
|
||||||
<price>600000</price>
|
<price>600000</price>
|
||||||
<fabricator>House Dvaered</fabricator>
|
<fabricator>House Draktharr</fabricator>
|
||||||
<tech>9</tech>
|
<tech>9</tech>
|
||||||
<description>Commonly referred to as the little Goddard, the Ancestor also has it's roots in the primitive flying machines used by men many ages ago. Unlike the Goddard though, the electronics are done by House Dvaered, making it considerably inferior in that area.</description>
|
<description>Commonly referred to as the little Goddard, the Ancestor also has it's roots in the primitive flying machines used by men many ages ago. Unlike the Goddard though, the electronics are done by House Draktharr, making it considerably inferior in that area.</description>
|
||||||
|
<movement>
|
||||||
|
<thrust>180</thrust>
|
||||||
|
<turn>105</turn>
|
||||||
|
<speed>220</speed>
|
||||||
|
</movement>
|
||||||
|
<health>
|
||||||
|
<shield>100</shield>
|
||||||
|
<armour>190</armour>
|
||||||
|
<energy>600</energy>
|
||||||
|
<shield_regen>90</shield_regen>
|
||||||
|
<armour_regen>30</armour_regen>
|
||||||
|
<energy_regen>700</energy_regen>
|
||||||
|
</health>
|
||||||
|
<characteristics>
|
||||||
|
<crew>6</crew>
|
||||||
|
<mass>80</mass>
|
||||||
|
<fuel>300</fuel>
|
||||||
|
<cap_weapon>80</cap_weapon>
|
||||||
|
<cap_cargo>10</cap_cargo>
|
||||||
|
</characteristics>
|
||||||
|
<outfits>
|
||||||
|
<outfit quantity="3">Laser Cannon</outfit>
|
||||||
|
<outfit quantity="1">Missile Launcher</outfit>
|
||||||
|
<outfit quantity="8">Missile</outfit>
|
||||||
|
</outfits>
|
||||||
|
</ship>
|
||||||
|
<ship name="Draktharr Ancestor">
|
||||||
|
<GFX target="ancestor">ancestor_draktharr</GFX>
|
||||||
|
<GUI>minimal</GUI>
|
||||||
|
<sound>engine</sound>
|
||||||
|
<class>1</class>
|
||||||
|
<price>600000</price>
|
||||||
|
<fabricator>House Draktharr</fabricator>
|
||||||
|
<tech>9999</tech>
|
||||||
|
<description>A Draktharr Ancestor.</description>
|
||||||
<movement>
|
<movement>
|
||||||
<thrust>180</thrust>
|
<thrust>180</thrust>
|
||||||
<turn>105</turn>
|
<turn>105</turn>
|
||||||
|
BIN
gfx/ship/ancestor.png
Normal file
BIN
gfx/ship/ancestor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 306 KiB |
BIN
gfx/ship/ancestor_draktharr.png
Normal file
BIN
gfx/ship/ancestor_draktharr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 293 KiB |
BIN
gfx/ship/ancestor_pirate.png
Normal file
BIN
gfx/ship/ancestor_pirate.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 297 KiB |
BIN
gfx/ship/ancestor_target.png
Normal file
BIN
gfx/ship/ancestor_target.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
BIN
gfx/ship/goddard_draktharr.png
Normal file
BIN
gfx/ship/goddard_draktharr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 513 KiB |
BIN
gfx/ship/vendetta_draktharr.png
Normal file
BIN
gfx/ship/vendetta_draktharr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 256 KiB |
80
scripts/ai/draktharr.lua
Normal file
80
scripts/ai/draktharr.lua
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
include("../scripts/ai/include/basic.lua")
|
||||||
|
|
||||||
|
-- Required control rate
|
||||||
|
control_rate = 2
|
||||||
|
|
||||||
|
-- Required "control" function.
|
||||||
|
function control()
|
||||||
|
task = ai.taskname()
|
||||||
|
|
||||||
|
enemy = ai.getenemy()
|
||||||
|
if task ~= "attack" and enemy ~= nil then
|
||||||
|
ai.hostile(enemy)
|
||||||
|
ai.pushtask(0, "attack", enemy)
|
||||||
|
elseif task == "none" then
|
||||||
|
planet = ai.landplanet()
|
||||||
|
-- Planet needs to exist..
|
||||||
|
if planet == nil then
|
||||||
|
ai.pushtask(0, "hyperspace")
|
||||||
|
else
|
||||||
|
ai.pushtask(0, "go", planet)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function attacked(attacker)
|
||||||
|
task = ai.taskname()
|
||||||
|
if task ~= "attack" and task ~= "runaway" then
|
||||||
|
taunt(attacker)
|
||||||
|
|
||||||
|
ai.pushtask(0, "attack", attacker)
|
||||||
|
elseif task == "attack" then
|
||||||
|
if ai.targetid() ~= attacker then
|
||||||
|
ai.pushtask(0, "attack", attacker)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function create()
|
||||||
|
ai.setcredits(rnd.int(1000, ai.shipprice()/100))
|
||||||
|
end
|
||||||
|
|
||||||
|
function taunt(target)
|
||||||
|
taunts = {
|
||||||
|
"Prepare for annihilation!",
|
||||||
|
"I shall wash my hull with your blood!",
|
||||||
|
"Your head will make a great trophy!"
|
||||||
|
}
|
||||||
|
ai.comm(target, taunts[rnd.int(1, #taunts)])
|
||||||
|
end
|
||||||
|
|
||||||
|
function go()
|
||||||
|
target = ai.target()
|
||||||
|
dir = ai.face(target)
|
||||||
|
dist = ai.dist(target)
|
||||||
|
bdist = ai.minbrakedist()
|
||||||
|
if dir < 10 and dist > bdist then
|
||||||
|
ai.accel()
|
||||||
|
elseif dir < 10 and dist < bdist then
|
||||||
|
ai.poptask()
|
||||||
|
ai.pushtask(0, "stop")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function stop()
|
||||||
|
if ai.isstopped() then
|
||||||
|
ai.stop()
|
||||||
|
ai.poptask()
|
||||||
|
ai.settimer(0, rnd.int(8000, 15000))
|
||||||
|
ai.pushtask(0, "land")
|
||||||
|
else
|
||||||
|
ai.brake()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function land()
|
||||||
|
if ai.timeup(0) then
|
||||||
|
ai.pushtask(0, "hyperspace")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -45,13 +45,13 @@ function create()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function taunt(target)
|
function taunt(target)
|
||||||
num = rnd.int(0,4)
|
taunts = {
|
||||||
if num == 0 then msg = "How dare you attack me!?"
|
"How dare you attack me!?",
|
||||||
elseif num == 1 then msg = "You can not defeat the Empire!"
|
"You can not defeat the Empire!",
|
||||||
elseif num == 2 then msg = "You will hang for this!"
|
"You will hang for this!",
|
||||||
elseif num == 3 then msg = "DIE!"
|
"DIE!!"
|
||||||
end
|
}
|
||||||
if msg then ai.comm(attacker, msg) end
|
ai.comm(target, taunts[rnd.int(1, #taunts)])
|
||||||
end
|
end
|
||||||
|
|
||||||
function go()
|
function go()
|
||||||
|
@ -40,13 +40,12 @@ end
|
|||||||
-- Required "attacked" function.
|
-- Required "attacked" function.
|
||||||
function attacked(attacker)
|
function attacked(attacker)
|
||||||
if ai.taskname() ~= "runaway" then
|
if ai.taskname() ~= "runaway" then
|
||||||
-- Let's have some messages.
|
sos = {
|
||||||
num = rnd.int(0,3)
|
"Mayday! We are under attack!",
|
||||||
if num == 0 then msg = "Mayday! We are under attack!"
|
"Requesting assistance. We are under attack!",
|
||||||
elseif num == 1 then msg = "Requesting assistance! Some scoundral is attacking us!"
|
"Merchant vessle here under attack! HALP!"
|
||||||
elseif num == 2 then msg = "Merchant vessle under attack here! HALP!"
|
}
|
||||||
end
|
ai.broadcast(sos[rnd.int(1, #sos)])
|
||||||
if msg then ai.broadcast(msg) end
|
|
||||||
|
|
||||||
-- So bravely run away!
|
-- So bravely run away!
|
||||||
ai.pushtask(0, "runaway", attacker)
|
ai.pushtask(0, "runaway", attacker)
|
||||||
|
@ -42,13 +42,13 @@ end
|
|||||||
|
|
||||||
-- Taunts
|
-- Taunts
|
||||||
function taunt(target)
|
function taunt(target)
|
||||||
num = ai.rnd(0,4)
|
taunts = {
|
||||||
if num == 0 then msg = "How dare you attack me!?"
|
"How dare you attack me!?",
|
||||||
elseif num == 1 then msg = "YOU! ARE NOT! PREPARED!!"
|
"YOU! ARE NOT! PREPARED!",
|
||||||
elseif num == 2 then msg = "Won't You just die already!?"
|
"Won't you just die already!?",
|
||||||
elseif num == 3 then msg = "You won't survive!"
|
"You won't survive!"
|
||||||
end
|
}
|
||||||
if msg then ai.comm(attacker, msg) end
|
ai.comm(target, taunts[rnd.int(1, #taunts)])
|
||||||
end
|
end
|
||||||
|
|
||||||
function scan()
|
function scan()
|
||||||
|
@ -74,13 +74,14 @@ function create()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function taunt(target)
|
function taunt(target)
|
||||||
num = rnd.int(0,4)
|
-- Some taunts.
|
||||||
if num == 0 then msg = "How dare you attack me?!"
|
taunts = {
|
||||||
elseif num == 1 then msg = "Aha! You think you can best ME?!"
|
"How dare you attack me?!",
|
||||||
elseif num == 2 then msg = "JUST! DIE!"
|
"Aha! You think you can best me!?",
|
||||||
elseif num == 3 then msg = "Ohh, You're not going to enjoy this!"
|
"JUST! DIE!",
|
||||||
end
|
"Ohh, I'm going to enjoy this!"
|
||||||
if msg then ai.comm(target, msg) end
|
}
|
||||||
|
ai.comm(target, taunts[rnd.int(1, #taunts)])
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Fly to the player. Pointless until hyperspace is implemented.
|
-- Fly to the player. Pointless until hyperspace is implemented.
|
||||||
|
Loading…
Reference in New Issue
Block a user