operating -> RE: How Viable is NOT Sinking Convoys? (9/4/2015 9:26:29 AM)
|
Here's the lua file on sinking convoys and what effect it would have on the USA: quote:
-- USA relationship drops several times when a certain number of convoys have been killed function ConvoyAttacks(attacker, defender) if defender.prototype ~= nil and defender.prototype.name == "convoy" then if attacker.faction.alliance.id == 2 then if GetEvent("ConvoyAttacks1") == 0 then local convoyLosses = 0 for faction in game:GetAllianceById(1).factions do convoyLosses = convoyLosses + faction.luaData.statsCasualties["convoy"] end if convoyLosses > 400 then SetEvent("ConvoyAttacks1", game.turn) local usa = game:GetFactionById(10) ChangeFactionAlignment(usa, attacker.faction.alliance, -15) end end if GetEvent("ConvoyAttacks2") == 0 then local convoyLosses = 0 for faction in game:GetAllianceById(1).factions do convoyLosses = convoyLosses + faction.luaData.statsCasualties["convoy"] end if convoyLosses > 800 then SetEvent("ConvoyAttacks2", game.turn) local usa = game:GetFactionById(10) ChangeFactionAlignment(usa, attacker.faction.alliance, -25) end end elseif attacker.faction.alliance.id == 1 and true then -- Add condition for not in Baltic if GetEvent("BlockadeEstablished") == 0 then SetEvent("BlockadeEstablished", game.turn) game:GetFactionById(2).luaData.blockaded = 1 end end end end
|
|
|
|