Beispiel #1
0
        /// <summary>
        /// 占い判定の追加を行う
        /// </summary>
        /// <param name="agent">判定を出したエージェント</param>
        /// <param name="target">判定を出されたエージェント</param>
        /// <param name="result">判定結果</param>
        /// <param name="judgeTalk">判定を出した発話</param>
        private void AddSeerJudge(Agent agent, Agent target, Species result, Talk judgeTalk)
        {
            Boolean cancel = false;

            // 過去の判定を確認する
            foreach (Judge judge in SeerJudge)
            {
                if (judge.Agent == agent && judge.IsEnable())
                {
                    if (judge.Result != result)
                    {
                        // 同じ人物に違う判定を出していた場合、古い判定を無効にする
                        judge.Cancel(judgeTalk);
                        cancel = true;
                        break;
                    }
                    else
                    {
                        // 同じ人物に同じ判定を出していた場合、更新は必要ないため抜ける
                        return;
                    }
                }
            }

            // 判定の追加
            Judge newSeerJudge = new Judge(agent, target, result, judgeTalk);

            SeerJudge.Add(newSeerJudge);


            // 村騙りを考慮せず内訳を削除する
            if (IsRemoveVillagerFakeCO)
            {
                if (cancel)
                {
                    // 取り消し有り → 内訳再編成
                    RemakeViewPointInfo();
                }
                else
                {
                    // 取り消し無し → 内訳の削除
                    RemovePatternFromJudge(newSeerJudge);
                }
            }
        }
Beispiel #2
0
        public void UpdateDayInfo(GameInfo gameInfo)
        {
            // 日の情報を更新
            TodayInfo.Update(gameInfo);

            // 新規会話の処理
            for (int i = talkOffset; i < TodayInfo.TalkList.Count; i++)
            {
                Talk    talk    = TodayInfo.TalkList[i];
                Content content = TodayInfo.TalkList[i].Content;

                // 単文か
                if (content.Operator == Operator.NOP)
                {
                    switch (content.Topic)
                    {
                    case Topic.COMINGOUT:
                        // カミングアウト
                        // 自分に対するCOのみ対象
                        if (talk.Agent == content.Target)
                        {
                            if (content.Role.GetTeam() == Team.VILLAGER)
                            {
                                // 村陣営CO
                                UpdateComingOut(content.Target, content.Role, talk);
                            }
                            else
                            {
                                // 人外CO
                                UpdateMonsterSideComingOut(content.Target, content.Role, talk);
                            }
                        }
                        break;

                    case Topic.DIVINED:
                        // 占い結果

                        // カミングアウトの更新
                        UpdateComingOut(talk.Agent, Role.SEER, talk);

                        // 判定の追加
                        Judge newSeerJudge = new Judge(talk);
                        SeerJudge.Add(newSeerJudge);

                        // 内訳の削除
                        if (IsRemoveVillagerFakeCO)
                        {
                            RemovePatternFromJudge(newSeerJudge);
                        }

                        break;

                    case Topic.IDENTIFIED:
                        // 霊媒結果

                        // カミングアウトの更新
                        UpdateComingOut(talk.Agent, Role.MEDIUM, talk);

                        // 判定の追加
                        Judge newMediumJudge = new Judge(talk);
                        MediumJudge.Add(newMediumJudge);

                        // 内訳の削除
                        if (IsRemoveVillagerFakeCO)
                        {
                            RemovePatternFromJudge(newMediumJudge);
                        }

                        break;

                    case Topic.GUARDED:
                        // 護衛履歴
                        break;

                    default:
                        break;
                    }
                }
            }
            talkOffset = TodayInfo.TalkList.Count;

            // 新規囁きの処理
        }
Beispiel #3
0
        public void UpdateDayInfo()
        {
            // 新規会話の処理
            if (!TalkContent.ContainsKey(LatestGameInfo.Day))
            {
                TalkContent.Add(LatestGameInfo.Day, new List <Content>());
            }
            List <Content> ContentList = TalkContent[LatestGameInfo.Day];

            for (int i = talkOffset; i < LatestGameInfo.TalkList.Count; i++)
            {
                Talk    srcTalk    = LatestGameInfo.TalkList[i];
                Content newContent = new Content(srcTalk.Text);

                // Content版を作成する
                ContentList.Add(newContent);

                // 単文か
                if (newContent.Operator == Operator.NOP)
                {
                    switch (newContent.Topic)
                    {
                    case Topic.COMINGOUT:
                        // カミングアウト
                        // 自分に対する村陣営COのみ対象
                        if (srcTalk.Agent == newContent.Target && newContent.Role.GetTeam() == Team.VILLAGER)
                        {
                            // カミングアウトの更新
                            UpdateComingOut(newContent.Target, newContent.Role, srcTalk);
                        }
                        break;

                    case Topic.DIVINED:
                        // 占い結果

                        // カミングアウトの更新
                        UpdateComingOut(srcTalk.Agent, Role.SEER, srcTalk);

                        // 判定の追加
                        Judge newSeerJudge = new Judge(srcTalk);
                        SeerJudge.Add(newSeerJudge);

                        break;

                    case Topic.IDENTIFIED:
                        // 霊媒結果

                        // カミングアウトの更新
                        UpdateComingOut(srcTalk.Agent, Role.MEDIUM, srcTalk);

                        // 判定の追加
                        Judge newMediumJudge = new Judge(srcTalk);
                        MediumJudge.Add(newMediumJudge);

                        break;

                    case Topic.GUARDED:
                        // 護衛履歴
                        break;

                    default:
                        break;
                    }
                }
            }
            talkOffset = LatestGameInfo.TalkList.Count;

            // 新規囁きの処理

            /*            for (int i = todayInfo.WhisperContentList.Count; i < todayInfo.WhisperList.Count; i++)
             *          {
             *              Content newContent = new Content(todayInfo.WhisperList[i].Text);
             *
             *              // Content版を作成する
             *              todayInfo.WhisperContentList.Add(newContent);
             *          }*/
        }