mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-12-05 08:09:04 +00:00
49 lines
1.7 KiB
C#
49 lines
1.7 KiB
C#
using Milimoe.FunGame.Core.Entity;
|
||
using Milimoe.FunGame.Core.Library.Constant;
|
||
|
||
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
|
||
{
|
||
public class 强驱散特效 : Effect
|
||
{
|
||
public override long Id => Skill.Id;
|
||
public override string Name => Skill.Name;
|
||
public override string Description => $"强驱散{TargetDescription}。";
|
||
public string TargetDescription
|
||
{
|
||
get
|
||
{
|
||
if (Skill.SelectAllTeammates)
|
||
{
|
||
return "友方全体角色";
|
||
}
|
||
else if (Skill.SelectAllEnemies)
|
||
{
|
||
return "敌方全体角色";
|
||
}
|
||
return $"{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}目标";
|
||
}
|
||
}
|
||
public override DispelType DispelType => DispelType.Strong;
|
||
|
||
public 强驱散特效(Skill skill) : base(skill)
|
||
{
|
||
GamingQueue = skill.GamingQueue;
|
||
}
|
||
|
||
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
|
||
{
|
||
Dictionary<Character, bool> isTeammateDictionary = GamingQueue?.GetIsTeammateDictionary(caster, targets) ?? [];
|
||
foreach (Character target in targets)
|
||
{
|
||
WriteLine($"[ {caster} ] 强驱散了 [ {target} ] !");
|
||
bool isEnemy = true;
|
||
if (isTeammateDictionary.TryGetValue(target, out bool value))
|
||
{
|
||
isEnemy = !value;
|
||
}
|
||
Dispel(caster, target, isEnemy);
|
||
}
|
||
}
|
||
}
|
||
}
|