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

View File

@@ -0,0 +1,34 @@
--[[
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(9) },
normal = { DateTime.Seconds(2), DateTime.Seconds(7) },
hard = { DateTime.Seconds(1), DateTime.Seconds(5) }
}
HarkonnenInfantryTypes = { "light_inf" }
ActivateAI = function()
IdlingUnits[Harkonnen] = { }
DefendAndRepairBase(Harkonnen, HarkonnenBase, 0.75, AttackGroupSize[Difficulty])
local delay = function() return Utils.RandomInteger(AttackDelays[Difficulty][1], AttackDelays[Difficulty][2] + 1) end
local toBuild = function() return HarkonnenInfantryTypes end
local attackThresholdSize = AttackGroupSize[Difficulty] * 2.5
ProduceUnits(Harkonnen, HBarracks, delay, toBuild, AttackGroupSize[Difficulty], attackThresholdSize)
end

View File

@@ -0,0 +1,95 @@
--[[
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.
]]
HarkonnenBase = { HConyard, HOutpost, HBarracks }
HarkonnenReinforcements =
{
easy =
{
{ "light_inf", "trike" },
{ "light_inf", "trike" },
{ "light_inf", "light_inf", "light_inf", "trike", "trike" }
},
normal =
{
{ "light_inf", "trike" },
{ "light_inf", "trike" },
{ "light_inf", "light_inf", "light_inf", "trike", "trike" },
{ "light_inf", "light_inf" },
{ "light_inf", "light_inf", "light_inf" },
{ "light_inf", "trike" }
},
hard =
{
{ "trike", "trike" },
{ "light_inf", "trike" },
{ "light_inf", "trike" },
{ "light_inf", "light_inf", "light_inf", "trike", "trike" },
{ "light_inf", "light_inf" },
{ "trike", "trike" },
{ "light_inf", "light_inf", "light_inf" },
{ "light_inf", "trike" },
{ "trike", "trike" }
}
}
HarkonnenAttackPaths =
{
{ HarkonnenEntry1.Location, HarkonnenRally1.Location },
{ HarkonnenEntry1.Location, HarkonnenRally3.Location },
{ HarkonnenEntry2.Location, HarkonnenRally2.Location },
{ HarkonnenEntry2.Location, HarkonnenRally4.Location }
}
HarkonnenAttackDelay =
{
easy = DateTime.Minutes(5),
normal = DateTime.Minutes(2) + DateTime.Seconds(40),
hard = DateTime.Minutes(1) + DateTime.Seconds(20)
}
HarkonnenAttackWaves =
{
easy = 3,
normal = 6,
hard = 9
}
Tick = function()
if Atreides.HasNoRequiredUnits() then
Harkonnen.MarkCompletedObjective(KillAtreides)
end
if Harkonnen.HasNoRequiredUnits() and not Atreides.IsObjectiveCompleted(KillHarkonnen) then
Media.DisplayMessage(UserInterface.GetFluentMessage("harkonnen-annihilated"), Mentat)
Atreides.MarkCompletedObjective(KillHarkonnen)
end
end
WorldLoaded = function()
Harkonnen = Player.GetPlayer("Harkonnen")
Atreides = Player.GetPlayer("Atreides")
InitObjectives(Atreides)
KillAtreides = AddPrimaryObjective(Harkonnen, "")
KillHarkonnen = AddPrimaryObjective(Atreides, "destroy-harkonnen-forces")
Camera.Position = AConyard.CenterPosition
Trigger.OnAllKilled(HarkonnenBase, function()
Utils.Do(Harkonnen.GetGroundAttackers(), IdleHunt)
end)
local path = function() return Utils.Random(HarkonnenAttackPaths) end
SendCarryallReinforcements(Harkonnen, 0, HarkonnenAttackWaves[Difficulty], HarkonnenAttackDelay[Difficulty], path, HarkonnenReinforcements[Difficulty])
Trigger.AfterDelay(0, ActivateAI)
end

Binary file not shown.

View File

@@ -0,0 +1,9 @@
## rules.yaml
briefing =
Infiltrate the Imperial Basin and build up our forces until they are strong enough to eradicate the local Harkonnen presence.
The Harkonnen are reinforcing their troops by air, so be on your guard. Use the Outpost's radar to detect attacks from unexpected quarters.
Be careful when mining the Spice. Spice mounds grow out of the sand. While a vital source of Spice, Spice mounds can damage or destroy any unit that blunders into them.
Good luck.

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

