Initial commit: OpenRA game engine
Some checks failed
Continuous Integration / Linux (.NET 8.0) (push) Has been cancelled
Continuous Integration / Windows (.NET 8.0) (push) Has been cancelled

Fork from OpenRA/OpenRA with one-click launch script (start-ra.cmd)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
let5sne.win10
2026-01-10 21:46:54 +08:00
commit 9cf6ebb986
4065 changed files with 635973 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,5 @@
## rules.yaml
briefing =
The Starport must be protected. All other efforts are secondary. No House will be allowed to interfere with the arrival of our Ixian weaponry.
Once we possess this illegal technology, we will confuse and crush our opponents. Until then, survive.

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

View File

@@ -0,0 +1,582 @@
MapFormat: 12
RequiresMod: d2k
Title: Ordos 06a
Author: Westwood Studios
Tileset: ARRAKIS
MapSize: 84,84
Bounds: 2,2,80,80
Visibility: MissionSelector
Categories: Campaign
LockPreview: True
Players:
PlayerReference@Neutral:
Name: Neutral
OwnsWorld: True
NonCombatant: True
Faction: Random
PlayerReference@Creeps:
Name: Creeps
NonCombatant: True
Faction: Random
Enemies: Atreides, Ordos, Harkonnen
PlayerReference@Ordos:
Name: Ordos
Playable: True
LockFaction: True
Faction: ordos
LockColor: True
Color: 5A9473
Enemies: Atreides, Harkonnen, Creeps
PlayerReference@Atreides:
Name: Atreides
Bot: campaign
LockFaction: True
Faction: atreides
LockColor: True
Color: 5A7394
Allies: Harkonnen
Enemies: Ordos, Creeps
PlayerReference@Harkonnen:
Name: Harkonnen
Bot: campaign
LockFaction: True
Faction: harkonnen
LockColor: True
Color: D64A42
Allies: Atreides
Enemies: Ordos, Creeps
Actors:
Actor0: wall
Location: 65,2
Owner: Ordos
AHeavyFactory: heavy_factory
Location: 3,3
Owner: Atreides
AConyard: construction_yard
Location: 8,3
Owner: Atreides
APower1: wind_trap
Location: 11,3
Owner: Atreides
APower2: wind_trap
Location: 13,3
Owner: Atreides
ALightFactory: light_factory
Location: 16,3
Owner: Atreides
Actor6: wall
Location: 65,3
Owner: Ordos
OOutpost: outpost
Location: 66,3
Owner: Ordos
OPower1: wind_trap
Location: 72,3
Owner: Ordos
OPower2: wind_trap
Location: 74,3
Owner: Ordos
OConyard: construction_yard
Location: 76,3
Owner: Ordos
OBarracks: barracks
Location: 79,3
Owner: Ordos
Actor12: wall
Location: 65,4
Owner: Ordos
ARock1: large_gun_turret
Location: 20,5
Facing: 640
Owner: Atreides
Actor14: wall
Location: 65,5
Owner: Ordos
Actor15: combat_tank_a
Location: 13,6
Owner: Atreides
Actor16: wall
Location: 65,6
Owner: Ordos
APower3: wind_trap
Location: 7,7
Owner: Atreides
APower4: wind_trap
Location: 9,7
Owner: Atreides
APower5: wind_trap
Location: 11,7
Owner: Atreides
APower6: wind_trap
Location: 13,7
Owner: Atreides
APower7: wind_trap
Location: 15,7
Owner: Atreides
Actor22: wall
Location: 65,7
Owner: Ordos
Actor23: trooper
Location: 4,8
Owner: Atreides
Actor24: wall
Location: 65,8
Owner: Ordos
Actor25: wall
Location: 66,8
Owner: Ordos
Actor26: wall
Location: 67,8
Owner: Ordos
Actor27: wall
Location: 68,8
Owner: Ordos
Actor28: wall
Location: 69,8
Owner: Ordos
Actor29: wall
Location: 70,8
Owner: Ordos
ABarracks: barracks
Location: 2,9
Owner: Atreides
Actor31: wall
Location: 70,9
Owner: Ordos
Actor32: wall
Location: 79,9
Owner: Ordos
Actor33: wall
Location: 80,9
Owner: Ordos
Actor34: wall
Location: 81,9
Owner: Ordos
APower8: wind_trap
Location: 10,10
Owner: Atreides
Actor36: wall
Location: 70,10
Owner: Ordos
Actor37: wall
Location: 79,10
Owner: Ordos
AResearch: research_centre
Location: 5,11
Owner: Atreides
Actor39: wall
Location: 70,11
Owner: Ordos
Actor40: wall
Location: 79,11
Owner: Ordos
APower9: wind_trap
Location: 2,12
Owner: Atreides
Actor42: combat_tank_a
Location: 8,12
Owner: Atreides
ARepair: repair_pad
Location: 13,12
Owner: Atreides
ARock2: large_gun_turret
Location: 16,12
Facing: 640
Owner: Atreides
Actor45: wall
Location: 70,12
Owner: Ordos
OGunt1: medium_gun_turret
Location: 71,12
Owner: Ordos
OGunt2: medium_gun_turret
Location: 78,12
Owner: Ordos
Actor48: wall
Location: 79,12
Owner: Ordos
APower10: wind_trap
Location: 2,15
Owner: Atreides
APower11: wind_trap
Location: 4,15
Owner: Atreides
APower12: wind_trap
Location: 6,15
Owner: Atreides
Actor52: combat_tank_a
Location: 11,17
Owner: Atreides
Actor53: combat_tank_a
Location: 8,18
Owner: Atreides
Actor54: wall
Location: 10,19
Owner: Atreides
Actor55: wall
Location: 11,19
Owner: Atreides
ARefinery: refinery
Location: 2,20
Owner: Atreides
Actor57: wall
Location: 10,20
Owner: Atreides
Actor58: combat_tank_a
Location: 6,21
Owner: Atreides
Actor59: wall
Location: 10,21
Owner: Atreides
Actor60: spicebloom.spawnpoint
Location: 38,21
Owner: Neutral
Actor61: wall
Location: 10,22
Owner: Atreides
Actor62: carryall
Location: 4,23
Owner: Atreides
Actor63: harvester
Location: 5,23
Owner: Atreides
ARock3: large_gun_turret
Location: 10,23
Facing: 768
Owner: Atreides
Actor65: wall
Location: 11,23
Owner: Atreides
AGunt1: medium_gun_turret
Location: 12,23
Facing: 768
Owner: Atreides
Actor67: wormspawner
Location: 26,23
Owner: Creeps
Actor68: siege_tank
Location: 5,24
Owner: Atreides
Actor69: spicebloom.spawnpoint
Location: 67,24
Owner: Neutral
Actor70: wall
Location: 2,25
Owner: Atreides
Actor71: wall
Location: 3,25
Owner: Atreides
Actor72: wall
Location: 4,25
Owner: Atreides
Actor73: wall
Location: 5,25
Owner: Atreides
Actor74: wall
Location: 6,25
Owner: Atreides
ARock4: large_gun_turret
Location: 7,25
Owner: Atreides
Actor76: wall
Location: 7,26
Owner: Atreides
AGunt2: medium_gun_turret
Location: 7,27
Owner: Atreides
Actor78: spicebloom.spawnpoint
Location: 76,30
Owner: Neutral
Actor79: spicebloom.spawnpoint
Location: 32,33
Owner: Neutral
Actor80: spicebloom.spawnpoint
Location: 56,33
Owner: Neutral
Actor81: spicebloom.spawnpoint
Location: 7,37
Owner: Neutral
Actor82: spicebloom.spawnpoint
Location: 44,48
Owner: Neutral
Actor83: spicebloom.spawnpoint
Location: 77,48
Owner: Neutral
Actor84: trooper
Location: 78,50
Owner: Ordos
Actor85: trooper
Location: 76,53
Owner: Ordos
Actor86: trooper
Location: 77,53
Owner: Ordos
OStarport: starport
Location: 79,53
Owner: Ordos
Actor88: trooper
Location: 77,55
Owner: Ordos
Actor89: raider
Location: 78,56
Owner: Ordos
HGunt1: medium_gun_turret
Location: 30,57
Facing: 0
Owner: Harkonnen
HGunt2: medium_gun_turret
Location: 34,57
Facing: 0
Owner: Harkonnen
Actor92: wall
Location: 30,58
Owner: Harkonnen
Actor93: combat_tank_h
Location: 32,58
Owner: Harkonnen
Actor94: wall
Location: 34,58
Owner: Harkonnen
Actor95: wall
Location: 30,59
Owner: Harkonnen
Actor96: trooper
Location: 33,59
Owner: Harkonnen
Actor97: wall
Location: 34,59
Owner: Harkonnen
Actor98: wall
Location: 30,60
Owner: Harkonnen
Actor99: trooper
Location: 31,60
Owner: Harkonnen
Actor100: wall
Location: 34,60
Owner: Harkonnen
Actor101: wall
Location: 29,61
Owner: Harkonnen
Actor102: wall
Location: 30,61
Owner: Harkonnen
Actor103: wall
Location: 34,61
Owner: Harkonnen
Actor104: wall
Location: 35,61
Owner: Harkonnen
Actor105: wall
Location: 29,62
Owner: Harkonnen
Actor106: wall
Location: 35,62
Owner: Harkonnen
Actor107: wall
Location: 29,63
Owner: Harkonnen
Actor108: wall
Location: 35,63
Owner: Harkonnen
Actor109: wall
Location: 36,63
Owner: Harkonnen
Actor110: wall
Location: 37,63
Owner: Harkonnen
Actor111: harvester
Location: 31,65
Owner: Harkonnen
HSilo1: silo
Location: 35,65
Owner: Harkonnen
Actor113: carryall
Location: 32,66
Owner: Harkonnen
HSilo2: silo
Location: 35,66
Owner: Harkonnen
HRefinery: refinery
Location: 30,67
Owner: Harkonnen
HSilo3: silo
Location: 35,67
Owner: Harkonnen
Actor117: spicebloom.spawnpoint
Location: 22,68
Owner: Neutral
HOutpost: outpost
Location: 35,70
Owner: Harkonnen
HPower1: wind_trap
Location: 31,71
Owner: Harkonnen
HPower2: wind_trap
Location: 34,73
Owner: Harkonnen
HPower3: wind_trap
Location: 36,73
Owner: Harkonnen
HPower4: wind_trap
Location: 38,73
Owner: Harkonnen
Actor123: wall
Location: 24,74
Owner: Harkonnen
HPower5: wind_trap
Location: 26,74
Owner: Harkonnen
HPower6: wind_trap
Location: 28,74
Owner: Harkonnen
HPower7: wind_trap
Location: 30,74
Owner: Harkonnen
Actor127: wall
Location: 24,75
Owner: Harkonnen
Actor128: spicebloom.spawnpoint
Location: 58,75
Owner: Neutral
HGunt3: medium_gun_turret
Location: 19,76
Facing: 128
Owner: Harkonnen
Actor130: wall
Location: 20,76
Owner: Harkonnen
Actor131: wall
Location: 21,76
Owner: Harkonnen
Actor132: wall
Location: 22,76
Owner: Harkonnen
Actor133: wall
Location: 23,76
Owner: Harkonnen
Actor134: wall
Location: 24,76
Owner: Harkonnen
Actor135: wall
Location: 19,77
Owner: Harkonnen
HHeavyFactory: heavy_factory
Location: 33,77
Owner: Harkonnen
HRock: large_gun_turret
Location: 38,77
Facing: 768
Owner: Harkonnen
HPower8: wind_trap
Location: 23,78
Owner: Harkonnen
HConyard: construction_yard
Location: 25,78
Owner: Harkonnen
HPower9: wind_trap
Location: 28,78
Owner: Harkonnen
HPower10: wind_trap
Location: 30,78
Owner: Harkonnen
Actor142: combat_tank_h
Location: 20,79
Owner: Harkonnen
HBarracks: barracks
Location: 36,79
Owner: Harkonnen
HGunt4: medium_gun_turret
Location: 19,80
Facing: 256
Owner: Harkonnen
Actor145: wall
Location: 39,80
Owner: Harkonnen
Actor146: wall
Location: 19,81
Owner: Harkonnen
Actor147: wall
Location: 39,81
Owner: Harkonnen
AtreidesRally1: waypoint
Owner: Neutral
Location: 8,22
AtreidesEntry1: waypoint
Owner: Neutral
Location: 2,22
HarkonnenRally1: waypoint
Owner: Neutral
Location: 32,64
HarkonnenEntry1: waypoint
Owner: Neutral
Location: 32,81
AtreidesRally2: waypoint
Owner: Neutral
Location: 77,76
AtreidesEntry2: waypoint
Owner: Neutral
Location: 77,81
AtreidesRally3: waypoint
Owner: Neutral
Location: 36,34
AtreidesEntry3: waypoint
Owner: Neutral
Location: 36,2
AtreidesRally4: waypoint
Owner: Neutral
Location: 68,41
AtreidesEntry4: waypoint
Owner: Neutral
Location: 81,41
HarkonnenRally2: waypoint
Owner: Neutral
Location: 44,59
HarkonnenEntry2: waypoint
Owner: Neutral
Location: 44,81
HarkonnenRally3: waypoint
Owner: Neutral
Location: 77,77
HarkonnenEntry3: waypoint
Owner: Neutral
Location: 81,77
HarkonnenRally4: waypoint
Owner: Neutral
Location: 56,50
HarkonnenEntry4: waypoint
Owner: Neutral
Location: 56,81
HarkonnenRally5: waypoint
Owner: Neutral
Location: 54,41
HarkonnenEntry5: waypoint
Owner: Neutral
Location: 81,41
HarkonnenRally6: waypoint
Owner: Neutral
Location: 52,33
HarkonnenEntry6: waypoint
Owner: Neutral
Location: 81,33
HarkonnenRally7: waypoint
Owner: Neutral
Location: 34,26
HarkonnenEntry7: waypoint
Owner: Neutral
Location: 34,2
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
FluentMessages: d2k|fluent/lua.ftl, d2k|fluent/campaign.ftl, map.ftl

