CardBuff,Exhaustible

This commit is contained in:
SoulliesOfficial
2025-11-01 06:13:58 -04:00
parent ee1d3d9c0a
commit abc540809f
30 changed files with 395 additions and 46 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 097f26782b8dc8b48ba083504b8f534c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6d11d663db0010e4982e754bfafbcd49
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d5ff08c0f122bb74a99b0f7c6e445719
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a410ef469d4ae7a4f9595394751c7236
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View 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;
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 8f7dd98409993714c963704f02449599

View File

@@ -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;
}
}
}
}