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 void Execute(CommodityVO commodity) { RendezVO rendez = AmbitionApp.GetEvent() as RendezVO; if (rendez == null) { return; } CharacterModel model = AmbitionApp.GetModel <CharacterModel>(); CommodityVO reward = new CommodityVO() { Type = CommodityType.Favor, ID = rendez.Character, Value = model.GetOutfitFavor(rendez.Character, AmbitionApp.Inventory.GetEquippedItem(ItemType.Outfit) as OutfitVO) }; AmbitionApp.SendMessage(reward); }
public void Execute(CalendarModel calendar) { ChapterVO chapter = AmbitionApp.Game.GetChapter(); if (chapter.TrivialPartyChance + chapter.DecentPartyChance + chapter.GrandPartyChance > 0 && AmbitionApp.CheckRequirements(AmbitionApp.Game.StartInvitationsReqirements) && RNG.Generate(0, 3) == 0) { int day = calendar.Day + RNG.Generate(1, 8) + RNG.Generate(1, 8); // +2d8 days if (AmbitionApp.GetEvent(day) == null) { PartyVO party = new PartyVO() { Day = day }; AmbitionApp.SendMessage(PartyMessages.INITIALIZE_PARTY, party); } } }
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)); }