View File

@@ -0,0 +1,54 @@
--[[
Copyright (c) The OpenRA Developers and Contributors
This file is part of OpenRA, which is free software. It is made
available to you under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version. For more
information, see COPYING.
]]
AttackGroupSize =
{
easy = 6,
normal = 8,
hard = 10
}
ProductionDelays =
{
easy = { DateTime.Seconds(16), DateTime.Seconds(30) },
normal = { DateTime.Seconds(2), DateTime.Seconds(5) },
hard = { DateTime.Seconds(1), DateTime.Seconds(3) }
}
EnemyInfantryTypes = { "light_inf", "light_inf", "light_inf", "trooper", "trooper" }
EnemyVehicleTypes = { "trike", "trike", "quad" }
AtreidesTankTypes = { "combat_tank_a", "siege_tank", "missile_tank" }
HarkonnenTankTypes = { "combat_tank_h", "siege_tank" }
InitAIUnits = function(house)
LastHarvesterEaten[house] = true
IdlingUnits[house] = Reinforcements.Reinforce(house, InitialReinforcements[house.InternalName], InitialReinforcementsPaths[house.InternalName])
DefendAndRepairBase(house, Base[house.InternalName], 0.75, AttackGroupSize[Difficulty])
end
ActivateAI = function()
InitAIUnits(Atreides)
InitAIUnits(Harkonnen)
local delay = function() return Utils.RandomInteger(ProductionDelays[Difficulty][1], ProductionDelays[Difficulty][2] + 1) end
local infantryToBuild = function() return { Utils.Random(EnemyInfantryTypes) } end
local vehiclesToBuild = function() return { Utils.Random(EnemyVehicleTypes) } end
local tanksToBuildAtreides = function() return { Utils.Random(AtreidesTankTypes) } end
local tanksToBuildHarkonnen = function() return { Utils.Random(HarkonnenTankTypes) } end
local attackTresholdSize = AttackGroupSize[Difficulty] * 2.5
ProduceUnits(Atreides, ABarracks, delay, infantryToBuild, AttackGroupSize[Difficulty], attackTresholdSize)
ProduceUnits(Atreides, ALightFactory, delay, vehiclesToBuild, AttackGroupSize[Difficulty], attackTresholdSize)
ProduceUnits(Atreides, AHeavyFactory, delay, tanksToBuildAtreides, AttackGroupSize[Difficulty], attackTresholdSize)
ProduceUnits(Harkonnen, HBarracks, delay, infantryToBuild, AttackGroupSize[Difficulty], attackTresholdSize)
ProduceUnits(Harkonnen, HHeavyFactory, delay, tanksToBuildHarkonnen, AttackGroupSize[Difficulty], attackTresholdSize)
end

