HasPolicy

From Civilization Modding Wiki
Revision as of 04:58, 17 February 2012 by Killmeplease (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description

Returns true if a player has a specified policy.

Example

 function hasPolicy(pPlayer, policyType)
 	for policy in GameInfo.Policies() do
 		if policy.Type == policyType then
 			return pPlayer:HasPolicy(policy.ID);
 		end
 	end
 	return false;
 end