Fixed a bug in Intervention

https://github.com/OpenRA/OpenRA/pull/5483#issuecomment-44781904
broke the game.
This commit is contained in:
abcdefg30
2014-11-19 18:09:12 +01:00
parent 19713a19f6
commit 71fa6b2aed
2 changed files with 29 additions and 3 deletions

View File

@@ -234,7 +234,7 @@ WorldLoaded = function()
sovietObjective = soviets.AddPrimaryObjective("Destroy 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
Trigger.OnExitedFootprint(BeachheadTrigger, function(a, id)
@@ -244,6 +244,17 @@ WorldLoaded = function()
player.MarkCompletedObjective(beachheadObjective)
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.AfterDelay(DateTime.Seconds(3), function()
player.MarkCompletedObjective(captureObjective)
@@ -252,6 +263,8 @@ WorldLoaded = function()
end)
Trigger.OnKilled(AirForceHQ, function() player.MarkFailedObjective(captureObjective) end)
Actor.Create("mainland", true, { Owner = player })
Trigger.AfterDelay(BaseFrontAttackInterval, function()
Build(BaseFrontAttackUnits, BaseFrontAttack)
ParadropSovietUnits()

View File

@@ -2248,10 +2248,23 @@ Rules:
E6:
Buildable:
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:
Prerequisite: givefix
WEAP:
MAINLAND:
Tooltip:
Name: Reach the mainland
ProvidesCustomPrerequisite:
Prerequisite: mainland
HPAD:
ProvidesCustomPrerequisite:
Prerequisite: givefix
FIX: