复制牌,保护buff显示调整

This commit is contained in:
SoulliesOfficial
2025-10-30 12:07:59 -04:00
parent b68eeda9af
commit 8b72c75128
33 changed files with 433 additions and 104 deletions

View File

@@ -0,0 +1,30 @@
using System.Collections.Generic;
using Continentis.MainGame.Card;
using Continentis.MainGame.Character;
using Continentis.MainGame.Commands;
using SLSFramework.General;
using UnityEngine;
namespace Continentis.Mods.Basic.Cards
{
public class BattlefieldExperience : CardLogicBase
{
protected override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_GenerateCards>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
mainGroup.AddCommand(new Cmd_Function(() =>
{
CardData holyWaterCardData = GetDerivativeCardData(0);
CardInstance.GenerateCardInstance(holyWaterCardData, user.team, "Hand");
}));
return mainGroup;
}
}
}

View File

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

View File

@@ -0,0 +1,28 @@
using System.Collections.Generic;
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
{
public class BodyAsShield : CardLogicBase
{
protected override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_Protect>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = TargetListCommandGroup(targetList,
new Cmd_PlayAnimation(user.characterView, "Skill"),
new Cmd_ParamFunction<CharacterBase>((target) =>
LogicComponent<CardLogicComponent_Protect>().GenerateProtection(user, target, GetAttribute("BuffCount_Protecting"))));
return mainGroup;
}
}
}

View File

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

View File

@@ -0,0 +1,37 @@
using System.Collections.Generic;
using Continentis.MainGame.Card;
using Continentis.MainGame.Character;
using Continentis.MainGame.Commands;
using SLSFramework.General;
using UnityEngine;
namespace Continentis.Mods.Basic.Cards
{
public class EchoOfHonor : CardLogicBase
{
protected override void SetUpLogicComponents()
{
AddLogicComponent<CardLogicComponent_GenerateCards>();
}
protected override CommandBase PlayEffect(List<CharacterBase> targetList)
{
CommandGroup mainGroup = new CommandGroup(ExecutionMode.Sequential);
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
mainGroup.AddCommand(new Cmd_Function(() =>
{
if (user.deckSubmodule.HandPile.Exclude(this.cardInstance).TryGetRandom(out CardInstance randomHandCard))
{
CardInstance newCard = CardInstance.GenerateCardInstance(randomHandCard.cardLogic, user, "Hand");
newCard.cardLogic.SetAttribute("StaminaCost", 0);
newCard.GenerateHandCardView("Hand");
}
else
{
Debug.LogWarning("EchoOfHonor: No other cards in hand to copy.");
}
}));
return mainGroup;
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 282b6253d383eac43817c8c9bd79aafe

View File

@@ -0,0 +1,16 @@
using UnityEngine;
public class IronWall : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 62b78a6b24f5eac43a9ec432f9ad7f3e

View File

@@ -16,7 +16,7 @@ namespace Continentis.Mods.Basic.Cards
new Cmd_PlayAnimation(user.characterView, "Skill"),
new Cmd_ParamFunction<CharacterBase>((target) =>
{
Protected protectedBuff = CreateCharacterBuff<Protected>(user);
Protected protectedBuff = CreateCharacterBuff<Protected>();
protectedBuff.Apply(target, user, this);
Protecting protectingBuff = CreateCharacterBuff<Protecting>(target, GetAttribute("BuffCount_Protecting"), protectedBuff);
protectingBuff.Apply(user, user, this);