卡牌更新
This commit is contained in:
37
Assets/Mods/Basic/Cards/Scripts/General/Attack/RayOfFrost.cs
Normal file
37
Assets/Mods/Basic/Cards/Scripts/General/Attack/RayOfFrost.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System.Collections.Generic;
|
||||
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
|
||||
{
|
||||
public class RayOfFrost : CardLogicBase
|
||||
{
|
||||
private const string BUFF_FREEZE_STACK = "Buff_Freeze_Stack";
|
||||
|
||||
public override void SetUpLogicComponents()
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
AttackTarget(target, GetTargetedFinalDamage(target));
|
||||
int freezeStacks = GetAttribute(BUFF_FREEZE_STACK);
|
||||
CreateCharacterBuff<Freeze>(freezeStacks).Apply(target, user, this);
|
||||
})
|
||||
));
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Magic();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user