架构大更
This commit is contained in:
@@ -14,32 +14,30 @@ namespace Continentis.Mods.Basic.Cards
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_ParamFunction<CharacterBase>(0.2f, target => user.Attack(target, GetTargetedFinalDamage(target))));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
Cmd.After(0.2f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Arcane();
|
||||
}
|
||||
|
||||
|
||||
public override int GetTargetedFinalDamage(CharacterBase target, List<string> elementalTags = null)
|
||||
{
|
||||
float baseDamageFromSuppress = 0;
|
||||
|
||||
|
||||
if (target is CombatNPC npc && user.IsOpponent(npc))
|
||||
{
|
||||
baseDamageFromSuppress = npc.actionCountThisRound == 0 ? 4f : 0f;
|
||||
}
|
||||
|
||||
|
||||
base.GetFinalDamage(target, elementalTags, out float baseDamageAfterOffset, out float elementalAmplifier, out float magicAmplifier, out float finalAmplifier);
|
||||
|
||||
|
||||
float finalDamage = (baseDamageAfterOffset + baseDamageFromSuppress) * elementalAmplifier * magicAmplifier * finalAmplifier;
|
||||
|
||||
return Mathf.RoundToInt(finalDamage);
|
||||
|
||||
Reference in New Issue
Block a user