Add Harkonnen 6b

This commit is contained in:
Mustafa Alperen Seki
2017-10-12 18:57:44 +03:00
committed by reaperrr
parent 01c1e08bd8
commit 7b12cf887d
11 changed files with 1138 additions and 28 deletions

View File

@@ -129,6 +129,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dune 2000 Lua scripts", "Du
mods\d2k\maps\harkonnen-04\harkonnen04.lua = mods\d2k\maps\harkonnen-04\harkonnen04.lua mods\d2k\maps\harkonnen-04\harkonnen04.lua = mods\d2k\maps\harkonnen-04\harkonnen04.lua
mods\d2k\maps\harkonnen-06a\harkonnen06a-AI.lua = mods\d2k\maps\harkonnen-06a\harkonnen06a-AI.lua mods\d2k\maps\harkonnen-06a\harkonnen06a-AI.lua = mods\d2k\maps\harkonnen-06a\harkonnen06a-AI.lua
mods\d2k\maps\harkonnen-06a\harkonnen06a.lua = mods\d2k\maps\harkonnen-06a\harkonnen06a.lua mods\d2k\maps\harkonnen-06a\harkonnen06a.lua = mods\d2k\maps\harkonnen-06a\harkonnen06a.lua
mods\d2k\maps\harkonnen-06b\harkonnen06b-AI.lua = mods\d2k\maps\harkonnen-06b\harkonnen06b-AI.lua
mods\d2k\maps\harkonnen-06b\harkonnen06b.lua = mods\d2k\maps\harkonnen-06b\harkonnen06b.lua
mods\d2k\maps\ordos-01a\ordos01a.lua = mods\d2k\maps\ordos-01a\ordos01a.lua mods\d2k\maps\ordos-01a\ordos01a.lua = mods\d2k\maps\ordos-01a\ordos01a.lua
mods\d2k\maps\ordos-01b\ordos01b.lua = mods\d2k\maps\ordos-01b\ordos01b.lua mods\d2k\maps\ordos-01b\ordos01b.lua = mods\d2k\maps\ordos-01b\ordos01b.lua
mods\d2k\maps\ordos-02a\ordos02a.lua = mods\d2k\maps\ordos-02a\ordos02a.lua mods\d2k\maps\ordos-02a\ordos02a.lua = mods\d2k\maps\ordos-02a\ordos02a.lua

View File

@@ -113,13 +113,6 @@ HarkonnenPaths =
{ HarkonnenEntry2.Location, HarkonnenRally2.Location } { HarkonnenEntry2.Location, HarkonnenRally2.Location }
} }
OrdosInterval =
{
easy = { DateTime.Minutes(1) + DateTime.Seconds(30), DateTime.Minutes(2) },
normal = { DateTime.Minutes(2) + DateTime.Seconds(20), DateTime.Minutes(2) + DateTime.Seconds(40) },
hard = { DateTime.Minutes(3) + DateTime.Seconds(40), DateTime.Minutes(4) }
}
SendStarportReinforcements = function() SendStarportReinforcements = function()
Trigger.AfterDelay(OrdosStarportDelay[Difficulty], function() Trigger.AfterDelay(OrdosStarportDelay[Difficulty], function()
if OStarport.IsDead or OStarport.Owner ~= ordos_main then if OStarport.IsDead or OStarport.Owner ~= ordos_main then
@@ -147,6 +140,63 @@ SendHarkonnenReinforcements = function(delay, number)
end) end)
end end
ChangeOwner = function(old_owner, new_owner)
local units = old_owner.GetActors()
Utils.Do(units, function(unit)
if not unit.IsDead then
unit.Owner = new_owner
end
end)
end
CheckSmugglerEnemies = function()
Utils.Do(SmugglerUnits, function(unit)
Trigger.OnDamaged(unit, function(self, attacker)
if unit.Owner == smuggler_neutral and attacker.Owner == player then
ChangeOwner(smuggler_neutral, smuggler_harkonnen)
-- Ensure that harvesters that was on a carryall switched sides.
Trigger.AfterDelay(DateTime.Seconds(15), function()
ChangeOwner(smuggler_neutral, smuggler_harkonnen)
end)
end
if unit.Owner == smuggler_ordos and attacker.Owner == player then
ChangeOwner(smuggler_ordos, smuggler_both)
-- Ensure that harvesters that was on a carryall switched sides.
Trigger.AfterDelay(DateTime.Seconds(15), function()
ChangeOwner(smuggler_ordos, smuggler_both)
end)
end
if unit.Owner == smuggler_neutral and (attacker.Owner == ordos_main or attacker.Owner == ordos_small) then
ChangeOwner(smuggler_neutral, smuggler_ordos)
-- Ensure that harvesters that was on a carryall switched sides.
Trigger.AfterDelay(DateTime.Seconds(15), function()
ChangeOwner(smuggler_neutral, smuggler_ordos)
end)
end
if unit.Owner == smuggler_harkonnen and (attacker.Owner == ordos_main or attacker.Owner == ordos_small) then
ChangeOwner(smuggler_harkonnen, smuggler_ordos)
-- Ensure that harvesters that was on a carryall switched sides.
Trigger.AfterDelay(DateTime.Seconds(15), function()
ChangeOwner(smuggler_harkonnen, smuggler_ordos)
end)
end
if attacker.Owner == player and not message_check then
message_check = true
Media.DisplayMessage("The Smugglers are now hostile!", "Mentat")
end
end)
end)
end
Tick = function() Tick = function()
if player.HasNoRequiredUnits() then if player.HasNoRequiredUnits() then
ordos_main.MarkCompletedObjective(KillHarkonnen1) ordos_main.MarkCompletedObjective(KillHarkonnen1)
@@ -158,6 +208,11 @@ Tick = function()
OrdosKilled = true OrdosKilled = true
end end
if smuggler_neutral.HasNoRequiredUnits() and smuggler_harkonnen.HasNoRequiredUnits() and smuggler_ordos.HasNoRequiredUnits() and smuggler_both.HasNoRequiredUnits() and not SmugglersKilled then
Media.DisplayMessage("The Smugglers have been annihilated!", "Mentat")
SmugglersKilled = true
end
if (OStarport.IsDead or OStarport.Owner == player) and not player.IsObjectiveCompleted(DestroyStarport) then if (OStarport.IsDead or OStarport.Owner == player) and not player.IsObjectiveCompleted(DestroyStarport) then
player.MarkCompletedObjective(DestroyStarport) player.MarkCompletedObjective(DestroyStarport)
end end
@@ -184,7 +239,10 @@ end
WorldLoaded = function() WorldLoaded = function()
ordos_main = Player.GetPlayer("Ordos Main Base") ordos_main = Player.GetPlayer("Ordos Main Base")
ordos_small = Player.GetPlayer("Ordos Small Base") ordos_small = Player.GetPlayer("Ordos Small Base")
smuggler = Player.GetPlayer("Smugglers") smuggler_neutral = Player.GetPlayer("Smugglers - Neutral")
smuggler_harkonnen = Player.GetPlayer("Smugglers - Enemy to Harkonnen")
smuggler_ordos = Player.GetPlayer("Smugglers - Enemy to Ordos")
smuggler_both = Player.GetPlayer("Smugglers - Enemy to Both")
player = Player.GetPlayer("Harkonnen") player = Player.GetPlayer("Harkonnen")
InitObjectives(player) InitObjectives(player)
@@ -192,6 +250,12 @@ WorldLoaded = function()
KillHarkonnen1 = ordos_main.AddPrimaryObjective("Kill all Harkonnen units.") KillHarkonnen1 = ordos_main.AddPrimaryObjective("Kill all Harkonnen units.")
KillHarkonnen2 = ordos_small.AddPrimaryObjective("Kill all Harkonnen units.") KillHarkonnen2 = ordos_small.AddPrimaryObjective("Kill all Harkonnen units.")
-- Wait for carryall drop
Trigger.AfterDelay(DateTime.Seconds(10), function()
SmugglerUnits = smuggler_neutral.GetActors()
CheckSmugglerEnemies()
end)
Camera.Position = HMCV.CenterPosition Camera.Position = HMCV.CenterPosition
OrdosAttackLocation = HMCV.Location OrdosAttackLocation = HMCV.Location

