卡牌更新
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Buffs
|
||||
{
|
||||
/// <summary>
|
||||
/// 流血:受到攻击时,额外受到等同于层数的伤害(响应式,不会递归触发)。
|
||||
/// 每次行动开始时层数减半(至少减 1)。
|
||||
/// </summary>
|
||||
public sealed class Bleed : CharacterCombatBuffBase
|
||||
{
|
||||
public Bleed(int stack)
|
||||
@@ -27,8 +29,13 @@ namespace Continentis.Mods.Basic.Buffs
|
||||
|
||||
private void OnGetAttacked(AttackResult result)
|
||||
{
|
||||
// 响应式 / 生命移除 / 反弹伤害不触发流血
|
||||
if (result.context.HasAnyTag(AttackTags.Reactive, AttackTags.HpRemoval, AttackTags.Reflected))
|
||||
return;
|
||||
|
||||
int stackAmount = unitedStackSubmodule.stackAmount;
|
||||
result.attacker.Attack(attachedCharacter, stackAmount, null, false, true);
|
||||
var ctx = new AttackContext().WithTag(AttackTags.Reactive).WithTag(AttackTags.GuaranteedHit);
|
||||
attachedCharacter.Attack(attachedCharacter, stackAmount, ctx);
|
||||
}
|
||||
|
||||
private void OnActionStart()
|
||||
@@ -40,8 +47,14 @@ namespace Continentis.Mods.Basic.Buffs
|
||||
|
||||
public override bool OnBuffApply(out CharacterCombatBuffBase existingBuff)
|
||||
{
|
||||
//TODO
|
||||
existingBuff = this;
|
||||
MainGameManager.Instance.basePrefabs.GenerateInfoText("Bleed", attachedCharacter.characterView);
|
||||
|
||||
if (FindExistingSameBuff(out existingBuff))
|
||||
{
|
||||
existingBuff.unitedStackSubmodule.AddStack(this.unitedStackSubmodule.stackAmount);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user