更新
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSUtilities.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 鲜血代偿(Blood Compensation):
|
||||
/// 保护一个队友数个回合,但为自己施加易伤Buff
|
||||
/// </summary>
|
||||
public class BloodCompensation : CardLogicBase
|
||||
{
|
||||
private const string BUFF_PROTECTING_COUNT = "Buff_Protecting_Count";
|
||||
private const string BUFF_VULNERABLE_COUNT = "Buff_Vulnerable_Count";
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Protect>().GenerateProtection(user, target, GetAttribute(BUFF_PROTECTING_COUNT));
|
||||
CreateCharacterBuff<Vulnerable>(GetAttribute(BUFF_VULNERABLE_COUNT)).Apply(user, user, this);
|
||||
})
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec007a8103b23584fbead2375da011c8
|
||||
@@ -0,0 +1,41 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSUtilities.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 添砖加瓦(Bricks And Tiles):
|
||||
/// 获得一定数量的格挡,并且给自身施加一层稳固(Consolidate)Buff。
|
||||
/// </summary>
|
||||
public class BricksAndTiles : CardLogicBase
|
||||
{
|
||||
private const string BUFF_CONSOLIDATE_COUNT = "Buff_Consolidate_Count";
|
||||
|
||||
public override void SetUpLogicComponents()
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_Defense>();
|
||||
}
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
return SingleCommandGroup(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
user.AddBlock(GetAttribute("Block"));
|
||||
int consolidateStacks = GetAttribute(BUFF_CONSOLIDATE_COUNT);
|
||||
CreateCharacterBuff<Consolidate>(consolidateStacks).Apply(user, user, this);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Defense>().SetBlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfe01dab0dbb32440bd49ce506850c97
|
||||
76
Assets/Mods/Basic/Cards/Scripts/Knight/Skill/Unyielding.cs
Normal file
76
Assets/Mods/Basic/Cards/Scripts/Knight/Skill/Unyielding.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSUtilities.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 不屈(Unyielding):
|
||||
/// 骑士技能牌。获得指定量的格挡和 1 层坚守(Firm)Buff。
|
||||
/// 如果使用者本回合已被攻击过,格挡翻倍。
|
||||
/// </summary>
|
||||
public class Unyielding : CardLogicBase
|
||||
{
|
||||
// 卡牌数据中配置的格挡基础值属性键
|
||||
private const string BUFF_FIRM_COUNT = "Buff_Firm_Count";
|
||||
|
||||
public override void SetUpLogicComponents()
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_Defense>();
|
||||
}
|
||||
|
||||
// ── 伤害预览 ──────────────────────────────────────────────────────────
|
||||
|
||||
public override void TargetingEffect(CharacterBase target)
|
||||
{
|
||||
// TargetingEffect 无目标意义(己方技能),复用 Untargeting 逻辑即可
|
||||
RefreshBlockPreview();
|
||||
}
|
||||
|
||||
public override void UntargetingEffect()
|
||||
{
|
||||
RefreshBlockPreview();
|
||||
}
|
||||
|
||||
// ── 出牌效果 ──────────────────────────────────────────────────────────
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
return SingleCommandGroup(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
int baseBlock = GetAttribute("Block");
|
||||
// 如果本回合已被攻击过,格挡翻倍
|
||||
bool isCounterReaction = user.recordSubmodule.WasAttackedThisRound;
|
||||
int finalBlock = isCounterReaction ? baseBlock * 2 : baseBlock;
|
||||
|
||||
user.AddBlock(finalBlock);
|
||||
|
||||
int firmStacks = GetAttribute(BUFF_FIRM_COUNT);
|
||||
CreateCharacterBuff<Firm>(firmStacks).Apply(user, user, this);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Defense>().SetBlock();
|
||||
}
|
||||
|
||||
// ── 私有辅助 ──────────────────────────────────────────────────────────
|
||||
|
||||
/// <summary>
|
||||
/// 根据当前是否被攻击过刷新格挡预览属性。
|
||||
/// </summary>
|
||||
private void RefreshBlockPreview()
|
||||
{
|
||||
int baseBlock = GetAttribute("Block");
|
||||
bool isCounterReaction = user != null && user.recordSubmodule.WasAttackedThisRound;
|
||||
card.SetAttribute("Display_Block", isCounterReaction ? baseBlock * 2 : baseBlock);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c51160c78806a654ea5432ab5f2571ea
|
||||
Reference in New Issue
Block a user