View File

@@ -26,7 +26,7 @@ Players:
PlayerReference@Creeps: PlayerReference@Creeps:
Name: Creeps Name: Creeps
NonCombatant: True NonCombatant: True
Enemies: Harkonnen, Ordos Main Base, Ordos Small Base, Smugglers Enemies: Harkonnen, Ordos Main Base, Ordos Small Base, Smugglers - Neutral, Smugglers - Enemy to Harkonnen, Smugglers - Enemy to Ordos, Smugglers - Enemy to Both
PlayerReference@Harkonnen: PlayerReference@Harkonnen:
Name: Harkonnen Name: Harkonnen
Playable: True Playable: True
@@ -34,7 +34,7 @@ Players:
Faction: harkonnen Faction: harkonnen
LockColor: True LockColor: True
Color: FE0000 Color: FE0000
Enemies: Ordos Main Base, Ordos Small Base, Creeps Enemies: Ordos Main Base, Ordos Small Base, Smugglers - Enemy to Harkonnen, Smugglers - Enemy to Both, Creeps
PlayerReference@Ordos Main Base: PlayerReference@Ordos Main Base:
Name: Ordos Main Base Name: Ordos Main Base
LockFaction: True LockFaction: True
@@ -42,7 +42,7 @@ Players:
LockColor: True LockColor: True
Color: B3EAA5 Color: B3EAA5
Allies: Ordos Small Base Allies: Ordos Small Base
Enemies: Harkonnen Enemies: Harkonnen, Smugglers - Enemy to Ordos, Smugglers - Enemy to Both
PlayerReference@Ordos Small Base: PlayerReference@Ordos Small Base:
Name: Ordos Small Base Name: Ordos Small Base
LockFaction: True LockFaction: True
@@ -50,13 +50,38 @@ Players:
LockColor: True LockColor: True
Color: B3EAA5 Color: B3EAA5
Allies: Ordos Main Base Allies: Ordos Main Base
Enemies: Harkonnen Enemies: Harkonnen, Smugglers - Enemy to Ordos, Smugglers - Enemy to Both
PlayerReference@Smugglers: PlayerReference@Smugglers - Neutral:
Name: Smugglers Name: Smugglers - Neutral
NonCombatant: True
LockFaction: True LockFaction: True
Faction: smuggler Faction: smuggler
LockColor: True LockColor: True
Color: 542209 Color: 542209
PlayerReference@Smugglers - Enemy to Harkonnen:
Name: Smugglers - Enemy to Harkonnen
NonCombatant: True
LockFaction: True
Faction: smuggler
LockColor: True
Color: 542209
Enemies: Harkonnen
PlayerReference@Smugglers - Enemy to Ordos:
Name: Smugglers - Enemy to Ordos
NonCombatant: True
LockFaction: True
Faction: smuggler
LockColor: True
Color: 542209
Enemies: Ordos Main Base, Ordos Small Base
PlayerReference@Smugglers - Enemy to Both:
Name: Smugglers - Enemy to Both
NonCombatant: True
LockFaction: True
Faction: smuggler
LockColor: True
Color: 542209
Enemies: Harkonnen, Ordos Main Base, Ordos Small Base
Actors: Actors:
Actor0: wormspawner Actor0: wormspawner
@@ -517,16 +542,16 @@ Actors:
Owner: Neutral Owner: Neutral
SSilo1: silo SSilo1: silo
Location: 81,68 Location: 81,68
Owner: Smugglers Owner: Smugglers - Neutral
SPower1: wind_trap SPower1: wind_trap
Location: 75,69 Location: 75,69
Owner: Smugglers Owner: Smugglers - Neutral
SPower2: wind_trap SPower2: wind_trap
Location: 78,69 Location: 78,69
Owner: Smugglers Owner: Smugglers - Neutral
SSilo2: silo SSilo2: silo
Location: 81,70 Location: 81,70
Owner: Smugglers Owner: Smugglers - Neutral
Actor156: combat_tank_h Actor156: combat_tank_h
Location: 6,71 Location: 6,71
Owner: Harkonnen Owner: Harkonnen
@@ -538,16 +563,16 @@ Actors:
Owner: Harkonnen Owner: Harkonnen
Actor159: light_inf Actor159: light_inf
Location: 77,72 Location: 77,72
Owner: Smugglers Owner: Smugglers - Neutral
SSilo3: silo SSilo3: silo
Location: 81,72 Location: 81,72
Owner: Smugglers Owner: Smugglers - Neutral
Actor161: trike Actor161: trike
Location: 11,73 Location: 11,73
Owner: Harkonnen Owner: Harkonnen
Actor162: trooper Actor162: trooper
Location: 80,73 Location: 80,73
Owner: Smugglers Owner: Smugglers - Neutral
Actor163: trooper Actor163: trooper
Location: 7,74 Location: 7,74
Owner: Harkonnen Owner: Harkonnen
@@ -559,25 +584,25 @@ Actors:
Owner: Harkonnen Owner: Harkonnen
SRefinery: refinery SRefinery: refinery
Location: 78,74 Location: 78,74
Owner: Smugglers Owner: Smugglers - Neutral
Actor167: light_inf Actor167: light_inf
Location: 82,74 Location: 82,74
Owner: Smugglers Owner: Smugglers - Neutral
Actor168: combat_tank_h Actor168: combat_tank_h
Location: 10,75 Location: 10,75
Owner: Harkonnen Owner: Harkonnen
Actor169: trooper Actor169: trooper
Location: 82,75 Location: 82,75
Owner: Smugglers Owner: Smugglers - Neutral
Actor170: light_inf Actor170: light_inf
Location: 15,76 Location: 15,76
Owner: Harkonnen Owner: Harkonnen
Actor171: carryall Actor171: carryall
Location: 77,76 Location: 77,76
Owner: Smugglers Owner: Smugglers - Neutral
Actor172: harvester Actor172: harvester
Location: 81,76 Location: 81,76
Owner: Smugglers Owner: Smugglers - Neutral
HMCV: mcv HMCV: mcv
Location: 8,77 Location: 8,77
Owner: Harkonnen Owner: Harkonnen
@@ -595,10 +620,10 @@ Actors:
Owner: Neutral Owner: Neutral
Actor178: light_inf Actor178: light_inf
Location: 82,77 Location: 82,77
Owner: Smugglers Owner: Smugglers - Neutral
Actor179: light_inf Actor179: light_inf
Location: 83,77 Location: 83,77
Owner: Smugglers Owner: Smugglers - Neutral
Actor180: light_inf Actor180: light_inf
Location: 11,78 Location: 11,78
Owner: Harkonnen Owner: Harkonnen

