Code: Select all
--Reinforcements through Saloniki port
if GetEvent("MacedoniaDonation") ~= game.turn
and player.alliance.id == 2 and game.type == Game.TYPE_SINGLE then
if salonikahex.unit == nil
and salonikahex.alliance.id == 1
and greece.alliance.id == 0 then
if (math.random(1,2) == 2 or france.morale < 50)
and britain.luaData.suezcanalblock == 0
and (GetEvent("AnzacBeachCaptured") > 0
or GetEvent("VenizelistTriumvirate") >0) then
SpawnUnit(1, britain, 113, 46, 1, 100)
britain:ConsumeManpower(15)
ChangeFactionAlignment(game:GetFactionById(14), greece.alliance, 3)
else
if GetEvent("VenizelistTriumvirate") >0 and france.alliance.id == 1 then
SpawnUnit(1, france, 113, 46, 1, 100)
france:ConsumeManpower(15)
ChangeFactionAlignment(game:GetFactionById(14), greece.alliance, 3)
local hex = GetHex(113,46)
UpdateUnit(hex.unit)
elseif france.alliance.id == 1 then
SpawnUnit(0, france, 113, 46, 1, 100)
france:ConsumeManpower(10)
ChangeFactionAlignment(game:GetFactionById(14), greece.alliance, 1)
local hex = GetHex(113,46)
UpdateUnit(hex.unit)
end
end
elseif salonikahex.alliance.id == 1 and salonikahex.unit ~= nil and roupel.alliance.id == 2 and romania.alliance.id == 1 then
if math.random(1,3) >= 2 then
ChangeFactionAlignment(game:GetFactionById(14), greece.alliance, math.random(1,2))
end
elseif salonikahex.alliance.id == 1 and salonikahex.unit ~= nil and roupel.alliance.id == 2 and bulgaria.alliance.id == 2 and italy.alliance.id == 1 and romania.alliance.id == 0 then
if math.random(1,3) == 3 then
ChangeFactionAlignment(game:GetFactionById(14), greece.alliance, 1)
end
elseif salonikahex.alliance.id == 2 and roupel.alliance.id == 2 and bulgaria.alliance.id == 2 and italy.alliance.id == 1 and romania.alliance.id == 1 then
if math.random(1,6) == 6 then
ChangeFactionAlignment(game:GetFactionById(14), greece.alliance, 1)
end
end
end
end


