更新
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSUtilities.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class UtmostStrike : CardLogicBase
|
||||
{
|
||||
public override void SetUpLogicComponents()
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
AddLogicComponent<CardLogicComponent_SelectHandCards>().SetCondition(SelectCondition).SetEffect(SelectEffect);
|
||||
}
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> 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),
|
||||
Cmd.Do(() => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
|
||||
LogicComponent<CardLogicComponent_SelectHandCards>().AddSelectionCommands(ref mainGroup);
|
||||
|
||||
return mainGroup;
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Physics();
|
||||
}
|
||||
|
||||
private bool SelectCondition(CardInstance card)
|
||||
{
|
||||
return card.contentSubmodule.cardType is not CardType.Attack;
|
||||
}
|
||||
|
||||
private void SelectEffect(CardInstance card)
|
||||
{
|
||||
CommandQueueManager.Instance.AddCommand(user.deckSubmodule.DiscardCard(card, true, 0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user