Cleric card done

This commit is contained in:
FrazeRIP
2025-11-13 00:58:50 -06:00
parent edbae155bd
commit 427674331a
13 changed files with 244 additions and 10 deletions

View File

@@ -2,16 +2,52 @@
using Continentis.MainGame.Card;
using Continentis.MainGame.Character;
using Continentis.MainGame.Commands;
using SLSFramework.General;
using System.Collections.Generic;
using UnityEngine;
namespace Continentis.Mods.Basic.Cards.Cleric
{
public class ChainBlessing : CardLogicBase
{
protected override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_GenerateCards>();
}
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
return base.PlayEffect(targetList);
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
mainGroup.AddCommand(new Cmd_Function(() =>
{
//Get powe cards in hand
var powerCards = new List<CardInstance>();
foreach (var card in user.deckSubmodule.HandPile)
{
if (card.cardLogic.contentSubmodule.cardType == MainGame.Card.CardType.Power)
{
powerCards.Add(card);
}
}
if (powerCards.TryGetRandom(out CardInstance randomPowerCard))
{
var copyCount = GetAttribute("CopyCount");
for (int i = 0; i < copyCount; i++)
{
CardInstance newCard = CardInstance.GenerateCardInstance(randomPowerCard.cardLogic, user, "Hand");
newCard.cardLogic.SetAttribute("StaminaCost", 0);
newCard.GenerateHandCardView("Hand");
}
}
else
{
Debug.LogWarning("ChainBlessing: No other power cards in hand to copy.");
}
}));
return new List<CommandBase> { mainGroup };
}
}
}

View File

@@ -2,6 +2,7 @@
using Continentis.MainGame.Card;
using Continentis.MainGame.Character;
using Continentis.MainGame.Commands;
using SLSFramework.General;
using System.Collections.Generic;
@@ -11,7 +12,12 @@ namespace Continentis.Mods.Basic.Cards.Cleric
{
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
return base.PlayEffect(targetList);
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_ParamFunction<CharacterBase>(0.01f, target =>
{
CreateCharacterBuff<Buffs.FreedomOfMovement>(GetAttribute("BuffStack")).Apply(target, user, this);
}));
return new List<CommandBase> { mainGroup };
}
}
}

View File

@@ -2,6 +2,8 @@
using Continentis.MainGame.Card;
using Continentis.MainGame.Character;
using Continentis.MainGame.Commands;
using Continentis.Mods.Basic.Buffs;
using SLSFramework.General;
using System.Collections.Generic;
@@ -11,7 +13,12 @@ namespace Continentis.Mods.Basic.Cards.Cleric
{
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
{
return base.PlayEffect(targetList);
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_ParamFunction<CharacterBase>(0.01f, target =>
{
CreateCharacterBuff<Withstand>(GetAttribute("BuffStack")).Apply(target, user, this);
}));
return new List<CommandBase> { mainGroup };
}
}
}

View File

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

View File

@@ -0,0 +1,44 @@
using Continentis.MainGame;
using Continentis.MainGame.Character;
using SLSFramework.General;
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Continentis.Mods.Basic.Buffs
{
public class FreedomOfMovement : CharacterCombatBuffBase
{
public FreedomOfMovement(int stack)
{
Initialize(BuffType.Positive, BuffDispelLevel.Basic);
this.contentSubmodule = new ContentSubmodule(this)
.AddParameterGetter("Stack", () => unitedStackSubmodule.stackAmount.ToString());
this.iconSubmodule = new IconSubmodule(this);
this.unitedStackSubmodule = new UnitedStackSubmodule(this, stack);
this.eventSubmodule = new EventSubmodule(this);
this.eventSubmodule.onBeforePlayCard.Add(this.GetType().FullName, new PrioritizedAction<MainGame.Card.CardInstance, System.Collections.Generic.List<CharacterBase>>(OnBeforePlayCard));
}
private void OnBeforePlayCard(MainGame.Card.CardInstance instance, List<CharacterBase> list)
{
if (instance.cardLogic.contentSubmodule.cardType == MainGame.Card.CardType.Power)
{
this.attachedCharacter.deckSubmodule.DrawCards(unitedStackSubmodule.stackAmount);
}
}
public override bool OnBuffApply(out CharacterCombatBuffBase existingBuff)
{
MainGameManager.Instance.basePrefabs.GenerateInfoText("Freedom Of Movement", attachedCharacter.characterView);
if (FindExistingSameBuff(out existingBuff))
{
existingBuff.unitedStackSubmodule.AddStack(this.unitedStackSubmodule.stackAmount);
return false;
}
return true;
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: df411ffb583330948b70f1a72c4f62df

View File

@@ -44,5 +44,11 @@ MonoBehaviour:
description: Keyword_Basic_Sharpness_Description
index: 4
isKeyDuplicated: 0
- Key: Basic_Withstand
Value:
name: Keyword_Basic_Withstand
description: Keyword_Basic_Withstand_Description
index: 5
isKeyDuplicated: 0
dividerPosProp: 0.2
keywordToAdd: Basic_KnifeTrick
keywordToAdd: Basic_Withstand

View File

@@ -135,4 +135,4 @@ MonoBehaviour:
index: 19
isKeyDuplicated: 0
dividerPosProp: 0.2
keywordToAdd: CounterAttack
keywordToAdd: Withstand

View File

@@ -10,6 +10,8 @@ Keyword_Basic_WoundDeterioration_Description,"When dealing at least 20 damage in
Keyword_Basic_Corrosion,Corrosion,腐蚀,,,,,
Keyword_Basic_Corrosion_Description,TODO,未知效果。,,,,,
Keyword_Basic_Sharpness,Sharpness,锋利,,,,,
Keyword_Basic_Sharpness_Description,TODO,下次攻击造成额外等同于层数的伤害并失去所有层数,,,,,
Keyword_Basic_Sharpness_Description,TODO,下次攻击失去所有层数,并造成额外等同于层数的伤害。,,,,,
Keyword_Basic_KnifeTrick,Knife Trick,刀具把戏,,,,,
Keyword_Basic_KnifeTrick_Description,TODO,每次失去所有锋利后,获得4层锋利,,,,,
Keyword_Basic_KnifeTrick_Description,TODO,每次失去所有锋利后,获得等同于层数的$Keyword("Basic_Sharpness"),,,,,
Keyword_Basic_Withstand,Withstand,抵御,,,,,
Keyword_Basic_Withstand_Description,TODO,结束回合时,获得等同于层数的格挡。,,,,,
Can't render this file because it contains an unexpected character in line 9 and column 199.

View File

@@ -8,9 +8,9 @@ Card_Basic_BlessedHolyWater_FunctionText,TODO,将1张“圣水”加入公共牌
Card_Basic_Sanctuary_DisplayName,Sanctuary,庇护术,,,,,
Card_Basic_Sanctuary_FunctionText,TODO,$Keyword("Purify")一名友方目标。\n$Keyword("Reuseable")。,,,,,
Card_Basic_ShieldOfDevotion_DisplayName,Shield Of Devotion,虔诚护盾,,,,,
Card_Basic_ShieldOfDevotion_FunctionText,TODO,,,,,,
Card_Basic_ShieldOfDevotion_FunctionText,TODO,$Keyword("Blessing")。\n获得$Attribute("BuffStack")层$Keyword("Basic_Sharpness")。,,,,,
Card_Basic_FreedomOfMovement_DisplayName,Freedom Of Movement,行动自如,,,,,
Card_Basic_FreedomOfMovement_FunctionText,TODO,,,,,,
Card_Basic_FreedomOfMovement_FunctionText,TODO,$Keyword("Blessing")。\n每打出一张能力牌抽$Attribute("BuffStack")张牌。,,,,,
Card_Basic_SpiritGuardian_DisplayName,Spirit Guardian,灵体卫士,,,,,
Card_Basic_SpiritGuardian_FunctionText,TODO,$Keyword("Blessing")。\n获得$Attribute("BuffStack")层$Keyword("CounterAttack")。,,,,,
Card_Basic_Faith_DisplayName,Faith,信仰,,,,,
@@ -20,4 +20,4 @@ Card_Basic_DivinePunishment_FunctionText,TODO,造成$Attribute("Damage")点伤
Card_Basic_DivineProtection_DisplayName,Divine Protection,神圣守护,,,,,
Card_Basic_DivineProtection_FunctionText,TODO,获得$Attribute("Block")点格挡。\n这张牌在本场战斗中的格挡+$Attribute("BlockStack")。,,,,,
Card_Basic_ChainBlessing_DisplayName,Chain Blessing,连锁祝福,,,,,
Card_Basic_ChainBlessing_FunctionText,TODO,,,,,,
Card_Basic_ChainBlessing_FunctionText,TODO,选择一张手牌里的能力牌并复制$Attribute("CopyCount")张。,,,,,
Can't render this file because it contains an unexpected character in line 3 and column 170.

View File

@@ -45,3 +45,7 @@ Buff_Basic_Protecting_DisplayName,Protecting,保护,,,,,
Buff_Basic_Protecting_FunctionText,"You are protecting $ParameterString(""Target""), for $ParameterInt(""Count"") rounds.",你正在$ParameterInt("Count")回合内保护$ParameterString("Target")。,,,,,
Buff_Basic_CounterAttack_DisplayName,Counter Attack,反击,,,,,
Buff_Basic_CounterAttack_FunctionText,"Whenever you are attacked, deal $ParameterAbsInt(""Stack"") damage back.",每当你被攻击时,对攻击者造成$ParameterAbsInt("Stack")点伤害。,,,,,
Buff_Basic_Withstand_DisplayName,Withstand,抵御,,,,,
Buff_Basic_Withstand_FunctionText,"Whenever you are attacked, deal $ParameterAbsInt(""Stack"") damage back.",结束回合时,获得$ParameterAbsInt("Stack")点格挡。,,,,,
Buff_Basic_FreedomOfMovement_DisplayName,Freedom Of Movement,行动自如,,,,,
Buff_Basic_FreedomOfMovement_FunctionText,"Whenever you played a Power card, draw $ParameterAbsInt(""Stack"") card.",每打出一张能力牌,抽$ParameterAbsInt("Stack")张牌。,,,,,
Can't render this file because it contains an unexpected character in line 7 and column 153.

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 KiB

View File

@@ -0,0 +1,119 @@
fileFormatVersion: 2
guid: 03cacd4aae6a19c4c8943d1d5417b3f2
labels:
- UnityAI
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 1024
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant: