Port scripts to new api.
This commit is contained in:
@@ -113,8 +113,8 @@ end
|
||||
|
||||
SetupAlliedUnits = function()
|
||||
Utils.Do(Map.NamedActors, function(a)
|
||||
if a.Owner == allies and a.HasProperty("AcceptsUpgrade") and a.AcceptsUpgrade("unkillable") then
|
||||
a.GrantUpgrade("unkillable")
|
||||
if a.Owner == allies and a.HasProperty("AcceptsCondition") and a.AcceptsCondition("unkillable") then
|
||||
a.GrantCondition("unkillable")
|
||||
a.Stance = "Defend"
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -11,8 +11,6 @@ World:
|
||||
ValuePerUnit: 0
|
||||
LuaScript:
|
||||
Scripts: desert-shellmap.lua
|
||||
ExternalConditions:
|
||||
Conditions: unkillable
|
||||
-StartGameNotification:
|
||||
|
||||
^Vehicle:
|
||||
@@ -23,6 +21,8 @@ World:
|
||||
DamageMultiplier@UNKILLABLE:
|
||||
RequiresCondition: unkillable
|
||||
Modifier: 0
|
||||
ExternalConditions:
|
||||
Conditions: unkillable
|
||||
|
||||
^Tank:
|
||||
GivesBounty:
|
||||
@@ -32,6 +32,8 @@ World:
|
||||
DamageMultiplier@UNKILLABLE:
|
||||
RequiresCondition: unkillable
|
||||
Modifier: 0
|
||||
ExternalConditions:
|
||||
Conditions: unkillable
|
||||
|
||||
^Infantry:
|
||||
GivesBounty:
|
||||
@@ -47,6 +49,8 @@ World:
|
||||
DamageMultiplier@UNKILLABLE:
|
||||
RequiresCondition: unkillable
|
||||
Modifier: 0
|
||||
ExternalConditions:
|
||||
Conditions: unkillable
|
||||
|
||||
^Ship:
|
||||
GivesBounty:
|
||||
@@ -56,6 +60,8 @@ World:
|
||||
DamageMultiplier@UNKILLABLE:
|
||||
RequiresCondition: unkillable
|
||||
Modifier: 0
|
||||
ExternalConditions:
|
||||
Conditions: unkillable
|
||||
|
||||
^Plane:
|
||||
GivesBounty:
|
||||
@@ -63,6 +69,8 @@ World:
|
||||
DamageMultiplier@UNKILLABLE:
|
||||
RequiresCondition: unkillable
|
||||
Modifier: 0
|
||||
ExternalConditions:
|
||||
Conditions: unkillable
|
||||
|
||||
^Building:
|
||||
GivesBounty:
|
||||
@@ -70,6 +78,8 @@ World:
|
||||
DamageMultiplier@UNKILLABLE:
|
||||
RequiresCondition: unkillable
|
||||
Modifier: 0
|
||||
ExternalConditions:
|
||||
Conditions: unkillable
|
||||
|
||||
OILB:
|
||||
CashTrickler:
|
||||
|
||||
@@ -98,7 +98,7 @@ SendUnits = function(entryCell, unitTypes, targetCell, extraData)
|
||||
end)
|
||||
|
||||
if extraData == "IronCurtain" then
|
||||
a.GrantTimedUpgrade("invulnerability", DateTime.Seconds(25))
|
||||
a.GrantCondition("invulnerability", DateTime.Seconds(25))
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -38,8 +38,8 @@ end
|
||||
|
||||
SetupInvulnerability = function()
|
||||
Utils.Do(Map.NamedActors, function(actor)
|
||||
if actor.HasProperty("AcceptsUpgrade") and actor.AcceptsUpgrade("unkillable") then
|
||||
actor.GrantUpgrade("unkillable")
|
||||
if actor.HasProperty("AcceptsCondition") and actor.AcceptsCondition("unkillable") then
|
||||
actor.GrantCondition("unkillable")
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -1436,8 +1436,6 @@ Rules:
|
||||
GlobalLightingPaletteEffect:
|
||||
Blue: 0.7
|
||||
Ambient: 0.7
|
||||
ExternalConditions:
|
||||
Conditions: unkillable
|
||||
HARV:
|
||||
-Targetable:
|
||||
GALITE:
|
||||
@@ -1449,11 +1447,17 @@ Rules:
|
||||
DamageMultiplier@UNKILLABLE:
|
||||
RequiresCondition: unkillable
|
||||
Modifier: 0
|
||||
ExternalConditions:
|
||||
Conditions: unkillable
|
||||
NAOBEL:
|
||||
DamageMultiplier@UNKILLABLE:
|
||||
RequiresCondition: unkillable
|
||||
Modifier: 0
|
||||
ExternalConditions:
|
||||
Conditions: unkillable
|
||||
NALASR:
|
||||
DamageMultiplier@UNKILLABLE:
|
||||
RequiresCondition: unkillable
|
||||
Modifier: 0
|
||||
ExternalConditions:
|
||||
Conditions: unkillable
|
||||
|
||||
Reference in New Issue
Block a user