[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>
|
||||
</pilots>
|
||||
</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">
|
||||
<ai>collective</ai>
|
||||
<faction>Collective</faction>
|
||||
@ -89,6 +96,40 @@
|
||||
<pilot chance="50">Drone</pilot>
|
||||
</pilots>
|
||||
</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">
|
||||
<ai>empire</ai>
|
||||
<faction>Empire</faction>
|
||||
|
107
dat/ship.xml
107
dat/ship.xml
@ -307,6 +307,41 @@
|
||||
<outfit quantity="40">Headhunter</outfit>
|
||||
</outfits>
|
||||
</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">
|
||||
<GFX>admonisher</GFX>
|
||||
<GUI>minimal</GUI>
|
||||
@ -445,6 +480,39 @@
|
||||
<outfit quantity="6">Laser Cannon</outfit>
|
||||
</outfits>
|
||||
</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">
|
||||
<GFX target="vendetta">vendetta_pirate</GFX>
|
||||
<GUI>minimal</GUI>
|
||||
@ -485,9 +553,44 @@
|
||||
<sound>engine</sound>
|
||||
<class>1</class>
|
||||
<price>600000</price>
|
||||
<fabricator>House Dvaered</fabricator>
|
||||
<fabricator>House Draktharr</fabricator>
|
||||
<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>
|
||||
<thrust>180</thrust>
|
||||
<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
|
||||
|
||||
function taunt(target)
|
||||
num = rnd.int(0,4)
|
||||
if num == 0 then msg = "How dare you attack me!?"
|
||||
elseif num == 1 then msg = "You can not defeat the Empire!"
|
||||
elseif num == 2 then msg = "You will hang for this!"
|
||||
elseif num == 3 then msg = "DIE!"
|
||||
end
|
||||
if msg then ai.comm(attacker, msg) end
|
||||
taunts = {
|
||||
"How dare you attack me!?",
|
||||
"You can not defeat the Empire!",
|
||||
"You will hang for this!",
|
||||
"DIE!!"
|
||||
}
|
||||
ai.comm(target, taunts[rnd.int(1, #taunts)])
|
||||
end
|
||||
|
||||
function go()
|
||||
|
@ -40,13 +40,12 @@ end
|
||||
-- Required "attacked" function.
|
||||
function attacked(attacker)
|
||||
if ai.taskname() ~= "runaway" then
|
||||
-- Let's have some messages.
|
||||
num = rnd.int(0,3)
|
||||
if num == 0 then msg = "Mayday! We are under attack!"
|
||||
elseif num == 1 then msg = "Requesting assistance! Some scoundral is attacking us!"
|
||||
elseif num == 2 then msg = "Merchant vessle under attack here! HALP!"
|
||||
end
|
||||
if msg then ai.broadcast(msg) end
|
||||
sos = {
|
||||
"Mayday! We are under attack!",
|
||||
"Requesting assistance. We are under attack!",
|
||||
"Merchant vessle here under attack! HALP!"
|
||||
}
|
||||
ai.broadcast(sos[rnd.int(1, #sos)])
|
||||
|
||||
-- So bravely run away!
|
||||
ai.pushtask(0, "runaway", attacker)
|
||||
|
@ -42,13 +42,13 @@ end
|
||||
|
||||
-- Taunts
|
||||
function taunt(target)
|
||||
num = ai.rnd(0,4)
|
||||
if num == 0 then msg = "How dare you attack me!?"
|
||||
elseif num == 1 then msg = "YOU! ARE NOT! PREPARED!!"
|
||||
elseif num == 2 then msg = "Won't You just die already!?"
|
||||
elseif num == 3 then msg = "You won't survive!"
|
||||
end
|
||||
if msg then ai.comm(attacker, msg) end
|
||||
taunts = {
|
||||
"How dare you attack me!?",
|
||||
"YOU! ARE NOT! PREPARED!",
|
||||
"Won't you just die already!?",
|
||||
"You won't survive!"
|
||||
}
|
||||
ai.comm(target, taunts[rnd.int(1, #taunts)])
|
||||
end
|
||||
|
||||
function scan()
|
||||
|
@ -74,13 +74,14 @@ function create()
|
||||
end
|
||||
|
||||
function taunt(target)
|
||||
num = rnd.int(0,4)
|
||||
if num == 0 then msg = "How dare you attack me?!"
|
||||
elseif num == 1 then msg = "Aha! You think you can best ME?!"
|
||||
elseif num == 2 then msg = "JUST! DIE!"
|
||||
elseif num == 3 then msg = "Ohh, You're not going to enjoy this!"
|
||||
end
|
||||
if msg then ai.comm(target, msg) end
|
||||
-- Some taunts.
|
||||
taunts = {
|
||||
"How dare you attack me?!",
|
||||
"Aha! You think you can best me!?",
|
||||
"JUST! DIE!",
|
||||
"Ohh, I'm going to enjoy this!"
|
||||
}
|
||||
ai.comm(target, taunts[rnd.int(1, #taunts)])
|
||||
end
|
||||
|
||||
-- Fly to the player. Pointless until hyperspace is implemented.
|
||||
|
Loading…
Reference in New Issue
Block a user