Beispiel #1
0
        public void UpdateRage(IOffensiveMeleeRageAbility ability, AbilityCheckState state)
        {
            // Can't crit yet
            if (state.ResourceKind == AbilityResourceKind.Gainer)
            {
                CurrentRage += ability.GetRageGain(false);
            }

            if (state.CanExecute)
            {
                CurrentRage -= ability.GetRageCost();
            }
        }
Beispiel #2
0
        public AbilityCheckState CanExecuteAbility(IOffensiveMeleeRageAbility ability, int maxRage)
        {
            AbilityCheckState state = new AbilityCheckState();

            if (ability.GetResourceKind() == AbilityResourceKind.Gainer)
            {
                state.CanExecute   = true;
                state.ResourceKind = AbilityResourceKind.Gainer;
            }

            if (CurrentRage < ability.GetRageCost())
            {
                state.CanExecute   = false;
                state.ResourceKind = AbilityResourceKind.Consumer;
            }
            state.CanExecute   = true;
            state.ResourceKind = AbilityResourceKind.Consumer;

            return(state);
        }