public ExplicitRadio(RadioFaction faction, Item radio) { #if DEBUG if (faction.RadioID != radio.Model.ID) { throw new InvalidOperationException("faction radio not provided"); } #endif Threats = faction.Threats; Investigate = faction.Investigate; FactionID = faction.FactionID; Radio = radio; }
public float DifficultyRating(Gameplay.GameFactions.IDs side) { // Historically supported factions are civilians and zombies Data.Faction us = Data.Models.Factions[(int)side]; float rating = 1f; /////////////////// // Constant factors. // Harder: // - Don't reveal starting map : +10% // Survivor Easier/Undead Harder: // - Disable NPC starvation : -10%/+10% // Harder/Easier: // - Nat Guards : -50% -> +50% // - Supplies : -50% -> +50% // - Zombifieds UpDay ////////////////// if (!RevealStartingDistrict) { rating += 0.1f; // theoretically affects everyone } if (!NPCCanStarveToDeath) { rating += (!Gameplay.GameFactions.TheCivilians.IsEnemyOf(us) ? -0.1f : 0.1f); // very arguable } if (NatGuardFactor != GameOptions.DEFAULT_NATGUARD_FACTOR && Gameplay.GameFactions.TheBlackOps != us) { // blackops are strictly after national guard so they don't care aobut this setting either way float k = (float)(NatGuardFactor - GameOptions.DEFAULT_NATGUARD_FACTOR) / (float)GameOptions.DEFAULT_NATGUARD_FACTOR; rating += 0.5f * (!Gameplay.GameFactions.TheArmy.IsEnemyOf(us) ? -k : k); } if (SuppliesDropFactor != GameOptions.DEFAULT_SUPPLIESDROP_FACTOR) { // while almost everyone can use medikits, the main influence of this is on food supply float k = (float)(SuppliesDropFactor - GameOptions.DEFAULT_SUPPLIESDROP_FACTOR) / (float)GameOptions.DEFAULT_SUPPLIESDROP_FACTOR; rating += 0.5f * (!Gameplay.GameFactions.TheCivilians.IsEnemyOf(us) ? -k : k); } if (ZombifiedsUpgradeDays != GameOptions.ZupDays.THREE) {