文本显示和Command大修

This commit is contained in:
SoulliesOfficial
2025-11-08 09:50:55 -05:00
parent 3f1e04dee7
commit b2e9e84c52
78 changed files with 293 additions and 244 deletions

View File

@@ -50,12 +50,12 @@ namespace Continentis.MainGame.Character
{
if (attributeSubmodule.coreAttributeGroup.current.ContainsKey(attributeName))
{
return attributeSubmodule.GetRoundCurrentCoreAttribute(attributeName);
return attributeSubmodule.GetCurrentCoreAttribute(attributeName);
}
if (attributeSubmodule.generalAttributeGroup.current.ContainsKey(attributeName))
{
return attributeSubmodule.GetRoundCurrentGeneralAttribute(attributeName);
return attributeSubmodule.GetGeneralAttribute(attributeName);
}
Debug.LogWarning($"Attribute {attributeName} not found in any attribute group.");

View File

@@ -93,17 +93,20 @@ namespace Continentis.MainGame.Character
RefreshAttributes();
iconSubmodule?.Update();
attachedCharacter.deckSubmodule.GetAllCards().ForEach(card => card.cardLogic.RefreshCardAttributes());
}
public override void Remove()
{
OnBuffRemove();
this.attachedCharacter.combatBuffSubmodule.buffList.Remove(this);
attachedCharacter.deckSubmodule.GetAllCards().ForEach(card => card.cardLogic.RefreshCardAttributes());
}
public override void UntriggerRemove()
{
this.attachedCharacter.combatBuffSubmodule.buffList.Remove(this);
attachedCharacter.deckSubmodule.GetAllCards().ForEach(card => card.cardLogic.RefreshCardAttributes());
}
/// <summary>

View File

@@ -121,7 +121,7 @@ namespace Continentis.MainGame.Character
/// <returns>是否闪避成功</returns>
public bool CheckDodge(int damage)
{
int dodge = attributeSubmodule.GetRoundCurrentGeneralAttribute("Dodge");
int dodge = attributeSubmodule.GetGeneralAttribute("Dodge");
if (dodge > 0)
{
@@ -145,7 +145,7 @@ namespace Continentis.MainGame.Character
/// <returns>格挡之后的剩余伤害</returns>
public int CheckBlock(int damage)
{
int block = attributeSubmodule.GetRoundCurrentGeneralAttribute("Block");
int block = attributeSubmodule.GetGeneralAttribute("Block");
if (block > 0)
{
@@ -178,7 +178,7 @@ namespace Continentis.MainGame.Character
/// <returns>护盾之后的剩余伤害</returns>
public int CheckShield(int damage)
{
int shield = attributeSubmodule.GetRoundCurrentGeneralAttribute("Shield");
int shield = attributeSubmodule.GetGeneralAttribute("Shield");
if (shield > 0)
{

View File

@@ -30,22 +30,22 @@ namespace Continentis.MainGame.Character
public partial class AttributeSubmodule
{
public float GetCurrentCoreAttribute(string attributeName, float defaultValue = 0)
public float GetRawCurrentCoreAttribute(string attributeName, float defaultValue = 0)
{
return coreAttributeGroup.current.GetValueOrDefault(attributeName, defaultValue);
}
public int GetRoundCurrentCoreAttribute(string attributeName, int defaultValue = 0)
public int GetCurrentCoreAttribute(string attributeName, int defaultValue = 0)
{
return coreAttributeGroup.current.GetRoundValue(attributeName, defaultValue);
}
public float GetCurrentGeneralAttribute(string attributeName, float defaultValue = 0)
public float GetRawGeneralAttribute(string attributeName, float defaultValue = 0)
{
return generalAttributeGroup.current.GetValueOrDefault(attributeName, defaultValue);
}
public int GetRoundCurrentGeneralAttribute(string attributeName, int defaultValue = 0)
public int GetGeneralAttribute(string attributeName, int defaultValue = 0)
{
return generalAttributeGroup.current.GetRoundValue(attributeName, defaultValue);
}
@@ -64,7 +64,7 @@ namespace Continentis.MainGame.Character
/// <returns>最终概率</returns>
public float Probability(string coreAttributeName, int requirement, bool higherPass = true, int additionalAmount = 0)
{
return Probability(GetRoundCurrentCoreAttribute(coreAttributeName), requirement, higherPass, additionalAmount);
return Probability(GetCurrentCoreAttribute(coreAttributeName), requirement, higherPass, additionalAmount);
}
/// <summary>
@@ -77,7 +77,7 @@ namespace Continentis.MainGame.Character
/// <returns>本次检定是否通过</returns>
public bool Check(string coreAttributeName, int requirement, bool higherPass = true, int additionalAmount = 0)
{
return Check(GetRoundCurrentCoreAttribute(coreAttributeName), requirement, higherPass, additionalAmount);
return Check(GetCurrentCoreAttribute(coreAttributeName), requirement, higherPass, additionalAmount);
}
private float Calculate(int value, int requirement)