// ID is the query month and Value is the Query date public static bool Check(RequirementVO req) { int year = 0; int month = FindMonth(req.ID); int day = req.Value % 100; if (month == 0) { month = (int)(req.Value * .01); year = (int)(month * .01); month = month % 100; } if (month == 0) { return(false); } if (year == 0) { year = 1789; } DateTime date = new DateTime(year, month, day); RequirementVO requirement = new RequirementVO() { Value = date.Subtract(AmbitionApp.Calendar.StartDate).Days, Operator = req.Operator }; return(RequirementsSvc.Check(requirement, AmbitionApp.Calendar.Day)); }
public static bool Check(RequirementVO req) { CharacterVO character = AmbitionApp.GetModel <CharacterModel>().GetCharacter(req.ID); int check = (character?.Acquainted ?? false) ? 1 : 0; return(RequirementsSvc.Check(req, check)); }
public static bool Check(RequirementVO req) { if (!AmbitionApp.Game.Misc.TryGetValue(req.ID, out int value)) { value = 0; } return(RequirementsSvc.Check(req, value)); }
public static bool Check(RequirementVO req) { CharacterModel characters = AmbitionApp.GetModel <CharacterModel>(); int favor = characters.Characters.TryGetValue(req.ID, out CharacterVO character) ? character.Favor : 0; return(RequirementsSvc.Check(req, favor)); }
public static bool Check(RequirementVO req) { int value = AmbitionApp.GetModel <GameModel>().Credibility; int roll = Util.RNG.Generate(100); return((roll >= 95) ? true : (roll < 5) ? false : RequirementsSvc.Check(req, roll + value)); }
public static bool Check(RequirementVO req) { int val = !string.IsNullOrEmpty(req.ID) && SteamAPI.IsSteamRunning() && Steamworks.SteamUserStats.GetAchievement(req.ID, out bool done) && done ? 1 : 0; return(RequirementsSvc.Check(req, val)); }
public static bool Check(RequirementVO req) { RendezVO rendez = AmbitionApp.GetEvent() as RendezVO; if (rendez == null) { return(false); } CharacterModel model = AmbitionApp.GetModel <CharacterModel>(); CharacterVO character = model.GetCharacter(rendez.Character); return(RequirementsSvc.Check(req, character?.Favor ?? 0)); }
public static bool Check(RequirementVO req) { RendezVO rendez = AmbitionApp.GetEvent() as RendezVO; if (rendez == null) { return(false); } CharacterModel model = AmbitionApp.GetModel <CharacterModel>(); int score = model.GetOutfitFavor(rendez.Character, AmbitionApp.Inventory.GetEquippedItem(ItemType.Outfit) as OutfitVO); return(RequirementsSvc.Check(req, score)); }
public static bool Check(RequirementVO req) { //Debug.LogFormat("FactionAllegianceReq check"); FactionModel factions = AmbitionApp.GetModel <FactionModel>(); int allegiance = 0; if (Enum.TryParse(req.ID, ignoreCase: true, out FactionType factionID)) { allegiance = factions.Factions.TryGetValue(factionID, out FactionVO faction) ? faction.Allegiance : 0; //Debug.LogFormat("Faction {0} allegiance is {1}, checking {2} {3}",req.ID, allegiance, req.Operator, req.Value); } else { Debug.LogErrorFormat("Bad faction ID {0} in FactionAllegianceReq", req.ID); } return(RequirementsSvc.Check(req, allegiance)); }
public static bool Check(RequirementVO req) { FactionModel model = AmbitionApp.GetModel <FactionModel>(); char[] sep = new char[] { ',', ' ' }; string[] tokens = req.ID.Split(sep); List <FactionVO> factions = new List <FactionVO>(); FactionType faction; foreach (string token in tokens) { if (Enum.TryParse(token, true, out faction)) { factions.Add(model.Factions[faction]); } } if (factions.Count > 1) { req.Value = factions[1].Power; } return(RequirementsSvc.Check(req, factions[0].Power)); }
public static bool Check(RequirementVO req) { var party = AmbitionApp.GetModel <PartyModel>().Party; // outfit reaction credibility shift ItemVO outfit = AmbitionApp.Inventory.GetEquippedItem(ItemType.Outfit); CalendarEvent e = AmbitionApp.GetEvent(); FactionType faction; if (e is PartyVO) { faction = ((PartyVO)e).Faction; } else { CharacterVO character = AmbitionApp.GetModel <CharacterModel>().GetCharacter(((RendezVO)e).Character); faction = character?.Faction ?? FactionType.Military; } int value = AmbitionApp.Inventory.GetFactionBonus(outfit, faction); return(RequirementsSvc.Check(req, value)); }
public static bool Check(RequirementVO req) { int isComplete = AmbitionApp.Story.IsComplete(req.ID, false) ? 1 : 0; return(RequirementsSvc.Check(req, isComplete)); }
// Checks the Paris model for known locations or currently available explorable locations public static bool Check(RequirementVO req) { return(RequirementsSvc.Check(req, AmbitionApp.Game.Exhaustion)); }
public static bool Check(RequirementVO req) => RequirementsSvc.Check(req, Util.RNG.Generate(100));
public static bool Check(RequirementVO req) { int value = AmbitionApp.GetModel <GameModel>().Livre; return(RequirementsSvc.Check(req, value)); }
public static bool Check(RequirementVO req) => RequirementsSvc.Check(req, AmbitionApp.Gossip.Quests.Count);