DCS_MissionDev/DCS_Syria/Ermenek Liberation/Moose_ErmenekLiberation_ZoneCaptureV2.lua
2024-11-12 14:18:28 -06:00

1028 lines
51 KiB
Lua

CZ1 = ZONE:New( "CZ1" )
ZoneCaptureCZ1 = ZONE_CAPTURE_COALITION:New( CZ1, coalition.side.RED )
:SetSmokeZone(true)
CZ2 = ZONE:New( "CZ2" )
ZoneCaptureCZ2 = ZONE_CAPTURE_COALITION:New( CZ2, coalition.side.RED )
:SetSmokeZone(true)
CZ3 = ZONE:New( "CZ3" )
ZoneCaptureCZ3 = ZONE_CAPTURE_COALITION:New( CZ3, coalition.side.RED )
:SetSmokeZone(true)
CZ4 = ZONE:New( "CZ4" )
ZoneCaptureCZ4 = ZONE_CAPTURE_COALITION:New( CZ4, coalition.side.RED )
:SetSmokeZone(true)
CZ5 = ZONE:New( "CZ5" )
ZoneCaptureCZ5 = ZONE_CAPTURE_COALITION:New( CZ5, coalition.side.RED )
:SetSmokeZone(true)
CZ6 = ZONE:New( "CZ6" )
ZoneCaptureCZ6 = ZONE_CAPTURE_COALITION:New( CZ6, coalition.side.RED )
:SetSmokeZone(true)
CZ7 = ZONE:New( "CZ7" )
ZoneCaptureCZ7 = ZONE_CAPTURE_COALITION:New( CZ7, coalition.side.RED )
:SetSmokeZone(true)
CZ8 = ZONE:New( "CZ8" )
ZoneCaptureCZ8 = ZONE_CAPTURE_COALITION:New( CZ8, coalition.side.RED )
:SetSmokeZone(true)
CZ9 = ZONE:New( "CZ9" )
ZoneCaptureCZ9 = ZONE_CAPTURE_COALITION:New( CZ9, coalition.side.RED )
:SetSmokeZone(true)
CZ10 = ZONE:New( "CZ10" )
ZoneCaptureCZ10 = ZONE_CAPTURE_COALITION:New( CZ10, coalition.side.RED )
:SetSmokeZone(true)
CZ11 = ZONE:New( "CZ11" )
ZoneCaptureCZ11 = ZONE_CAPTURE_COALITION:New( CZ11, coalition.side.RED )
:SetSmokeZone(true)
CZ12 = ZONE:New( "CZ12" )
ZoneCaptureCZ12 = ZONE_CAPTURE_COALITION:New( CZ12, coalition.side.RED )
:SetSmokeZone(true)
CZ13 = ZONE:New( "CZ13" )
ZoneCaptureCZ13 = ZONE_CAPTURE_COALITION:New( CZ13, coalition.side.RED )
:SetSmokeZone(true)
CZGAZIPASA = ZONE:New( "GAZIPAS" )
ZoneCaptureGAZIPASA = ZONE_CAPTURE_COALITION:New( CZGAZIPASA, coalition.side.RED )
:SetSmokeZone(true)
--- @param Functional.ZoneCaptureGAZIPASA#ZONE_CAPTURE_COALITION self
function ZoneCaptureGAZIPASA:OnEnterGuarded( From, Event, To )
if From ~= To then
local Coalition = self:GetCoalition()
self:E( { Coalition = Coalition } )
if Coalition == coalition.side.BLUE then
ZoneCaptureGAZIPASA:Smoke( SMOKECOLOR.Blue )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureGAZIPASA:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureGAZIPASA:GetZoneName() ), MESSAGE.Type.Information )
else
ZoneCaptureGAZIPASA:Smoke( SMOKECOLOR.Red )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureGAZIPASA:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureGAZIPASA:GetZoneName() ), MESSAGE.Type.Information )
end
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureGAZIPASA:OnEnterEmpty()
ZoneCaptureGAZIPASA:Smoke( SMOKECOLOR.Green )
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureGAZIPASA:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureGAZIPASA:GetZoneName() ), MESSAGE.Type.Information )
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureGAZIPASA:OnEnterAttacked()
ZoneCaptureGAZIPASA:Smoke( SMOKECOLOR.White )
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureGAZIPASA:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureGAZIPASA:GetZoneName() ), MESSAGE.Type.Information )
else
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureGAZIPASA:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureGAZIPASA:GetZoneName() ), MESSAGE.Type.Information )
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureGAZIPASA:OnEnterCaptured()
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
ScoreAddBlue(CapturePoints)
StatBlueCapturePoints = StatBlueCapturePoints + CapturePoints
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureGAZIPASA:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureGAZIPASA:GetZoneName() ), MESSAGE.Type.Information )
else
ScoreAddRed(CapturePoints)
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureGAZIPASA:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureGAZIPASA:GetZoneName() ), MESSAGE.Type.Information )
end
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
self:__Guard( 30 )
end
ZoneCaptureGAZIPASA:MonitorDestroyedUnits()
ZoneCaptureGAZIPASA:__Guard( 1 )
-----------------------------------------------------------------------------------------------------------
--- @param Functional.ZoneCaptureCZ13#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ13:OnEnterGuarded( From, Event, To )
if From ~= To then
local Coalition = self:GetCoalition()
self:E( { Coalition = Coalition } )
if Coalition == coalition.side.BLUE then
ZoneCaptureCZ13:Smoke( SMOKECOLOR.Blue )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ13:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ13:GetZoneName() ), MESSAGE.Type.Information )
else
ZoneCaptureCZ13:Smoke( SMOKECOLOR.Red )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ13:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ13:GetZoneName() ), MESSAGE.Type.Information )
end
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ13:OnEnterEmpty()
ZoneCaptureCZ13:Smoke( SMOKECOLOR.Green )
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ13:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ13:GetZoneName() ), MESSAGE.Type.Information )
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ13:OnEnterAttacked()
ZoneCaptureCZ13:Smoke( SMOKECOLOR.White )
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCZ13:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ13:GetZoneName() ), MESSAGE.Type.Information )
else
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCZ13:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ13:GetZoneName() ), MESSAGE.Type.Information )
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ13:OnEnterCaptured()
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
ScoreAddBlue(CapturePoints)
StatBlueCapturePoints = StatBlueCapturePoints + CapturePoints
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCZ13:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ13:GetZoneName() ), MESSAGE.Type.Information )
else
ScoreAddRed(CapturePoints)
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCZ13:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ13:GetZoneName() ), MESSAGE.Type.Information )
end
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
self:__Guard( 30 )
end
ZoneCaptureCZ13:MonitorDestroyedUnits()
ZoneCaptureCZ13:__Guard( 1 )
-----------------------------------------------------------------------------------------------------------
--- @param Functional.ZoneCaptureCZ12#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ12:OnEnterGuarded( From, Event, To )
if From ~= To then
local Coalition = self:GetCoalition()
self:E( { Coalition = Coalition } )
if Coalition == coalition.side.BLUE then
ZoneCaptureCZ12:Smoke( SMOKECOLOR.Blue )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ12:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ12:GetZoneName() ), MESSAGE.Type.Information )
else
ZoneCaptureCZ12:Smoke( SMOKECOLOR.Red )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ12:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ12:GetZoneName() ), MESSAGE.Type.Information )
end
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ12:OnEnterEmpty()
ZoneCaptureCZ12:Smoke( SMOKECOLOR.Green )
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ12:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ12:GetZoneName() ), MESSAGE.Type.Information )
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ12:OnEnterAttacked()
ZoneCaptureCZ12:Smoke( SMOKECOLOR.White )
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCZ12:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ12:GetZoneName() ), MESSAGE.Type.Information )
else
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCZ12:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ12:GetZoneName() ), MESSAGE.Type.Information )
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ12:OnEnterCaptured()
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
ScoreAddBlue(CapturePoints)
StatBlueCapturePoints = StatBlueCapturePoints + CapturePoints
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCZ12:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ12:GetZoneName() ), MESSAGE.Type.Information )
else
ScoreAddRed(CapturePoints)
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCZ12:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ12:GetZoneName() ), MESSAGE.Type.Information )
end
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
self:__Guard( 30 )
end
ZoneCaptureCZ12:MonitorDestroyedUnits()
ZoneCaptureCZ12:__Guard( 1 )
-----------------------------------------------------------------------------------------------------------
--- @param Functional.ZoneCaptureCZ11#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ11:OnEnterGuarded( From, Event, To )
if From ~= To then
local Coalition = self:GetCoalition()
self:E( { Coalition = Coalition } )
if Coalition == coalition.side.BLUE then
ZoneCaptureCZ11:Smoke( SMOKECOLOR.Blue )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ11:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ11:GetZoneName() ), MESSAGE.Type.Information )
else
ZoneCaptureCZ11:Smoke( SMOKECOLOR.Red )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ11:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ11:GetZoneName() ), MESSAGE.Type.Information )
end
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ11:OnEnterEmpty()
ZoneCaptureCZ11:Smoke( SMOKECOLOR.Green )
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ11:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ11:GetZoneName() ), MESSAGE.Type.Information )
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ11:OnEnterAttacked()
ZoneCaptureCZ11:Smoke( SMOKECOLOR.White )
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCZ11:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ11:GetZoneName() ), MESSAGE.Type.Information )
else
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCZ11:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ11:GetZoneName() ), MESSAGE.Type.Information )
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ11:OnEnterCaptured()
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
ScoreAddBlue(CapturePoints)
StatBlueCapturePoints = StatBlueCapturePoints + CapturePoints
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCZ11:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ11:GetZoneName() ), MESSAGE.Type.Information )
else
ScoreAddRed(CapturePoints)
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCZ11:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ11:GetZoneName() ), MESSAGE.Type.Information )
end
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
self:__Guard( 30 )
end
ZoneCaptureCZ11:MonitorDestroyedUnits()
ZoneCaptureCZ11:__Guard( 1 )
-----------------------------------------------------------------------------------------------------------
--- @param Functional.ZoneCaptureCZ10#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ10:OnEnterGuarded( From, Event, To )
if From ~= To then
local Coalition = self:GetCoalition()
self:E( { Coalition = Coalition } )
if Coalition == coalition.side.BLUE then
ZoneCaptureCZ10:Smoke( SMOKECOLOR.Blue )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ10:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ10:GetZoneName() ), MESSAGE.Type.Information )
else
ZoneCaptureCZ10:Smoke( SMOKECOLOR.Red )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ10:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ10:GetZoneName() ), MESSAGE.Type.Information )
end
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ10:OnEnterEmpty()
ZoneCaptureCZ10:Smoke( SMOKECOLOR.Green )
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ10:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ10:GetZoneName() ), MESSAGE.Type.Information )
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ10:OnEnterAttacked()
ZoneCaptureCZ10:Smoke( SMOKECOLOR.White )
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCZ10:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ10:GetZoneName() ), MESSAGE.Type.Information )
else
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCZ10:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ10:GetZoneName() ), MESSAGE.Type.Information )
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ10:OnEnterCaptured()
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
ScoreAddBlue(CapturePoints)
StatBlueCapturePoints = StatBlueCapturePoints + CapturePoints
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCZ10:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ10:GetZoneName() ), MESSAGE.Type.Information )
else
ScoreAddRed(CapturePoints)
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCZ10:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ10:GetZoneName() ), MESSAGE.Type.Information )
end
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
self:__Guard( 30 )
end
ZoneCaptureCZ10:MonitorDestroyedUnits()
ZoneCaptureCZ10:__Guard( 1 )
-----------------------------------------------------------------------------------------------------------
--- @param Functional.ZoneCaptureCZ9#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ9:OnEnterGuarded( From, Event, To )
if From ~= To then
local Coalition = self:GetCoalition()
self:E( { Coalition = Coalition } )
if Coalition == coalition.side.BLUE then
ZoneCaptureCZ9:Smoke( SMOKECOLOR.Blue )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ9:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ9:GetZoneName() ), MESSAGE.Type.Information )
else
ZoneCaptureCZ9:Smoke( SMOKECOLOR.Red )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ9:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ9:GetZoneName() ), MESSAGE.Type.Information )
end
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ9:OnEnterEmpty()
ZoneCaptureCZ9:Smoke( SMOKECOLOR.Green )
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ9:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ9:GetZoneName() ), MESSAGE.Type.Information )
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ9:OnEnterAttacked()
ZoneCaptureCZ9:Smoke( SMOKECOLOR.White )
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCZ9:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ9:GetZoneName() ), MESSAGE.Type.Information )
else
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCZ9:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ9:GetZoneName() ), MESSAGE.Type.Information )
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ9:OnEnterCaptured()
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
ScoreAddBlue(CapturePoints)
StatBlueCapturePoints = StatBlueCapturePoints + CapturePoints
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCZ9:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ9:GetZoneName() ), MESSAGE.Type.Information )
else
ScoreAddRed(CapturePoints)
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCZ9:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ9:GetZoneName() ), MESSAGE.Type.Information )
end
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
self:__Guard( 30 )
end
ZoneCaptureCZ9:MonitorDestroyedUnits()
ZoneCaptureCZ9:__Guard( 1 )
-----------------------------------------------------------------------------------------------------------
--- @param Functional.ZoneCaptureCZ8#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ8:OnEnterGuarded( From, Event, To )
if From ~= To then
local Coalition = self:GetCoalition()
self:E( { Coalition = Coalition } )
if Coalition == coalition.side.BLUE then
ZoneCaptureCZ8:Smoke( SMOKECOLOR.Blue )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ8:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ8:GetZoneName() ), MESSAGE.Type.Information )
else
ZoneCaptureCZ8:Smoke( SMOKECOLOR.Red )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ8:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ8:GetZoneName() ), MESSAGE.Type.Information )
end
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ8:OnEnterEmpty()
ZoneCaptureCZ8:Smoke( SMOKECOLOR.Green )
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ8:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ8:GetZoneName() ), MESSAGE.Type.Information )
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ8:OnEnterAttacked()
ZoneCaptureCZ8:Smoke( SMOKECOLOR.White )
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCZ8:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ8:GetZoneName() ), MESSAGE.Type.Information )
else
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCZ8:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ8:GetZoneName() ), MESSAGE.Type.Information )
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ8:OnEnterCaptured()
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
ScoreAddBlue(CapturePoints)
StatBlueCapturePoints = StatBlueCapturePoints + CapturePoints
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCZ8:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ8:GetZoneName() ), MESSAGE.Type.Information )
else
ScoreAddRed(CapturePoints)
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCZ8:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ8:GetZoneName() ), MESSAGE.Type.Information )
end
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
self:__Guard( 30 )
end
ZoneCaptureCZ8:MonitorDestroyedUnits()
ZoneCaptureCZ8:__Guard( 1 )
-----------------------------------------------------------------------------------------------------------
--- @param Functional.ZoneCaptureCZ7#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ7:OnEnterGuarded( From, Event, To )
if From ~= To then
local Coalition = self:GetCoalition()
self:E( { Coalition = Coalition } )
if Coalition == coalition.side.BLUE then
ZoneCaptureCZ7:Smoke( SMOKECOLOR.Blue )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ7:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ7:GetZoneName() ), MESSAGE.Type.Information )
else
ZoneCaptureCZ7:Smoke( SMOKECOLOR.Red )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ7:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ7:GetZoneName() ), MESSAGE.Type.Information )
end
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ7:OnEnterEmpty()
ZoneCaptureCZ7:Smoke( SMOKECOLOR.Green )
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ7:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ7:GetZoneName() ), MESSAGE.Type.Information )
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ7:OnEnterAttacked()
ZoneCaptureCZ7:Smoke( SMOKECOLOR.White )
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCZ7:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ7:GetZoneName() ), MESSAGE.Type.Information )
else
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCZ7:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ7:GetZoneName() ), MESSAGE.Type.Information )
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ7:OnEnterCaptured()
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
ScoreAddBlue(CapturePoints)
StatBlueCapturePoints = StatBlueCapturePoints + CapturePoints
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCZ7:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ7:GetZoneName() ), MESSAGE.Type.Information )
else
ScoreAddRed(CapturePoints)
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCZ7:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ7:GetZoneName() ), MESSAGE.Type.Information )
end
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
self:__Guard( 30 )
end
ZoneCaptureCZ7:MonitorDestroyedUnits()
ZoneCaptureCZ7:__Guard( 1 )
-----------------------------------------------------------------------------------------------------------
--- @param Functional.ZoneCaptureCZ6#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ6:OnEnterGuarded( From, Event, To )
if From ~= To then
local Coalition = self:GetCoalition()
self:E( { Coalition = Coalition } )
if Coalition == coalition.side.BLUE then
ZoneCaptureCZ6:Smoke( SMOKECOLOR.Blue )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ6:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ6:GetZoneName() ), MESSAGE.Type.Information )
else
ZoneCaptureCZ6:Smoke( SMOKECOLOR.Red )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ6:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ6:GetZoneName() ), MESSAGE.Type.Information )
end
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ6:OnEnterEmpty()
ZoneCaptureCZ6:Smoke( SMOKECOLOR.Green )
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ6:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ6:GetZoneName() ), MESSAGE.Type.Information )
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ6:OnEnterAttacked()
ZoneCaptureCZ6:Smoke( SMOKECOLOR.White )
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCZ6:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ6:GetZoneName() ), MESSAGE.Type.Information )
else
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCZ6:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ6:GetZoneName() ), MESSAGE.Type.Information )
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ6:OnEnterCaptured()
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
ScoreAddBlue(CapturePoints)
StatBlueCapturePoints = StatBlueCapturePoints + CapturePoints
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCZ6:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ6:GetZoneName() ), MESSAGE.Type.Information )
else
ScoreAddRed(CapturePoints)
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCZ6:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ6:GetZoneName() ), MESSAGE.Type.Information )
end
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
self:__Guard( 30 )
end
ZoneCaptureCZ6:MonitorDestroyedUnits()
ZoneCaptureCZ6:__Guard( 1 )
-----------------------------------------------------------------------------------------------------------
--- @param Functional.ZoneCaptureCZ5#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ5:OnEnterGuarded( From, Event, To )
if From ~= To then
local Coalition = self:GetCoalition()
self:E( { Coalition = Coalition } )
if Coalition == coalition.side.BLUE then
ZoneCaptureCZ5:Smoke( SMOKECOLOR.Blue )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ5:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ5:GetZoneName() ), MESSAGE.Type.Information )
else
ZoneCaptureCZ5:Smoke( SMOKECOLOR.Red )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ5:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ5:GetZoneName() ), MESSAGE.Type.Information )
end
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ5:OnEnterEmpty()
ZoneCaptureCZ5:Smoke( SMOKECOLOR.Green )
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ5:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ5:GetZoneName() ), MESSAGE.Type.Information )
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ5:OnEnterAttacked()
ZoneCaptureCZ5:Smoke( SMOKECOLOR.White )
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCZ5:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ5:GetZoneName() ), MESSAGE.Type.Information )
else
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCZ5:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ5:GetZoneName() ), MESSAGE.Type.Information )
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ5:OnEnterCaptured()
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
ScoreAddBlue(CapturePoints)
StatBlueCapturePoints = StatBlueCapturePoints + CapturePoints
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCZ5:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ5:GetZoneName() ), MESSAGE.Type.Information )
else
ScoreAddRed(CapturePoints)
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCZ5:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ5:GetZoneName() ), MESSAGE.Type.Information )
end
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
self:__Guard( 30 )
end
ZoneCaptureCZ5:MonitorDestroyedUnits()
ZoneCaptureCZ5:__Guard( 1 )
-----------------------------------------------------------------------------------------------------------
--- @param Functional.ZoneCaptureCZ4#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ4:OnEnterGuarded( From, Event, To )
if From ~= To then
local Coalition = self:GetCoalition()
self:E( { Coalition = Coalition } )
if Coalition == coalition.side.BLUE then
ZoneCaptureCZ4:Smoke( SMOKECOLOR.Blue )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ4:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ4:GetZoneName() ), MESSAGE.Type.Information )
else
ZoneCaptureCZ4:Smoke( SMOKECOLOR.Red )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ4:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ4:GetZoneName() ), MESSAGE.Type.Information )
end
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ4:OnEnterEmpty()
ZoneCaptureCZ4:Smoke( SMOKECOLOR.Green )
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ4:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ4:GetZoneName() ), MESSAGE.Type.Information )
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ4:OnEnterAttacked()
ZoneCaptureCZ4:Smoke( SMOKECOLOR.White )
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCZ4:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ4:GetZoneName() ), MESSAGE.Type.Information )
else
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCZ4:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ4:GetZoneName() ), MESSAGE.Type.Information )
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ4:OnEnterCaptured()
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
ScoreAddBlue(CapturePoints)
StatBlueCapturePoints = StatBlueCapturePoints + CapturePoints
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCZ4:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ4:GetZoneName() ), MESSAGE.Type.Information )
else
ScoreAddRed(CapturePoints)
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCZ4:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ4:GetZoneName() ), MESSAGE.Type.Information )
end
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
self:__Guard( 30 )
end
ZoneCaptureCZ4:MonitorDestroyedUnits()
ZoneCaptureCZ4:__Guard( 1 )
-----------------------------------------------------------------------------------------------------------
--- @param Functional.ZoneCaptureCZ3#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ3:OnEnterGuarded( From, Event, To )
if From ~= To then
local Coalition = self:GetCoalition()
self:E( { Coalition = Coalition } )
if Coalition == coalition.side.BLUE then
ZoneCaptureCZ3:Smoke( SMOKECOLOR.Blue )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ3:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ3:GetZoneName() ), MESSAGE.Type.Information )
else
ZoneCaptureCZ3:Smoke( SMOKECOLOR.Red )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ3:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ3:GetZoneName() ), MESSAGE.Type.Information )
end
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ3:OnEnterEmpty()
ZoneCaptureCZ3:Smoke( SMOKECOLOR.Green )
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ3:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ3:GetZoneName() ), MESSAGE.Type.Information )
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ3:OnEnterAttacked()
ZoneCaptureCZ3:Smoke( SMOKECOLOR.White )
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCZ3:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ3:GetZoneName() ), MESSAGE.Type.Information )
else
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCZ3:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ3:GetZoneName() ), MESSAGE.Type.Information )
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ3:OnEnterCaptured()
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
ScoreAddBlue(CapturePoints)
StatBlueCapturePoints = StatBlueCapturePoints + CapturePoints
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCZ3:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ3:GetZoneName() ), MESSAGE.Type.Information )
else
ScoreAddRed(CapturePoints)
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCZ3:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ3:GetZoneName() ), MESSAGE.Type.Information )
end
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
self:__Guard( 30 )
end
ZoneCaptureCZ3:MonitorDestroyedUnits()
ZoneCaptureCZ3:__Guard( 1 )
-----------------------------------------------------------------------------------------------------------
--- @param Functional.ZoneCaptureCZ2#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ2:OnEnterGuarded( From, Event, To )
if From ~= To then
local Coalition = self:GetCoalition()
self:E( { Coalition = Coalition } )
if Coalition == coalition.side.BLUE then
ZoneCaptureCZ2:Smoke( SMOKECOLOR.Blue )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ2:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ2:GetZoneName() ), MESSAGE.Type.Information )
else
ZoneCaptureCZ2:Smoke( SMOKECOLOR.Red )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ2:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ2:GetZoneName() ), MESSAGE.Type.Information )
end
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ2:OnEnterEmpty()
ZoneCaptureCZ2:Smoke( SMOKECOLOR.Green )
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ2:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ2:GetZoneName() ), MESSAGE.Type.Information )
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ2:OnEnterAttacked()
ZoneCaptureCZ2:Smoke( SMOKECOLOR.White )
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCZ2:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ2:GetZoneName() ), MESSAGE.Type.Information )
else
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCZ2:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ2:GetZoneName() ), MESSAGE.Type.Information )
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ2:OnEnterCaptured()
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
ScoreAddBlue(CapturePoints)
StatBlueCapturePoints = StatBlueCapturePoints + CapturePoints
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCZ2:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ2:GetZoneName() ), MESSAGE.Type.Information )
else
ScoreAddRed(CapturePoints)
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCZ2:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ2:GetZoneName() ), MESSAGE.Type.Information )
end
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
self:__Guard( 30 )
end
ZoneCaptureCZ2:MonitorDestroyedUnits()
ZoneCaptureCZ2:__Guard( 1 )
-----------------------------------------------------------------------------------------------------------
--- @param Functional.ZoneCaptureCZ1#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ1:OnEnterGuarded( From, Event, To )
if From ~= To then
local Coalition = self:GetCoalition()
self:E( { Coalition = Coalition } )
if Coalition == coalition.side.BLUE then
ZoneCaptureCZ1:Smoke( SMOKECOLOR.Blue )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ1:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCZ1:GetZoneName() ), MESSAGE.Type.Information )
else
ZoneCaptureCZ1:Smoke( SMOKECOLOR.Red )
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ1:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCZ1:GetZoneName() ), MESSAGE.Type.Information )
end
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ1:OnEnterEmpty()
ZoneCaptureCZ1:Smoke( SMOKECOLOR.Green )
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ1:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCZ1:GetZoneName() ), MESSAGE.Type.Information )
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ1:OnEnterAttacked()
ZoneCaptureCZ1:Smoke( SMOKECOLOR.White )
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCZ1:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ1:GetZoneName() ), MESSAGE.Type.Information )
else
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCZ1:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCZ1:GetZoneName() ), MESSAGE.Type.Information )
end
end
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
function ZoneCaptureCZ1:OnEnterCaptured()
local Coalition = self:GetCoalition()
self:E({Coalition = Coalition})
if Coalition == coalition.side.BLUE then
ScoreAddBlue(CapturePoints)
StatBlueCapturePoints = StatBlueCapturePoints + CapturePoints
RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCZ1:GetZoneName() ), MESSAGE.Type.Information )
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ1:GetZoneName() ), MESSAGE.Type.Information )
else
ScoreAddRed(CapturePoints)
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCZ1:GetZoneName() ), MESSAGE.Type.Information )
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCZ1:GetZoneName() ), MESSAGE.Type.Information )
end
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
self:__Guard( 30 )
end
ZoneCaptureCZ1:MonitorDestroyedUnits()
ZoneCaptureCZ1:__Guard( 1 )
ZoneCaptureCZ1:Start(30,30)
ZoneCaptureCZ2:Start(30,30)
ZoneCaptureCZ3:Start(30,30)
ZoneCaptureCZ4:Start(30,30)
ZoneCaptureCZ5:Start(30,30)
ZoneCaptureCZ6:Start(30,30)
ZoneCaptureCZ7:Start(30,30)
ZoneCaptureCZ8:Start(30,30)
ZoneCaptureCZ9:Start(30,30)
ZoneCaptureCZ10:Start(30,30)
ZoneCaptureCZ11:Start(30,30)
ZoneCaptureCZ12:Start(30,30)
ZoneCaptureCZ13:Start(30,30)
ZoneCaptureGAZIPASA:Start(30,30)
-- Create the tasks under the mission
--
--local ZoneCaptureGroupSet = SET_GROUP:New():FilterCoalitions("blue"):FilterStart()
--
--local US_Task_Zone_Capture1 = TASK_ZONE_CAPTURE:New( US_Mission, ZoneCaptureGroupSet, ZoneCaptureCZ1:GetZoneName(), ZoneCaptureCZ1 )
--local US_Task_Zone_Capture2 = TASK_ZONE_CAPTURE:New( US_Mission, ZoneCaptureGroupSet, ZoneCaptureCZ2:GetZoneName(), ZoneCaptureCZ2 )
US_CC:SetMenu()