Add support for sending Iron Curtained units on Fort Lonestar
This commit is contained in:
@@ -29,7 +29,7 @@ Waves =
|
||||
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Boss } }
|
||||
}
|
||||
|
||||
SendUnits = function(entryCell, unitTypes, targetCell)
|
||||
SendUnits = function(entryCell, unitTypes, targetCell, extraData)
|
||||
Reinforcements.Reinforce(soviets, unitTypes, { entryCell }, 40, function(a)
|
||||
if not a.HasProperty("AttackMove") then
|
||||
Trigger.OnIdle(a, function(a)
|
||||
@@ -45,6 +45,10 @@ SendUnits = function(entryCell, unitTypes, targetCell)
|
||||
a.Hunt()
|
||||
end
|
||||
end)
|
||||
|
||||
if extraData == "IronCurtain" then
|
||||
a.GrantTimedUpgrade("invulnerability", DateTime.Seconds(25))
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -60,6 +64,15 @@ SendWave = function()
|
||||
SendUnits(entry, units, target)
|
||||
end)
|
||||
|
||||
if wave.ironUnits then
|
||||
Utils.Do(wave.ironUnits, function(units)
|
||||
local entry = Utils.Random(SovietEntryPoints).Location
|
||||
local target = Utils.Random(SpawnPoints).Location
|
||||
|
||||
SendUnits(entry, units, target, "IronCurtain")
|
||||
end)
|
||||
end
|
||||
|
||||
Utils.Do(players, function(player)
|
||||
Media.PlaySpeechNotification(player, "EnemyUnitsApproaching")
|
||||
end)
|
||||
|
||||
@@ -524,6 +524,8 @@ Rules:
|
||||
Type: LightningStrike
|
||||
LuaScript:
|
||||
Scripts: fort-lonestar.lua
|
||||
ScriptUpgradesCache:
|
||||
Upgrades: invulnerability
|
||||
FORTCRATE:
|
||||
Inherits: ^Crate
|
||||
SupportPowerCrateAction@parabombs:
|
||||
|
||||
Reference in New Issue
Block a user