Replace Map.Difficulty with Map.LobbyOption in scripts.

This commit is contained in:
Paul Chote
2016-06-12 20:43:54 +01:00
parent 8ce4ab0bd1
commit d08a8eb1f6
32 changed files with 203 additions and 203 deletions

View File

@@ -11,7 +11,7 @@ PathGuards = { PathGuard1, PathGuard2, PathGuard3, PathGuard4, PathGuard5, PathG
IdlingUnits = { }
if Map.Difficulty == "Easy" then
if Map.LobbyOption("difficulty") == "easy" then
TimerTicks = DateTime.Minutes(10)
Announcements =
{
@@ -23,7 +23,7 @@ if Map.Difficulty == "Easy" then
{ speech = "WarningOneMinuteRemaining", delay = DateTime.Minutes(9) }
}
elseif Map.Difficulty == "Normal" then
elseif Map.LobbyOption("difficulty") == "normal" then
TimerTicks = DateTime.Minutes(5)
Announcements =
{
@@ -38,7 +38,7 @@ elseif Map.Difficulty == "Normal" then
InfantryDelay = DateTime.Seconds(18)
AttackGroupSize = 5
elseif Map.Difficulty == "Hard" then
elseif Map.LobbyOption("difficulty") == "hard" then
TimerTicks = DateTime.Minutes(3)
Announcements =
{
@@ -146,7 +146,7 @@ SendAttack = function()
end
Utils.Do(units, function(unit)
if Map.Difficulty ~= "Real tough guy" then
if Map.LobbyOption("difficulty") ~= "tough" then
unit.AttackMove(DeployPoint.Location)
end
Trigger.OnIdle(unit, unit.Hunt)

View File

@@ -22,7 +22,7 @@ World:
easy: Easy
normal: Normal
hard: Hard
realtoughguy: Real tough guy
tough: Real tough guy
Default: easy
HARV:

View File

@@ -9,7 +9,7 @@ WaterTransportTriggerArea = { CPos.New(39, 54), CPos.New(40, 54), CPos.New(41, 5
ParadropTriggerArea = { CPos.New(81, 60), CPos.New(82, 60), CPos.New(83, 60), CPos.New(63, 63), CPos.New(64, 63), CPos.New(65, 63), CPos.New(66, 63), CPos.New(67, 63), CPos.New(68, 63), CPos.New(69, 63), CPos.New(70, 63), CPos.New(71, 63), CPos.New(72, 63) }
ReinforcementsTriggerArea = { CPos.New(96, 55), CPos.New(97, 55), CPos.New(97, 56), CPos.New(98, 56) }
if Map.Difficulty == "Easy" then
if Map.LobbyOption("difficulty") == "easy" then
TanyaType = "e7"
else
TanyaType = "e7.noautotarget"

View File

@@ -20,7 +20,7 @@ GuardTanks = { Heavy1, Heavy2, Heavy3 }
CheckpointGuards = { USSRCheckpointGuard1, USSRCheckpointGuard2 }
CheckpointGuardWaypoints = { CheckpointGuardWaypoint1, CheckpointGuardWaypoint2 }
if Map.Difficulty == "Easy" then
if Map.LobbyOption("difficulty") == "easy" then
TanyaType = "e7"
else
TanyaType = "e7.noautotarget"

View File

@@ -158,7 +158,7 @@ InitProductionBuildings = function()
end)
end
if Map.Difficulty ~= "Easy" then
if Map.LobbyOption("difficulty") ~= "easy" then
if not Airfield1.IsDead then
Trigger.OnKilled(Airfield1, function()

View File

@@ -1,9 +1,9 @@
if Map.Difficulty == "Easy" then
if Map.LobbyOption("difficulty") == "easy" then
TanyaType = "e7"
ReinforceCash = 5000
HoldAITime = DateTime.Minutes(3)
SpecialCameras = true
elseif Map.Difficulty == "Normal" then
elseif Map.LobbyOption("difficulty") == "normal" then
TanyaType = "e7.noautotarget"
ChangeStance = true
ReinforceCash = 2250
@@ -83,7 +83,7 @@ Tick = function()
end
if ussr.HasNoRequiredUnits() then
if not greece.IsObjectiveCompleted(KillAll) and Map.Difficulty == "Real tough guy" then
if not greece.IsObjectiveCompleted(KillAll) and Map.LobbyOption("difficulty") == "tough" then
SendWaterExtraction()
end
greece.MarkCompletedObjective(KillAll)
@@ -186,7 +186,7 @@ FreeTanya = function()
Trigger.OnKilled(Tanya, function() ussr.MarkCompletedObjective(ussrObj) end)
if Map.Difficulty == "Real tough guy" then
if Map.LobbyOption("difficulty") == "tough" then
KillSams = greece.AddPrimaryObjective("Destroy all four SAM Sites that block\nour reinforcements' helicopter.")
greece.MarkCompletedObjective(mainObj)
@@ -272,7 +272,7 @@ InitTriggers = function()
end
end)
if Map.Difficulty ~= "Real tough guy" then
if Map.LobbyOption("difficulty") ~= "tough" then
Trigger.OnKilled(Mammoth, function()
Trigger.AfterDelay(HoldAITime - DateTime.Seconds(45), function() HoldProduction = false end)
Trigger.AfterDelay(HoldAITime, function() Attacking = true end)
@@ -294,7 +294,7 @@ InitTriggers = function()
Trigger.AfterDelay(DateTime.Seconds(7), flare.Destroy)
Media.PlaySpeechNotification(greece, "SignalFlare")
if Map.Difficulty == "Real tough guy" then
if Map.LobbyOption("difficulty") == "tough" then
Reinforcements.ReinforceWithTransport(greece, InsertionHeliType, HeliReinforcements, ExtractionPath, { ExtractionPath[1] })
if not Harvester.IsDead then
Harvester.FindResources()

View File

@@ -16,7 +16,7 @@ World:
easy: Easy
normal: Normal
hard: Hard
realtoughguy: Real tough guy
tough: Real tough guy
Default: easy
Camera.Truk:

View File

@@ -1,20 +1,20 @@
DeathThreshold =
{
Easy = 200,
Normal = 100,
easy = 200,
normal = 100,
}
TanyaType = "e7"
TanyaStance = "AttackAnything"
if Map.Difficulty ~= "Easy" then
if Map.LobbyOption("difficulty") ~= "easy" then
TanyaType = "e7.noautotarget"
TanyaStance = "HoldFire"
end
RepairTriggerThreshold =
{
Easy = 50,
Normal = 75,
easy = 50,
normal = 75,
}
Sams = { Sam1, Sam2, Sam3, Sam4 }
@@ -58,8 +58,8 @@ SovietVehicles =
}
ProductionInterval =
{
Easy = DateTime.Seconds(10),
Normal = DateTime.Seconds(2),
easy = DateTime.Seconds(10),
normal = DateTime.Seconds(2),
}
ReinforcementsDelay = DateTime.Minutes(16)
@@ -144,7 +144,7 @@ ProduceInfantry = function()
soviets.Build({ Utils.Random(SovietInfantry) }, function(units)
table.insert(AttackGroup, units[1])
SendAttackGroup()
Trigger.AfterDelay(ProductionInterval[Map.Difficulty], ProduceInfantry)
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceInfantry)
end)
end
@@ -156,7 +156,7 @@ ProduceVehicles = function()
soviets.Build({ Utils.Random(SovietVehicles[SovietVehicleType]) }, function(units)
table.insert(AttackGroup, units[1])
SendAttackGroup()
Trigger.AfterDelay(ProductionInterval[Map.Difficulty], ProduceVehicles)
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceVehicles)
end)
end
@@ -177,7 +177,7 @@ Tick = function()
allies2.MarkCompletedObjective(objCutSovietPower)
end
if not allies2.IsObjectiveCompleted(objLimitLosses) and allies2.UnitsLost > DeathThreshold[Map.Difficulty] then
if not allies2.IsObjectiveCompleted(objLimitLosses) and allies2.UnitsLost > DeathThreshold[Map.LobbyOption("difficulty")] then
allies2.MarkFailedObjective(objLimitLosses)
end
@@ -191,7 +191,7 @@ end
SetupSoviets = function()
soviets.Cash = 1000
if Map.Difficulty == "Easy" then
if Map.LobbyOption("difficulty") == "easy" then
Utils.Do(Sams, function(sam)
local camera = Actor.Create("Camera.SAM", true, { Owner = allies1, Location = sam.Location })
Trigger.OnKilledOrCaptured(sam, function()
@@ -203,7 +203,7 @@ SetupSoviets = function()
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == soviets and self.HasProperty("StartBuildingRepairs") end)
Utils.Do(buildings, function(actor)
Trigger.OnDamaged(actor, function(building)
if building.Owner == soviets and building.Health < (building.MaxHealth * RepairTriggerThreshold[Map.Difficulty] / 100) then
if building.Owner == soviets and building.Health < (building.MaxHealth * RepairTriggerThreshold[Map.LobbyOption("difficulty")] / 100) then
building.StartBuildingRepairs()
end
end)
@@ -283,7 +283,7 @@ SpawnTanya = function()
Tanya = Actor.Create(TanyaType, true, { Owner = allies1, Location = TanyaLocation.Location })
Tanya.Stance = TanyaStance
if Map.Difficulty ~= "Easy" and allies1.IsLocalPlayer then
if Map.LobbyOption("difficulty") ~= "easy" and allies1.IsLocalPlayer then
Trigger.AfterDelay(DateTime.Seconds(2), function()
Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya")
end)
@@ -355,7 +355,7 @@ WorldLoaded = function()
objDestroySamSites = allies1.AddPrimaryObjective("Destroy the SAM sites.")
objHoldPosition = allies2.AddPrimaryObjective("Hold your position and protect the base.")
objLimitLosses = allies2.AddSecondaryObjective("Do not lose more than " .. DeathThreshold[Map.Difficulty] .. " units.")
objLimitLosses = allies2.AddSecondaryObjective("Do not lose more than " .. DeathThreshold[Map.LobbyOption("difficulty")] .. " units.")
objCutSovietPower = allies2.AddSecondaryObjective("Take out the Soviet power grid.")
SetupTriggers()

View File

@@ -13,7 +13,7 @@ Walls =
{ WallBottomRight1, WallBottomRight2, WallBottomRight3, WallBottomRight4, WallBottomRight5, WallBottomRight6, WallBottomRight7, WallBottomRight8, WallBottomRight9 }
}
if Map.Difficulty == "Very Easy (1P)" then
if Map.LobbyOption("difficulty") == "veryeasy" then
ParaChance = 20
Patrol = { "e1", "e2", "e1" }
Infantry = { "e4", "e1", "e1", "e2", "e2" }
@@ -22,7 +22,7 @@ if Map.Difficulty == "Very Easy (1P)" then
LongRange = { "arty" }
Boss = { "v2rl" }
Swarm = { "shok", "shok", "shok" }
elseif Map.Difficulty == "Easy (2P)" then
elseif Map.LobbyOption("difficulty") == "easy" then
ParaChance = 25
Patrol = { "e1", "e2", "e1" }
Infantry = { "e4", "e1", "e1", "e2", "e1", "e2", "e1" }
@@ -31,7 +31,7 @@ elseif Map.Difficulty == "Easy (2P)" then
LongRange = { "v2rl" }
Boss = { "4tnk" }
Swarm = { "shok", "shok", "shok", "shok", "ttnk" }
elseif Map.Difficulty == "Normal (3P)" then
elseif Map.LobbyOption("difficulty") == "normal" then
ParaChance = 30
Patrol = { "e1", "e2", "e1", "e1" }
Infantry = { "e4", "e1", "e1", "e2", "e1", "e2", "e1" }
@@ -40,7 +40,7 @@ elseif Map.Difficulty == "Normal (3P)" then
LongRange = { "v2rl" }
Boss = { "4tnk" }
Swarm = { "shok", "shok", "shok", "shok", "ttnk", "ttnk", "ttnk" }
elseif Map.Difficulty == "Hard (4P)" then
elseif Map.LobbyOption("difficulty") == "hard" then
ParaChance = 35
Patrol = { "e1", "e2", "e1", "e1", "e4" }
Infantry = { "e4", "e1", "e1", "e2", "e1", "e2", "e1" }
@@ -77,7 +77,7 @@ Waves =
}
-- Now do some adjustments to the waves
if Map.Difficulty == "Real tough guy" or Map.Difficulty == "Endless mode" then
if Map.LobbyOption("difficulty") == "tough" or Map.LobbyOption("difficulty") == "endless" then
Waves[8] = { delay = 1500, units = { Infantry, Infantry, Patrol, Infantry, Infantry, Infantry }, ironUnits = { LongRange } }
Waves[9] = { delay = 1500, units = { Infantry, Infantry, Patrol, Infantry, Infantry, Infantry, Infantry, Infantry, LongRange, LongRange, Vehicles, Tank }, ironUnits = { Tank } }
Waves[11] = { delay = 1500, units = { Vehicles, Infantry, Patrol, Patrol, Patrol, Infantry, LongRange, Tank, Boss, Infantry, Infantry, Patrol } }
@@ -145,7 +145,7 @@ SendWave = function()
SendWave()
end
else
if Map.Difficulty == "Endless mode" then
if Map.LobbyOption("difficulty") == "endless" then
Wave = 0
IncreaseDifficulty()
SendWave()

View File

@@ -44,13 +44,13 @@ World:
ID: difficulty
Label: Difficulty
Values:
hard(4p): Hard (4P)
normal(3p): Normal (3P)
easy(2p): Easy (2P)
veryeasy(1p): Very Easy (1P)
realtoughguy: Real tough guy
endlessmode: Endless mode
Default: hard(4p)
hard: Hard (4P)
normal: Normal (3P)
easy: Easy (2P)
veryeasy: Very Easy (1P)
tough: Real tough guy
endless: Endless mode
Default: hard
FORTCRATE:
Inherits: ^Crate

View File

@@ -9,9 +9,9 @@ BeachheadTrigger =
CPos.New(137, 104), CPos.New(137, 105), CPos.New(137, 106), CPos.New(136, 106), CPos.New(136, 107)
}
Difficulty = Map.Difficulty
Difficulty = Map.LobbyOption("difficulty")
if Difficulty == "Medium" then
if Difficulty == "medium" then
BaseRaidInterval = DateTime.Minutes(3)
BaseFrontAttackInterval = DateTime.Minutes(3) + DateTime.Seconds(30)
BaseRearAttackInterval = DateTime.Minutes(8)

View File

@@ -1,8 +1,8 @@
if Map.Difficulty == "Easy" then
if Map.LobbyOption("difficulty") == "easy" then
remainingTime = DateTime.Minutes(7)
elseif Map.Difficulty == "Normal" then
elseif Map.LobbyOption("difficulty") == "normal" then
remainingTime = DateTime.Minutes(6)
elseif Map.Difficulty == "Hard" then
elseif Map.LobbyOption("difficulty") == "hard" then
remainingTime = DateTime.Minutes(5)
end
@@ -256,7 +256,7 @@ end)
Trigger.OnEnteredFootprint(SpyHideout3Trigger, function(a, id)
if not spyHideout3Trigger and a.Owner == player then
spyHideout3Trigger = true
if Map.Difficulty ~= "Hard" then
if Map.LobbyOption("difficulty") ~= "hard" then
Reinforcements.Reinforce(player, USSRReinforcements2, { ReinforcementSpawn.Location, CameraSpyHideout33.Location }, 0)
Media.PlaySpeechNotification(player, "ReinforcementsArrived")
end
@@ -363,7 +363,7 @@ Tick = function()
if not SpyHideout4.IsDead and SpyHideout4.HasPassengers then
spyReachedHideout4 = true
end
if remainingTime == DateTime.Minutes(5) and Map.Difficulty ~= "Hard" then
if remainingTime == DateTime.Minutes(5) and Map.LobbyOption("difficulty") ~= "hard" then
Media.PlaySpeechNotification(player, "WarningFiveMinutesRemaining")
elseif remainingTime == DateTime.Minutes(4) then
Media.PlaySpeechNotification(player, "WarningFourMinutesRemaining")

View File

@@ -18,7 +18,7 @@ Patrol2Path = { BridgeEntrancePoint.Location, NERoadTurnPoint.Location, Crossroa
VillageCamArea = { CPos.New(68, 75),CPos.New(68, 76),CPos.New(68, 77),CPos.New(68, 78),CPos.New(68, 79), CPos.New(68, 80), CPos.New(68, 81), CPos.New(68, 82) }
if Map.Difficulty == "Easy" then
if Map.LobbyOption("difficulty") == "easy" then
ArmorReinfGreece = { "jeep", "1tnk", "1tnk" }
else
ArmorReinfGreece = { "jeep", "jeep", "1tnk", "1tnk", "1tnk" }
@@ -60,7 +60,7 @@ BringPatrol1 = function()
end)
Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then
if Map.LobbyOption("difficulty") == "hard" then
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol1)
else
Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol1)
@@ -79,7 +79,7 @@ BringPatrol2 = function()
end)
Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then
if Map.LobbyOption("difficulty") == "hard" then
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol2)
else
Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol2)

View File

@@ -83,7 +83,7 @@ RunInitialActivities = function()
Trigger.AfterDelay(DateTime.Minutes(1), ProduceInfantry)
Trigger.AfterDelay(DateTime.Minutes(2), ProduceArmor)
if Map.Difficulty == "Hard" or Map.Difficulty == "Medium" then
if Map.LobbyOption("difficulty") == "hard" or Map.LobbyOption("difficulty") == "normal" then
Trigger.AfterDelay(DateTime.Seconds(15), ReinfInf)
end
Trigger.AfterDelay(DateTime.Minutes(1), ReinfInf)
@@ -108,9 +108,9 @@ Tick = function()
if RCheck then
RCheck = false
if Map.Difficulty == "Hard" then
if Map.LobbyOption("difficulty") == "hard" then
Trigger.AfterDelay(DateTime.Seconds(150), ReinfArmor)
elseif Map.Difficulty == "Medium" then
elseif Map.LobbyOption("difficulty") == "normal" then
Trigger.AfterDelay(DateTime.Minutes(5), ReinfArmor)
else
Trigger.AfterDelay(DateTime.Minutes(8), ReinfArmor)

View File

@@ -17,7 +17,7 @@ Patrol2Path = { EntranceSouthPoint.Location, ToRadarBridgePoint.Location, Island
VillageCamArea = { CPos.New(37, 58),CPos.New(37, 59),CPos.New(37, 60),CPos.New(38, 60),CPos.New(39, 60), CPos.New(40, 60), CPos.New(41, 60), CPos.New(35, 57), CPos.New(34, 57), CPos.New(33, 57), CPos.New(32, 57) }
if Map.Difficulty == "Easy" then
if Map.LobbyOption("difficulty") == "easy" then
ArmorReinfGreece = { "jeep", "1tnk", "1tnk" }
else
ArmorReinfGreece = { "jeep", "jeep", "1tnk", "1tnk", "1tnk" }
@@ -60,7 +60,7 @@ BringPatrol1 = function()
end)
Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then
if Map.LobbyOption("difficulty") == "hard" then
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol1)
else
Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol1)
@@ -79,7 +79,7 @@ BringPatrol2 = function()
end)
Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then
if Map.LobbyOption("difficulty") == "hard" then
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol2)
else
Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol2)

