Warlord¶
A boss fight: the Warlord, a tank with two health phases, its own boss bar and music, who calls in riflemen on foot. Gunships escort it at high heat. It announces itself on the radio with a face of its own. Wrecking it three times earns a paint.
| Mod id | Kind | Files |
|---|---|---|
warlord |
Lua code | 9 |
Copy the whole folder into mods/ in the save folder to try it. Browse it on GitHub.
mod.json¶
{
"id": "warlord",
"title": "Warlord",
"version": "1.0",
"api": 1,
"author": "Taxation Evasion",
"description": "A boss fight: the Warlord, a tank with two health phases, its own boss bar and music, who calls in riflemen on foot. Gunships escort it at high heat. It announces itself on the radio with a face of its own. Wrecking it three times earns a paint.",
"scripts": ["main.lua"]
}
main.lua¶
-- The Warlord's code: everything else about the fight (its health, phases,
-- bar title and music) is in enemies.json. Each wreck counts toward the
-- GUNMETAL paint's contract (counters.json, paints.json).
game.enemy('warlord.warlord', {
-- Each phase calls in a bigger squad of riflemen.
phase = function(s, e, n)
for _ = 1, n + 1 do game.spawn(s, 'warlord.rifleman') end
end,
-- Its wreck goes up and takes nearby units with it.
death = function(s, e)
game.blast(s, e.x, e.y, 60, 120)
game.count(s, 'warlord.warlords_wrecked')
end,
})
announcer.json¶
[
{
"id": "warlord.warlord",
"lines": [
"This is the Warlord speaking.",
"Pull over and pay your taxes."
],
"enemy": "warlord.warlord",
"portrait": "warlord.general",
"priority": 4,
"ttl": 10,
"sound": "army_radio_01",
"volume": 0.6
}
]
counters.json¶
enemies.json¶
[
{
"id": "warlord.rifleman",
"base": "soldier",
"hp": 10,
"spawn": {
"heat": 3,
"every": 30,
"count": 3,
"max_alive": 6
}
},
{
"id": "warlord.gunship",
"base": "helicopter",
"hp": 40,
"spawn": {"heat": 4, "every": 60, "max_alive": 1},
"weapon": {
"every": 2,
"range": 260,
"speed": 200,
"lanes": 2,
"spread": 8
}
},
{
"id": "warlord.warlord",
"base": "tank",
"hp": 400,
"spawn": {"heat": 4, "every": 120},
"boss": {
"title": "THE WARLORD",
"intro": "WARLORD INBOUND",
"music": "mixtape_brute_force",
"phases": [
{
"at": 0.6,
"weapon": {
"every": 1.2,
"range": 240,
"speed": 190,
"lanes": 3,
"spread": 14
}
},
{
"at": 0.25,
"weapon": {
"every": 0.6,
"range": 260,
"speed": 220,
"lanes": 5,
"spread": 12
}
}
]
},
"behavior": "warlord.warlord"
}
]
paints.json¶
[
{
"id": "warlord.gunmetal",
"name": "GUNMETAL",
"rgb": [84, 90, 98],
"group": "COMBAT",
"counter": "warlord.warlords_wrecked",
"target": 3,
"requirement": "Wreck the Warlord 3 times"
}
]
sprites/general_idle.png¶
![]()
sprites/general_talk_a.png¶
![]()
sprites/general_talk_b.png¶
![]()