View File

@@ -0,0 +1,144 @@
MapFormat: 12
RequiresMod: d2k
Title: Atreides 02b
Author: Westwood Studios
Tileset: ARRAKIS
MapSize: 52,52
Bounds: 2,2,48,48
Visibility: MissionSelector
Categories: Campaign
LockPreview: True
Players:
PlayerReference@Neutral:
Name: Neutral
OwnsWorld: True
NonCombatant: True
PlayerReference@Creeps:
Name: Creeps
NonCombatant: True
Enemies: Atreides, Harkonnen
PlayerReference@Atreides:
Name: Atreides
Playable: True
LockFaction: True
Faction: atreides
LockColor: True
Color: 5A7394
Enemies: Harkonnen, Creeps
PlayerReference@Harkonnen:
Name: Harkonnen
LockFaction: True
Faction: harkonnen
LockColor: True
Color: D64A42
Enemies: Atreides, Creeps
Bot: campaign
Actors:
Actor0: light_inf
Location: 26,8
Owner: Atreides
Actor1: trike
Location: 28,8
Owner: Atreides
Actor2: trike
Location: 30,8
Owner: Atreides
Actor3: light_inf
Location: 24,10
Owner: Atreides
Actor5: trike
Location: 31,11
Owner: Atreides
Actor6: light_inf
Location: 47,11
Owner: Harkonnen
Actor7: light_inf
Location: 25,12
Owner: Atreides
Actor8: light_inf
Location: 8,14
Owner: Harkonnen
Actor9: light_inf
Location: 27,14
Owner: Atreides
Actor10: wormspawner
Location: 40,17
Owner: Creeps
Actor11: light_inf
Location: 40,33
Owner: Harkonnen
Actor12: trike
Location: 14,39
Owner: Harkonnen
Actor13: light_inf
Location: 16,39
Owner: Harkonnen
Actor14: trike
Location: 18,39
Owner: Harkonnen
Actor16: trike
Location: 16,41
Owner: Harkonnen
Actor17: light_inf
Location: 9,42
Owner: Harkonnen
Actor20: light_inf
Location: 11,44
Owner: Harkonnen
Actor21: trike
Location: 12,46
Owner: Harkonnen
Actor22: light_inf
Location: 18,46
Owner: Harkonnen
Actor23: light_inf
Location: 21,46
Owner: Harkonnen
Actor24: trike
Location: 16,48
Owner: Harkonnen
HConyard: construction_yard
Location: 14,42
Owner: Harkonnen
HOutpost: outpostnopower
Location: 11,40
Owner: Harkonnen
HBarracks: barracks
Location: 18,42
Owner: Harkonnen
AConyard: construction_yard
Location: 27,10
Owner: Atreides
HarkonnenEntry1: waypoint
Owner: Neutral
Location: 2,22
HarkonnenEntry2: waypoint
Owner: Neutral
Location: 49,33
HarkonnenRally1: waypoint
Owner: Neutral
Location: 12,7
HarkonnenRally2: waypoint
Owner: Neutral
Location: 36,15
HarkonnenRally3: waypoint
Owner: Neutral
Location: 18,17
HarkonnenRally4: waypoint
Owner: Neutral
Location: 30,28
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,69 @@
Player:
PlayerResources:
DefaultCash: 5000
World:
LuaScript:
Scripts: campaign.lua, utils.lua, atreides02b.lua, atreides02b-AI.lua
MissionData:
Briefing: briefing
BriefingVideo: A_BR02_E.VQA
MapOptions:
TechLevel: low
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
upgrade.conyard:
Buildable:
Prerequisites: ~disabled
upgrade.barracks:
Buildable:
Prerequisites: ~disabled
upgrade.light:
Buildable:
Prerequisites: ~disabled
upgrade.heavy:
Buildable:
Prerequisites: ~disabled
concreteb:
Buildable:
Prerequisites: ~disabled
heavy_factory:
Buildable:
Prerequisites: ~disabled
medium_gun_turret:
Buildable:
Prerequisites: ~disabled
wall:
Buildable:
Prerequisites: ~disabled
outpost:
Buildable:
Prerequisites: barracks
outpostnopower:
Inherits: outpost
Buildable:
Prerequisites: ~disabled
GrantCondition@IDISABLE:
RequiresCondition: powerdown
-GrantConditionOnPowerState@LOWPOWER: