CardBuff,Exhaustible
This commit is contained in:
BIN
Assets/ExportedMods/Basic.umod
LFS
BIN
Assets/ExportedMods/Basic.umod
LFS
Binary file not shown.
@@ -50,6 +50,7 @@ MonoBehaviour:
|
||||
- CardData_Basic_Dazed
|
||||
- CardData_Basic_Faint
|
||||
- CardData_Basic_Oblivion
|
||||
- CardData_Basic_LessRestoration
|
||||
- CardData_Basic_BattlefieldExperience
|
||||
- CardData_Basic_BodyAsShield
|
||||
- CardData_Basic_Cover
|
||||
@@ -65,6 +66,7 @@ MonoBehaviour:
|
||||
- CardData_Basic_OathOfHonor
|
||||
- CardData_Basic_Smite
|
||||
- CardData_Basic_UtmostStrike
|
||||
- CardData_Basic_Abundant
|
||||
- CardData_Basic_ArcaneMissiles
|
||||
- CardData_Basic_ConcentratedSpellcasting
|
||||
- CardData_Basic_ElectricClaw
|
||||
@@ -72,7 +74,9 @@ MonoBehaviour:
|
||||
- CardData_Basic_FireBall
|
||||
- CardData_Basic_FlameInscription
|
||||
- CardData_Basic_Haste
|
||||
- CardData_Basic_IdentifyWeakness
|
||||
- CardData_Basic_Scorch
|
||||
- CardData_Basic_WitchcraftRay
|
||||
characterDataIDList:
|
||||
- CharacterData_Basic_Knight
|
||||
- CharacterData_Basic_Mage
|
||||
@@ -87,5 +91,7 @@ MonoBehaviour:
|
||||
- {fileID: 4900000, guid: c3a2d38972f95ed41aa340ad6c5ca3b5, type: 3}
|
||||
- {fileID: 4900000, guid: dae5bc8e90366584ca78827dfe470a23, type: 3}
|
||||
- {fileID: 4900000, guid: 769aea741717c4a4bbf3c474056da92f, type: 3}
|
||||
- {fileID: 4900000, guid: e1ad01987651df444878ed7e1da1b9c8, type: 3}
|
||||
- {fileID: 4900000, guid: 5d66745b8665526429012762a60469bd, type: 3}
|
||||
- {fileID: 4900000, guid: b8e11e42fa0f82c41a2cb84cd79ccb79, type: 3}
|
||||
- {fileID: 4900000, guid: 240d7d7c1050c1c498575d637265ab32, type: 3}
|
||||
|
||||
8
Assets/Mods/Basic/Cards/Data/PlayerHeros/Cleric.meta
Normal file
8
Assets/Mods/Basic/Cards/Data/PlayerHeros/Cleric.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 097f26782b8dc8b48ba083504b8f534c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,66 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9a4129cdd7011ca46b83d8c17d9f3623, type: 3}
|
||||
m_Name: CardData_Basic_LessRestoration
|
||||
m_EditorClassIdentifier:
|
||||
modName: Basic
|
||||
className: LessRestoration
|
||||
displayName: Card_Basic_LessRestoration_DisplayName
|
||||
cardRarity: 10
|
||||
cardType: 10
|
||||
keywords:
|
||||
- TargetAllies
|
||||
- Exhaustible
|
||||
cardSprite: {fileID: 21300000, guid: c7e0489a5e85e65499fcacddb7c1391e, type: 3}
|
||||
cardLayoutTags: []
|
||||
functionText: Card_Basic_LessRestoration_FunctionText
|
||||
cardDescription:
|
||||
baseWeight: 1
|
||||
variableAttributes:
|
||||
dictionaryList:
|
||||
- Key: StaminaCost
|
||||
Value: 0
|
||||
index: 0
|
||||
isKeyDuplicated: 0
|
||||
- Key: ManaCost
|
||||
Value: 1
|
||||
index: 1
|
||||
isKeyDuplicated: 0
|
||||
- Key: TargetCount
|
||||
Value: 1
|
||||
index: 2
|
||||
isKeyDuplicated: 0
|
||||
- Key: ExhaustibleCount
|
||||
Value: 3
|
||||
index: 3
|
||||
isKeyDuplicated: 0
|
||||
- Key: HealAmount
|
||||
Value: 6
|
||||
index: 4
|
||||
isKeyDuplicated: 0
|
||||
dividerPosProp: 0.5
|
||||
originalAttributes:
|
||||
dictionaryList: []
|
||||
dividerPosProp: 0.5
|
||||
runtimeCurrentAttributes:
|
||||
dictionaryList: []
|
||||
dividerPosProp: 0.5
|
||||
upgradeNode:
|
||||
sourceCard: {fileID: 0}
|
||||
isTerminalNode: 0
|
||||
isInfiniteUpgrade: 0
|
||||
maxUpgradeLevel: 0
|
||||
upgradeCards: []
|
||||
customDescriptions: []
|
||||
prefabRefs: []
|
||||
derivativeCardDataRefs: []
|
||||
derivativeCharacterDataRefs: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d11d663db0010e4982e754bfafbcd49
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,61 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9a4129cdd7011ca46b83d8c17d9f3623, type: 3}
|
||||
m_Name: CardData_Basic_Abundant
|
||||
m_EditorClassIdentifier:
|
||||
modName: Basic
|
||||
className: Abundant
|
||||
displayName: Card_Basic_Abundant_DisplayName
|
||||
cardRarity: 20
|
||||
cardType: 10
|
||||
keywords:
|
||||
- TargetSelf
|
||||
cardSprite: {fileID: 21300000, guid: aae12ccc5edd96c40b082fba851f3056, type: 3}
|
||||
cardLayoutTags: []
|
||||
functionText: Card_Basic_Abundant_FunctionText
|
||||
cardDescription:
|
||||
baseWeight: 1
|
||||
variableAttributes:
|
||||
dictionaryList:
|
||||
- Key: StaminaCost
|
||||
Value: 0
|
||||
index: 0
|
||||
isKeyDuplicated: 0
|
||||
- Key: ManaCost
|
||||
Value: 1
|
||||
index: 1
|
||||
isKeyDuplicated: 0
|
||||
- Key: TargetCount
|
||||
Value: 0
|
||||
index: 2
|
||||
isKeyDuplicated: 0
|
||||
- Key: BuffStack_Abundant
|
||||
Value: 2
|
||||
index: 3
|
||||
isKeyDuplicated: 0
|
||||
dividerPosProp: 0.5
|
||||
originalAttributes:
|
||||
dictionaryList: []
|
||||
dividerPosProp: 0.5
|
||||
runtimeCurrentAttributes:
|
||||
dictionaryList: []
|
||||
dividerPosProp: 0.5
|
||||
upgradeNode:
|
||||
sourceCard: {fileID: 0}
|
||||
isTerminalNode: 0
|
||||
isInfiniteUpgrade: 0
|
||||
maxUpgradeLevel: 0
|
||||
upgradeCards: []
|
||||
customDescriptions: []
|
||||
prefabRefs: []
|
||||
derivativeCardDataRefs: []
|
||||
derivativeCharacterDataRefs: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d5ff08c0f122bb74a99b0f7c6e445719
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Mods/Basic/Cards/Scripts/Cleric.meta
Normal file
8
Assets/Mods/Basic/Cards/Scripts/Cleric.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a410ef469d4ae7a4f9595394751c7236
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
26
Assets/Mods/Basic/Cards/Scripts/Cleric/LessRestoration.cs
Normal file
26
Assets/Mods/Basic/Cards/Scripts/Cleric/LessRestoration.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class LessRestoration : CardLogicBase
|
||||
{
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
new Cmd_ParamFunction<CharacterBase>(0.1f, target =>
|
||||
{
|
||||
target.Heal(GetAttribute("HealAmount"));
|
||||
target.combatBuffSubmodule.Dispel(BuffDispelLevel.Basic, user);
|
||||
}));
|
||||
|
||||
return mainGroup;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f7dd98409993714c963704f02449599
|
||||
@@ -1,39 +1,72 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
namespace Continentis.Mods.Basic
|
||||
{
|
||||
public class Abundant : CardLogicBase
|
||||
namespace Cards
|
||||
{
|
||||
protected override void SetUpLogicComponents()
|
||||
public class Abundant : CardLogicBase
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_SelectHandCards>().SetCondition(SelectCondition).SetEffect(SelectEffect);
|
||||
}
|
||||
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
LogicComponent<CardLogicComponent_SelectHandCards>().AddSelectionCommands(ref mainGroup);
|
||||
|
||||
return mainGroup;
|
||||
}
|
||||
|
||||
private bool SelectCondition(CardInstance card)
|
||||
{
|
||||
return card.cardLogic.contentSubmodule.cardType is CardType.Attack && card.cardLogic.HasKeyword("Magic");
|
||||
}
|
||||
|
||||
private void SelectEffect(CardInstance card)
|
||||
{
|
||||
/*if (card.cardLogic.HasAttribute("Damage"))
|
||||
protected override void SetUpLogicComponents()
|
||||
{
|
||||
card.cardLogic.ModifyAttribute("Damage", GetAttribute("DamageIncrease"));
|
||||
}*/
|
||||
AddLogicComponent<CardLogicComponent_SelectHandCards>().SetCondition(SelectCondition).SetEffect(SelectEffect);
|
||||
}
|
||||
|
||||
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential,
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
LogicComponent<CardLogicComponent_SelectHandCards>().AddSelectionCommands(ref mainGroup);
|
||||
|
||||
return mainGroup;
|
||||
}
|
||||
|
||||
private bool SelectCondition(CardInstance card)
|
||||
{
|
||||
return card.cardLogic.contentSubmodule.cardType is CardType.Attack && card.cardLogic.HasKeyword("Magic");
|
||||
}
|
||||
|
||||
private void SelectEffect(CardInstance card)
|
||||
{
|
||||
CreateCardBuff<Buffs.Abundant>(GetAttribute("BuffStack_Abundant")).Apply(card.cardLogic, user, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Buffs
|
||||
{
|
||||
public class Abundant : CardCombatBuffBase
|
||||
{
|
||||
public Abundant(int stack)
|
||||
{
|
||||
Initialize(BuffType.Positive, BuffDispelLevel.Strong);
|
||||
|
||||
this.contentSubmodule = new ContentSubmodule(this);
|
||||
|
||||
this.unitedStackSubmodule = new UnitedStackSubmodule(this, true, -1, stack);
|
||||
|
||||
this.attributeSubmodule = new AttributeSubmodule(this);
|
||||
this.attributeSubmodule.numericChange.Add("Damage", stack);
|
||||
}
|
||||
|
||||
public override bool OnBuffApply(out CardCombatBuffBase existingBuff)
|
||||
{
|
||||
if (FindExistingSameBuff(out existingBuff))
|
||||
{
|
||||
existingBuff.unitedStackSubmodule.ModifyStack(this.unitedStackSubmodule.stackAmount);
|
||||
int newStack = existingBuff.unitedStackSubmodule.stackAmount;
|
||||
existingBuff.attributeSubmodule.numericChange["Damage"] = newStack;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ MonoBehaviour:
|
||||
index: 2
|
||||
isKeyDuplicated: 0
|
||||
- Key: Intelligence
|
||||
Value: 18
|
||||
Value: 12
|
||||
index: 3
|
||||
isKeyDuplicated: 0
|
||||
- Key: Physique
|
||||
@@ -45,7 +45,7 @@ MonoBehaviour:
|
||||
index: 4
|
||||
isKeyDuplicated: 0
|
||||
- Key: Perception
|
||||
Value: 18
|
||||
Value: 24
|
||||
index: 5
|
||||
isKeyDuplicated: 0
|
||||
- Key: Charisma
|
||||
@@ -148,7 +148,7 @@ MonoBehaviour:
|
||||
index: 22
|
||||
isKeyDuplicated: 0
|
||||
- Key: DrawCardAmountPerAction
|
||||
Value: 4
|
||||
Value: 8
|
||||
index: 23
|
||||
isKeyDuplicated: 0
|
||||
- Key: Awareness
|
||||
@@ -215,5 +215,7 @@ MonoBehaviour:
|
||||
- CardData_Basic_ElectricClaw
|
||||
- CardData_Basic_IdentifyWeakness
|
||||
- CardData_Basic_WitchcraftRay
|
||||
- CardData_Basic_Abundant
|
||||
- CardData_Basic_LessRestoration
|
||||
hudDataRefs:
|
||||
- HUDData_Basic_Default
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace Continentis.Mods.Basic.Equipments
|
||||
eventSubmodule.onCombatStart.InsertByPriority("SteelBracer_AddFirm", new PrioritizedAction(() =>
|
||||
{
|
||||
new Firm(1).Apply(character);
|
||||
new Vulnerable(2).Apply(character);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,5 +104,11 @@ MonoBehaviour:
|
||||
description: Keyword_Magic_Description
|
||||
index: 14
|
||||
isKeyDuplicated: 0
|
||||
- Key: Exhaustible
|
||||
Value:
|
||||
name: Keyword_Exhaustible
|
||||
description: Keyword_Exhaustible_Description
|
||||
index: 15
|
||||
isKeyDuplicated: 0
|
||||
dividerPosProp: 0.2
|
||||
keywordToAdd: Magic
|
||||
keywordToAdd: Exhaustible
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
Key,English,Simplified Chinese,Traditional Chinese,Japanese,Korean,Vietnamese,Thai
|
||||
Card_Basic_LessRestoration_DisplayName,Less Restoration,次级恢复术,,,,,
|
||||
Card_Basic_LessRestoration_FunctionText,"$Keyword(""Exhaustible""): $Attribute(""ExhaustibleCount""), Heal $Attribute(""HealAmount"") and basic dispel target.","$Keyword(""Exhaustible""): $Attribute(""ExhaustibleCount""),治疗目标$Attribute(""HealAmount"")点生命值,并施加弱驱散。",,,,,
|
||||
|
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d66745b8665526429012762a60469bd
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -25,3 +25,5 @@ Keyword_Retain,Retain,保留,,,,,
|
||||
Keyword_Retain_Description,"After you finish your action, if this card is in your hand pile, keep it.",你的行动结束时,如果这张卡牌在你的手牌堆中,保留它。,,,,,
|
||||
Keyword_Ethereal,Ethereal,虚无,,,,,
|
||||
Keyword_Ethereal_Description,"After you finish your action, if this card is in your hand pile, exhaust it.",你的行动结束时,如果这张卡牌在你的手牌堆中,消耗它。,,,,,
|
||||
Keyword_Exhaustible,Exhaustible,消耗性,,,,,
|
||||
Keyword_Exhaustible_Description,"After play this card for certain times, exhaust it.",在你打出这张牌一定次数之后,消耗它。,,,,,
|
||||
|
||||
|
@@ -0,0 +1,3 @@
|
||||
Key,English,Simplified Chinese,Traditional Chinese,Japanese,Korean,Vietnamese,Thai
|
||||
Card_Basic_ArcaneMissiles_DisplayName,Arcane Missiles,奥术飞弹,,,,,
|
||||
Card_Basic_ArcaneMissiles_FunctionText,"Deal $Attribute(""Damage"") damage for $Attribute(""AttackCount"") times.","造成$Attribute(""Damage"")点伤害 $Attribute(""AttackCount"")次。",,,,,
|
||||
|
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1ad01987651df444878ed7e1da1b9c8
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -102,4 +102,8 @@ MonoBehaviour:
|
||||
Value:
|
||||
index: 21
|
||||
isKeyDuplicated: 0
|
||||
- Key: Exhaustible
|
||||
Value:
|
||||
index: 22
|
||||
isKeyDuplicated: 0
|
||||
dividerPosProp: 0.3
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.7 MiB |
@@ -72,12 +72,24 @@ namespace Continentis.MainGame
|
||||
current[attributeName] = originalAttribute;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetAttribute(string attributeName, float value)
|
||||
{
|
||||
if (!current.ContainsKey(attributeName))
|
||||
{
|
||||
Debug.Log($"{attributeName} is not found in current attributes, use default value");
|
||||
}
|
||||
|
||||
current[attributeName] = value;
|
||||
}
|
||||
|
||||
public void ModifyAttribute(string attributeName,
|
||||
float numericChange, float percentageChangeOfAccumulation, float percentChangeOfMultiplication)
|
||||
{
|
||||
if (!current.ContainsKey(attributeName))
|
||||
{
|
||||
Debug.Log($"{attributeName} is not found in current attributes, use default value");
|
||||
|
||||
if (attributeName.Contains("Multiplier"))
|
||||
{
|
||||
current[attributeName] = 1f;
|
||||
@@ -86,8 +98,6 @@ namespace Continentis.MainGame
|
||||
{
|
||||
current[attributeName] = 0f;
|
||||
}
|
||||
|
||||
Debug.Log($"{attributeName} is not found in current attributes, use default value");
|
||||
}
|
||||
|
||||
current[attributeName] += numericChange;
|
||||
|
||||
@@ -281,6 +281,36 @@ namespace Continentis.MainGame.Card
|
||||
|
||||
return ModManager.CreateInstance<T>(buffTypeID, parameters);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建一个卡牌战斗Buff实例
|
||||
/// 注意,此函数依赖ModManager的类型注册功能,请确保在Mod加载时已注册对应Buff类型
|
||||
/// 此函数中的T并不是原型参数,而是获取Mod中注册的类型用的
|
||||
/// </summary>
|
||||
public T CreateCardBuff<T>(params object[] parameters) where T :CardBuffBase
|
||||
{
|
||||
string buffTypeID = ModManager.GetTypeID(typeof(T));
|
||||
|
||||
if (string.IsNullOrEmpty(buffTypeID))
|
||||
{
|
||||
Debug.LogError($"Failed to get buff name for type {typeof(T).FullName}");
|
||||
return null;
|
||||
}
|
||||
|
||||
return ModManager.CreateInstance<T>(buffTypeID, parameters);
|
||||
}
|
||||
|
||||
|
||||
public T CreateCardBuff<T>(string buffTypeID, params object[] parameters) where T :CardBuffBase
|
||||
{
|
||||
if (string.IsNullOrEmpty(buffTypeID))
|
||||
{
|
||||
Debug.LogError($"Failed to get buff name for type {typeof(T).FullName}");
|
||||
return null;
|
||||
}
|
||||
|
||||
return ModManager.CreateInstance<T>(buffTypeID, parameters);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -27,8 +27,8 @@ namespace Continentis.MainGame.Card
|
||||
|
||||
public override void OnAfterFirstApply()
|
||||
{
|
||||
attributeSubmodule?.RefreshAllModifiedAttributes();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public override void OnBuffRemove()
|
||||
{
|
||||
@@ -63,7 +63,7 @@ namespace Continentis.MainGame.Card
|
||||
|
||||
public partial class CardCombatBuffBase
|
||||
{
|
||||
protected bool FindExistingBuff<T>(out T existingBuff) where T : CardBuffBase
|
||||
protected bool FindExistingSameBuff<T>(out T existingBuff) where T : CardBuffBase
|
||||
{
|
||||
return base.FindExistingSameBuff(out existingBuff, attachedCard.combatBuffSubmodule.buffList);
|
||||
}
|
||||
@@ -84,6 +84,13 @@ namespace Continentis.MainGame.Card
|
||||
this.attachedCard.combatBuffSubmodule.buffList.Add(this);
|
||||
OnAfterFirstApply();
|
||||
}
|
||||
|
||||
attributeSubmodule?.RefreshAllModifiedAttributes();
|
||||
Debug.Log(base.attachedCard.GetAttribute("Damage"));
|
||||
CardTextInterpreter.InterpretText(attachedCard);
|
||||
attachedCard.handCardView?.Setup();
|
||||
attachedCard.intentionCardView?.Setup();
|
||||
Debug.Log(base.attachedCard.contentSubmodule.interpretedFunctionText);
|
||||
}
|
||||
|
||||
public override void Remove()
|
||||
|
||||
@@ -238,13 +238,33 @@ namespace Continentis.MainGame.Card
|
||||
return;
|
||||
}
|
||||
|
||||
if (HasKeyword("Exhaust"))
|
||||
{
|
||||
CommandQueueManager.Instance.AddCommand(user.deckSubmodule.ExhaustCard(cardInstance));
|
||||
return;
|
||||
}
|
||||
|
||||
if(HasKeyword("Exhaustible"))
|
||||
{
|
||||
if (!cardInstance.cardLogic.HasAttribute("ExhaustibleCount"))
|
||||
{
|
||||
Debug.LogError("Exhaustible card missing ExhaustibleCount attribute: " + contentSubmodule.cardName);
|
||||
CommandQueueManager.Instance.AddCommand(user.deckSubmodule.ExhaustCard(cardInstance));
|
||||
return;
|
||||
}
|
||||
|
||||
cardInstance.cardLogic.ModifyAttribute("ExhaustibleCount", -1);
|
||||
|
||||
if(cardInstance.cardLogic.GetAttribute("ExhaustibleCount") <= 0)
|
||||
{
|
||||
CommandQueueManager.Instance.AddCommand(user.deckSubmodule.ExhaustCard(cardInstance));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (user is PlayerHero playerHero)
|
||||
{
|
||||
if (HasKeyword("Exhaust"))
|
||||
{
|
||||
CommandQueueManager.Instance.AddCommand(playerHero.deckSubmodule.ExhaustCard(cardInstance));
|
||||
}
|
||||
else if(!HasKeyword("Reuse"))
|
||||
if(!HasKeyword("Reuse"))
|
||||
{
|
||||
CommandQueueManager.Instance.AddCommand(playerHero.deckSubmodule.DiscardCard(cardInstance, false));
|
||||
CommandQueueManager.Instance.AddCommand(new Cmd_Function(() =>
|
||||
@@ -258,10 +278,7 @@ namespace Continentis.MainGame.Card
|
||||
}
|
||||
else if (user is CombatNPC npc)
|
||||
{
|
||||
if (HasKeyword("Exhaust"))
|
||||
{
|
||||
CommandQueueManager.Instance.AddCommand(npc.deckSubmodule.ExhaustCard(cardInstance));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace Continentis.MainGame.Card
|
||||
}
|
||||
|
||||
attributeGroup = new AttributeGroup(originalAttributes, endowingAttributes);
|
||||
attributeGroup.ApplyAllAttributes();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +60,11 @@ namespace Continentis.MainGame.Card
|
||||
owner.ApplyAttributeChangesByCard();
|
||||
owner.combatBuffSubmodule.GetAttributeChange(attributeName, out float numeric, out float pAccumulation, out float pMultiplication);
|
||||
attributeGroup.ModifyAttribute(attributeName, numeric, pAccumulation, pMultiplication);
|
||||
string displayAttributeName = "Display" + attributeName;
|
||||
if(attributeGroup.current.ContainsKey(displayAttributeName))
|
||||
{
|
||||
attributeGroup.SetAttribute(displayAttributeName, attributeGroup.current[attributeName]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -77,6 +83,11 @@ namespace Continentis.MainGame.Card
|
||||
{
|
||||
owner.combatBuffSubmodule.GetAttributeChange(attributeName, out float numeric, out float pAccumulation, out float pMultiplication);
|
||||
attributeGroup.ModifyAttribute(attributeName, numeric, pAccumulation, pMultiplication);
|
||||
string displayAttributeName = "Display" + attributeName;
|
||||
if(attributeGroup.current.ContainsKey(displayAttributeName))
|
||||
{
|
||||
attributeGroup.SetAttribute(displayAttributeName, attributeGroup.current[attributeName]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace Continentis.MainGame.Card
|
||||
public override void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
base.OnPointerEnter(eventData);
|
||||
CardTextInterpreter.InterpretText(cardLogic);
|
||||
cardDescriptionText.text = cardLogic.contentSubmodule.interpretedFunctionText;
|
||||
if (CombatUIManager.Instance.selectingCardView == null)
|
||||
{
|
||||
canvas.overrideSorting = true;
|
||||
|
||||
@@ -45,6 +45,17 @@ namespace Continentis.MainGame.Character
|
||||
{
|
||||
return buffList.Exists(x => x.GetType() == typeof(T));
|
||||
}
|
||||
|
||||
public List<CharacterCombatBuffBase> Dispel(BuffDispelLevel dispelLevel, CharacterBase dispelSource)
|
||||
{
|
||||
List<CharacterCombatBuffBase> dispelledBuffs = buffList
|
||||
.Where(buff => buff.dispelThreshold <= dispelLevel &&
|
||||
buff.buffType == (owner.IsAlly(dispelSource) ? BuffType.Negative : BuffType.Positive))
|
||||
.ToList();
|
||||
|
||||
dispelledBuffs.For(buff => buff.Remove());
|
||||
return dispelledBuffs;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class CombatBuffSubmodule
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace Continentis.MainGame.Combat
|
||||
playerHero.combatBuffSubmodule.ActionStart();
|
||||
|
||||
combatMainPage.handPile.isUpdatingLayout = false;
|
||||
CommandQueueManager.Instance.AddCommand(playerHero.deckSubmodule.DrawCards(5));
|
||||
CommandQueueManager.Instance.AddCommand(playerHero.deckSubmodule.DrawCards(playerHero.GetAttribute("DrawCardAmountPerAction")));
|
||||
CommandQueueManager.Instance.AddCommand(new Cmd_Function(0f, () =>
|
||||
{
|
||||
//Debug.Log((drawCard.groupContext.context["DrawnCards"] as List<CardInstance>).Count);
|
||||
|
||||
Reference in New Issue
Block a user