public QuestRewardFaction(int level) { QuestSourceFaction newFaction = new QuestSourceFaction(ReputationBiases.UNKNOWN); newFaction.initialHeroLevel = level; newFaction = ReputationGenerator.GenerateReputationInstance(newFaction, ReputationBiases.UNKNOWN); Faction = newFaction; }
public void GenerateSettings() { ReputationGenerator.GenerateQuestPreferences(this, personalityType); ReputationGenerator.GenerateName(this, ReputationNameConventions.GROUP); for (int i = 0; i < Random.Range(MIN_HEROES_PER_FACTION, MAX_HEROES_PER_FACTION + 1); i++) { Heroes.Add(HeroGenerator.GenerateHero(this, Mathf.Clamp(initialHeroLevel + Random.Range(-1, 1), 1, 100), true)); } }
public static QuestInstance GenerateQuestInstance(QuestSourceTypes forcedType) { int questDuration = m_QuestDurationChoser.GetRandomValue(); int itemRewardChance; IQuestReward additionalReward = null; IQuestSource qSource; switch (forcedType) { default: case QuestSourceTypes.FACTION: qSource = ReputationManager.GetRandomFaction(); QuestSourceFaction factionSource = qSource as QuestSourceFaction; itemRewardChance = 25; if (Random.Range(0, daysSinceHeroRecruit) == 0) { additionalReward = new QuestRewardHero(factionSource); daysSinceHeroRecruit = Random.Range(10, 20); } else if (Random.Range(0, daysSinceFactionRecruit) == 0) { additionalReward = new QuestRewardFaction(factionSource.AverageHeroLevel + Random.Range(3, 6)); daysSinceFactionRecruit = Random.Range(25, 35); } daysSinceHeroRecruit--; daysSinceFactionRecruit--; break; case QuestSourceTypes.PERSON: qSource = ReputationGenerator.GenerateReputationInstance(new QuestSourcePerson(EnumUtility.GetRandomEnumValue <ReputationBiases>())); itemRewardChance = 5; break; case QuestSourceTypes.RUMOR: qSource = ReputationGenerator.GenerateReputationInstance(new QuestSourceRumor()); itemRewardChance = 15; break; } QuestInstance quest = GenerateQuestInstance(qSource, questDuration); quest.AdditionalReward = additionalReward; quest.PartySize = m_PartySizeChoser.GetRandomValue(); if (Random.Range(0, itemRewardChance) == 0) { GameItem itemReward = GameItemGenerator.GenerateItem(GameItemTypes.UNKNOWN, GetItemRarityForDifficulty(quest.DifficultyLevel)); quest.HandlerItemReward = new QuestRewardItem(itemReward); } return(quest); }
public void GenerateSettings() { ReputationGenerator.GenerateName(this, ReputationNameConventions.COMPOUND); }
public void GenerateSettings() { ReputationGenerator.GenerateName(this, ReputationNameConventions.POINT_OF_INTEREST, ReputationNameConventions.TERRITORY); }