
  --[[To do:Every time a Major Civilization Conquested a city of YAN state,
  the Civilization will get a diplomacy penality(determined by the population remain in the city) between all other major civilizations.]]
  -----Reference resources:   GameEvents.CityCaptureComplete(iOldOwner--playerID, bIsCapital, iX, iY--City, iNewOwner, iPop, bConquest)
  local t_DipPenalityValue = {}
  function DecideDiploPenality(iOldOwner, bIsCapital, iX, iY, iNewOwner, iPop, bConquest)
  local PoorPlayer = Players[iOldOwner]
  local EvilPlayer = Players[iNewOwner]
  local iVictim = iPop
  print("PoorPlayer is",iOldOwner)
  if bConquest == true  and PoorPlayer:GetCivilizationType() == GameInfoTypes.CIVILIZATION_YAN then
	print("EvilPlayer is",iNewOwner)
	t_DipPenalityValue[iNewOwner] = t_DipPenalityValue[iNewOwner] or 0
	if bIsCapital == true then
		t_DipPenalityValue[iNewOwner] = t_DipPenalityValue[iNewOwner] + iVictim * 5
	elseif bIsCapital == false then
		t_DipPenalityValue[iNewOwner] = t_DipPenalityValue[iNewOwner] + iVictim * 1
	end
  end
  print("iDiploPenality is",t_DipPenalityValue[iNewOwner])
end

GameEvents.CityCaptureComplete.Add(DecideDiploPenality)




function OnGetDiploPenality(iDiploModifier,iFromPlayer,iToPlayer)

if (t_DipPenalityValue[iToPlayer]~= nil) and iDiploModifier == GameInfoTypes.DIPLOMODIFIER_EVIL_CONQUEST then
	return t_DipPenalityValue[iToPlayer]
end
end

GameEvents.GetDiploModifier.Add(OnGetDiploPenality)