View File

@@ -68,7 +68,7 @@ RunInitialActivities = function()
Trigger.AfterDelay(DateTime.Minutes(1), ProduceInfantry)
Trigger.AfterDelay(DateTime.Minutes(2), ProduceArmor)
if Map.Difficulty == "Hard" or Map.Difficulty == "Medium" then
if Map.LobbyOption("difficulty") == "hard" or Map.LobbyOption("difficulty") == "medium" then
Trigger.AfterDelay(DateTime.Seconds(5), ReinfInf)
end
Trigger.AfterDelay(DateTime.Minutes(1), ReinfInf)
@@ -93,9 +93,9 @@ Tick = function()
if RCheck then
RCheck = false
if Map.Difficulty == "Hard" then
if Map.LobbyOption("difficulty") == "hard" then
Trigger.AfterDelay(DateTime.Seconds(150), ReinfArmor)
elseif Map.Difficulty == "Medium" then
elseif Map.LobbyOption("difficulty") == "medium" then
Trigger.AfterDelay(DateTime.Minutes(5), ReinfArmor)
else
Trigger.AfterDelay(DateTime.Minutes(8), ReinfArmor)

View File

@@ -3,7 +3,7 @@ SovietStartToBasePath = { StartPoint.Location, SovietBasePoint.Location }
SovietMCVReinf = { "mcv", "3tnk", "3tnk", "e1", "e1" }
SovExpansionPointGuard = { "2tnk", "2tnk", "e3", "e3", "e3" }
if Map.Difficulty == "Easy" then
if Map.LobbyOption("difficulty") == "easy" then
ArmorReinfGreece = { "jeep", "1tnk", "1tnk" }
else
ArmorReinfGreece = { "jeep", "jeep", "1tnk", "1tnk", "1tnk" }
@@ -70,11 +70,11 @@ IslandTroops1 = function()
end)
if not CheckForCYard() then
return
elseif Map.Difficulty == "Easy" then
elseif Map.LobbyOption("difficulty") == "easy" then
return
else
Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then
if Map.LobbyOption("difficulty") == "hard" then
Trigger.AfterDelay(DateTime.Minutes(3), IslandTroops1)
else
Trigger.AfterDelay(DateTime.Minutes(5), IslandTroops1)
@@ -92,11 +92,11 @@ IslandTroops2 = function()
end)
if not CheckForCYard() then
return
elseif Map.Difficulty == "Easy" then
elseif Map.LobbyOption("difficulty") == "easy" then
return
else
Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then
if Map.LobbyOption("difficulty") == "hard" then
Trigger.AfterDelay(DateTime.Minutes(3), IslandTroops2)
else
Trigger.AfterDelay(DateTime.Minutes(5), IslandTroops2)
@@ -114,11 +114,11 @@ IslandTroops3 = function()
end)
if not CheckForCYard() then
return
elseif Map.Difficulty == "Easy" then
elseif Map.LobbyOption("difficulty") == "easy" then
return
else
Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then
if Map.LobbyOption("difficulty") == "hard" then
Trigger.AfterDelay(DateTime.Minutes(3), IslandTroops3)
else
Trigger.AfterDelay(DateTime.Minutes(5), IslandTroops3)
@@ -138,7 +138,7 @@ BringDDPatrol1 = function()
return
else
Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then
if Map.LobbyOption("difficulty") == "hard" then
Trigger.AfterDelay(DateTime.Minutes(4), BringDDPatrol1)
else
Trigger.AfterDelay(DateTime.Minutes(7), BringDDPatrol1)
@@ -158,7 +158,7 @@ BringDDPatrol2 = function()
return
else
Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then
if Map.LobbyOption("difficulty") == "hard" then
Trigger.AfterDelay(DateTime.Minutes(4), BringDDPatrol2)
else
Trigger.AfterDelay(DateTime.Minutes(7), BringDDPatrol2)

