Merge pull request #9402 from abcdefg30/atreides02a

Add atreides02a
This commit is contained in:
Oliver Brakmann
2015-10-01 22:43:48 +02:00
5 changed files with 361 additions and 0 deletions

View File

@@ -0,0 +1,124 @@
HarkonnenBase = { HConyard, HPower1, HPower2, HBarracks }
HarkonnenReinforcements = { }
HarkonnenReinforcements["Easy"] =
{
{ "light_inf", "trike" },
{ "light_inf", "trike" },
{ "light_inf", "light_inf", "light_inf", "trike", "trike" }
}
HarkonnenReinforcements["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" },
}
HarkonnenReinforcements["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 = { }
HarkonnenAttackDelay["Easy"] = DateTime.Minutes(5)
HarkonnenAttackDelay["Normal"] = DateTime.Minutes(2) + DateTime.Seconds(40)
HarkonnenAttackDelay["Hard"] = DateTime.Minutes(1) + DateTime.Seconds(20)
HarkonnenAttackWaves = { }
HarkonnenAttackWaves["Easy"] = 3
HarkonnenAttackWaves["Normal"] = 6
HarkonnenAttackWaves["Hard"] = 9
wave = 0
SendHarkonnen = function()
Trigger.AfterDelay(HarkonnenAttackDelay[Map.Difficulty], function()
wave = wave + 1
if wave > HarkonnenAttackWaves[Map.Difficulty] then
return
end
local path = Utils.Random(HarkonnenAttackPaths)
local units = Reinforcements.ReinforceWithTransport(harkonnen, "carryall.reinforce", HarkonnenReinforcements[Map.Difficulty][wave], path, { path[1] })[2]
Utils.Do(units, IdleHunt)
SendHarkonnen()
end)
end
IdleHunt = function(unit)
Trigger.OnIdle(unit, unit.Hunt)
end
Tick = function()
if player.HasNoRequiredUnits() then
harkonnen.MarkCompletedObjective(KillAtreides)
end
if harkonnen.HasNoRequiredUnits() and not player.IsObjectiveCompleted(KillHarkonnen) then
Media.DisplayMessage("The Harkonnen have been anihilated!", "Mentat")
player.MarkCompletedObjective(KillHarkonnen)
end
end
WorldLoaded = function()
harkonnen = Player.GetPlayer("Harkonnen")
player = Player.GetPlayer("Atreides")
InitObjectives()
Camera.Position = AConyard.CenterPosition
Trigger.OnAllKilled(HarkonnenBase, function()
Utils.Do(harkonnen.GetGroundAttackers(), IdleHunt)
end)
SendHarkonnen()
end
InitObjectives = function()
Trigger.OnObjectiveAdded(player, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
end)
KillAtreides = harkonnen.AddPrimaryObjective("Kill all Atreides units.")
KillHarkonnen = player.AddPrimaryObjective("Destroy all Harkonnen forces.")
Trigger.OnObjectiveCompleted(player, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
end)
Trigger.OnObjectiveFailed(player, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
end)
Trigger.OnPlayerLost(player, function()
Trigger.AfterDelay(DateTime.Seconds(1), function()
Media.PlaySpeechNotification(player, "Lose")
end)
end)
Trigger.OnPlayerWon(player, function()
Trigger.AfterDelay(DateTime.Seconds(1), function()
Media.PlaySpeechNotification(player, "Win")
end)
end)
end

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

View File

@@ -0,0 +1,236 @@
MapFormat: 7
RequiresMod: d2k
Title: Atreides 02a
Description: Infiltrate the Imperial Basin and build up our forces until they are strong enough to eradicate the local Harkonnen presence.\n\nThe Harkonnen are reinforcing their troops by air, so be on your guard. Use the Outpost's radar to detect attacks from unexpected quarters.\n\nBe careful when minig 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.\n\nGood luck.\n
Author: Westwood Studios
Tileset: ARRAKIS
MapSize: 52,52
Bounds: 2,2,48,48
Visibility: MissionSelector
Type: Campaign
Videos:
Briefing: a_br02_e.vqa
Options:
Crates: False
Creeps: True
Fog: True
Shroud: True
AllyBuildRadius: False
FragileAlliances: False
StartingCash: 5000
TechLevel: Low
ConfigurableStartingUnits: False
Difficulties: Easy, Normal, Hard
ShortGame: False
Players:
PlayerReference@Neutral:
Name: Neutral
OwnsWorld: True
NonCombatant: True
PlayerReference@Creeps:
Name: Creeps
NonCombatant: True
PlayerReference@Atreides:
Name: Atreides
Playable: True
LockFaction: True
Faction: atreides
LockColor: True
ColorRamp: 170,255,200
Enemies: Harkonnen
PlayerReference@Harkonnen:
Name: Harkonnen
LockFaction: True
Faction: harkonnen
LockColor: True
ColorRamp: 0,255,127
Enemies: Atreides
Actors:
Actor0: spicebloom
Location: 42,4
Owner: Neutral
Actor1: trike
Location: 26,6
Owner: Atreides
Actor2: trike
Location: 11,8
Owner: Harkonnen
Actor3: trike
Location: 20,8
Owner: Atreides
Actor4: trike
Location: 23,8
Owner: Atreides
Actor6: light_inf
Location: 19,11
Owner: Atreides
Actor7: trike
Location: 25,11
Owner: Atreides
Actor8: light_inf
Location: 25,12
Owner: Atreides
Actor9: trike
Location: 45,12
Owner: Harkonnen
Actor10: light_inf
Location: 19,13
Owner: Atreides
Actor11: trike
Location: 23,13
Owner: Atreides
Actor12: light_inf
Location: 15,19
Owner: Harkonnen
Actor13: light_inf
Location: 7,20
Owner: Harkonnen
Actor14: light_inf
Location: 34,21
Owner: Harkonnen
Actor15: spicebloom
Location: 25,23
Owner: Neutral
Actor16: light_inf
Location: 23,27
Owner: Harkonnen
Actor17: light_inf
Location: 48,31
Owner: Harkonnen
Actor18: wormspawner
Location: 43,35
Owner: Creeps
Actor19: light_inf
Location: 7,36
Owner: Harkonnen
Actor20: trike
Location: 40,37
Owner: Harkonnen
Actor21: trike
Location: 23,38
Owner: Harkonnen
Actor22: light_inf
Location: 25,38
Owner: Harkonnen
Actor23: spicebloom
Location: 11,40
Owner: Neutral
Actor24: trike
Location: 22,40
Owner: Harkonnen
Actor26: trike
Location: 21,41
Owner: Harkonnen
Actor27: trike
Location: 23,41
Owner: Harkonnen
Actor28: light_inf
Location: 21,44
Owner: Harkonnen
Actor30: light_inf
Location: 22,46
Owner: Harkonnen
Actor31: light_inf
Location: 28,46
Owner: Harkonnen
Actor32: spicebloom
Location: 42,46
Owner: Neutral
HConyard: construction_yard
Location: 24,44
Owner: Harkonnen
HPower1: wind_trap
Location: 22,47
Owner: Harkonnen
HPower2: wind_trap
Location: 25,47
Owner: Harkonnen
HBarracks: barracks
Location: 25,40
Owner: Harkonnen
AConyard: construction_yard
Location: 21,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: 21,18
HarkonnenRally4: waypoint
Owner: Neutral
Location: 30,28
Smudges:
Rules:
Player:
-ConquestVictoryConditions:
MissionObjectives:
EarlyGameOver: true
World:
-CrateSpawner:
-SpawnMPUnits:
-MPStartLocations:
LuaScript:
Scripts: atreides02a.lua
ObjectivesPanel:
PanelName: MISSION_OBJECTIVES
WormManager:
Minimum: 1
Maximum: 1
carryall.reinforce:
Cargo:
MaxWeight: 10
construction_yard:
Production:
Produces: Building
concreteb:
Buildable:
Prerequisites: ~disabled
heavy_factory:
Buildable:
Prerequisites: ~disabled
medium_gun_turret:
Buildable:
Prerequisites: ~disabled
wall:
Buildable:
Prerequisites: ~disabled
outpost:
Buildable:
Prerequisites: barracks
Sequences:
VoxelSequences:
Weapons:
Voices:
Notifications:
Translations:

View File

@@ -1,3 +1,4 @@
Atreides Campaign:
./mods/d2k/maps/atreides-01a
./mods/d2k/maps/atreides-01b
./mods/d2k/maps/atreides-02a