chore: initialize OshimaBot repository (rename from Enhancement)
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
|
||||
namespace OshimaBot.Content.Effects.SkillEffects
|
||||
{
|
||||
public class 增加物理护盾_护盾值型 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"为{Skill.TargetDescription()}提供 {护盾值:0.##} 点物理护盾值。";
|
||||
|
||||
private double 护盾值 => Level > 0 ? Math.Abs(基础数值护盾 + 基础护盾等级成长 * (Level - 1)) : Math.Abs(基础数值护盾);
|
||||
private double 基础数值护盾 { get; set; } = 200;
|
||||
private double 基础护盾等级成长 { get; set; } = 100;
|
||||
|
||||
public 增加物理护盾_护盾值型(Skill skill, double 基础数值护盾, double 基础护盾等级成长) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
this.基础数值护盾 = 基础数值护盾;
|
||||
this.基础护盾等级成长 = 基础护盾等级成长;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
List<Character> targets = ctx.Targets;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
target.Shield[false] += 护盾值;
|
||||
WriteLine($"[ {target} ] 获得了 {护盾值:0.##} 点物理护盾值!");
|
||||
GamingQueue?.AddApplyEffects(target, EffectType.Shield);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user