Merge pull request #11636 from abcdefg30/noGuard

Don't allow tanya to automatically target, but allow her to move within a attack-moving/guarding group
This commit is contained in:
Oliver Brakmann
2016-09-04 13:44:46 +02:00
committed by GitHub
6 changed files with 9 additions and 19 deletions

View File

@@ -13,7 +13,9 @@ SendInsertionHelicopter = function()
TanyaReinforcements, InsertionPath, { InsertionEntry.Location })[2] TanyaReinforcements, InsertionPath, { InsertionEntry.Location })[2]
local tanya = passengers[1] local tanya = passengers[1]
Trigger.OnKilled(tanya, TanyaKilledInAction) Trigger.OnKilled(tanya, TanyaKilledInAction)
tanya.Stance = "HoldFire" Trigger.AfterDelay(DateTime.Seconds(4), function()
Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya")
end)
end end
SendJeeps = function() SendJeeps = function()

View File

@@ -13,7 +13,6 @@ if Map.LobbyOption("difficulty") == "easy" then
TanyaType = "e7" TanyaType = "e7"
else else
TanyaType = "e7.noautotarget" TanyaType = "e7.noautotarget"
ChangeStance = true
end end
IdleHunt = function(actor) IdleHunt = function(actor)
@@ -50,8 +49,7 @@ SendAlliedUnits = function()
local Artillery = Actor.Create("arty", true, { Owner = player, Location = AlliedUnitsEntry.Location }) local Artillery = Actor.Create("arty", true, { Owner = player, Location = AlliedUnitsEntry.Location })
local Tanya = Actor.Create(TanyaType, true, { Owner = player, Location = AlliedUnitsEntry.Location }) local Tanya = Actor.Create(TanyaType, true, { Owner = player, Location = AlliedUnitsEntry.Location })
if ChangeStance then if TanyaType == "e7.noautotarget" then
Tanya.Stance = "HoldFire"
Trigger.AfterDelay(DateTime.Seconds(2), function() Trigger.AfterDelay(DateTime.Seconds(2), function()
Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya") Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya")
end) end)

View File

@@ -24,7 +24,6 @@ if Map.LobbyOption("difficulty") == "easy" then
TanyaType = "e7" TanyaType = "e7"
else else
TanyaType = "e7.noautotarget" TanyaType = "e7.noautotarget"
ChangeStance = true
end end
IdleHunt = function(actor) IdleHunt = function(actor)
@@ -63,8 +62,7 @@ end
SetupAlliedUnits = function() SetupAlliedUnits = function()
Tanya = Actor.Create(TanyaType, true, { Owner = player, Location = TanyaWaypoint.Location, Facing = 128 }) Tanya = Actor.Create(TanyaType, true, { Owner = player, Location = TanyaWaypoint.Location, Facing = 128 })
if ChangeStance then if TanyaType == "e7.noautotarget" then
Tanya.Stance = "HoldFire"
Trigger.AfterDelay(DateTime.Seconds(2), function() Trigger.AfterDelay(DateTime.Seconds(2), function()
Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya") Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya")
end) end)

View File

@@ -5,13 +5,11 @@ if Map.LobbyOption("difficulty") == "easy" then
SpecialCameras = true SpecialCameras = true
elseif Map.LobbyOption("difficulty") == "normal" then elseif Map.LobbyOption("difficulty") == "normal" then
TanyaType = "e7.noautotarget" TanyaType = "e7.noautotarget"
ChangeStance = true
ReinforceCash = 2250 ReinforceCash = 2250
HoldAITime = DateTime.Minutes(2) HoldAITime = DateTime.Minutes(2)
SpecialCameras = true SpecialCameras = true
else else
TanyaType = "e7.noautotarget" TanyaType = "e7.noautotarget"
ChangeStance = true
ReinforceCash = 1500 ReinforceCash = 1500
HoldAITime = DateTime.Minutes(1) + DateTime.Seconds(30) HoldAITime = DateTime.Minutes(1) + DateTime.Seconds(30)
SendWaterTransports = true SendWaterTransports = true
@@ -177,8 +175,7 @@ FreeTanya = function()
Tanya.Demolish(Prison) Tanya.Demolish(Prison)
Tanya.Move(Tanya.Location + CVec.New(Utils.RandomInteger(-1, 2), 1)) Tanya.Move(Tanya.Location + CVec.New(Utils.RandomInteger(-1, 2), 1))
if ChangeStance then if TanyaType == "e7.noautotarget" then
Tanya.Stance = "HoldFire"
Trigger.AfterDelay(DateTime.Seconds(1), function() Trigger.AfterDelay(DateTime.Seconds(1), function()
Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya") Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya")
end) end)

View File

@@ -5,10 +5,8 @@ DeathThreshold =
} }
TanyaType = "e7" TanyaType = "e7"
TanyaStance = "AttackAnything"
if Map.LobbyOption("difficulty") ~= "easy" then if Map.LobbyOption("difficulty") ~= "easy" then
TanyaType = "e7.noautotarget" TanyaType = "e7.noautotarget"
TanyaStance = "HoldFire"
end end
RepairTriggerThreshold = RepairTriggerThreshold =
@@ -281,7 +279,6 @@ end
SpawnTanya = function() SpawnTanya = function()
Tanya = Actor.Create(TanyaType, true, { Owner = allies1, Location = TanyaLocation.Location }) Tanya = Actor.Create(TanyaType, true, { Owner = allies1, Location = TanyaLocation.Location })
Tanya.Stance = TanyaStance
if Map.LobbyOption("difficulty") ~= "easy" and allies1.IsLocalPlayer then if Map.LobbyOption("difficulty") ~= "easy" and allies1.IsLocalPlayer then
Trigger.AfterDelay(DateTime.Seconds(2), function() Trigger.AfterDelay(DateTime.Seconds(2), function()

View File

@@ -29,9 +29,7 @@ World:
E7.noautotarget: E7.noautotarget:
Inherits: E7 Inherits: E7
AutoTarget: -AutoTarget:
EnableStances: false
-AttackMove:
RenderSprites: RenderSprites:
Image: E7 Image: E7