Advertisement
Guest User

Untitled

a guest
Jul 26th, 2014
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.44 KB | None | 0 0
  1. function GetGeorge()
  2.     if George == nil then  
  3.         for iPlayer = 0, GameDefines.MAX_CIV_PLAYERS - 1 do
  4.             local player = Players[iPlayer];           
  5.             if player ~= nil and player:GetCivilizationType() == GameInfoTypes["CIVILIZATION_UNITED_KINGDOM"] then
  6.                 George = player
  7.                 break
  8.             end
  9.         end
  10.     end
  11.    
  12.     return George
  13. end
  14.  
  15. function GreaterEurope_WarWeLoveTheKingDay ()
  16.     if bWar then
  17.         local George = GetGeorge()
  18.         local BritainAtWar = false
  19.         if George then
  20.             if Teams[teamOne]:IsMinorCiv() or Teams[teamOne]:IsBarbarian() then return end
  21.             if Teams[teamTwo]:IsMinorCiv() or Teams[teamTwo]:IsBarbarian() then return end
  22.  
  23.             if teamOne == George:GetTeam() then
  24.                 if Teams[teamOne]:GetAtWarCount() == 1 then
  25.                     BritainAtWar = true
  26.                 end
  27.             elseif teamTwo == George:GetTeam() then
  28.                 if Teams[teamTwo]:GetAtWarCount() == 1 then
  29.                     BritainAtWar = true
  30.  
  31.                 if BritainAtWar = true then
  32.                     for pCity in pPlayer:Cities() do
  33.                     city:SetWeLoveTheKingDayCounter () = 15
  34.                 end
  35.             end
  36.         end
  37.     end
  38. end
  39. Events.WarStateChanged.Add(GreaterEurope_WarWeLoveTheKingDay)
  40.            
  41. function GreaterEurope_WLTKDProduction ()
  42.     if player:GetCivilizationType() == GameInfoTypes["CIVILIZATION_UNITED_KINGDOM"] then
  43.     for pCity in pPlayer:Cities() do
  44.         if pCity:GetWeLoveTheKingDayCounter() > 0 then
  45.             city:SetNumRealBuilding(GameInfoTypes["BUILDING_UNITED_KINGDOM_WAR_DUMMY"], 1) 
  46.         end
  47.     end
  48. end
  49. GameEvents.PlaterDoTurn.Add(GreaterEurope_WLTKDProduction)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement