Add support for sending Iron Curtained units on Fort Lonestar

This commit is contained in:
abcdefg30
2015-12-19 15:55:50 +01:00
parent 7092e81f2d
commit fff67d3348
2 changed files with 16 additions and 1 deletions

View File

@@ -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)

View File

@@ -524,6 +524,8 @@ Rules:
Type: LightningStrike
LuaScript:
Scripts: fort-lonestar.lua
ScriptUpgradesCache:
Upgrades: invulnerability
FORTCRATE:
Inherits: ^Crate
SupportPowerCrateAction@parabombs: