EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
EvEMath::Agent Namespace Reference

Functions

float EffectiveQuality (int8 AgentQuality, uint8 NegotiationSkillLevel, float AgentPersonalStanding)
 
float EffectiveStanding (float YourStanding, double standingBonus)
 
float RequiredStanding (uint8 AgentLevel, int8 AgentQuality)
 
float MissionStandingIncrease (float BaseMissionIncrease, uint8 YourSocialSkillLevel)
 
float Efficiency (uint8 AgentLevel, int8 AgentQuality)
 
float AgentStandingIncrease (float CurrentStanding, float PercentIncrease)
 
float GetStandingBonus (float fromStanding, uint32 fromFactionID, uint8 ConnectionsSkillLevel, uint8 DiplomacySkillLevel, uint8 CriminalConnectionsSkillLevel)
 

Function Documentation

float EvEMath::Agent::AgentStandingIncrease ( float  CurrentStanding,
float  PercentIncrease 
)

Definition at line 175 of file EvEMath.cpp.

176 {
177  return (((10.0f - CurrentStanding) * PercentIncrease) + CurrentStanding);
178 }
float EvEMath::Agent::EffectiveQuality ( int8  AgentQuality,
uint8  NegotiationSkillLevel,
float  AgentPersonalStanding 
)

Definition at line 150 of file EvEMath.cpp.

Referenced by Agent::UpdateStandings().

151 {
152  return (AgentQuality + (5.0f * NegotiationLevel) + AgentPersonalStanding);
153 }

Here is the caller graph for this function:

float EvEMath::Agent::EffectiveStanding ( float  YourStanding,
double  standingBonus 
)

Definition at line 155 of file EvEMath.cpp.

Referenced by Agent::CanUseAgent(), and Agent::UpdateStandings().

156 {
157  return (1.0f - (1.0f - YourStanding / 10.0f) * (1.0f - standingBonus / 10.0f)) * 10.0f;
158 }

Here is the caller graph for this function:

float EvEMath::Agent::Efficiency ( uint8  AgentLevel,
int8  AgentQuality 
)

Definition at line 170 of file EvEMath.cpp.

Referenced by Agent::UpdateStandings().

171 {
172  return (0.01f * ((8.0f * AgentLevel) + (0.1f * AgentQuality) - 4.0f));
173 }

Here is the caller graph for this function:

float EvEMath::Agent::GetStandingBonus ( float  fromStanding,
uint32  fromFactionID,
uint8  ConnectionsSkillLevel,
uint8  DiplomacySkillLevel,
uint8  CriminalConnectionsSkillLevel 
)

Definition at line 180 of file EvEMath.cpp.

Referenced by Agent::CanUseAgent(), and Agent::UpdateStandings().

181 {
182  float bonus(0.0f);
183  if (fromStanding < 0.0f) {
184  bonus = DiplomacySkillLevel * 0.4f;
185  } else if (fromStanding > 0.0f) {
186  switch (fromFactionID) {
187  case 500010:
188  case 500011:
189  case 500012:
190  case 500019:
191  case 500020: {
192  bonus = CriminalConnectionsSkillLevel * 0.4f;
193  } break;
194  default: {
195  bonus = ConnectionsSkillLevel * 0.4f;
196  } break;
197  }
198  }
199  return bonus;
200 }

Here is the caller graph for this function:

float EvEMath::Agent::MissionStandingIncrease ( float  BaseMissionIncrease,
uint8  YourSocialSkillLevel 
)

Definition at line 165 of file EvEMath.cpp.

Referenced by Agent::UpdateStandings().

166 {
167  return (BaseMissionIncrease * (1.0f + 0.05f * YourSocialSkillLevel));
168 }

Here is the caller graph for this function:

float EvEMath::Agent::RequiredStanding ( uint8  AgentLevel,
int8  AgentQuality 
)

Definition at line 160 of file EvEMath.cpp.

161 {
162  return (((AgentLevel - 1.0f) * 2.0f) + (AgentQuality/20.0f));
163 }