Beispiel #1
0
        private Message GetDirectResistSkills(SkillType initiativeSkillType, CharacterAction action)
        {
            var message = new DirectResistSkillsListMessage();
            List <SkillType> resistables = new List <SkillType>();

            foreach (var skillType in SkillType.SkillTypes)
            {
                if (SkillChecker.CanResistSkillWithoutDMCheck(initiativeSkillType, skillType.Value, action))
                {
                    resistables.Add(skillType.Value);
                }
            }
            message.skillTypes = new SkillTypeDescription[resistables.Count];
            for (int i = 0; i < resistables.Count; ++i)
            {
                message.skillTypes[i] = StreamableFactory.CreateSkillTypeDescription(resistables[i]);
            }
            return(message);
        }
 public void PassiveUseSkill(SkillType skillType, bool force, bool bigone, int[] fixedDicePoints = null)
 {
     if (force)
     {
         this.PassiveSelectSkill(skillType, bigone, fixedDicePoints);
     }
     else
     {
         if (SkillChecker.CanResistSkillWithoutDMCheck(SkillChecker.Instance.InitiativeSkillType, skillType, SkillChecker.Instance.CheckingAction))
         {
             this.PassiveSelectSkill(skillType, bigone, fixedDicePoints);
         }
         else
         {
             Game.DM.DMClient.RequestDMCheck(SkillChecker.Instance.Passive.Controller,
                                             SkillChecker.Instance.Passive.Name + "对" + SkillChecker.Instance.Passive.Name + "使用" + skillType.Name + ",可以吗?",
                                             result => { if (result)
                                                         {
                                                             this.PassiveSelectSkill(skillType, bigone, fixedDicePoints);
                                                         }
                                             });
         }
     }
 }