View File

@@ -24,6 +24,10 @@ World:
PlayerIndex: PlayerIndex:
Ordos Main Base: 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160 Ordos Main Base: 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160
Ordos Small Base: 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160 Ordos Small Base: 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160
Smugglers - Neutral: 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208
Smugglers - Enemy to Harkonnen: 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208
Smugglers - Enemy to Ordos: 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208
Smugglers - Enemy to Both: 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208
carryall.reinforce: carryall.reinforce:
Cargo: Cargo:

View File

@@ -0,0 +1,50 @@
--[[
Copyright 2007-2017 The OpenRA Developers (see AUTHORS)
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) }
}
OrdosInfantryTypes = { "light_inf", "light_inf", "trooper", "trooper", "trooper" }
OrdosVehicleTypes = { "raider", "raider", "quad" }
OrdosTankTypes = { "combat_tank_o", "combat_tank_o", "siege_tank" }
OrdosStarportTypes = { "trike.starport", "trike.starport", "quad.starport", "combat_tank_o.starport", "combat_tank_o.starport", "siege_tank.starport", "missile_tank.starport" }
ActivateAI = function()
IdlingUnits[ordos_main] = Reinforcements.Reinforce(ordos_main, InitialOrdosReinforcements[1], InitialOrdosPaths[1]), Reinforcements.Reinforce(ordos_main, InitialOrdosReinforcements[2], InitialOrdosPaths[2])
IdlingUnits[ordos_small] = Reinforcements.Reinforce(ordos_small, InitialOrdosReinforcements[1], InitialOrdosPaths[3])
DefendAndRepairBase(ordos_main, OrdosMainBase, 0.75, AttackGroupSize[Difficulty])
DefendAndRepairBase(ordos_small, OrdosSmallBase, 0.75, AttackGroupSize[Difficulty])
local delay = function() return Utils.RandomInteger(AttackDelays[Difficulty][1], AttackDelays[Difficulty][2] + 1) end
local infantryToBuild = function() return { Utils.Random(OrdosInfantryTypes) } end
local vehilcesToBuild = function() return { Utils.Random(OrdosVehicleTypes) } end
local tanksToBuild = function() return { Utils.Random(OrdosTankTypes) } end
local unitsToBuy = function() return { Utils.Random(OrdosStarportTypes) } end
local attackThresholdSize = AttackGroupSize[Difficulty] * 2.5
ProduceUnits(ordos_main, OBarracks1, delay, infantryToBuild, AttackGroupSize[Difficulty], attackThresholdSize)
ProduceUnits(ordos_main, OLightFactory1, delay, vehilcesToBuild, AttackGroupSize[Difficulty], attackThresholdSize)
ProduceUnits(ordos_main, OHeavyFactory, delay, tanksToBuild, AttackGroupSize[Difficulty], attackThresholdSize)
ProduceUnits(ordos_main, OStarport, delay, unitsToBuy, AttackGroupSize[Difficulty], attackThresholdSize)
ProduceUnits(ordos_small, OBarracks2, delay, infantryToBuild, AttackGroupSize[Difficulty], attackThresholdSize)
ProduceUnits(ordos_small, OLightFactory2, delay, vehilcesToBuild, AttackGroupSize[Difficulty], attackThresholdSize)
end

