架构大更
This commit is contained in:
@@ -3,9 +3,7 @@ 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
|
||||
{
|
||||
@@ -17,27 +15,26 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Protect>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
CommandGroup mainGroup = ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
//new Cmd_PlaySFX("SFX_Basic_GeneralMeleeImpact").SetDelay(0.2f),
|
||||
//new Cmd_SpawnVFX("VFX_Basic_DefaultAttack").SetDelay(0.2f),
|
||||
new Cmd_ParamFunction<CharacterBase>(target => user.Attack(target, GetTargetedFinalDamage(target))));
|
||||
Cmd.Do(() => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
|
||||
foreach (CharacterBase protectTarget in CombatMainManager.Instance.characterController.GetAllAllies(user))
|
||||
List<CharacterBase> allies = CombatMainManager.Instance.characterController.GetAllAllies(user);
|
||||
foreach (CharacterBase ally in allies)
|
||||
{
|
||||
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);
|
||||
CharacterBase captured = ally;
|
||||
mainGroup.AddCommand(Cmd.Do(() =>
|
||||
LogicComponent<CardLogicComponent_Protect>()
|
||||
.GenerateProtection(user, captured, GetAttribute("BuffCount_Protecting"))
|
||||
));
|
||||
}
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
|
||||
return mainGroup;
|
||||
}
|
||||
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Slash();
|
||||
|
||||
Reference in New Issue
Block a user