mirror of
https://github.com/iTracerFacer/DCS_MissionDev.git
synced 2025-12-03 04:14:46 +00:00
1023 lines
51 KiB
Lua
1023 lines
51 KiB
Lua
CZ1 = ZONE:New( "C1" )
|
|
ZoneCaptureC1 = ZONE_CAPTURE_COALITION:New( CZ1, coalition.side.RED )
|
|
:SetSmokeZone(true)
|
|
|
|
CZ2 = ZONE:New( "C2" )
|
|
ZoneCaptureC2 = ZONE_CAPTURE_COALITION:New( CZ2, coalition.side.RED )
|
|
:SetSmokeZone(true)
|
|
|
|
CZ3 = ZONE:New( "C3" )
|
|
ZoneCaptureC3 = ZONE_CAPTURE_COALITION:New( CZ3, coalition.side.RED )
|
|
:SetSmokeZone(true)
|
|
|
|
CZ4 = ZONE:New( "C4" )
|
|
ZoneCaptureC4 = ZONE_CAPTURE_COALITION:New( CZ4, coalition.side.RED )
|
|
:SetSmokeZone(true)
|
|
|
|
CZ5 = ZONE:New( "C5" )
|
|
ZoneCaptureC5 = ZONE_CAPTURE_COALITION:New( CZ5, coalition.side.RED )
|
|
:SetSmokeZone(true)
|
|
|
|
CZ6 = ZONE:New( "C6" )
|
|
ZoneCaptureC6 = ZONE_CAPTURE_COALITION:New( CZ6, coalition.side.RED )
|
|
:SetSmokeZone(true)
|
|
|
|
CZ7 = ZONE:New( "C7" )
|
|
ZoneCaptureC7 = ZONE_CAPTURE_COALITION:New( CZ7, coalition.side.RED )
|
|
:SetSmokeZone(true)
|
|
|
|
CZ8 = ZONE:New( "C8" )
|
|
ZoneCaptureC8 = ZONE_CAPTURE_COALITION:New( CZ8, coalition.side.RED )
|
|
:SetSmokeZone(true)
|
|
|
|
CZ9 = ZONE:New( "C9" )
|
|
ZoneCaptureC9 = ZONE_CAPTURE_COALITION:New( CZ9, coalition.side.RED )
|
|
:SetSmokeZone(true)
|
|
|
|
CZ10 = ZONE:New( "C10" )
|
|
ZoneCaptureC10 = ZONE_CAPTURE_COALITION:New( CZ10, coalition.side.RED )
|
|
:SetSmokeZone(true)
|
|
|
|
CZ11 = ZONE:New( "C11" )
|
|
ZoneCaptureC11 = ZONE_CAPTURE_COALITION:New( CZ11, coalition.side.RED )
|
|
:SetSmokeZone(true)
|
|
|
|
|
|
CZ12 = ZONE:New( "C12" )
|
|
ZoneCaptureC12 = ZONE_CAPTURE_COALITION:New( CZ12, coalition.side.RED )
|
|
:SetSmokeZone(true)
|
|
|
|
|
|
CZ13 = ZONE:New( "C13" )
|
|
ZoneCaptureC13 = 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.ZoneCaptureC13#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC13:OnEnterGuarded( From, Event, To )
|
|
if From ~= To then
|
|
local Coalition = self:GetCoalition()
|
|
self:E( { Coalition = Coalition } )
|
|
if Coalition == coalition.side.BLUE then
|
|
ZoneCaptureC13:Smoke( SMOKECOLOR.Blue )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC13:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC13:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ZoneCaptureC13:Smoke( SMOKECOLOR.Red )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC13:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC13:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC13:OnEnterEmpty()
|
|
ZoneCaptureC13:Smoke( SMOKECOLOR.Green )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC13:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC13:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC13:OnEnterAttacked()
|
|
ZoneCaptureC13: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", ZoneCaptureC13:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC13:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureC13:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC13:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC13: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!", ZoneCaptureC13:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC13:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ScoreAddRed(CapturePoints)
|
|
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureC13:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC13:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
|
|
|
self:__Guard( 30 )
|
|
end
|
|
|
|
ZoneCaptureC13:MonitorDestroyedUnits()
|
|
ZoneCaptureC13:__Guard( 1 )
|
|
|
|
|
|
-----------------------------------------------------------------------------------------------------------
|
|
|
|
--- @param Functional.ZoneCaptureC12#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC12:OnEnterGuarded( From, Event, To )
|
|
if From ~= To then
|
|
local Coalition = self:GetCoalition()
|
|
self:E( { Coalition = Coalition } )
|
|
if Coalition == coalition.side.BLUE then
|
|
ZoneCaptureC12:Smoke( SMOKECOLOR.Blue )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC12:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC12:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ZoneCaptureC12:Smoke( SMOKECOLOR.Red )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC12:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC12:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC12:OnEnterEmpty()
|
|
ZoneCaptureC12:Smoke( SMOKECOLOR.Green )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC12:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC12:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC12:OnEnterAttacked()
|
|
ZoneCaptureC12: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", ZoneCaptureC12:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC12:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureC12:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC12:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC12: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!", ZoneCaptureC12:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC12:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ScoreAddRed(CapturePoints)
|
|
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureC12:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC12:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
|
|
|
self:__Guard( 30 )
|
|
end
|
|
|
|
ZoneCaptureC12:MonitorDestroyedUnits()
|
|
ZoneCaptureC12:__Guard( 1 )
|
|
|
|
|
|
-----------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
--- @param Functional.ZoneCaptureC11#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC11:OnEnterGuarded( From, Event, To )
|
|
if From ~= To then
|
|
local Coalition = self:GetCoalition()
|
|
self:E( { Coalition = Coalition } )
|
|
if Coalition == coalition.side.BLUE then
|
|
ZoneCaptureC11:Smoke( SMOKECOLOR.Blue )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC11:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC11:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ZoneCaptureC11:Smoke( SMOKECOLOR.Red )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC11:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC11:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC11:OnEnterEmpty()
|
|
ZoneCaptureC11:Smoke( SMOKECOLOR.Green )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC11:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC11:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC11:OnEnterAttacked()
|
|
ZoneCaptureC11: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", ZoneCaptureC11:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC11:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureC11:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC11:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC11: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!", ZoneCaptureC11:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC11:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ScoreAddRed(CapturePoints)
|
|
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureC11:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC11:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
|
|
|
self:__Guard( 30 )
|
|
end
|
|
|
|
ZoneCaptureC11:MonitorDestroyedUnits()
|
|
ZoneCaptureC11:__Guard( 1 )
|
|
|
|
|
|
-----------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
--- @param Functional.ZoneCaptureC10#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC10:OnEnterGuarded( From, Event, To )
|
|
if From ~= To then
|
|
local Coalition = self:GetCoalition()
|
|
self:E( { Coalition = Coalition } )
|
|
if Coalition == coalition.side.BLUE then
|
|
ZoneCaptureC10:Smoke( SMOKECOLOR.Blue )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC10:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC10:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ZoneCaptureC10:Smoke( SMOKECOLOR.Red )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC10:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC10:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC10:OnEnterEmpty()
|
|
ZoneCaptureC10:Smoke( SMOKECOLOR.Green )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC10:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC10:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC10:OnEnterAttacked()
|
|
ZoneCaptureC10: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", ZoneCaptureC10:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC10:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureC10:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC10:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC10: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!", ZoneCaptureC10:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC10:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ScoreAddRed(CapturePoints)
|
|
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureC10:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC10:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
|
|
|
self:__Guard( 30 )
|
|
end
|
|
|
|
ZoneCaptureC10:MonitorDestroyedUnits()
|
|
ZoneCaptureC10:__Guard( 1 )
|
|
|
|
|
|
-----------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
--- @param Functional.ZoneCaptureC9#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC9:OnEnterGuarded( From, Event, To )
|
|
if From ~= To then
|
|
local Coalition = self:GetCoalition()
|
|
self:E( { Coalition = Coalition } )
|
|
if Coalition == coalition.side.BLUE then
|
|
ZoneCaptureC9:Smoke( SMOKECOLOR.Blue )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC9:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC9:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ZoneCaptureC9:Smoke( SMOKECOLOR.Red )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC9:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC9:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC9:OnEnterEmpty()
|
|
ZoneCaptureC9:Smoke( SMOKECOLOR.Green )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC9:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC9:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC9:OnEnterAttacked()
|
|
ZoneCaptureC9: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", ZoneCaptureC9:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC9:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureC9:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC9:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC9: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!", ZoneCaptureC9:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC9:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ScoreAddRed(CapturePoints)
|
|
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureC9:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC9:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
|
|
|
self:__Guard( 30 )
|
|
end
|
|
|
|
ZoneCaptureC9:MonitorDestroyedUnits()
|
|
ZoneCaptureC9:__Guard( 1 )
|
|
|
|
|
|
-----------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
--- @param Functional.ZoneCaptureC8#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC8:OnEnterGuarded( From, Event, To )
|
|
if From ~= To then
|
|
local Coalition = self:GetCoalition()
|
|
self:E( { Coalition = Coalition } )
|
|
if Coalition == coalition.side.BLUE then
|
|
ZoneCaptureC8:Smoke( SMOKECOLOR.Blue )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC8:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC8:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ZoneCaptureC8:Smoke( SMOKECOLOR.Red )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC8:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC8:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC8:OnEnterEmpty()
|
|
ZoneCaptureC8:Smoke( SMOKECOLOR.Green )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC8:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC8:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC8:OnEnterAttacked()
|
|
ZoneCaptureC8: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", ZoneCaptureC8:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC8:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureC8:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC8:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC8: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!", ZoneCaptureC8:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC8:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ScoreAddRed(CapturePoints)
|
|
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureC8:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC8:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
|
|
|
self:__Guard( 30 )
|
|
end
|
|
|
|
ZoneCaptureC8:MonitorDestroyedUnits()
|
|
ZoneCaptureC8:__Guard( 1 )
|
|
|
|
|
|
-----------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
--- @param Functional.ZoneCaptureC7#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC7:OnEnterGuarded( From, Event, To )
|
|
if From ~= To then
|
|
local Coalition = self:GetCoalition()
|
|
self:E( { Coalition = Coalition } )
|
|
if Coalition == coalition.side.BLUE then
|
|
ZoneCaptureC7:Smoke( SMOKECOLOR.Blue )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC7:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC7:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ZoneCaptureC7:Smoke( SMOKECOLOR.Red )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC7:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC7:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC7:OnEnterEmpty()
|
|
ZoneCaptureC7:Smoke( SMOKECOLOR.Green )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC7:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC7:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC7:OnEnterAttacked()
|
|
ZoneCaptureC7: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", ZoneCaptureC7:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC7:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureC7:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC7:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC7: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!", ZoneCaptureC7:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC7:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ScoreAddRed(CapturePoints)
|
|
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureC7:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC7:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
|
|
|
self:__Guard( 30 )
|
|
end
|
|
|
|
ZoneCaptureC7:MonitorDestroyedUnits()
|
|
ZoneCaptureC7:__Guard( 1 )
|
|
|
|
|
|
-----------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
--- @param Functional.ZoneCaptureC6#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC6:OnEnterGuarded( From, Event, To )
|
|
if From ~= To then
|
|
local Coalition = self:GetCoalition()
|
|
self:E( { Coalition = Coalition } )
|
|
if Coalition == coalition.side.BLUE then
|
|
ZoneCaptureC6:Smoke( SMOKECOLOR.Blue )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC6:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC6:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ZoneCaptureC6:Smoke( SMOKECOLOR.Red )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC6:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC6:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC6:OnEnterEmpty()
|
|
ZoneCaptureC6:Smoke( SMOKECOLOR.Green )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC6:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC6:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC6:OnEnterAttacked()
|
|
ZoneCaptureC6: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", ZoneCaptureC6:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC6:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureC6:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC6:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC6: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!", ZoneCaptureC6:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC6:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ScoreAddRed(CapturePoints)
|
|
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureC6:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC6:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
|
|
|
self:__Guard( 30 )
|
|
end
|
|
|
|
ZoneCaptureC6:MonitorDestroyedUnits()
|
|
ZoneCaptureC6:__Guard( 1 )
|
|
|
|
|
|
-----------------------------------------------------------------------------------------------------------
|
|
|
|
--- @param Functional.ZoneCaptureC5#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC5:OnEnterGuarded( From, Event, To )
|
|
if From ~= To then
|
|
local Coalition = self:GetCoalition()
|
|
self:E( { Coalition = Coalition } )
|
|
if Coalition == coalition.side.BLUE then
|
|
ZoneCaptureC5:Smoke( SMOKECOLOR.Blue )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC5:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC5:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ZoneCaptureC5:Smoke( SMOKECOLOR.Red )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC5:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC5:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC5:OnEnterEmpty()
|
|
ZoneCaptureC5:Smoke( SMOKECOLOR.Green )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC5:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC5:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC5:OnEnterAttacked()
|
|
ZoneCaptureC5: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", ZoneCaptureC5:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC5:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureC5:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC5:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC5: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!", ZoneCaptureC5:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC5:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ScoreAddRed(CapturePoints)
|
|
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureC5:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC5:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
|
|
|
self:__Guard( 30 )
|
|
end
|
|
|
|
ZoneCaptureC5:MonitorDestroyedUnits()
|
|
ZoneCaptureC5:__Guard( 1 )
|
|
|
|
|
|
-----------------------------------------------------------------------------------------------------------
|
|
|
|
--- @param Functional.ZoneCaptureC4#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC4:OnEnterGuarded( From, Event, To )
|
|
if From ~= To then
|
|
local Coalition = self:GetCoalition()
|
|
self:E( { Coalition = Coalition } )
|
|
if Coalition == coalition.side.BLUE then
|
|
ZoneCaptureC4:Smoke( SMOKECOLOR.Blue )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC4:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC4:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ZoneCaptureC4:Smoke( SMOKECOLOR.Red )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC4:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC4:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC4:OnEnterEmpty()
|
|
ZoneCaptureC4:Smoke( SMOKECOLOR.Green )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC4:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC4:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC4:OnEnterAttacked()
|
|
ZoneCaptureC4: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", ZoneCaptureC4:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC4:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureC4:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC4:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC4: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!", ZoneCaptureC4:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC4:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ScoreAddRed(CapturePoints)
|
|
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureC4:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC4:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
|
|
|
self:__Guard( 30 )
|
|
end
|
|
|
|
ZoneCaptureC4:MonitorDestroyedUnits()
|
|
ZoneCaptureC4:__Guard( 1 )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------------------------------------
|
|
|
|
--- @param Functional.ZoneCaptureC3#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC3:OnEnterGuarded( From, Event, To )
|
|
if From ~= To then
|
|
local Coalition = self:GetCoalition()
|
|
self:E( { Coalition = Coalition } )
|
|
if Coalition == coalition.side.BLUE then
|
|
ZoneCaptureC3:Smoke( SMOKECOLOR.Blue )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC3:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC3:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ZoneCaptureC3:Smoke( SMOKECOLOR.Red )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC3:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC3:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC3:OnEnterEmpty()
|
|
ZoneCaptureC3:Smoke( SMOKECOLOR.Green )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC3:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC3:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC3:OnEnterAttacked()
|
|
ZoneCaptureC3: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", ZoneCaptureC3:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC3:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureC3:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC3:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC3: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!", ZoneCaptureC3:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC3:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ScoreAddRed(CapturePoints)
|
|
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureC3:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC3:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
|
|
|
self:__Guard( 30 )
|
|
end
|
|
|
|
ZoneCaptureC3:MonitorDestroyedUnits()
|
|
ZoneCaptureC3:__Guard( 1 )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
--- @param Functional.ZoneCaptureC2#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC2:OnEnterGuarded( From, Event, To )
|
|
if From ~= To then
|
|
local Coalition = self:GetCoalition()
|
|
self:E( { Coalition = Coalition } )
|
|
if Coalition == coalition.side.BLUE then
|
|
ZoneCaptureC2:Smoke( SMOKECOLOR.Blue )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC2:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC2:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ZoneCaptureC2:Smoke( SMOKECOLOR.Red )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC2:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC2:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC2:OnEnterEmpty()
|
|
ZoneCaptureC2:Smoke( SMOKECOLOR.Green )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC2:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC2:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC2:OnEnterAttacked()
|
|
ZoneCaptureC2: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", ZoneCaptureC2:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC2:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureC2:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC2:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC2: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!", ZoneCaptureC2:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC2:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ScoreAddRed(CapturePoints)
|
|
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureC2:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC2:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
|
|
|
self:__Guard( 30 )
|
|
end
|
|
|
|
ZoneCaptureC2:MonitorDestroyedUnits()
|
|
ZoneCaptureC2:__Guard( 1 )
|
|
|
|
-----------------------------------------------------------------------------------------------------------
|
|
|
|
--- @param Functional.ZoneCaptureC1#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC1:OnEnterGuarded( From, Event, To )
|
|
if From ~= To then
|
|
local Coalition = self:GetCoalition()
|
|
self:E( { Coalition = Coalition } )
|
|
if Coalition == coalition.side.BLUE then
|
|
ZoneCaptureC1:Smoke( SMOKECOLOR.Blue )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC1:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureC1:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ZoneCaptureC1:Smoke( SMOKECOLOR.Red )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC1:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureC1:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC1:OnEnterEmpty()
|
|
ZoneCaptureC1:Smoke( SMOKECOLOR.Green )
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC1:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureC1:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC1:OnEnterAttacked()
|
|
ZoneCaptureC1: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", ZoneCaptureC1:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC1:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureC1:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureC1:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
end
|
|
|
|
--- @param Functional.Protect#ZONE_CAPTURE_COALITION self
|
|
function ZoneCaptureC1: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!", ZoneCaptureC1:GetZoneName() ), MESSAGE.Type.Information )
|
|
US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC1:GetZoneName() ), MESSAGE.Type.Information )
|
|
else
|
|
ScoreAddRed(CapturePoints)
|
|
StatRedCapturePoints = StatRedCapturePoints + CapturePoints
|
|
US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureC1:GetZoneName() ), MESSAGE.Type.Information )
|
|
RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureC1:GetZoneName() ), MESSAGE.Type.Information )
|
|
end
|
|
|
|
self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 )
|
|
|
|
self:__Guard( 30 )
|
|
end
|
|
|
|
ZoneCaptureC1:MonitorDestroyedUnits()
|
|
ZoneCaptureC1:__Guard( 1 )
|
|
|
|
ZoneCaptureC1:Start(30,30)
|
|
ZoneCaptureC2:Start(30,30)
|
|
ZoneCaptureC3:Start(30,30)
|
|
ZoneCaptureC4:Start(30,30)
|
|
ZoneCaptureC5:Start(30,30)
|
|
ZoneCaptureC6:Start(30,30)
|
|
ZoneCaptureC7:Start(30,30)
|
|
ZoneCaptureC8:Start(30,30)
|
|
ZoneCaptureC9:Start(30,30)
|
|
ZoneCaptureC10:Start(30,30)
|
|
ZoneCaptureC11:Start(30,30)
|
|
ZoneCaptureC12:Start(30,30)
|
|
ZoneCaptureC13: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, ZoneCaptureC1:GetZoneName(), ZoneCaptureC1 )
|
|
--local US_Task_Zone_Capture2 = TASK_ZONE_CAPTURE:New( US_Mission, ZoneCaptureGroupSet, ZoneCaptureC2:GetZoneName(), ZoneCaptureC2 )
|
|
|
|
US_CC:SetMenu()
|