View File

@@ -0,0 +1,244 @@
--[[
Copyright 2007-2017 The OpenRA Developers (see AUTHORS)
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.
]]
OrdosMainBase = { OConyard1, OOutpost, ORefinery1, ORefinery2, OHeavyFactory, OLightFactory1, OHiTechFactory, ORepair, OStarport, OGunt1, OGunt2, OGunt3, OGunt4, OGunt5, OGunt6, ORocket1, ORocket2, OBarracks1, OPower1, OPower2, OPower3, OPower4, OPower5, OPower6, OPower7, OPower8, OPower9, OPower10, OSilo1, OSilo2, OSilo3, OSilo4, OSilo5, OSilo6 }
OrdosSmallBase = { OConyard2, ORefinery3, OBarracks2, OLightFactory2, OGunt6, OGunt7, ORocket3, ORocket4, OPower11, OPower12, OPower13, OPower14, OSilo7, OSilo8, OSilo9 }
OrdosReinforcements =
{
easy =
{
{ "combat_tank_o", "light_inf", "raider" },
{ "raider", "trooper" },
{ "quad", "trooper", "trooper", "combat_tank_o"},
{ "siege_tank", "quad" },
{ "combat_tank_o", "combat_tank_o", "light_inf", "light_inf", "light_inf", "light_inf" },
{ "trooper", "trooper", "trooper", "trooper", "trooper" },
{ "light_inf", "light_inf", "light_inf", "light_inf", "missile_tank" }
},
normal =
{
{ "combat_tank_o", "raider", "raider" },
{ "raider", "raider" },
{ "quad", "trooper", "trooper", "trooper", "combat_tank_o"},
{ "raider", "raider" },
{ "siege_tank", "combat_tank_o" },
{ "trooper", "trooper", "trooper", "trooper", "trooper", "trooper" },
{ "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "missile_tank" },
{ "combat_tank_o", "combat_tank_o", "siege_tank" }
},
hard =
{
{ "combat_tank_o", "combat_tank_o", "raider" },
{ "raider", "raider", "trooper" },
{ "quad", "trooper", "trooper", "trooper", "trooper", "combat_tank_o"},
{ "raider", "raider", "light_inf" },
{ "siege_tank", "combat_tank_o", "quad" },
{ "trooper", "trooper", "trooper", "trooper", "trooper", "trooper", "trooper" },
{ "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "missile_tank" },
{ "combat_tank_o", "combat_tank_o", "siege_tank", "siege_tank" },
{ "missile_tank", "quad", "quad", "raider", "raider" }
}
}
OrdosStarportReinforcements =
{
easy = { "raider", "missile_tank", "combat_tank_o", "quad", "deviator", "deviator" },
normal = { "raider", "missile_tank", "missile_tank", "quad", "deviator", "deviator" },
hard = { "raider", "raider", "missile_tank", "missile_tank", "quad", "quad", "deviator", "deviator" }
}
OrdosAttackDelay =
{
easy = DateTime.Minutes(3),
normal = DateTime.Minutes(2) + DateTime.Seconds(20),
hard = DateTime.Minutes(1)
}
OrdosStarportDelay =
{
easy = DateTime.Minutes(7),
normal = DateTime.Minutes(6),
hard = DateTime.Minutes(5)
}
OrdosAttackWaves =
{
easy = 7,
normal = 8,
hard = 9
}
InitialOrdosReinforcements =
{
{ "trooper", "trooper", "trooper", "trooper", "light_inf", "light_inf", "light_inf", "light_inf", "light_inf", "light_inf" },
{ "combat_tank_o", "combat_tank_o", "quad", "quad", "raider", "raider" }
}
OrdosPaths =
{
{ OrdosEntry1.Location, OrdosRally1.Location },
{ OrdosEntry2.Location, OrdosRally2.Location },
{ OrdosEntry3.Location, OrdosRally3.Location },
{ OrdosEntry4.Location, OrdosRally4.Location },
{ OrdosEntry5.Location, OrdosRally5.Location },
{ OrdosEntry6.Location, OrdosRally6.Location }
}
InitialOrdosPaths =
{
{ OrdosEntry7.Location, OrdosRally7.Location },
{ OrdosEntry8.Location, OrdosRally8.Location },
{ OrdosEntry9.Location, OrdosRally9.Location }
}
SendStarportReinforcements = function()
Trigger.AfterDelay(OrdosStarportDelay[Difficulty], function()
if OStarport.IsDead or OStarport.Owner ~= ordos_main then
return
end
local units = Reinforcements.ReinforceWithTransport(ordos_main, "frigate", OrdosStarportReinforcements[Difficulty], { OrdosStarportEntry.Location, OStarport.Location + CVec.New(1, 1) }, { OrdosStarportExit.Location })[2]
Utils.Do(units, function(unit)
unit.AttackMove(OrdosAttackLocation)
IdleHunt(unit)
end)
Media.DisplayMessage("Ixian transports detected.", "Mentat")
SendStarportReinforcements()
end)
end
ChangeOwner = function(old_owner, new_owner)
local units = old_owner.GetActors()
Utils.Do(units, function(unit)
if not unit.IsDead then
unit.Owner = new_owner
end
end)
end
CheckSmugglerEnemies = function()
Utils.Do(SmugglerUnits, function(unit)
Trigger.OnDamaged(unit, function(self, attacker)
if unit.Owner == smuggler_neutral and attacker.Owner == player then
ChangeOwner(smuggler_neutral, smuggler_harkonnen)
end
if unit.Owner == smuggler_ordos and attacker.Owner == player then
ChangeOwner(smuggler_ordos, smuggler_both)
end
if unit.Owner == smuggler_neutral and (attacker.Owner == ordos_main or attacker.Owner == ordos_small) then
ChangeOwner(smuggler_neutral, smuggler_ordos)
end
if unit.Owner == smuggler_harkonnen and (attacker.Owner == ordos_main or attacker.Owner == ordos_small) then
ChangeOwner(smuggler_harkonnen, smuggler_ordos)
end
if attacker.Owner == player and not message_check then
message_check = true
Media.DisplayMessage("The Smugglers are now hostile!", "Mentat")
end
end)
end)
end
Tick = function()
if player.HasNoRequiredUnits() then
ordos_main.MarkCompletedObjective(KillHarkonnen1)
ordos_small.MarkCompletedObjective(KillHarkonnen2)
end
if ordos_main.HasNoRequiredUnits() and ordos_small.HasNoRequiredUnits() and not OrdosKilled then
Media.DisplayMessage("The Ordos have been annihilated!", "Mentat")
OrdosKilled = true
end
if smuggler_neutral.HasNoRequiredUnits() and smuggler_harkonnen.HasNoRequiredUnits() and smuggler_ordos.HasNoRequiredUnits() and smuggler_both.HasNoRequiredUnits() and not SmugglersKilled then
Media.DisplayMessage("The Smugglers have been annihilated!", "Mentat")
SmugglersKilled = true
end
if (OStarport.IsDead or OStarport.Owner == player) and not player.IsObjectiveCompleted(DestroyStarport) then
player.MarkCompletedObjective(DestroyStarport)
end
if DateTime.GameTime % DateTime.Seconds(10) == 0 and LastHarvesterEaten[ordos_main] then
local units = ordos_main.GetActorsByType("harvester")
if #units > 0 then
LastHarvesterEaten[ordos_main] = false
ProtectHarvester(units[1], ordos_main, AttackGroupSize[Difficulty])
end
end
if DateTime.GameTime % DateTime.Seconds(10) == 0 and LastHarvesterEaten[ordos_small] then
local units = ordos_small.GetActorsByType("harvester")
if #units > 0 then
LastHarvesterEaten[ordos_small] = false
ProtectHarvester(units[1], ordos_small, AttackGroupSize[Difficulty])
end
end
end
WorldLoaded = function()
ordos_main = Player.GetPlayer("Ordos Main Base")
ordos_small = Player.GetPlayer("Ordos Small Base")
smuggler_neutral = Player.GetPlayer("Smugglers - Neutral")
smuggler_harkonnen = Player.GetPlayer("Smugglers - Enemy to Harkonnen")
smuggler_ordos = Player.GetPlayer("Smugglers - Enemy to Ordos")
smuggler_both = Player.GetPlayer("Smugglers - Enemy to Both")
player = Player.GetPlayer("Harkonnen")
InitObjectives(player)
DestroyStarport = player.AddPrimaryObjective("Capture or Destroy the Ordos Starport.")
KillHarkonnen1 = ordos_main.AddPrimaryObjective("Kill all Harkonnen units.")
KillHarkonnen2 = ordos_small.AddPrimaryObjective("Kill all Harkonnen units.")
-- Wait for carryall drop
Trigger.AfterDelay(DateTime.Seconds(15), function()
SmugglerUnits = smuggler_neutral.GetActors()
CheckSmugglerEnemies()
end)
Camera.Position = HConYard.CenterPosition
OrdosAttackLocation = HConYard.Location
Trigger.OnAllKilledOrCaptured(OrdosMainBase, function()
Utils.Do(ordos_main.GetGroundAttackers(), IdleHunt)
end)
Trigger.OnAllKilledOrCaptured(OrdosSmallBase, function()
Utils.Do(ordos_small.GetGroundAttackers(), IdleHunt)
end)
local path = function() return Utils.Random(OrdosPaths) end
local waveCondition = function() return OrdosKilled end
local huntFunction = function(unit)
unit.AttackMove(OrdosAttackLocation)
IdleHunt(unit)
end
SendCarryallReinforcements(ordos_main, 0, OrdosAttackWaves[Difficulty], OrdosAttackDelay[Difficulty], path, OrdosReinforcements[Difficulty], waveCondition, huntFunction)
SendStarportReinforcements()
Actor.Create("upgrade.barracks", true, { Owner = ordos_main })
Actor.Create("upgrade.light", true, { Owner = ordos_main })
Actor.Create("upgrade.heavy", true, { Owner = ordos_main })
Actor.Create("upgrade.barracks", true, { Owner = ordos_small })
Actor.Create("upgrade.light", true, { Owner = ordos_small })
Trigger.AfterDelay(0, ActivateAI)
end

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB

View File

@@ -0,0 +1,649 @@
MapFormat: 11
RequiresMod: d2k
Title: Harkonnen 06b
Author: Westwood Studios
Tileset: ARRAKIS
MapSize: 98,74
Bounds: 2,2,94,70
Visibility: MissionSelector
Categories: Campaign
LockPreview: True
Players:
PlayerReference@Neutral:
Name: Neutral
OwnsWorld: True
NonCombatant: True
PlayerReference@Creeps:
Name: Creeps
NonCombatant: True
Enemies: Harkonnen, Ordos Main Base, Ordos Small Base, Smugglers - Neutral, Smugglers - Enemy to Harkonnen, Smugglers - Enemy to Ordos, Smugglers - Enemy to Both
PlayerReference@Harkonnen:
Name: Harkonnen
Playable: True
LockFaction: True
Faction: harkonnen
LockColor: True
Color: FE0000
Enemies: Ordos Main Base, Ordos Small Base, Smugglers - Enemy to Harkonnen, Smugglers - Enemy to Both, Creeps
PlayerReference@Ordos Main Base:
Name: Ordos Main Base
LockFaction: True
Faction: ordos
LockColor: True
Color: B3EAA5
Allies: Ordos Small Base
Enemies: Harkonnen, Smugglers - Enemy to Ordos, Smugglers - Enemy to Both
PlayerReference@Ordos Small Base:
Name: Ordos Small Base
LockFaction: True
Faction: ordos
LockColor: True
Color: B3EAA5
Allies: Ordos Main Base
Enemies: Harkonnen, Smugglers - Enemy to Ordos, Smugglers - Enemy to Both
PlayerReference@Smugglers - Neutral:
Name: Smugglers - Neutral
NonCombatant: True
LockFaction: True
Faction: smuggler
LockColor: True
Color: 542209
PlayerReference@Smugglers - Enemy to Harkonnen:
Name: Smugglers - Enemy to Harkonnen
NonCombatant: True
LockFaction: True
Faction: smuggler
LockColor: True
Color: 542209
Enemies: Harkonnen
PlayerReference@Smugglers - Enemy to Ordos:
Name: Smugglers - Enemy to Ordos
NonCombatant: True
LockFaction: True
Faction: smuggler
LockColor: True
Color: 542209
Enemies: Ordos Main Base, Ordos Small Base
PlayerReference@Smugglers - Enemy to Both:
Name: Smugglers - Enemy to Both
NonCombatant: True
LockFaction: True
Faction: smuggler
LockColor: True
Color: 542209
Enemies: Harkonnen, Ordos Main Base, Ordos Small Base
Actors:
Actor0: wall
Location: 25,2
Owner: Ordos Small Base
Actor1: wall
Location: 22,3
Owner: Ordos Small Base
Actor2: wall
Location: 23,3
Owner: Ordos Small Base
Actor3: wall
Location: 24,3
Owner: Ordos Small Base
ORocket3: large_gun_turret
Location: 25,3
Owner: Ordos Small Base
OPower1: wind_trap
Location: 51,3
Owner: Ordos Main Base
OPower2: wind_trap
Location: 54,3
Owner: Ordos Main Base
ORefinery1: refinery
Location: 57,3
Owner: Ordos Main Base
OLightFactory1: light_factory
Location: 71,3
Owner: Ordos Main Base
OPower3: wind_trap
Location: 75,3
Owner: Ordos Main Base
OPower4: wind_trap
Location: 78,3
Owner: Ordos Main Base
OPower5: wind_trap
Location: 81,3
Owner: Ordos Main Base
OPower6: wind_trap
Location: 84,3
Owner: Ordos Main Base
OPower7: wind_trap
Location: 87,3
Owner: Ordos Main Base
OSilo1: silo
Location: 90,3
Owner: Ordos Main Base
OSilo2: silo
Location: 91,3
Owner: Ordos Main Base
OSilo3: silo
Location: 92,3
Owner: Ordos Main Base
Actor17: harvester
Location: 60,4
Owner: Ordos Main Base
OSilo4: silo
Location: 90,4
Owner: Ordos Main Base
OSilo5: silo
Location: 91,4
Owner: Ordos Main Base
OSilo6: silo
Location: 92,4
Owner: Ordos Main Base
OSilo7: silo
Location: 5,5
Owner: Ordos Small Base
OSilo8: silo
Location: 7,5
Owner: Ordos Small Base
OSilo9: silo
Location: 9,5
Owner: Ordos Small Base
OPower11: wind_trap
Location: 18,5
Owner: Ordos Small Base
Actor25: carryall
Location: 60,5
Owner: Ordos Main Base
OPower12: wind_trap
Location: 15,6
Owner: Ordos Small Base
Actor27: wall
Location: 91,6
Owner: Ordos Main Base
Actor28: wall
Location: 92,6
Owner: Ordos Main Base
Actor29: wall
Location: 93,6
Owner: Ordos Main Base
Actor30: wall
Location: 94,6
Owner: Ordos Main Base
Actor31: wall
Location: 95,6
Owner: Ordos Main Base
OPower13: wind_trap
Location: 3,7
Owner: Ordos Small Base
OLightFactory2: light_factory
Location: 7,7
Owner: Ordos Small Base
Actor34: wall
Location: 22,7
Owner: Ordos Small Base
Actor35: wall
Location: 23,7
Owner: Ordos Small Base
Actor36: wall
Location: 24,7
Owner: Ordos Small Base
ORocket4: large_gun_turret
Location: 25,7
Owner: Ordos Small Base
OPower8: wind_trap
Location: 51,7
Owner: Ordos Main Base
OPower9: wind_trap
Location: 54,7
Owner: Ordos Main Base
Actor40: harvester
Location: 58,7
Owner: Ordos Main Base
OConYard1: construction_yard
Location: 60,7
Owner: Ordos Main Base
OHiTechFactory: high_tech_factory
Location: 71,7
Owner: Ordos Main Base
OPower10: wind_trap
Location: 87,7
Owner: Ordos Main Base
Actor44: wall
Location: 25,8
Owner: Ordos Small Base
OHeavyFactory: heavy_factory
Location: 79,8
Owner: Ordos Main Base
OStarport: starport
Location: 92,8
Owner: Ordos Main Base
OBarracks2: barracks
Location: 19,9
Owner: Ordos Small Base
OOutpost: outpost
Location: 75,9
Owner: Ordos Main Base
ORefinery3: refinery
Location: 15,10
Owner: Ordos Small Base
Actor50: spicebloom.spawnpoint
Location: 40,10
Owner: Neutral
Actor51: harvester
Location: 63,10
Owner: Ordos Main Base
OConYard2: construction_yard
Location: 7,11
Owner: Ordos Small Base
ORefinery2: refinery
Location: 67,11
Owner: Ordos Main Base
Actor54: carryall
Location: 70,11
Owner: Ordos Main Base
OBarracks1: barracks
Location: 71,11
Owner: Ordos Main Base
Actor56: light_inf
Location: 79,11
Owner: Ordos Main Base
OPower14: wind_trap
Location: 3,12
Owner: Ordos Small Base
Actor58: carryall
Location: 18,12
Owner: Ordos Small Base
Actor59: wall
Location: 51,12
Owner: Ordos Main Base
Actor60: wall
Location: 52,12
Owner: Ordos Main Base
Actor61: wall
Location: 53,12
Owner: Ordos Main Base
ORocket1: large_gun_turret
Location: 54,12
Owner: Ordos Main Base
ORocket2: large_gun_turret
Location: 60,12
Owner: Ordos Main Base
Actor64: wall
Location: 61,12
Owner: Ordos Main Base
Actor65: wall
Location: 62,12
Owner: Ordos Main Base
Actor66: wall
Location: 63,12
Owner: Ordos Main Base
Actor67: wall
Location: 64,12
Owner: Ordos Main Base
Actor68: harvester
Location: 70,12
Owner: Ordos Main Base
Actor69: light_inf
Location: 84,12
Owner: Ordos Main Base
ORepair: repair_pad
Location: 87,12
Owner: Ordos Main Base
OGunt1: medium_gun_turret
Location: 92,12
Owner: Ordos Main Base
Actor72: wall
Location: 93,12
Owner: Ordos Main Base
Actor73: wall
Location: 94,12
Owner: Ordos Main Base
Actor74: wall
Location: 95,12
Owner: Ordos Main Base
Actor75: harvester
Location: 13,13
Owner: Ordos Small Base
Actor76: light_inf
Location: 58,13
Owner: Ordos Main Base
Actor77: wall
Location: 64,13
Owner: Ordos Main Base
Actor78: light_inf
Location: 55,14
Owner: Ordos Main Base
Actor79: wall
Location: 64,14
Owner: Ordos Main Base
Actor80: wall
Location: 9,15
Owner: Ordos Small Base
Actor81: wall
Location: 14,15
Owner: Ordos Small Base
Actor82: wall
Location: 17,15
Owner: Ordos Small Base
Actor83: wall
Location: 18,15
Owner: Ordos Small Base
Actor84: wall
Location: 19,15
Owner: Ordos Small Base
Actor85: wall
Location: 9,16
Owner: Ordos Small Base
Actor86: wall
Location: 14,16
Owner: Ordos Small Base
Actor87: wall
Location: 16,16
Owner: Ordos Small Base
Actor88: wall
Location: 17,16
Owner: Ordos Small Base
Actor89: spicebloom.spawnpoint
Location: 45,16
Owner: Neutral
Actor90: wall
Location: 55,16
Owner: Ordos Main Base
Actor91: wall
Location: 59,16
Owner: Ordos Main Base
Actor92: wall
Location: 87,16
Owner: Ordos Main Base
Actor93: wall
Location: 2,17
Owner: Ordos Small Base
Actor94: wall
Location: 3,17
Owner: Ordos Small Base
Actor95: wall
Location: 4,17
Owner: Ordos Small Base
Actor96: wall
Location: 5,17
Owner: Ordos Small Base
Actor97: wall
Location: 6,17
Owner: Ordos Small Base
Actor98: wall
Location: 7,17
Owner: Ordos Small Base
Actor99: wall
Location: 8,17
Owner: Ordos Small Base
OGunt6: medium_gun_turret
Location: 9,17
Owner: Ordos Small Base
OGunt7: medium_gun_turret
Location: 14,17
Owner: Ordos Small Base
Actor102: wall
Location: 15,17
Owner: Ordos Small Base
Actor103: wall
Location: 16,17
Owner: Ordos Small Base
OGunt2: medium_gun_turret
Location: 55,17
Owner: Ordos Main Base
Actor105: wall
Location: 56,17
Owner: Ordos Main Base
Actor106: wall
Location: 57,17
Owner: Ordos Main Base
Actor107: wall
Location: 58,17
Owner: Ordos Main Base
OGunt3: medium_gun_turret
Location: 59,17
Owner: Ordos Main Base
Actor109: wall
Location: 87,17
Owner: Ordos Main Base
Actor110: spicebloom.spawnpoint
Location: 26,18
Owner: Neutral
Actor111: wall
Location: 87,18
Owner: Ordos Main Base
Actor112: wall
Location: 88,18
Owner: Ordos Main Base
Actor113: wall
Location: 89,18
Owner: Ordos Main Base
OGunt4: medium_gun_turret
Location: 90,18
Owner: Ordos Main Base
Actor115: light_inf
Location: 92,19
Owner: Ordos Main Base
OGunt5: medium_gun_turret
Location: 93,21
Owner: Ordos Main Base
Actor117: wall
Location: 94,21
Owner: Ordos Main Base
Actor118: wall
Location: 95,21
Owner: Ordos Main Base
Actor119: spicebloom.spawnpoint
Location: 14,23
Owner: Neutral
Actor120: spicebloom.spawnpoint
Location: 65,23
Owner: Neutral
SSilo1: silo
Location: 49,26
Owner: Smugglers - Neutral
SSilo2: silo
Location: 50,26
Owner: Smugglers - Neutral
SSilo3: silo
Location: 51,26
Owner: Smugglers - Neutral
Actor124: trooper
Location: 51,28
Owner: Smugglers - Neutral
Actor125: light_inf
Location: 53,28
Owner: Smugglers - Neutral
Actor126: wormspawner
Location: 76,28
Owner: Creeps
Actor127: spicebloom.spawnpoint
Location: 86,29
Owner: Neutral
SSilo4: silo
Location: 44,30
Owner: Smugglers - Neutral
SSilo5: silo
Location: 45,30
Owner: Smugglers - Neutral
SPower1: wind_trap
Location: 47,30
Owner: Smugglers - Neutral
SPower2: wind_trap
Location: 50,30
Owner: Smugglers - Neutral
Actor132: light_inf
Location: 53,30
Owner: Smugglers - Neutral
SRefinery: refinery
Location: 43,33
Owner: Smugglers - Neutral
Actor134: light_inf
Location: 50,33
Owner: Smugglers - Neutral
Actor135: harvester
Location: 46,35
Owner: Smugglers - Neutral
Actor136: light_inf
Location: 48,35
Owner: Smugglers - Neutral
Actor137: light_inf
Location: 52,35
Owner: Smugglers - Neutral
Actor138: light_inf
Location: 42,36
Owner: Smugglers - Neutral
Actor139: light_inf
Location: 44,37
Owner: Smugglers - Neutral
Actor140: spicebloom.spawnpoint
Location: 67,37
Owner: Neutral
Actor141: spicebloom.spawnpoint
Location: 58,39
Owner: Neutral
Actor142: light_inf
Location: 26,47
Owner: Ordos Main Base
Actor143: light_inf
Location: 58,47
Owner: Harkonnen
Actor144: quad
Location: 60,47
Owner: Harkonnen
Actor145: light_inf
Location: 63,47
Owner: Harkonnen
Actor146: trooper
Location: 57,49
Owner: Harkonnen
HConYard: construction_yard
Location: 59,49
Owner: Harkonnen
Actor148: light_inf
Location: 24,50
Owner: Ordos Main Base
Actor149: light_inf
Location: 63,50
Owner: Harkonnen
Actor150: quad
Location: 57,51
Owner: Harkonnen
Actor151: spicebloom.spawnpoint
Location: 87,51
Owner: Neutral
Actor152: light_inf
Location: 58,53
Owner: Harkonnen
Actor153: trooper
Location: 63,53
Owner: Harkonnen
Actor154: trike
Location: 60,54
Owner: Harkonnen
Actor155: trooper
Location: 61,54
Owner: Harkonnen
Actor156: spicebloom.spawnpoint
Location: 70,58
Owner: Neutral
Actor157: spicebloom.spawnpoint
Location: 24,59
Owner: Neutral
Actor158: spicebloom.spawnpoint
Location: 73,64
Owner: Neutral
Actor159: light_inf
Location: 7,67
Owner: Ordos Main Base
Actor160: light_inf
Location: 13,68
Owner: Ordos Main Base
Actor161: spicebloom.spawnpoint
Location: 33,68
Owner: Neutral
Actor162: spicebloom.spawnpoint
Location: 93,68
Owner: Neutral
Actor163: spicebloom.spawnpoint
Location: 48,69
Owner: Neutral
Actor164: spicebloom.spawnpoint
Location: 66,69
Owner: Neutral
Actor165: spicebloom.spawnpoint
Location: 16,70
Owner: Neutral
Actor166: spicebloom.spawnpoint
Location: 18,70
Owner: Neutral
OrdosRally8: waypoint
Owner: Neutral
Location: 65,8
OrdosEntry8: waypoint
Owner: Neutral
Location: 65,2
OrdosRally7: waypoint
Owner: Neutral
Location: 68,8
OrdosEntry7: waypoint
Owner: Neutral
Location: 68,2
OrdosRally9: waypoint
Owner: Neutral
Location: 12,7
OrdosEntry9: waypoint
Owner: Neutral
Location: 12,2
OrdosRally1: waypoint
Owner: Neutral
Location: 15,66
OrdosEntry1: waypoint
Owner: Neutral
Location: 15,71
OrdosRally2: waypoint
Owner: Neutral
Location: 28,69
OrdosEntry2: waypoint
Owner: Neutral
Location: 28,71
OrdosRally3: waypoint
Owner: Neutral
Location: 44,65
OrdosEntry3: waypoint
Owner: Neutral
Location: 44,71
OrdosRally4: waypoint
Owner: Neutral
Location: 74,66
OrdosEntry4: waypoint
Owner: Neutral
Location: 74,71
OrdosRally5: waypoint
Owner: Neutral
Location: 89,70
OrdosEntry5: waypoint
Owner: Neutral
Location: 95,70
OrdosRally6: waypoint
Owner: Neutral
Location: 89,53
OrdosEntry6: waypoint
Owner: Neutral
Location: 95,53
OrdosStarportEntry: waypoint
Owner: Neutral
Location: 95,9
OrdosStarportExit: waypoint
Owner: Neutral
Location: 2,9
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml

View File

@@ -0,0 +1,71 @@
Player:
PlayerResources:
DefaultCash: 5000
World:
LuaScript:
Scripts: campaign-global.lua, harkonnen06b.lua, harkonnen06b-AI.lua
MissionData:
Briefing: The weak Ordos are no match for Harkonnen troops. However, smuggled Ixian technologies may upset this balance of power.\n\nThis cannot be allowed to happen. Establish a base on the plain, locate the Ordos Starport and destroy or capture it before the expensive shipments of Ixian weaponry begin to arrive. Time is short - the transports have already entered the system.
BriefingVideo: H_BR06_E.VQA
MapOptions:
TechLevel: medium
ScriptLobbyDropdown@difficulty:
ID: difficulty
Label: Difficulty
Values:
easy: Easy
normal: Normal
hard: Hard
Default: easy
^Palettes:
IndexedPlayerPalette:
PlayerIndex:
Ordos Main Base: 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160
Ordos Small Base: 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160
Smugglers - Neutral: 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208
Smugglers - Enemy to Harkonnen: 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208
Smugglers - Enemy to Ordos: 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208
Smugglers - Enemy to Both: 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208
carryall.reinforce:
Cargo:
MaxWeight: 10
frigate:
Aircraft:
LandableTerrainTypes: Sand, Rock, Transition, Spice, SpiceSand, Dune, Concrete
VTOL: true # The frigate would teleport to land otherwise
concreteb:
Buildable:
Prerequisites: ~disabled
large_gun_turret:
Buildable:
Prerequisites: ~disabled
research_centre:
Buildable:
Prerequisites: outpost, heavy_factory, upgrade.heavy
starport:
Buildable:
Prerequisites: heavy_factory, outpost
missile_tank:
Buildable:
Prerequisites: ~heavy.missiletank, upgrade.heavy, research_centre
sardaukar:
Buildable:
Prerequisites: ~disabled
stealth_raider:
Buildable:
Prerequisites: ~disabled
upgrade.conyard:
Buildable:
Prerequisites: ~disabled

View File

@@ -26,3 +26,4 @@ Harkonnen Campaign:
./mods/d2k/maps/harkonnen-03b ./mods/d2k/maps/harkonnen-03b
./mods/d2k/maps/harkonnen-04 ./mods/d2k/maps/harkonnen-04
./mods/d2k/maps/harkonnen-06a ./mods/d2k/maps/harkonnen-06a
./mods/d2k/maps/harkonnen-06b