Fixed a bug in Intervention
https://github.com/OpenRA/OpenRA/pull/5483#issuecomment-44781904 broke the game.
This commit is contained in:
@@ -234,7 +234,7 @@ WorldLoaded = function()
|
|||||||
|
|
||||||
sovietObjective = soviets.AddPrimaryObjective("Destroy the village.")
|
sovietObjective = soviets.AddPrimaryObjective("Destroy the village.")
|
||||||
villageObjective = player.AddPrimaryObjective("Save the village.")
|
villageObjective = player.AddPrimaryObjective("Save the village.")
|
||||||
beachheadObjective = player.AddSecondaryObjective("Get your MCV to the main island.")
|
beachheadObjective = player.AddPrimaryObjective("Get your MCV to the main island.")
|
||||||
|
|
||||||
beachheadTrigger = false
|
beachheadTrigger = false
|
||||||
Trigger.OnExitedFootprint(BeachheadTrigger, function(a, id)
|
Trigger.OnExitedFootprint(BeachheadTrigger, function(a, id)
|
||||||
@@ -244,6 +244,17 @@ WorldLoaded = function()
|
|||||||
player.MarkCompletedObjective(beachheadObjective)
|
player.MarkCompletedObjective(beachheadObjective)
|
||||||
|
|
||||||
captureObjective = player.AddPrimaryObjective("Locate and capture the enemy's Air Force HQ.")
|
captureObjective = player.AddPrimaryObjective("Locate and capture the enemy's Air Force HQ.")
|
||||||
|
|
||||||
|
if AirForceHQ.IsDead then
|
||||||
|
player.MarkFailedObjective(captureObjective)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if AirForceHQ.Owner == player then
|
||||||
|
player.MarkCompletedObjective(captureObjective)
|
||||||
|
player.MarkCompletedObjective(villageObjective)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
Trigger.OnCapture(AirForceHQ, function()
|
Trigger.OnCapture(AirForceHQ, function()
|
||||||
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
||||||
player.MarkCompletedObjective(captureObjective)
|
player.MarkCompletedObjective(captureObjective)
|
||||||
@@ -252,6 +263,8 @@ WorldLoaded = function()
|
|||||||
end)
|
end)
|
||||||
Trigger.OnKilled(AirForceHQ, function() player.MarkFailedObjective(captureObjective) end)
|
Trigger.OnKilled(AirForceHQ, function() player.MarkFailedObjective(captureObjective) end)
|
||||||
|
|
||||||
|
Actor.Create("mainland", true, { Owner = player })
|
||||||
|
|
||||||
Trigger.AfterDelay(BaseFrontAttackInterval, function()
|
Trigger.AfterDelay(BaseFrontAttackInterval, function()
|
||||||
Build(BaseFrontAttackUnits, BaseFrontAttack)
|
Build(BaseFrontAttackUnits, BaseFrontAttack)
|
||||||
ParadropSovietUnits()
|
ParadropSovietUnits()
|
||||||
|
|||||||
@@ -2248,10 +2248,23 @@ Rules:
|
|||||||
E6:
|
E6:
|
||||||
Buildable:
|
Buildable:
|
||||||
Prerequisites: ~disabled
|
Prerequisites: ~disabled
|
||||||
HPAD:
|
TENT:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: anypower, ~structures.allies, ~techlevel.infonly, mainland
|
||||||
|
DOME:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: proc, ~techlevel.medium, mainland
|
||||||
|
WEAP:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: proc, ~techlevel.low, mainland
|
||||||
ProvidesCustomPrerequisite:
|
ProvidesCustomPrerequisite:
|
||||||
Prerequisite: givefix
|
Prerequisite: givefix
|
||||||
WEAP:
|
MAINLAND:
|
||||||
|
Tooltip:
|
||||||
|
Name: Reach the mainland
|
||||||
|
ProvidesCustomPrerequisite:
|
||||||
|
Prerequisite: mainland
|
||||||
|
HPAD:
|
||||||
ProvidesCustomPrerequisite:
|
ProvidesCustomPrerequisite:
|
||||||
Prerequisite: givefix
|
Prerequisite: givefix
|
||||||
FIX:
|
FIX:
|
||||||
|
|||||||
Reference in New Issue
Block a user