Skip to content

Instantly share code, notes, and snippets.

@hawksprite
Created December 22, 2015 20:22
Show Gist options
  • Save hawksprite/08a14fee52a3985db1aa to your computer and use it in GitHub Desktop.
Save hawksprite/08a14fee52a3985db1aa to your computer and use it in GitHub Desktop.
float PI = m_oNext.m_oPersonalInfluence.GetCurrentValue();
float opinionOfPlayer = GetOpinionOfCharacter(ECHAR_ID_COREY);
// Gather some formal authority values
float formalAuthority = 0.0f;
float yourFormalAuthority = 0.0f;
float formalRespect = 0.0f;
for (int k = 0; k < (int)m_pkoMeeting->GetCharacters().size(); k++)
{
CCharacter &roLookedCharacter = *m_pkoMeeting->GetCharacters()[k];
if (ECHAR_ID_COREY == roLookedCharacter.GetId())
{
formalAuthority = roLookedCharacter.GetCurrentFormalAuthority().GetCurrentValue();
}
if (GetId() == roLookedCharacter.GetId()) {
yourFormalAuthority = roLookedCharacter.GetCurrentFormalAuthority().GetCurrentValue();
formalRespect = roLookedCharacter.GetRespectForAuthority().GetCurrentValue();
//roLookedCharacter.
}
}
formalAuthority = (((yourFormalAuthority - formalAuthority) * formalRespect) / 25.0f) * 100.0f;
CIdea *poIdea = GetLastFinalActionType().GetIdea();
float remainingWork = GetIdeaRemainingPositiveWorkContribution(*poIdea);
float finishedWork = GetIdeaSustainablePositiveWorkContribution(*poIdea);
float workTillProductive = remainingWork / (remainingWork + finishedWork);
float leadershipPotential = PI + opinionOfPlayer + formalAuthority + workTillProductive;
// 304 seems to be the apparant max, so this converts the range from 0 to 100
leadershipPotential = (leadershipPotential * 100) / 304;
if (leadershipPotential > 100) {
leadershipPotential = 100.0f;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment