2026-04-01 12:23:27 -04:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using Continentis.MainGame;
|
|
|
|
|
|
using Continentis.MainGame.Card;
|
|
|
|
|
|
using Continentis.MainGame.Character;
|
|
|
|
|
|
using Continentis.MainGame.Commands;
|
|
|
|
|
|
using Continentis.Mods.Basic.Buffs;
|
2026-04-17 12:01:50 -04:00
|
|
|
|
using SLSUtilities.General;
|
2026-04-01 12:23:27 -04:00
|
|
|
|
|
|
|
|
|
|
namespace Continentis.Mods.Basic.Cards
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 火焰射线:选择 3 次目标(可重复),对每个选中的目标造成火焰伤害并施加灼烧 Buff。
|
|
|
|
|
|
/// 卡牌数据需配置 targetCount = 3,关键词需包含 AllowDuplicateTargets 和 TargetEnemies。
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class FireRays : CardLogicBase
|
|
|
|
|
|
{
|
|
|
|
|
|
private const string BUFF_BURN_STACK = "Buff_Burn_Stack";
|
|
|
|
|
|
|
|
|
|
|
|
private AttackContext FireCtx => AttackContext.Default(card)
|
|
|
|
|
|
.WithDamageKeywords("Fire");
|
|
|
|
|
|
|
|
|
|
|
|
public override void SetUpLogicComponents()
|
|
|
|
|
|
{
|
|
|
|
|
|
AddLogicComponent<CardLogicComponent_Attack>();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>选中目标时更新伤害预览。</summary>
|
|
|
|
|
|
public override void TargetingEffect(CharacterBase target)
|
|
|
|
|
|
{
|
2026-04-08 04:48:35 -04:00
|
|
|
|
card.SetAttribute("Display_Damage", GetTargetedFinalDamage(target, FireCtx));
|
2026-04-01 12:23:27 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>取消选中时以无目标模式刷新预览。</summary>
|
|
|
|
|
|
public override void UntargetingEffect()
|
|
|
|
|
|
{
|
2026-04-08 04:48:35 -04:00
|
|
|
|
card.SetAttribute("Display_Damage", GetNoTargetFinalDamage(FireCtx));
|
2026-04-01 12:23:27 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
|
|
|
|
|
{
|
|
|
|
|
|
// targetList 可包含重复目标(由多目标选择系统传入)
|
|
|
|
|
|
return Cmd.Sequential(
|
|
|
|
|
|
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
|
|
|
|
|
ForEachTarget(targetList, target => Cmd.Do(() =>
|
|
|
|
|
|
{
|
|
|
|
|
|
AttackContext ctx = FireCtx;
|
|
|
|
|
|
AttackTarget(target, GetTargetedFinalDamage(target, ctx), ctx);
|
|
|
|
|
|
|
|
|
|
|
|
int burnStacks = GetAttribute(BUFF_BURN_STACK);
|
2026-04-08 04:48:35 -04:00
|
|
|
|
CreateCharacterBuff<Burn>(burnStacks).Apply(target, user, this);
|
2026-04-01 12:23:27 -04:00
|
|
|
|
}))
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void ApplyAttributeChangesByCard()
|
|
|
|
|
|
{
|
2026-04-08 04:48:35 -04:00
|
|
|
|
LogicComponent<CardLogicComponent_Attack>().SetDamage_Magic();
|
2026-04-01 12:23:27 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|