架构大更

This commit is contained in:
SoulliesOfficial
2026-03-20 11:56:50 -04:00
parent e60ef64d01
commit d09b58fd80
3663 changed files with 15232012 additions and 105579 deletions

View File

@@ -14,37 +14,39 @@ namespace Continentis.Mods.Basic.Cards
AddLogicComponent<CardLogicComponent_Attack>();
}
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
{
List<CommandBase> templates = new List<CommandBase>();
templates.Add(new Cmd_PlayAnimation(user.characterView, "Attack"));
for (int i = 0; i < GetAttribute("AttackCount"); i++) //多段攻击(段数可变)情况的处理
// 多段攻击先等1秒占位再对每个目标依次连续打多段
CommandGroup occupiedGroup = Cmd.Sequential(
Cmd.After(1f, () =>
CommandQueueManager.Instance.AddCommand(Cmd.Do(() =>
Debug.Log("插队指令,等待动画播放完毕")))
)
);
CommandGroup mainGroup = ForEachTarget(targetList, target =>
{
templates.Add(new Cmd_ParamFunction<CharacterBase>(0.4f, target =>
CommandGroup perTargetGroup = Cmd.Sequential(new Cmd_PlayAnimation(user.characterView, "Attack"));
int attackCount = GetAttribute("AttackCount");
for (int i = 0; i < attackCount; i++)
{
user.Attack(target, GetTargetedFinalDamage(target));
Debug.Log("攻击命令触发");
}));
}
CommandGroup occupiedGroup = new CommandGroup(ExecutionMode.Sequential, new Cmd_Function(1, ()=>
{
CommandQueueManager.Instance.AddCommand(new Cmd_Function(() =>
{
Debug.Log("插队指令,等待动画播放完毕");
}), false);
}));
CommandGroup mainGroup = TargetListCommandGroup(targetList, ExecutionMode.Sequential, ExecutionMode.Sequential, templates.ToArray());
CommandGroup finalGroup = new CommandGroup(ExecutionMode.Sequential, new Cmd_Function(()=>
{
Debug.Log("不插队指令");
}));
CommandGroup firstGroup = new CommandGroup(ExecutionMode.Sequential, new Cmd_Function(()=>
{
Debug.Log("插队指令,抽牌");
}), new Cmd_DrawCards(user.deckSubmodule, 1));
firstGroup.insertAtFirst = true;
return new List<CommandBase> { occupiedGroup, mainGroup, finalGroup, firstGroup };
perTargetGroup.AddCommand(Cmd.After(0.4f, () =>
{
user.Attack(target, GetTargetedFinalDamage(target));
Debug.Log("攻击命令触发");
}));
}
return perTargetGroup;
});
CommandGroup finalGroup = Cmd.Sequential(Cmd.Do(() => Debug.Log("不插队指令")));
CommandGroup firstGroup = Cmd.Sequential(
Cmd.Do(() => Debug.Log("插队指令,抽牌")),
new Cmd_DrawCards(user.deckSubmodule, 1)
);
return Cmd.Sequential(occupiedGroup, mainGroup, finalGroup, firstGroup);
}
public override void ApplyAttributeChangesByCard()