View File

@@ -0,0 +1,278 @@
--[[
Copyright (c) The OpenRA Developers and Contributors
This file is part of OpenRA, which is free software. It is made
available to you under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version. For more
information, see COPYING.
]]
Base =
{
Atreides = { AConyard, APower1, APower2, APower3, APower4, APower5, APower6, APower7, APower8, APower9, APower10, APower11, APower12, ABarracks, ARefinery, ALightFactory, AHeavyFactory, ARepair, AResearch, AGunt1, AGunt2, ARock1, ARock2, ARock3, ARock4 },
Harkonnen = { HConyard, HPower1, HPower2, HPower3, HPower4, HPower5, HPower6, HPower7, HPower8, HPower9, HPower10, HBarracks, HRefinery, HOutpost, HHeavyFactory, HGunt1, HGunt2, HGunt3, HGunt4, HRock, HSilo1, HSilo2, HSilo3 }
}
AtreidesReinforcements =
{
easy =
{
{ "light_inf", "light_inf", "light_inf", "trooper", "trooper" },
{ "quad", "quad", "combat_tank_a" },
{ "light_inf", "light_inf", "light_inf", "trooper", "trooper", "quad", "quad" }
},
normal =
{
{ "light_inf", "light_inf", "light_inf", "trooper", "trooper", "quad", "quad" },
{ "quad", "quad", "combat_tank_a", "combat_tank_a" },
{ "light_inf", "light_inf", "light_inf", "trooper", "trooper", "quad", "quad", "quad" },
{ "combat_tank_a", "combat_tank_a", "combat_tank_a" }
},
hard =
{
{ "light_inf", "light_inf", "light_inf", "trooper", "trooper", "trooper", "quad", "quad" },
{ "quad", "quad", "quad", "combat_tank_a", "combat_tank_a" },
{ "light_inf", "light_inf", "light_inf", "trooper", "trooper", "quad", "quad", "quad", "quad" },
{ "combat_tank_a", "combat_tank_a", "combat_tank_a", "quad" },
{ "combat_tank_a", "combat_tank_a", "missile_tank", "siege_tank" }
}
}
HarkonnenReinforcements =
{
easy =
{
{ "quad", "trike", "trike" },
{ "light_inf", "light_inf", "light_inf", "trooper", "trooper" },
{ "combat_tank_h", "quad" },
{ "trooper", "trooper", "trooper", "trooper", "trooper" }
},
normal =
{
{ "combat_tank_h", "combat_tank_h", "trike", "trike" },
{ "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "trooper", "trooper" },
{ "combat_tank_h", "quad", "quad" },
{ "trooper", "trooper", "trooper", "trooper", "trooper", "trooper", "trooper" },
{ "trike", "trike", "quad", "siege_tank" }
},
hard =
{
{ "combat_tank_h", "combat_tank_h", "trike", "trike", "trike" },
{ "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "trooper", "trooper" },
{ "combat_tank_h", "combat_tank_h", "quad", "quad" },
{ "trooper", "trooper", "trooper", "trooper", "trooper", "trooper", "trooper", "trooper" },
{ "trike", "trike", "quad", "quad", "siege_tank" },
{ "missile_tank", "missile_tank", "missile_tank", "missile_tank" }
}
}
IxianReinforcements =
{
easy = { "deviator", "deviator", "missile_tank", "missile_tank", "missile_tank", "siege_tank", "siege_tank", "combat_tank_o", "combat_tank_o" },
normal = { "deviator", "deviator", "missile_tank", "missile_tank", "missile_tank", "siege_tank", "siege_tank", "combat_tank_o" },
hard = { "deviator", "deviator", "missile_tank", "missile_tank", "siege_tank", "siege_tank", "combat_tank_o" }
}
EnemyAttackDelay =
{
easy = DateTime.Minutes(5) + DateTime.Seconds(15),
normal = DateTime.Minutes(3) + DateTime.Seconds(15),
hard = DateTime.Minutes(1) + DateTime.Seconds(30)
}
AtreidesPaths =
{
{ AtreidesEntry2.Location, AtreidesRally2.Location },
{ AtreidesEntry3.Location, AtreidesRally3.Location },
{ AtreidesEntry4.Location, AtreidesRally4.Location }
}
HarkonnenPaths =
{
{ HarkonnenEntry2.Location, HarkonnenRally2.Location },
{ HarkonnenEntry3.Location, HarkonnenRally3.Location },
{ HarkonnenEntry4.Location, HarkonnenRally4.Location },
{ HarkonnenEntry5.Location, HarkonnenRally5.Location },
{ HarkonnenEntry6.Location, HarkonnenRally6.Location },
{ HarkonnenEntry7.Location, HarkonnenRally7.Location }
}
AtreidesAttackWaves =
{
easy = 3,
normal = 4,
hard = 5
}
HarkonnenAttackWaves =
{
easy = 4,
normal = 5,
hard = 6
}
InitialReinforcements =
{
Atreides = { "combat_tank_a", "quad", "quad", "trike", "trike" },
Harkonnen = { "trooper", "trooper", "trooper", "trooper", "trooper", "combat_tank_h" }
}
InitialReinforcementsPaths =
{
Atreides = { AtreidesEntry1.Location, AtreidesRally1.Location },
Harkonnen = { HarkonnenEntry1.Location, HarkonnenRally1.Location }
}
InitialContrabandTimes =
{
easy = DateTime.Minutes(10),
normal = DateTime.Minutes(15),
hard = DateTime.Minutes(20)
}
ContrabandTimes =
{
easy = DateTime.Minutes(4),
normal = DateTime.Minutes(6),
hard = DateTime.Minutes(7)
}
IxianReinforcementsHaveArrived = UserInterface.GetFluentMessage("ixian-reinforcements-arrived")
SendContraband = function()
Media.PlaySpeechNotification(Ordos, "Reinforce")
for i = 0, 6 do
local c = Ordos.Color
if i % 2 == 0 then
c = HSLColor.White
end
Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText(IxianReinforcementsHaveArrived, c) end)
end
Trigger.AfterDelay(DateTime.Seconds(6), function()
TimerTicks = ContrabandTimes[Difficulty]
end)
local entryPath = { CPos.New(82, OStarport.Location.Y + 1), OStarport.Location + CVec.New(1, 1) }
local exitPath = { CPos.New(2, OStarport.Location.Y + 1) }
Reinforcements.ReinforceWithTransport(Ordos, "frigate", IxianReinforcements[Difficulty], entryPath, exitPath)
end
Hunt = function(house)
Trigger.OnAllKilledOrCaptured(Base[house.InternalName], function()
Utils.Do(house.GetGroundAttackers(), IdleHunt)
end)
end
CheckHarvester = function(house)
if DateTime.GameTime % DateTime.Seconds(10) == 0 and LastHarvesterEaten[house] then
local units = house.GetActorsByType("harvester")
if #units > 0 then
LastHarvesterEaten[house] = false
ProtectHarvester(units[1], house, AttackGroupSize[Difficulty])
end
end
end
Tick = function()
if not Ordos.IsObjectiveCompleted(KillAtreides) and Atreides.HasNoRequiredUnits() then
Media.DisplayMessage(UserInterface.GetFluentMessage("atreides-annihilated"), Mentat)
Ordos.MarkCompletedObjective(KillAtreides)
DestroyCarryalls(Atreides)
if Ordos.IsObjectiveCompleted(KillHarkonnen) then
Ordos.MarkCompletedObjective(GuardStarport)
end
end
if not Ordos.IsObjectiveCompleted(KillHarkonnen) and Harkonnen.HasNoRequiredUnits() then
Media.DisplayMessage(UserInterface.GetFluentMessage("harkonnen-annihilated"), Mentat)
Ordos.MarkCompletedObjective(KillHarkonnen)
DestroyCarryalls(Harkonnen)
if Ordos.IsObjectiveCompleted(KillAtreides) then
Ordos.MarkCompletedObjective(GuardStarport)
end
end
if TimerTicks and TimerTicks > 0 then
TimerTicks = TimerTicks - 1
if TimerTicks == 0 then
if not FirstIxiansArrived then
Media.DisplayMessage(UserInterface.GetFluentMessage("deliveries-arriving-massive-reinforcements"), Mentat)
end
FirstIxiansArrived = true
SendContraband()
elseif (TimerTicks % DateTime.Seconds(1)) == 0 then
local time = Utils.FormatTime(TimerTicks)
local reinforcementsText = UserInterface.GetFluentMessage("initial-reinforcements-arrive-in", { ["time"] = time })
if FirstIxiansArrived then
reinforcementsText = UserInterface.GetFluentMessage("additional-reinforcements-arrive-in", { ["time"] = time })
end
UserInterface.SetMissionText(reinforcementsText, Ordos.Color)
end
end
CheckHarvester(Atreides)
CheckHarvester(Harkonnen)
end
WorldLoaded = function()
Atreides = Player.GetPlayer("Atreides")
Harkonnen = Player.GetPlayer("Harkonnen")
Ordos = Player.GetPlayer("Ordos")
InitObjectives(Ordos)
GuardStarport = AddPrimaryObjective(Ordos, "defend-starport")
KillAtreides = AddPrimaryObjective(Ordos, "destroy-atreides")
KillHarkonnen = AddPrimaryObjective(Ordos, "destroy-harkonnen")
Camera.Position = OConyard.CenterPosition
EnemyAttackLocations = { OConyard.Location, OStarport.Location }
Trigger.OnRemovedFromWorld(OStarport, function()
Ordos.MarkFailedObjective(GuardStarport)
end)
Trigger.AfterDelay(DateTime.Seconds(2), function()
TimerTicks = InitialContrabandTimes[Difficulty]
local time = Utils.FormatTime(TimerTicks)
Media.DisplayMessage(UserInterface.GetFluentMessage("ixian-reinforcements-in", { ["time"] = time }), Mentat)
end)
Hunt(Atreides)
Hunt(Harkonnen)
local atreidesPath = function() return Utils.Random(AtreidesPaths) end
local harkonnenPath = function() return Utils.Random(HarkonnenPaths) end
local atreidesCondition = function() return Ordos.IsObjectiveCompleted(KillAtreides) end
local harkonnenCondition = function() return Ordos.IsObjectiveCompleted(KillHarkonnen) end
local huntFunction = function(unit)
unit.AttackMove(Utils.Random(EnemyAttackLocations))
IdleHunt(unit)
end
local announcementFunction = function()
Media.DisplayMessage(UserInterface.GetFluentMessage("enemy-reinforcements-arrived"), Mentat)
end
SendCarryallReinforcements(Atreides, 0, AtreidesAttackWaves[Difficulty], EnemyAttackDelay[Difficulty], atreidesPath, AtreidesReinforcements[Difficulty], atreidesCondition, huntFunction, announcementFunction)
Trigger.AfterDelay(Utils.RandomInteger(DateTime.Seconds(45), DateTime.Minutes(1) + DateTime.Seconds(15)), function()
SendCarryallReinforcements(Harkonnen, 0, HarkonnenAttackWaves[Difficulty], EnemyAttackDelay[Difficulty], harkonnenPath, HarkonnenReinforcements[Difficulty], harkonnenCondition, huntFunction, announcementFunction)
end)
Actor.Create("upgrade.barracks", true, { Owner = Atreides })
Actor.Create("upgrade.light", true, { Owner = Atreides })
Actor.Create("upgrade.heavy", true, { Owner = Atreides })
Actor.Create("upgrade.barracks", true, { Owner = Harkonnen })
Actor.Create("upgrade.heavy", true, { Owner = Harkonnen })
Trigger.AfterDelay(0, ActivateAI)
end

View File

@@ -0,0 +1,61 @@
Player:
PlayerResources:
DefaultCash: 6000
World:
LuaScript:
Scripts: campaign.lua, utils.lua, ordos06a.lua, ordos06a-AI.lua
MissionData:
Briefing: briefing
BriefingVideo: O_BR06_E.VQA
MapOptions:
TechLevel: medium
ScriptLobbyDropdown@difficulty:
ID: difficulty
Label: dropdown-difficulty.label
Description: dropdown-difficulty.description
Values:
easy: options-difficulty.easy
normal: options-difficulty.normal
hard: options-difficulty.hard
Default: easy
carryall.reinforce:
Cargo:
MaxWeight: 10
frigate:
Aircraft:
LandableTerrainTypes: Sand, Rock, Transition, Spice, SpiceSand, Dune, Concrete
concreteb:
Buildable:
Prerequisites: ~disabled
upgrade.conyard:
Buildable:
Prerequisites: ~disabled
starport:
Buildable:
Prerequisites: heavy_factory, outpost
missile_tank:
Buildable:
Prerequisites: ~heavy.missile_tank, upgrade.heavy, research_centre
grenadier:
Buildable:
Prerequisites: ~disabled
stealth_raider:
Buildable:
Prerequisites: ~disabled
sardaukar:
Buildable:
Prerequisites: ~disabled
large_gun_turret:
Buildable:
Prerequisites: ~disabled