コード例 #1
0
        public static List <CharacterActionItem> GetSkillItems(Character ch)
        {
            List <CharacterActionItem> items = new List <CharacterActionItem>();

            foreach (string skill in from a in Monster.SkillsList orderby a.Key select a.Key)
            {
                Monster.SkillInfo info = Monster.SkillsDetails[skill];


                if (info.Subtypes != null)
                {
                    List <CharacterActionItem> subitems = new List <CharacterActionItem>();
                    foreach (string subtype in info.Subtypes)
                    {
                        subitems.Add(new CharacterActionItem(subtype, "d20p", CharacterActionType.RollSkill,
                                                             new Tuple <string, string>(skill, subtype)));
                    }
                    var ci = new CharacterActionItem(skill, "d20p", subitems);
                    items.Add(ci);
                }
                else
                {
                    items.Add(new CharacterActionItem(skill, "d20p", CharacterActionType.RollSkill, new Tuple <string, string>(skill, null)));
                }
            }


            return(items);
        }
コード例 #2
0
        public static List <CharacterActionItem> GetActions(Character ch, Character selCh, List <Character> nearCharacters)
        {
            List <CharacterActionItem> items = new List <CharacterActionItem>();

            items.Add(new CharacterActionItem("Edit", "pencil", CharacterActionType.EditMonster));
            //items.Add(new CharacterActionItem("Copy to Custom", "import"));
            if (!ch.IsIdle)
            {
                items.Add(new CharacterActionItem("Make Idle", "zzz", CharacterActionType.MakeIdle));
            }
            else
            {
                items.Add(new CharacterActionItem("Remove Idle", "zzz", CharacterActionType.RemoveIdle));
            }

            /*if (!ch.IsHidden)
             * {
             *
             *      items.Add(new CharacterActionItem("Make Hidden", "blind", CharacterActionType.MakeHidden));
             * }
             * else
             * {
             *
             *      items.Add(new CharacterActionItem("Remove Hidden", "blind", CharacterActionType.RemoveHidden));
             * }*/

            items.Add(new CharacterActionItem());
            CharacterActionItem conditionsItem = new CharacterActionItem("Add Condition", "clock", GetConditionItems(ch));

            items.Add(conditionsItem);
            //items.Add(new CharacterActionItem("Apply Affliction", "lightning"));
            items.Add(new CharacterActionItem("Notes", "notes", CharacterActionType.EditNotes));

            items.Add(new CharacterActionItem());
            items.Add(new CharacterActionItem("Roll", "d20", GetRollItems(ch)));
            items.Add(new CharacterActionItem("Initiative", "sort", GetInitiativeItems(ch, selCh, nearCharacters)));
            items.Add(new CharacterActionItem("Clone", "clone", CharacterActionType.Clone));
            if (ch.IsMonster)
            {
                items.Add(new CharacterActionItem("Move to Party", "prev", CharacterActionType.MoveToParty));
            }
            else
            {
                items.Add(new CharacterActionItem("Move to Monsters", "next", CharacterActionType.MoveToMonsters));
            }
            items.Add(new CharacterActionItem());
            items.Add(new CharacterActionItem("Copy to Custom", "import", CharacterActionType.CopyToCustom));

            items.Add(new CharacterActionItem());
            items.Add(new CharacterActionItem("Delete", "delete", CharacterActionType.Delete));

            return(items);
        }
コード例 #3
0
        public static List <CharacterActionItem> GetAttackItems(Character ch)
        {
            List <CharacterActionItem> items = new List <CharacterActionItem>();

            foreach (AttackSet atkSet in ch.Monster.MeleeAttacks)
            {
                CharacterActionItem item = new CharacterActionItem(atkSet.ToString(), "sword", CharacterActionType.RollAttackSet, atkSet);
                items.Add(item);
            }

            foreach (Attack atk in ch.Monster.RangedAttacks)
            {
                CharacterActionItem item = new CharacterActionItem(atk.ToString(), "bow", CharacterActionType.RollAttack, atk);
                items.Add(item);
            }

            return(items);
        }