Update
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
@@ -67,7 +68,9 @@ namespace Continentis.MainGame.Card
|
||||
{
|
||||
protected bool FindExistingSameBuff<T>(out T existingBuff) where T : CardBuffBase
|
||||
{
|
||||
return base.FindExistingSameBuff(out existingBuff, attachedCard.combatBuffSubmodule.buffList);
|
||||
bool result = FindExistingSameBuffs(out List<T> existingBuffs, attachedCard.combatBuffSubmodule.buffList);
|
||||
existingBuff = result ? existingBuffs[0] : null;
|
||||
return result;
|
||||
}
|
||||
|
||||
public override void Apply(CardInstance attachedCard, CharacterBase sourceCharacter = null)
|
||||
|
||||
@@ -170,8 +170,10 @@ namespace Continentis.MainGame.Card
|
||||
/// </summary>
|
||||
/// <param name="targetList">目标列表</param>
|
||||
/// <param name="user">使用者</param>
|
||||
/// <param name="noConsumption">是否不消耗资源</param>
|
||||
/// <param name="willCheckBeforePlay">打出之前是否进行可用性检测</param>
|
||||
public bool Play(List<CharacterBase> targetList, CharacterBase user = null, bool willCheckBeforePlay = true)
|
||||
public bool Play(List<CharacterBase> targetList, CharacterBase user = null,
|
||||
bool willCheckBeforePlay = true, bool noConsumption = false)
|
||||
{
|
||||
if (handCardView != null)
|
||||
{
|
||||
@@ -188,9 +190,12 @@ namespace Continentis.MainGame.Card
|
||||
|
||||
if (!willCheckBeforePlay || CheckBeforePlay())
|
||||
{
|
||||
this.user.ModifyStamina(-GetAttribute("StaminaCost"));
|
||||
this.user.ModifyMana(-GetAttribute("ManaCost"));
|
||||
|
||||
if (!noConsumption)
|
||||
{
|
||||
this.user.ModifyStamina(-GetAttribute("StaminaCost"));
|
||||
this.user.ModifyMana(-GetAttribute("ManaCost"));
|
||||
}
|
||||
|
||||
Debug.Log($"Starting to play card: {contentSubmodule.cardName}");
|
||||
|
||||
CommandQueueManager.Instance.AddCommand(new Cmd_Function(() =>
|
||||
|
||||
@@ -26,6 +26,11 @@ namespace Continentis.MainGame.Card
|
||||
{
|
||||
card.SetVariableAttribute("Damage", damageOffset, additive, originalDamage);
|
||||
}
|
||||
|
||||
public void SetDamage_Default()
|
||||
{
|
||||
SetDamage(0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 斩击伤害计算,伤害=基础伤害+(力量加成+敏捷加成)/2
|
||||
|
||||
Reference in New Issue
Block a user