diff --git a/NEWS b/NEWS index 088b70ed9..db8ec5a60 100644 --- a/NEWS +++ b/NEWS @@ -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" diff --git a/scripts/devel/invasion-now.lua b/scripts/devel/invasion-now.lua new file mode 100644 index 000000000..a2b29231f --- /dev/null +++ b/scripts/devel/invasion-now.lua @@ -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