invasion-now: script to trigger invasions.

develop
expwnent 2013-05-31 15:53:37 -04:00
parent 909d686ae4
commit 5c827beae0
2 changed files with 19 additions and 0 deletions

@ -10,6 +10,7 @@ DFHack future
- locate_ore: scan the map for unmined ore veins
- multicmd: run a sequence of dfhack commands, separated by ';'
- autobutcher: A GUI front-end for the autobutcher plugin.
- invasionNow: trigger an invasion, or many
Misc improvements:
- exterminate: renamed from slayrace, add help message, add butcher mode
- ruby: add df.dfhack_run "somecommand"

@ -0,0 +1,18 @@
-- invasion-now civ_id delay : schedules an invasion in the near future
args = {...}
num = tonumber(args[1])
if ( num ~= nil ) then
time = tonumber(args[2]) or 1
time2 = tonumber(args[3]) or time
for i = time,time2 do
df.global.timed_events:insert('#',{
new = df.timed_event,
type = df.timed_event_type.CivAttack,
season = df.global.cur_season,
season_ticks = df.global.cur_season_tick+i,
entity = df.historical_entity.find(num)
})
end
end