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,7 @@
## rules.yaml
briefing =
Spice is paramount. The Atreides control it. Capture their Starport and bring in an MCV to start mining.
Combat is costly. Fight only if the Atreides obstruct the flow of spice. Use the minimum amount of funds for defense.
Mine and store what is needed to pay our debt to the Ixians. Once that amount has been collected, Ordos forces will withdraw.

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

View File

@@ -0,0 +1,576 @@
MapFormat: 12
RequiresMod: d2k
Title: Ordos 05
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: Ordos, AtreidesMainBase, AtreidesSmallBase1, AtreidesSmallBase2, AtreidesSmallBase3
PlayerReference@Ordos:
Name: Ordos
Playable: True
LockFaction: True
Faction: ordos
LockColor: True
Color: 5A9473
Enemies: AtreidesMainBase, AtreidesSmallBase1, AtreidesSmallBase2, AtreidesSmallBase3, Creeps
PlayerReference@AtreidesMainBase:
Name: AtreidesMainBase
LockFaction: True
Faction: atreides
LockColor: True
Color: 5A7394
Allies: AtreidesSmallBase1, AtreidesSmallBase2
Enemies: Ordos, Creeps
Bot: campaign
PlayerReference@AtreidesSmallBase1:
Name: AtreidesSmallBase1
LockFaction: True
Faction: atreides
LockColor: True
Color: 5A7394
Allies: AtreidesMainBase, AtreidesSmallBase2, AtreidesSmallBase3
Enemies: Ordos, Creeps
Bot: campaign
PlayerReference@AtreidesSmallBase2:
Name: AtreidesSmallBase2
LockFaction: True
Faction: atreides
LockColor: True
Color: 5A7394
Allies: AtreidesMainBase, AtreidesSmallBase1, AtreidesSmallBase3
Enemies: Ordos, Creeps
Bot: campaign
PlayerReference@AtreidesSmallBase3:
Name: AtreidesSmallBase3
LockFaction: True
Faction: atreides
LockColor: True
Color: 5A7394
Allies: AtreidesMainBase, AtreidesSmallBase1, AtreidesSmallBase2
Enemies: Ordos, Creeps
Bot: campaign
Actors:
Actor0: wall
Location: 13,2
Owner: AtreidesMainBase
ALightFactory: light_factory
Location: 6,3
Owner: AtreidesMainBase
AHeavyFactory: heavy_factory
Location: 10,3
Owner: AtreidesMainBase
Actor3: wall
Location: 13,3
Owner: AtreidesMainBase
Actor4: wall
Location: 13,4
Owner: AtreidesMainBase
Actor5: wall
Location: 13,5
Owner: AtreidesMainBase
AGunt1: medium_gun_turret
Location: 14,5
Owner: AtreidesMainBase
TurretFacing: 768
APower1: wind_trap
Location: 3,6
Owner: AtreidesMainBase
ABarracks1: barracks
Location: 9,6
Owner: AtreidesMainBase
Actor9: spicebloom.spawnpoint
Location: 71,6
Owner: Neutral
Actor10: trooper
Location: 14,7
Owner: AtreidesMainBase
Actor11: spicebloom.spawnpoint
Location: 22,7
Owner: Neutral
Actor12: wall
Location: 16,8
Owner: AtreidesMainBase
AGunt2: medium_gun_turret
Location: 17,8
Owner: AtreidesMainBase
TurretFacing: 896
APower2: wind_trap
Location: 5,9
Owner: AtreidesMainBase
Actor15: trooper
Location: 11,9
Owner: AtreidesMainBase
Actor16: wall
Location: 17,9
Owner: AtreidesMainBase
Actor17: wall
Location: 17,10
Owner: AtreidesMainBase
APower3: wind_trap
Location: 10,11
Owner: AtreidesMainBase
Actor19: trooper
Location: 14,11
Owner: AtreidesMainBase
Actor20: wall
Location: 17,11
Owner: AtreidesMainBase
Actor21: wormspawner
Location: 70,11
Owner: Creeps
Actor22: combat_tank_a
Location: 9,12
Owner: AtreidesMainBase
Actor23: wall
Location: 17,12
Owner: AtreidesMainBase
Actor24: wall
Location: 17,13
Owner: AtreidesMainBase
Actor25: light_inf
Location: 4,14
Owner: AtreidesMainBase
Actor26: light_inf
Location: 6,14
Owner: AtreidesMainBase
Actor27: trooper
Location: 13,14
Owner: AtreidesMainBase
Actor28: spicebloom.spawnpoint
Location: 49,14
Owner: Neutral
Actor29: spicebloom.spawnpoint
Location: 25,15
Owner: Neutral
ARefinery1: refinery
Location: 2,16
Owner: AtreidesMainBase
AConyard: construction_yard
Location: 8,16
Owner: AtreidesMainBase
Actor32: light_inf
Location: 6,17
Owner: AtreidesMainBase
AGunt3: medium_gun_turret
Location: 15,17
Owner: AtreidesMainBase
TurretFacing: 640
Actor34: light_inf
Location: 11,18
Owner: AtreidesMainBase
Actor35: wall
Location: 33,18
Owner: AtreidesSmallBase1
Actor36: wall
Location: 34,18
Owner: AtreidesSmallBase1
Actor37: wall
Location: 35,18
Owner: AtreidesSmallBase1
APower4: wind_trap
Location: 27,19
Owner: AtreidesSmallBase1
APower5: wind_trap
Location: 29,19
Owner: AtreidesSmallBase1
Actor40: wall
Location: 35,19
Owner: AtreidesSmallBase1
Actor41: harvester
Location: 3,20
Owner: AtreidesMainBase
Actor42: carryall
Location: 5,20
Owner: AtreidesMainBase
Actor43: trike
Location: 34,20
Owner: AtreidesSmallBase1
Facing: 768
AGunt6: medium_gun_turret
Location: 35,20
Owner: AtreidesSmallBase1
TurretFacing: 768
Actor45: spicebloom.spawnpoint
Location: 60,20
Owner: Neutral
Actor46: wall
Location: 2,23
Owner: AtreidesMainBase
Actor47: wall
Location: 5,23
Owner: AtreidesMainBase
ARefinery2: refinery
Location: 27,23
Owner: AtreidesSmallBase1
ABarracks2: barracks
Location: 30,23
Owner: AtreidesSmallBase1
Actor50: trike
Location: 34,23
Owner: AtreidesSmallBase1
Facing: 768
AGunt7: medium_gun_turret
Location: 35,23
Owner: AtreidesSmallBase1
TurretFacing: 768
Actor52: spicebloom.spawnpoint
Location: 78,23
Owner: Neutral
Actor53: wall
Location: 2,24
Owner: AtreidesMainBase
Actor54: wall
Location: 5,24
Owner: AtreidesMainBase
Actor55: wall
Location: 33,24
Owner: AtreidesSmallBase1
Actor56: wall
Location: 34,24
Owner: AtreidesSmallBase1
Actor57: wall
Location: 35,24
Owner: AtreidesSmallBase1
AGunt4: medium_gun_turret
Location: 2,25
Owner: AtreidesMainBase
TurretFacing: 512
AGunt5: medium_gun_turret
Location: 5,25
Owner: AtreidesMainBase
TurretFacing: 512
Actor60: harvester
Location: 26,25
Owner: AtreidesSmallBase1
Actor61: wall
Location: 33,25
Owner: AtreidesSmallBase1
Actor62: carryall
Location: 27,26
Owner: AtreidesSmallBase1
Actor63: wall
Location: 33,26
Owner: AtreidesSmallBase1
Actor64: wall
Location: 33,27
Owner: AtreidesSmallBase1
Actor65: quad
Location: 30,28
Owner: AtreidesMainBase
Actor66: wall
Location: 33,28
Owner: AtreidesSmallBase1
Actor67: spicebloom.spawnpoint
Location: 21,29
Owner: Neutral
Actor68: wall
Location: 33,29
Owner: AtreidesSmallBase1
Actor69: spicebloom.spawnpoint
Location: 8,32
Owner: Neutral
Actor70: spicebloom.spawnpoint
Location: 53,48
Owner: Neutral
Actor71: light_inf
Location: 42,49
Owner: AtreidesSmallBase2
AGunt8: medium_gun_turret
Location: 44,49
Owner: AtreidesSmallBase2
Actor73: wall
Location: 44,50
Owner: AtreidesSmallBase2
Actor74: wall
Location: 45,50
Owner: AtreidesSmallBase2
AGunt9: medium_gun_turret
Location: 38,51
Owner: AtreidesSmallBase2
TurretFacing: 128
Actor76: wall
Location: 39,51
Owner: AtreidesSmallBase2
ABarracks3: barracks
Location: 42,51
Owner: AtreidesSmallBase2
Actor78: wall
Location: 45,51
Owner: AtreidesSmallBase2
Actor79: wall
Location: 38,52
Owner: AtreidesSmallBase2
Actor80: wall
Location: 45,52
Owner: AtreidesSmallBase2
Actor81: wall
Location: 38,53
Owner: AtreidesSmallBase2
Actor82: wall
Location: 45,53
Owner: AtreidesSmallBase2
AGunt10: medium_gun_turret
Location: 46,53
Owner: AtreidesSmallBase2
TurretFacing: 896
Actor84: wall
Location: 38,54
Owner: AtreidesSmallBase2
APower6: wind_trap
Location: 40,54
Owner: AtreidesSmallBase2
APower7: wind_trap
Location: 42,54
Owner: AtreidesSmallBase2
Actor87: wall
Location: 46,54
Owner: AtreidesSmallBase2
Actor88: wall
Location: 46,55
Owner: AtreidesSmallBase2
Actor89: wall
Location: 47,55
Owner: AtreidesSmallBase2
Actor90: light_inf
Location: 45,56
Owner: AtreidesSmallBase2
Actor91: wall
Location: 47,56
Owner: AtreidesSmallBase2
Actor92: wall
Location: 63,56
Owner: AtreidesSmallBase3
Actor93: wall
Location: 64,56
Owner: AtreidesSmallBase3
Actor94: wall
Location: 65,56
Owner: AtreidesSmallBase3
Actor95: wall
Location: 47,57
Owner: AtreidesSmallBase2
Actor96: wall
Location: 63,57
Owner: AtreidesSmallBase3
AGunt11: medium_gun_turret
Location: 64,57
Owner: AtreidesSmallBase3
Actor98: wall
Location: 65,57
Owner: AtreidesSmallBase3
Actor99: wall
Location: 47,58
Owner: AtreidesSmallBase2
Actor100: wall
Location: 63,58
Owner: AtreidesSmallBase3
Actor101: wall
Location: 64,58
Owner: AtreidesSmallBase3
Actor102: wall
Location: 65,58
Owner: AtreidesSmallBase3
Actor103: spicebloom.spawnpoint
Location: 9,59
Owner: Neutral
Actor104: spicebloom.spawnpoint
Location: 20,60
Owner: Neutral
Actor105: spicebloom.spawnpoint
Location: 76,61
Owner: Neutral
Actor106: spicebloom.spawnpoint
Location: 79,62
Owner: Neutral
Actor107: spicebloom.spawnpoint
Location: 57,66
Owner: Neutral
AStarport: starport
Location: 70,68
Owner: AtreidesSmallBase3
Actor109: wall
Location: 76,70
Owner: AtreidesSmallBase3
Actor110: light_inf
Location: 74,71
Owner: AtreidesSmallBase3
Actor111: trike
Location: 75,71
Owner: AtreidesSmallBase3
Actor112: wall
Location: 76,71
Owner: AtreidesSmallBase3
Actor113: spicebloom.spawnpoint
Location: 59,72
Owner: Neutral
APower8: wind_trap
Location: 69,72
Owner: AtreidesSmallBase3
APower9: wind_trap
Location: 71,72
Owner: AtreidesSmallBase3
AGunt12: medium_gun_turret
Location: 74,72
Owner: AtreidesSmallBase3
TurretFacing: 640
Actor117: wall
Location: 75,72
Owner: AtreidesSmallBase3
Actor118: wall
Location: 76,72
Owner: AtreidesSmallBase3
Actor119: light_inf
Location: 67,73
Owner: AtreidesSmallBase3
Actor120: wall
Location: 74,73
Owner: AtreidesSmallBase3
Actor121: light_inf
Location: 73,74
Owner: AtreidesSmallBase3
Actor122: wall
Location: 74,74
Owner: AtreidesSmallBase3
Actor123: wall
Location: 69,75
Owner: AtreidesSmallBase3
Actor124: wall
Location: 70,75
Owner: AtreidesSmallBase3
Actor125: wall
Location: 71,75
Owner: AtreidesSmallBase3
Actor126: wall
Location: 72,75
Owner: AtreidesSmallBase3
Actor127: wall
Location: 73,75
Owner: AtreidesSmallBase3
Actor128: wall
Location: 74,75
Owner: AtreidesSmallBase3
Actor129: light_inf
Location: 81,76
Owner: Ordos
Actor130: spicebloom.spawnpoint
Location: 22,77
Owner: Neutral
OTrooper1: trooper
Location: 80,77
Owner: Ordos
ORaider1: raider
Location: 78,78
Owner: Ordos
ORaider2: raider
Location: 79,78
Owner: Ordos
OCombat1: combat_tank_o
Location: 81,78
Owner: Ordos
OTrooper2: trooper
Location: 78,79
Owner: Ordos
OEngi1: engineer
Location: 79,79
Owner: Ordos
OEngi2: engineer
Location: 80,79
Owner: Ordos
Actor138: spicebloom.spawnpoint
Location: 58,80
Owner: Neutral
OLInf1: light_inf
Location: 77,80
Owner: Ordos
OCombat2: combat_tank_o
Location: 78,80
Owner: Ordos
OCombat3: combat_tank_o
Location: 79,80
Owner: Ordos
OEngi3: engineer
Location: 80,80
Owner: Ordos
OTrooper3: trooper
Location: 76,81
Owner: Ordos
OTrooper4: trooper
Location: 78,81
Owner: Ordos
OrdosStarportEntry: waypoint
Owner: Neutral
Location: 81,69
OrdosStarportExit: waypoint
Owner: Neutral
Location: 2,69
AtreidesRally3: waypoint
Owner: Neutral
Location: 40,53
AtreidesRally2: waypoint
Owner: Neutral
Location: 32,21
AtreidesRally1: waypoint
Owner: Neutral
Location: 13,9
AtreidesEntry1: waypoint
Owner: Neutral
Location: 2,9
AtreidesRally4: waypoint
Owner: Neutral
Location: 49,78
AtreidesEntry4: waypoint
Owner: Neutral
Location: 49,81
AtreidesRally5: waypoint
Owner: Neutral
Location: 62,47
AtreidesEntry5: waypoint
Owner: Neutral
Location: 81,47
AtreidesRally6: waypoint
Owner: Neutral
Location: 78,45
AtreidesEntry6: waypoint
Owner: Neutral
Location: 81,45
AtreidesRally7: waypoint
Owner: Neutral
Location: 71,28
AtreidesEntry7: waypoint
Owner: Neutral
Location: 81,28
AtreidesRally8: waypoint
Owner: Neutral
Location: 27,58
AtreidesEntry8: waypoint
Owner: Neutral
Location: 2,58
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,62 @@
--[[
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
}
AttackDelays =
{
easy = { DateTime.Seconds(4), DateTime.Seconds(7) },
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" }
EnemyTankType = { "combat_tank_a" }
InitAIUnits = function(house)
LastHarvesterEaten[house] = true
if house ~= AtreidesSmall3 then
IdlingUnits[house] = Reinforcements.Reinforce(house, InitialReinforcements[house.InternalName], InitialReinforcementsPaths[house.InternalName])
else
IdlingUnits[house] = { }
end
DefendAndRepairBase(house, Base[house.InternalName], 0.75, AttackGroupSize[Difficulty])
end
ActivateAIProduction = function()
local delay = function() return Utils.RandomInteger(AttackDelays[Difficulty][1], AttackDelays[Difficulty][2] + 1) end
local infantryToBuild = function() return { Utils.Random(EnemyInfantryTypes) } end
local vehiclesToBuild = function() return { Utils.Random(EnemyVehicleTypes) } end
local tanksToBuild = function() return EnemyTankType end
local attackTresholdSize = AttackGroupSize[Difficulty] * 2.5
ProduceUnits(AtreidesMain, ABarracks1, delay, infantryToBuild, AttackGroupSize[Difficulty], attackTresholdSize)
ProduceUnits(AtreidesMain, ALightFactory, delay, vehiclesToBuild, AttackGroupSize[Difficulty], attackTresholdSize)
ProduceUnits(AtreidesMain, AHeavyFactory, delay, tanksToBuild, AttackGroupSize[Difficulty], attackTresholdSize)
ProduceUnits(AtreidesSmall1, ABarracks2, delay, infantryToBuild, AttackGroupSize[Difficulty], attackTresholdSize)
ProduceUnits(AtreidesSmall2, ABarracks3, delay, infantryToBuild, AttackGroupSize[Difficulty], attackTresholdSize)
AIProductionActivated = true
end
ActivateAI = function()
InitAIUnits(AtreidesMain)
InitAIUnits(AtreidesSmall1)
InitAIUnits(AtreidesSmall2)
InitAIUnits(AtreidesSmall3)
end

View File

@@ -0,0 +1,228 @@
--[[
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 =
{
AtreidesMainBase = { AConyard, APower1, APower2, APower3, ABarracks1, ARefinery1, ALightFactory, AHeavyFactory, AGunt1, AGunt2, AGunt3, AGunt4, AGunt5 },
AtreidesSmallBase1 = { APower4, APower5, ABarracks2, ARefinery2, AGunt6, AGunt7 },
AtreidesSmallBase2 = { APower6, APower7, ABarracks3, AGunt8, AGunt9, AGunt10 },
AtreidesSmallBase3 = { APower8, APower9, AStarport, AGunt11, AGunt12 }
}
AtreidesReinforcements =
{
easy =
{
{ "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "light_inf" },
{ "quad", "trike", "combat_tank_a"},
{ "light_inf", "light_inf", "light_inf", "light_inf", "trooper", "trooper", "trooper" },
{ "light_inf", "light_inf", "light_inf", "light_inf", "trooper", "trooper", "trooper" },
{ "combat_tank_a", "combat_tank_a", "quad" },
{ "quad", "quad", "trooper", "quad", "quad", "trooper" },
{ "combat_tank_a", "combat_tank_a", "combat_tank_a", "quad", "siege_tank", "missile_tank" },
{ "quad", "quad", "quad", "trooper", "trooper", "trooper", "trooper" }
},
normal =
{
{ "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "light_inf" },
{ "quad", "trike", "trike", "combat_tank_a"},
{ "light_inf", "light_inf", "light_inf", "light_inf", "trooper", "trooper", "trooper", "trooper" },
{ "light_inf", "light_inf", "light_inf", "light_inf", "trooper", "trooper", "trooper", "trooper" },
{ "combat_tank_a", "combat_tank_a", "combat_tank_a" },
{ "quad", "quad", "quad", "quad", "quad", "quad" },
{ "combat_tank_a", "combat_tank_a", "combat_tank_a", "combat_tank_a", "quad", "siege_tank", "missile_tank" },
{ "quad", "quad", "quad", "trooper", "trooper", "trooper", "trooper", "trooper" }
},
hard =
{
{ "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "light_inf" },
{ "quad", "quad", "trike", "trike", "combat_tank_a"},
{ "light_inf", "light_inf", "light_inf", "light_inf", "trooper", "trooper", "trooper", "trooper", "trooper" },
{ "light_inf", "light_inf", "light_inf", "light_inf", "trooper", "trooper", "trooper", "trooper", "trooper" },
{ "combat_tank_a", "combat_tank_a", "combat_tank_a", "quad" },
{ "quad", "quad", "quad", "trooper", "quad", "quad", "quad", "trooper" },
{ "combat_tank_a", "combat_tank_a", "combat_tank_a", "combat_tank_a", "quad", "siege_tank", "siege_tank", "missile_tank" },
{ "quad", "quad", "quad", "trooper", "trooper", "trooper", "trooper", "trooper", "trooper" }
}
}
AtreidesAttackDelay =
{
easy = DateTime.Minutes(3) + DateTime.Seconds(15),
normal = DateTime.Minutes(2) + DateTime.Seconds(15),
hard = DateTime.Minutes(1) + DateTime.Seconds(15)
}
AtreidesPaths =
{
{ AtreidesEntry4.Location, AtreidesRally4.Location },
{ AtreidesEntry5.Location, AtreidesRally5.Location },
{ AtreidesEntry6.Location, AtreidesRally6.Location },
{ AtreidesEntry7.Location, AtreidesRally7.Location },
{ AtreidesEntry8.Location, AtreidesRally8.Location }
}
InitialReinforcements =
{
AtreidesMainBase = { "combat_tank_a", "combat_tank_a", "quad", "quad", "trike", "light_inf", "light_inf", "light_inf", "light_inf" },
AtreidesSmallBase1 = { "trooper", "trooper", "trooper", "light_inf", "light_inf", "light_inf", "light_inf" },
AtreidesSmallBase2 = { "trooper", "trooper", "trooper", "light_inf", "light_inf", "light_inf", "light_inf" }
}
InitialReinforcementsPaths =
{
AtreidesMainBase = { AtreidesEntry1.Location, AtreidesRally1.Location },
AtreidesSmallBase1 = { ABarracks2.Location, AtreidesRally2.Location },
AtreidesSmallBase2 = { ABarracks3.Location, AtreidesRally3.Location }
}
ToHarvest =
{
easy = 12500,
normal = 15000,
hard = 20000
}
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
CachedResources = -1
Tick = function()
if Ordos.Resources > SpiceToHarvest - 1 then
Ordos.MarkCompletedObjective(GatherSpice)
end
if Ordos.HasNoRequiredUnits() then
AtreidesMain.MarkCompletedObjective(KillOrdos1)
AtreidesSmall1.MarkCompletedObjective(KillOrdos2)
AtreidesSmall2.MarkCompletedObjective(KillOrdos3)
AtreidesSmall3.MarkCompletedObjective(KillOrdos4)
end
if AtreidesMain.HasNoRequiredUnits() and AtreidesSmall1.HasNoRequiredUnits() and AtreidesSmall2.HasNoRequiredUnits() and AtreidesSmall3.HasNoRequiredUnits() and not Ordos.IsObjectiveCompleted(KillAtreides) then
Media.DisplayMessage(UserInterface.GetFluentMessage("atreides-annihilated"), Mentat)
Ordos.MarkCompletedObjective(KillAtreides)
end
if #Ordos.GetActorsByType("engineer") == 0 and not Ordos.IsObjectiveCompleted(CaptureStarport) then
Ordos.MarkFailedObjective(CaptureStarport)
end
if Ordos.IsObjectiveCompleted(CaptureStarport) then
if Ordos.Resources ~= CachedResources then
local harvestedResources = UserInterface.GetFluentMessage("harvested-resources",
{ ["harvested"] = Ordos.Resources, ["goal"] = SpiceToHarvest })
UserInterface.SetMissionText(harvestedResources)
CachedResources = Ordos.Resources
end
end
CheckHarvester(AtreidesMain)
CheckHarvester(AtreidesSmall1)
end
WorldLoaded = function()
AtreidesMain = Player.GetPlayer("AtreidesMainBase")
AtreidesSmall1 = Player.GetPlayer("AtreidesSmallBase1")
AtreidesSmall2 = Player.GetPlayer("AtreidesSmallBase2")
AtreidesSmall3 = Player.GetPlayer("AtreidesSmallBase3")
Ordos = Player.GetPlayer("Ordos")
SpiceToHarvest = ToHarvest[Difficulty]
InitObjectives(Ordos)
KillOrdos1 = AddPrimaryObjective(AtreidesMain, "")
KillOrdos2 = AddPrimaryObjective(AtreidesSmall1, "")
KillOrdos3 = AddPrimaryObjective(AtreidesSmall2, "")
KillOrdos4 = AddPrimaryObjective(AtreidesSmall3, "")
CaptureStarport = AddPrimaryObjective(Ordos, "capture-atreides-starport-establish-base")
local harvestSpice = UserInterface.GetFluentMessage("harvest-spice", { ["spice"] = SpiceToHarvest })
GatherSpice = AddPrimaryObjective(Ordos, harvestSpice)
KillAtreides = AddSecondaryObjective(Ordos, "destroy-atreides")
Camera.Position = OEngi1.CenterPosition
AtreidesAttackLocation = OEngi1.Location
if Difficulty ~= "easy" then
OTrooper3.Destroy()
end
if Difficulty == "hard" then
OTrooper4.Destroy()
OCombat2.Destroy()
end
Hunt(AtreidesMain)
Hunt(AtreidesSmall1)
Hunt(AtreidesSmall2)
Hunt(AtreidesSmall3)
local path = function() return Utils.Random(AtreidesPaths) end
local waveCondition = function() return Ordos.IsObjectiveCompleted(KillAtreides) end
local huntFunction = function(unit)
unit.AttackMove(AtreidesAttackLocation)
IdleHunt(unit)
end
SendCarryallReinforcements(AtreidesMain, 0, 8, AtreidesAttackDelay[Difficulty], path, AtreidesReinforcements[Difficulty], waveCondition, huntFunction)
Actor.Create("upgrade.barracks", true, { Owner = AtreidesMain })
Actor.Create("upgrade.light", true, { Owner = AtreidesMain })
Actor.Create("upgrade.heavy", true, { Owner = AtreidesMain })
Actor.Create("upgrade.barracks", true, { Owner = AtreidesSmall1 })
Actor.Create("upgrade.barracks", true, { Owner = AtreidesSmall2 })
Trigger.AfterDelay(0, ActivateAI)
Trigger.OnKilled(AStarport, function()
if not Ordos.IsObjectiveCompleted(CaptureStarport) then
Ordos.MarkFailedObjective(CaptureStarport)
end
end)
Trigger.OnCapture(AStarport, function()
Ordos.MarkCompletedObjective(CaptureStarport)
if not AIProductionActivated then
ActivateAIProduction()
end
Reinforcements.ReinforceWithTransport(Ordos, "frigate", { "mcv" }, { OrdosStarportEntry.Location, AStarport.Location + CVec.New(1, 1) }, { OrdosStarportExit.Location })
if APower8.Owner ~= Ordos and not APower8.IsDead then
APower8.Sell()
end
if APower9.Owner ~= Ordos and not APower9.IsDead then
APower9.Sell()
end
end)
Trigger.OnKilledOrCaptured(APower8, function()
if not AIProductionActivated then
ActivateAIProduction()
end
end)
Trigger.OnKilledOrCaptured(APower9, function()
if not AIProductionActivated then
ActivateAIProduction()
end
end)
end

View File

@@ -0,0 +1,68 @@
Player:
PlayerResources:
DefaultCash: 6000
World:
LuaScript:
Scripts: campaign.lua, utils.lua, ordos05.lua, ordos05-AI.lua
MissionData:
Briefing: briefing
BriefingVideo: O_BR05_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
^Palettes:
IndexedPlayerPalette:
PlayerIndex:
AtreidesMainBase: 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128
AtreidesSmallBase1: 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128
AtreidesSmallBase2: 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128
AtreidesSmallBase3: 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128
FixedPlayerColorShift:
BasePalette: player
PlayerIndex:
AtreidesMainBase: 0.274, -0.275, 1, 0.32, 0.34
AtreidesSmallBase1: 0.274, -0.275, 1, 0.32, 0.34
AtreidesSmallBase2: 0.274, -0.275, 1, 0.32, 0.34
AtreidesSmallBase3: 0.274, -0.275, 1, 0.32, 0.34
carryall.reinforce:
Cargo:
MaxWeight: 10
frigate:
Aircraft:
LandableTerrainTypes: Sand, Rock, Transition, Spice, SpiceSand, Dune, Concrete
concreteb:
Buildable:
Prerequisites: ~disabled
upgrade.conyard:
Buildable:
Prerequisites: ~disabled
grenadier:
Buildable:
Prerequisites: ~disabled
stealth_raider:
Buildable:
Prerequisites: ~disabled
large_gun_turret:
Buildable:
Prerequisites: ~disabled
siege_tank:
Buildable:
Prerequisites: ~disabled