更新
This commit is contained in:
61
Assets/Mods/Basic/Cards/Scripts/General/Attack/SandStorm.cs
Normal file
61
Assets/Mods/Basic/Cards/Scripts/General/Attack/SandStorm.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 沙暴:对全体敌人造成多段伤害,并附加致盲 Buff。
|
||||
/// AOE 范围由卡牌数据的目标配置决定,动画只播放一次。
|
||||
/// </summary>
|
||||
public class SandStorm : CardLogicBase
|
||||
{
|
||||
private AttackContext EarthCtx => AttackContext.Default(card).WithDamageKeywords("Earth");
|
||||
|
||||
public override void SetUpLogicComponents()
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
int hitCount = GetAttribute("HitCount");
|
||||
|
||||
CommandGroup hitsGroup = Cmd.Sequential();
|
||||
for (int i = 0; i < hitCount; i++)
|
||||
{
|
||||
hitsGroup.AddCommand(Cmd.After(0.5f, () =>
|
||||
{
|
||||
foreach (CharacterBase target in targetList)
|
||||
{
|
||||
AttackTarget(target, GetTargetedFinalDamage(target), EarthCtx);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
int blindCount = GetAttribute("Buff_Blind_Count");
|
||||
CommandGroup debuffGroup = Cmd.Sequential(Cmd.Do(() =>
|
||||
{
|
||||
foreach (CharacterBase target in targetList)
|
||||
{
|
||||
CreateCharacterBuff<Blind>(blindCount).Apply(target, user);
|
||||
}
|
||||
}));
|
||||
|
||||
return Cmd.Sequential(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
hitsGroup,
|
||||
debuffGroup
|
||||
);
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Arcane();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user