SpiritGuardian CounterAttack has bug
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user