Created
June 16, 2014 02:05
-
-
Save TomiToivio/fefb80bb0f35e2a58d53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local P = {} | |
AI_SOV = P | |
function P.ProposeDeclareWar( minister ) | |
local ai = minister:GetOwnerAI() | |
local ministerCountry = minister:GetCountry() | |
local strategy = ministerCountry:GetStrategy() | |
local year = ai:GetCurrentDate():GetYear() | |
local month = ai:GetCurrentDate():GetMonthOfYear() | |
local perTag = CCountryDataBase.GetTag('PER') | |
if not ministerCountry:GetRelation(perTag):HasWar() | |
and not perTag:GetCountry():IsSubject() | |
and CCurrentGameState.GetProvince( 9158 ):GetController() == perTag | |
then | |
strategy:PrepareWar( perTag, 100 ) | |
end | |
end | |
function P.ManageSpyMissionAtHome(newMission, ai, minister, ministerCountry) | |
if not ministerCountry:IsAtWar() then | |
newMission = SpyMission.SPYMISSION_LOWER_NEUTRALITY | |
end | |
return newMission | |
end | |
function P.PickBestMission(ai, minister, countryTag, bestMission, bestScore ) | |
if tostring(countryTag) == 'GER' then | |
bestMission = SpyMission.SPYMISSION_INCREASE_THREAT | |
else | |
bestMission = SpyMission.SPYMISSION_BOOST_OUR_PARTY | |
end | |
return bestMission | |
end | |
return AI_SOV |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment