예제 #1
0
        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));
        }
예제 #2
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));
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
                }
            }
        }
예제 #5
0
        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));
        }