public static float MaxPawnCost(Faction faction, float totalPoints, RaidStrategyDef raidStrategy, PawnGroupKindDef groupKind) { float num = faction.def.maxPawnCostPerTotalPointsCurve.Evaluate(totalPoints); if (raidStrategy != null) { num = Mathf.Min(num, totalPoints / raidStrategy.minPawns); } num = Mathf.Max(num, faction.def.MinPointsToGeneratePawnGroup(groupKind) * 1.2f); if (raidStrategy != null) { num = Mathf.Max(num, raidStrategy.Worker.MinMaxAllowedPawnGenOptionCost(faction, groupKind) * 1.2f); } return(num); }
private static string <DoTable_RaidStrategySampled> m__4(RaidStrategyDef d) { return(d.defName); }
public static float AdjustedRaidPoints(float points, PawnsArrivalModeDef raidArrivalMode, RaidStrategyDef raidStrategy, Faction faction, PawnGroupKindDef groupKind) { if (raidArrivalMode.pointsFactorCurve != null) { points *= raidArrivalMode.pointsFactorCurve.Evaluate(points); } if (raidStrategy.pointsFactorCurve != null) { points *= raidStrategy.pointsFactorCurve.Evaluate(points); } points = Mathf.Max(points, raidStrategy.Worker.MinimumPoints(faction, groupKind) * 1.05f); return(points); }
private static float MaxAllowedPawnGenOptionCost(Faction faction, float totalPoints, RaidStrategyDef raidStrategy) { float num = PawnGroupMakerUtility.MaxPawnCostPerRaidPointsCurve.Evaluate(totalPoints); num *= faction.def.maxPawnOptionCostFactor; if (raidStrategy != null) { num = Mathf.Min(num, totalPoints / raidStrategy.minPawns); } num = Mathf.Max(num, (float)(faction.def.MinPointsToGenerateNormalPawnGroup() * 1.2000000476837158)); if (raidStrategy != null) { num = Mathf.Max(num, (float)(raidStrategy.Worker.MinMaxAllowedPawnGenOptionCost(faction) * 1.2000000476837158)); } return(num); }