Example #1
0
 public static TargetingType ConvertTargetingType(MagicTypeEnum type)
 {
     TargetTypeLookup.TryGetValue(type, out var found);
     return(found);
 }
Example #2
0
 public static UseType Convert(MagicTypeEnum type)
 {
     UseTypeLookup.TryGetValue(type, out var found);
     return(found);
 }
Example #3
0
File: Magic.cs Project: Pircs/Yi
        private static IEnumerable <(YiObj, int)> GetTargets(YiObj player, Vector2 loc, MagicTypeEnum magicType)
        {
            var targetList = new List <(YiObj, int)>();

            switch (MagicTypeHelper.ConvertTargetingType(magicType))
            {
            case TargetingType.Single:
                Single(player, targetList);
                break;

            case TargetingType.Sector:
                Sector(player, loc, targetList);
                break;

            case TargetingType.Circle:
                Circle(player, targetList);
                break;

            case TargetingType.Self:
                targetList.Add((player, 0));
                break;
            }

            return(targetList);
        }