public SideQuestItem(QuestDraft questDraft, QuestDifficulty difficulty, Reward reward) : base(questDraft) { Difficulty = difficulty; Reward = reward; Hold = false; Completed = false; }
public SideQuestItem(int requiredRed, int requiredGreen, int requiredBlue, QuestDifficulty difficulty, Reward reward) : base(requiredRed, requiredGreen, requiredBlue) { Difficulty = difficulty; Reward = reward; Hold = false; Completed = false; }
public Quest(int ID, string Question, List <Answer> Answers, int correctAnswer, QuestDifficulty questDifficulty) { this.ID = ID; this.Question = Question; this.Answers = Answers; this.correctAnswer = correctAnswer; this.questDifficulty = questDifficulty; }
public QuestModel(uint id, string name, string bannerPath, QuestDifficulty difficulty, int clearScore, uint openClearQuestID) { this.ID = id; this.Name = name; this.bannerFilename = bannerPath; this.Difficulty = difficulty; this.ClearScore = clearScore; this.openClearQuestID = openClearQuestID; }
public void Init(LevelQuestController controller) { freeStatus.gameObject.SetActive(false); readyStatus.gameObject.SetActive(false); this.Controller = controller; difficulty = Formuls.RandomQuestDifficulty(); Utils.GroundTransform(transform); Status = QuestStatus.free; }
public static string Generate(QuestType type, QuestDifficulty difficulty, Rarity rarity) { string name = ""; if (type == QuestType.Battle) { name = BattleEventNames[Random.Range(0, BattleEventNames.Length)] + AddLand(Addition.either); } else if (type == QuestType.Conquest) { name = "Conquest" + AddLand(Addition.either); } else if (type == QuestType.Siege) { name = "Siege" + AddLand(Addition.either); } else if (type == QuestType.Conquest) { name = "Conquest" + AddLand(Addition.either); } else if (type == QuestType.Defense) { name = "Defense" + AddLand(Addition._for); } else if (type == QuestType.Lore) { name = "Lore Quest"; } else if (type == QuestType.Merchant) { name = "Merchant Quest"; } else if (type == QuestType.Puzzle) { name = "Puzzle Quest"; } else if (type == QuestType.Rescue) { name = "Rescue Quest"; } else if (type == QuestType.Rumor) { name = "Rumor Quest"; } else if (type == QuestType.Story) { name = "Story Quest"; } else if (type == QuestType.Tutorial) { name = "Tutorial Quest"; } return(name); }
public Quest(Quest quest) { name = quest.name; description = quest.description; type = quest.type; difficulty = quest.difficulty; rarity = quest.rarity; goldReward = quest.goldReward; experienceReward = quest.experienceReward; mapData = new MapData(quest.mapData); }
public Quest(string name, string description, QuestType type, QuestDifficulty difficulty, Rarity rarity, int goldReward, int experienceReward, MapData mapData) { this.name = name; this.description = description; this.type = type; this.difficulty = difficulty; this.rarity = rarity; this.goldReward = goldReward; this.experienceReward = experienceReward; this.mapData = new MapData(mapData); }
public Quest() { name = ""; description = ""; type = QuestType.Blank; difficulty = QuestDifficulty.None; rarity = Rarity.None; goldReward = 0; experienceReward = 0; mapData = null; }
public static string Generate(QuestType type, QuestDifficulty difficulty, Rarity rarity) { string description = ""; if (type == QuestType.Battle) { description = "You must battle a " + GroupSizes[Random.Range(0, GroupSizes.Length)] + " group of " + EnemyTypes[Random.Range(0, EnemyTypes.Length)] + "s."; } else if (type == QuestType.Conquest) { description = "You must conquer " + AddLand(Addition.none) + " from the " + EnemyDescriptor[Random.Range(0, EnemyDescriptor.Length)] + " " + EnemyTypes[Random.Range(0, EnemyTypes.Length)] + "s."; } else if (type == QuestType.Siege) { description = "You must siege the city " + AddLand(Addition.of); } else if (type == QuestType.Defense) { description = "You must defend the land " + AddLand(Addition.of) + " from a " + GroupSizes[Random.Range(0, GroupSizes.Length)] + " group of " + EnemyTypes[Random.Range(0, EnemyTypes.Length)] + "s."; } else if (type == QuestType.Lore) { description = "Lore Quest"; } else if (type == QuestType.Merchant) { FantasyName name = NameGenerator.Get(Gender.Male, "Northern Human", "Citizen"); description = name.FirstName + " " + name.LastName + ", the famous merchant wants to sell you some " + Items[Random.Range(0, Items.Length)] + "."; } else if (type == QuestType.Puzzle) { description = "Puzzle Quest"; } else if (type == QuestType.Rescue) { FantasyName name = NameGenerator.Get(Gender.Male, "Northern Human", "Citizen"); description = "You must rescue " + name.FirstName + " " + name.LastName + " from a " + GroupSizes[Random.Range(0, GroupSizes.Length)] + " group of " + EnemyDescriptor[Random.Range(0, EnemyDescriptor.Length)] + " " + EnemyTypes[Random.Range(0, EnemyTypes.Length)] + "s."; } else if (type == QuestType.Rumor) { description = "It is rumored that a" + Age[Random.Range(0, Age.Length)] + " " + RumorType[Random.Range(0, Age.Length)] + " was found in this area"; } else if (type == QuestType.Story) { description = "Story Quest"; } else if (type == QuestType.Tutorial) { description = "Tutorial Quest"; } return(description); }
public static Quest Generate() { QuestType type = (QuestType)Random.Range(0, (int)QuestType.Number); QuestDifficulty difficulty = (QuestDifficulty)Random.Range(0, (int)QuestDifficulty.Number); Rarity rarity = (Rarity)Random.Range(0, (int)Rarity.Number); string name = QuestName.Generate(type, difficulty, rarity); string description = QuestDescription.Generate(type, difficulty, rarity); int gold = Random.Range(10, 100); int exp = Random.Range(10, 100); MapData mapData = new MapData(MapGenerator.Generate()); Quest quest = new Quest(name, description, type, difficulty, rarity, gold, exp, mapData); return(quest); }
public int returnQuest(QuestDifficulty difficulty) { List <Quest> questsSelectedByDifficulty = questManager.quests.FindAll(x => x.questDifficulty.Equals(difficulty)); int questSelected = Random.Range(0, questsSelectedByDifficulty.Count); for (int i = 0; i < questPlayed.Count; i++) { if (questSelected != questPlayed[i]) { break; } } Debug.Log($"Quests selected for {difficulty} difficulty {questsSelectedByDifficulty.Count}"); return(questSelected); }
public QuestDifficultyPacket(QuestDifficulty[] questdiffs) { // Setup dummy difficulty entries for (int i = 0; i < questdiffs.Length; i++) { QuestDifficultyEntry difficulty = new QuestDifficultyEntry(); difficulty.unknown1 = 0x0101; difficulty.monster1 = 0xFFFFFFFF; difficulty.monster2 = 0xFFFFFFFF; difficulty.monster3 = 0xFFFFFFFF; questdiffs[i].difficulty1 = difficulty; questdiffs[i].difficulty2 = difficulty; questdiffs[i].difficulty3 = difficulty; questdiffs[i].difficulty4 = difficulty; questdiffs[i].difficulty5 = difficulty; questdiffs[i].difficulty6 = difficulty; questdiffs[i].difficulty7 = difficulty; questdiffs[i].difficulty8 = difficulty; } this.questdiffs = questdiffs; }
public Quest GenerateQuest() { var newQuest = new Quest(); // Step 1 - Generate a GUID to distinguish the quest from all others. Guid guid = Guid.NewGuid(); newQuest.GUID = guid.ToString(); // Step 2 - Determine what level of difficulty of Quest will be generated. // There are three grades of difficulty: // 0 - Easy // 1 - Moderate // 2 - Hard // // TODO: In later iterations, determine what difficulty the player is // best-suited to based on their history of completing quests. var rng = new Random(); QuestDifficulty difficulty = (QuestDifficulty)rng.Next(0, 3); newQuest.Difficulty = difficulty; // Step 3 - Determine what type of quset will be generated. // There are the following types of quests: // 0 - Patrol (go to these sectors) // 1 - Combat (Destroy the named ship) // // TODO: In later iterations, determine what quest types are available // based on the entity that gives them out. QuestObjectiveType questType = (QuestObjectiveType)rng.Next(0, 2); // Step 4 - Generate a name for the quest. string questName = string.Empty; switch (questType) { case QuestObjectiveType.Patrol: questName = "Patrol Duty"; break; case QuestObjectiveType.Combat: questName = "Intercept Enemies"; break; } newQuest.Name = questName; // Step 5 - Generate quest steps based on difficulty. // The difficulty of the quest has a number // of effects on what the player has to do. // - Higher difficulty quests have more steps. // - Higher difficulty quests gives more rewards. // - Higher difficulty quests spawn more dangerous // types of ships. // - Higher difficulty quests can be further from // their point of origin, and thus take longer // to get to. // Step _ - Generate a description for the quest. string questDescription = string.Empty; switch (questType) { case QuestObjectiveType.Patrol: break; case QuestObjectiveType.Combat: break; } newQuest.Description = questDescription; // TODO: Call QuestService to save the quest and all child objects. return(newQuest); }
public static QuestRewardType RandomQuestReward(QuestDifficulty d) { WDictionary<QuestRewardType> w = null; switch (d) { case QuestDifficulty.easy: w = new WDictionary<QuestRewardType>(new Dictionary<QuestRewardType, float>() { { QuestRewardType.money, 70},{ QuestRewardType.materials, 40},{ QuestRewardType.crystal, 15},{ QuestRewardType.item, 5} }); break; case QuestDifficulty.normal: w = new WDictionary<QuestRewardType>(new Dictionary<QuestRewardType, float>() { { QuestRewardType.money, 70},{ QuestRewardType.materials, 50},{ QuestRewardType.crystal, 25},{ QuestRewardType.item, 10} }); break; case QuestDifficulty.hard: w = new WDictionary<QuestRewardType>(new Dictionary<QuestRewardType, float>() { { QuestRewardType.money, 50},{ QuestRewardType.materials, 30},{ QuestRewardType.crystal, 25},{ QuestRewardType.item, 15} }); break; default: return QuestRewardType.money; } return w.Random(); }
public static GiftType CalcGiftType(QuestDifficulty difficulty) { Dictionary<GiftType, float> d; switch (difficulty) { case QuestDifficulty.easy: d = new Dictionary<GiftType, float>() { {GiftType.catalys, 9}, {GiftType.recepi, 8}, {GiftType.item, 2}, {GiftType.enchant, 8}, {GiftType.bonus, 4}, }; break; case QuestDifficulty.hard: d = new Dictionary<GiftType, float>() { {GiftType.catalys, 7}, {GiftType.recepi, 6}, {GiftType.item, 2}, {GiftType.enchant, 9}, {GiftType.bonus, 5}, }; break; default: d = new Dictionary<GiftType, float>() { {GiftType.catalys, 3}, {GiftType.recepi, 2}, {GiftType.item, 2}, {GiftType.enchant, 4}, {GiftType.bonus, 3}, }; break; } WDictionary<GiftType> gifts = new WDictionary<GiftType>(d); return gifts.Random(); }