36 lines
1.3 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Milimoe.FunGame.Core.Entity;
namespace Oshima.FunGame.OshimaModules.Skills
{
public static class SkillExtension
{
public static string TargetDescription(this Skill skill)
{
if (skill.SelectAllTeammates)
{
return "友方全体角色";
}
else if (skill.SelectAllEnemies)
{
return "敌方全体角色";
}
if (skill.CanSelectTeammate && !skill.CanSelectEnemy)
{
return $"目标{(skill.CanSelectTargetCount > 1 ? $" {skill.CanSelectTargetCount} " : "")}友方角色{(!skill.CanSelectSelf ? "" : "")}";
}
else if (!skill.CanSelectTeammate && skill.CanSelectEnemy)
{
return $"目标{(skill.CanSelectTargetCount > 1 ? $" {skill.CanSelectTargetCount} " : "")}敌方角色";
}
else if (!skill.CanSelectTeammate && !skill.CanSelectEnemy && skill.CanSelectSelf)
{
return $"自身";
}
else
{
return $"{(skill.CanSelectTargetCount > 1 ? $" {skill.CanSelectTargetCount} " : "")}目标";
}
}
}
}