View File

@@ -19,7 +19,7 @@ CheckForSPen = function()
end
RunInitialActivities = function()
if Map.Difficulty == "Hard" then
if Map.LobbyOption("difficulty") == "hard" then
Expand()
ExpansionCheck = true
else
@@ -57,7 +57,7 @@ RunInitialActivities = function()
ProduceInfantry()
Trigger.AfterDelay(DateTime.Minutes(2), ProduceShips)
if Map.Difficulty == "Hard" or Map.Difficulty == "Medium" then
if Map.LobbyOption("difficulty") == "hard" or Map.LobbyOption("difficulty") == "medium" then
Trigger.AfterDelay(DateTime.Seconds(25), ReinfInf)
end
Trigger.AfterDelay(DateTime.Minutes(2), ReinfInf)
@@ -170,9 +170,9 @@ Tick = function()
if not RCheck then
RCheck = true
if Map.Difficulty == "Easy" and ReinfCheck then
if Map.LobbyOption("difficulty") == "easy" and ReinfCheck then
Trigger.AfterDelay(DateTime.Minutes(6), ReinfArmor)
elseif Map.Difficulty == "Medium" then
elseif Map.LobbyOption("difficulty") == "medium" then
Trigger.AfterDelay(DateTime.Minutes(4), ReinfArmor)
else
Trigger.AfterDelay(DateTime.Minutes(3), ReinfArmor)

