除了充盈都做完了
This commit is contained in:
46
Assets/Mods/Basic/Cards/Scripts/Knight/DivineSmite.cs
Normal file
46
Assets/Mods/Basic/Cards/Scripts/Knight/DivineSmite.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Combat;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class DivineSmite : CardLogicBase
|
||||
{
|
||||
protected override void SetUpLogicComponents()
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
AddLogicComponent<CardLogicComponent_Protect>();
|
||||
}
|
||||
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_PlaySFX("SFX_Basic_SwordStrike"),
|
||||
new Cmd_SpawnVFX("VFX_Basic_RedImpact"),
|
||||
new Cmd_ParamFunction<CharacterBase>(target => user.Attack(target, GetFinalDamage(target))));
|
||||
|
||||
foreach (CharacterBase protectTarget in CombatMainManager.Instance.characterController.GetAllAllies(user))
|
||||
{
|
||||
Cmd_ParamFunction<CharacterBase> protectCommand = new Cmd_ParamFunction<CharacterBase>((target) =>
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Protect>().GenerateProtection(user, target, GetAttribute("BuffCount_Protecting"));
|
||||
});
|
||||
protectCommand.selfContext.context["Target"] = protectTarget;
|
||||
mainGroup.AddCommand(protectCommand);
|
||||
}
|
||||
|
||||
return mainGroup;
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Slash();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user