Advertisement
Guest User

Untitled

a guest
Jul 26th, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.46 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.             end
  28.             elseif teamTwo == George:GetTeam() then
  29.                 if Teams[teamTwo]:GetAtWarCount() == 1 then
  30.                     BritainAtWar = true
  31.            
  32.                 if BritainAtWar == true then
  33.                     for pCity in George:Cities() do
  34.                     city:SetWeLoveTheKingDayCounter () = 15
  35.                 end
  36.             end
  37.         end
  38.     end
  39. end
  40. Events.WarStateChanged.Add(GreaterEurope_WarWeLoveTheKingDay)
  41.            
  42. function GreaterEurope_WLTKDProduction ()
  43.     if player:GetCivilizationType() == GameInfoTypes["CIVILIZATION_UNITED_KINGDOM"] then
  44.     for pCity in pPlayer:Cities() do
  45.         if pCity:GetWeLoveTheKingDayCounter() > 0 then
  46.             pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_UNITED_KINGDOM_WAR_DUMMY"], 1)
  47.         end
  48.     end
  49. end
  50. GameEvents.PlaterDoTurn.Add(GreaterEurope_WLTKDProduction)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement