架构大更

This commit is contained in:
SoulliesOfficial
2026-03-20 11:56:50 -04:00
parent e60ef64d01
commit d09b58fd80
3663 changed files with 15232012 additions and 105579 deletions

View File

@@ -1,10 +1,8 @@
using System.Collections.Generic;
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
@@ -16,38 +14,36 @@ namespace Continentis.Mods.Basic.Cards.Cleric
AddLogicComponent<CardLogicComponent_GenerateCards>();
}
public override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
public override CommandGroup PlayEffect(List<CharacterBase> 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)
return Cmd.Sequential(
new Cmd_PlayAnimation(user.characterView, "Skill"),
Cmd.Do(() =>
{
if (card.contentSubmodule.cardType == MainGame.Card.CardType.Power)
var powerCards = new List<CardInstance>();
foreach (var card in user.deckSubmodule.HandPile)
{
powerCards.Add(card);
if (card.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++)
if (powerCards.TryGetRandom(out CardInstance randomPowerCard))
{
CardInstance newCard = CardInstance.GenerateCardInstance(randomPowerCard, user, "Hand");
newCard.cardLogic.SetAttribute("StaminaCost", 0);
newCard.GenerateHandCardView("Hand");
var copyCount = GetAttribute("CopyCount");
for (int i = 0; i < copyCount; i++)
{
CardInstance newCard = CardInstance.GenerateCardInstance(randomPowerCard, 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 };
else
{
Debug.LogWarning("ChainBlessing: No power cards in hand to copy.");
}
})
);
}
}
}