35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
using Continentis.MainGame.Card;
|
|
using Continentis.MainGame.Character;
|
|
using Continentis.MainGame.Commands;
|
|
using SLSUtilities.General;
|
|
using UnityEngine;
|
|
|
|
namespace Continentis.Mods.Basic.Cards
|
|
{
|
|
public class ShieldBash : CardLogicBase
|
|
{
|
|
public override void SetUpLogicComponents()
|
|
{
|
|
AddLogicComponent<CardLogicComponent_Attack>();
|
|
AddLogicComponent<CardLogicComponent_Defense>();
|
|
}
|
|
|
|
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
|
{
|
|
var mainGroup = ForEachTarget(targetList, target => Cmd.Parallel(
|
|
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
|
Cmd.Do(() => AttackTarget(target, GetTargetedFinalDamage(target)))
|
|
));
|
|
|
|
mainGroup.AddCommand(Cmd.Do(() => user.AddBlock(GetAttribute("Block"))));
|
|
return mainGroup;
|
|
}
|
|
|
|
public override void ApplyAttributeChangesByCard()
|
|
{
|
|
LogicComponent<CardLogicComponent_Attack>().SetDamage_Physics();
|
|
LogicComponent<CardLogicComponent_Defense>().SetBlock();
|
|
}
|
|
}
|
|
} |