bane_
Howardianism High-Priest
- Joined
- Nov 27, 2013
- Messages
- 1,559
I've tried with the args being Player ID and Team ID, yet nothing works.
There is no error, it just doesn't go on.
From experience derived from earlier versions of this code, the problem seems to be IsMinorCiv, but I have no idea why and research proved fruitless.
There is no error, it just doesn't go on.
From experience derived from earlier versions of this code, the problem seems to be IsMinorCiv, but I have no idea why and research proved fruitless.
Code:
function PlagueMet(iPlayer, iPlayerMet)
--local pTeam = Teams[iTeam]
--local pTeamMet = Teams[iTeamMet]
local pPlayer = Players[iPlayer]
local pPlayerMet = Players[iPlayerMet]
if pPlayer:GetCivilizationType() == ePlagueLords then
print("[PlagueMet] Started.")
print("[PlagueMet] Player met is a City-State? " ..tostring(pPlayerMet:IsMinorCiv()))
if pPlayerMet:IsMinorCiv() then
print("[PlagueMet] Plaguelords met a Minor Civ.")
if WBCTable.iTimesMetCS > 0 then
print("[PlagueMet] Number of times met a Minor Civ is below 3.")
local iModifier = WBCCheckMultiplierGS()
pPlayerMet:ChangeMinorCivFriendshipWithMajor(iPlayer, (105 * iModifier))
WBCTable.iTimesMetCS = WBCTable.iTimesMetCS - 1
else
print("[PlagueMet] First part of UA is DONE.")
GameEvents.TeamMeet.Remove(PlagueMet)
end
end
print("[PlagueMet] Ended.")
end
end