GCD / Global Cooldown
Global Cooldown or GCD for short, is a way to keep all abilities on a shared cooldown, which is the main difference
between this and the CooldownComponent
talked about before. All abilities require this and are subject to this,
however not all abilities must be affected by it.
IAbility
requires the implementation of a isOGCD
method that checks if the ability is off GCD (meaning not affected
by it).
PassiveAbility
will always return this as false, meaning passives cannot be on global cooldown.
Ability
however is more customizable, by default this is false (meaning all Ability
are affected by global
cooldowns). However this class also provides a setOGCD()
method which devs can call from the constructor of their
ability to put their abilities off GCD.
As of right now players will NEVER be affected by the GCD from Ability
. GCDs only being meant for NPCs at the moment.
This can be changed by implementing your own IAbility
, starting the GCD when the ability is used via GCDCapability.startGCD
and checking if the GCD is active via GCDCapability.isOnGCD
.
The GCD itself is entity specific, and is defined by an attribute called GCD
/
attribute.name.generic.mineminenomi.gcd
(default at 40 ticks, 2 seconds).