SpiritGuardian CounterAttack has bug

This commit is contained in:
FrazeRIP
2025-11-12 01:20:19 -06:00
parent 52a7c2e00e
commit 92668e1b20
19 changed files with 261 additions and 40 deletions

View File

@@ -14,31 +14,35 @@ namespace Continentis.Mods.Basic.Buffs
this.contentSubmodule = new ContentSubmodule(this)
.AddParameterGetter("Stack", () => unitedStackSubmodule.stackAmount.ToString())
.AddParameterGetter("Count", () => actionCountSubmodule.remainingCount.ToString());
this.iconSubmodule = new IconSubmodule(this);
this.unitedStackSubmodule = new UnitedStackSubmodule(this, stack);
this.actionCountSubmodule = new CountSubmodule(this, count);
this.eventSubmodule = new EventSubmodule(this);
this.eventSubmodule.onGetAttacked.Add("EstablishFormation", new PrioritizedAction<AttackResult>(atkResult =>
{
attachedCharacter.Attack(atkResult.attacker, unitedStackSubmodule.stackAmount, null, false, true);
}));
this.eventSubmodule.onRoundStart.Add("EstablishFormation", new PrioritizedAction(() =>
{
this.Remove();
}));
}
public override bool OnBuffApply(out CharacterCombatBuffBase existingBuff)
public override bool OnBuffApply(out CharacterCombatBuffBase existingBuff)
{
MainGameManager.Instance.basePrefabs.GenerateInfoText(contentSubmodule.displayName, attachedCharacter.characterView);
if (FindExistingSameBuff(out existingBuff))
{
existingBuff.unitedStackSubmodule.PickHigherStack(this.unitedStackSubmodule);
existingBuff.actionCountSubmodule.PickHigherCount(this.actionCountSubmodule);
return false;
}
return true;
}
}