View File

@@ -1,20 +1,20 @@
EnemyReinforcements =
{
Easy =
easy =
{
{ "e1", "e1", "e3" },
{ "e1", "e3", "jeep" },
{ "e1", "jeep", "1tnk" }
},
Normal =
normal =
{
{ "e1", "e1", "e3", "e3" },
{ "e1", "e3", "jeep", "jeep" },
{ "e1", "jeep", "1tnk", "2tnk" }
},
Hard =
hard =
{
{ "e1", "e1", "e3", "e3", "e1" },
{ "e1", "e3", "jeep", "jeep", "1tnk" },
@@ -24,9 +24,9 @@ EnemyReinforcements =
EnemyAttackDelay =
{
Easy = DateTime.Minutes(5),
Normal = DateTime.Minutes(2) + DateTime.Seconds(40),
Hard = DateTime.Minutes(1) + DateTime.Seconds(30)
easy = DateTime.Minutes(5),
normal = DateTime.Minutes(2) + DateTime.Seconds(40),
hard = DateTime.Minutes(1) + DateTime.Seconds(30)
}
EnemyPaths =
@@ -37,7 +37,7 @@ EnemyPaths =
wave = 0
SendEnemies = function()
Trigger.AfterDelay(EnemyAttackDelay[Map.Difficulty], function()
Trigger.AfterDelay(EnemyAttackDelay[Map.LobbyOption("difficulty")], function()
wave = wave + 1
if wave > 3 then
@@ -45,10 +45,10 @@ SendEnemies = function()
end
if wave == 1 then
local units = Reinforcements.ReinforceWithTransport(enemy, "tran", EnemyReinforcements[Map.Difficulty][wave], EnemyPaths[1], { EnemyPaths[1][1] })[2]
local units = Reinforcements.ReinforceWithTransport(enemy, "tran", EnemyReinforcements[Map.LobbyOption("difficulty")][wave], EnemyPaths[1], { EnemyPaths[1][1] })[2]
Utils.Do(units, IdleHunt)
else
local units = Reinforcements.ReinforceWithTransport(enemy, "lst", EnemyReinforcements[Map.Difficulty][wave], EnemyPaths[2], { EnemyPaths[2][1] })[2]
local units = Reinforcements.ReinforceWithTransport(enemy, "lst", EnemyReinforcements[Map.LobbyOption("difficulty")][wave], EnemyPaths[2], { EnemyPaths[2][1] })[2]
Utils.Do(units, IdleHunt)
end

View File

@@ -1,20 +1,20 @@
EnemyReinforcements =
{
Easy =
easy =
{
{ "e1", "e1", "e3" },
{ "e1", "e3", "jeep" },
{ "e1", "jeep", "1tnk" }
},
Normal =
normal =
{
{ "e1", "e1", "e3", "e3" },
{ "e1", "e3", "jeep", "jeep" },
{ "e1", "jeep", "1tnk", "2tnk" }
},
Hard =
hard =
{
{ "e1", "e1", "e3", "e3", "e1" },
{ "e1", "e3", "jeep", "jeep", "1tnk" },
@@ -24,9 +24,9 @@ EnemyReinforcements =
EnemyAttackDelay =
{
Easy = DateTime.Minutes(5),
Normal = DateTime.Minutes(2) + DateTime.Seconds(40),
Hard = DateTime.Minutes(1) + DateTime.Seconds(30)
easy = DateTime.Minutes(5),
normal = DateTime.Minutes(2) + DateTime.Seconds(40),
hard = DateTime.Minutes(1) + DateTime.Seconds(30)
}
EnemyPaths =
@@ -37,7 +37,7 @@ EnemyPaths =
wave = 0
SendEnemies = function()
Trigger.AfterDelay(EnemyAttackDelay[Map.Difficulty], function()
Trigger.AfterDelay(EnemyAttackDelay[Map.LobbyOption("difficulty")], function()
wave = wave + 1
if wave > 3 then
@@ -45,10 +45,10 @@ SendEnemies = function()
end
if wave == 1 then
local units = Reinforcements.ReinforceWithTransport(enemy, "tran", EnemyReinforcements[Map.Difficulty][wave], EnemyPaths[1], { EnemyPaths[1][1] })[2]
local units = Reinforcements.ReinforceWithTransport(enemy, "tran", EnemyReinforcements[Map.LobbyOption("difficulty")][wave], EnemyPaths[1], { EnemyPaths[1][1] })[2]
Utils.Do(units, IdleHunt)
else
local units = Reinforcements.ReinforceWithTransport(enemy, "lst", EnemyReinforcements[Map.Difficulty][wave], EnemyPaths[2], { EnemyPaths[2][1] })[2]
local units = Reinforcements.ReinforceWithTransport(enemy, "lst", EnemyReinforcements[Map.LobbyOption("difficulty")][wave], EnemyPaths[2], { EnemyPaths[2][1] })[2]
Utils.Do(units, IdleHunt)
end

View File

@@ -1,8 +1,8 @@
if Map.Difficulty == "Easy" then
if Map.LobbyOption("difficulty") == "easy" then
remainingTime = DateTime.Minutes(7)
elseif Map.Difficulty == "Normal" then
elseif Map.LobbyOption("difficulty") == "normal" then
remainingTime = DateTime.Minutes(6)
elseif Map.Difficulty == "Hard" then
elseif Map.LobbyOption("difficulty") == "hard" then
remainingTime = DateTime.Minutes(5)
end
@@ -299,7 +299,7 @@ Tick = function()
enemy.MarkCompletedObjective(alliedObjective)
end
if remainingTime == DateTime.Minutes(5) and Map.Difficulty ~= "Hard" then
if remainingTime == DateTime.Minutes(5) and Map.LobbyOption("difficulty") ~= "hard" then
Media.PlaySpeechNotification(player, "WarningFiveMinutesRemaining")
elseif remainingTime == DateTime.Minutes(4) then
Media.PlaySpeechNotification(player, "WarningFourMinutesRemaining")

View File

@@ -1,6 +1,6 @@
Difficulty = Map.Difficulty
Difficulty = Map.LobbyOption("difficulty")
if Difficulty == "Easy" then
if Difficulty == "easy" then
AttackAtFrameIncrement = DateTime.Seconds(22)
AttackAtFrameIncrementInf = DateTime.Seconds(16)
TimerTicks = DateTime.Minutes(15)
@@ -8,7 +8,7 @@ if Difficulty == "Easy" then
DamageModifier = 0.5
LongBowReinforcements = { "heli", "heli" }
ParadropArtillery = true
elseif Difficulty == "Medium" then
elseif Difficulty == "medium" then
AttackAtFrameIncrement = DateTime.Seconds(18)
AttackAtFrameIncrementInf = DateTime.Seconds(12)
TimerTicks = DateTime.Minutes(20)
@@ -16,7 +16,7 @@ elseif Difficulty == "Medium" then
MoreParas = true
DamageModifier = 0.75
LongBowReinforcements = { "heli", "heli" }
else --Difficulty == "Hard"
else --Difficulty == "hard"
AttackAtFrameIncrement = DateTime.Seconds(14)
AttackAtFrameIncrementInf = DateTime.Seconds(8)
TimerTicks = DateTime.Minutes(25)