protected void Finish(int cooldown) { if (ParentCharacter.Abilities.ContainsType(typeof(AceInTheHole))) { var ability = (ParentCharacter.Abilities.Single(a => a.GetType() == typeof(AceInTheHole)) as AceInTheHole); if (ability != null && ability.HasFreeAbility) { ability.HasFreeAbility = false; } else { CurrentCooldown = cooldown; } } else { CurrentCooldown = cooldown; } switch (Type) { case AbilityType.Normal: ParentCharacter.HasUsedNormalAbilityInPhaseBefore = true; //ParentCharacter.HasUsedBasicAttackInPhaseBefore = true; break; case AbilityType.Ultimatum: ParentCharacter.HasUsedUltimatumAbilityInPhaseBefore = true; break; case AbilityType.Passive: break; default: throw new ArgumentOutOfRangeException(); } Active.CleanAndTrySelecting(); AfterUseFinish?.Invoke(); }
protected void OnFailedUseFinish() { Active.CleanAndTrySelecting(); }