Open Terotrous opened 1 month ago
Way ahead of ya, I already mentioned this in a random and cryptic comment!
/// <summary>
/// Stops the entity's movement and locks it in place.
/// </summary>
public void ApplyHold()
{
// Temporary implementation, replace with a proper state lock
// system. Read: Copy it over from Lela.
// --exec
lock (_holdSyncLock)
_holdCount++;
this.Stop();
this.Entity.Properties.Invalidate(PropertyName.MSPD);
}
For context, in our Mabi servers we have a lock system^^ This essentially allows you to lock certain features, like moving, talking, attacking, etc, either for a time or until unlocked manually. It's also layered, so a feature can be locked multiple times. Since this is a pretty universal system, I'm considering porting that.
I feel like knockdown might be a bit tricky since we don't have any obvious way of knowing how long it takes you to get back up. With a debuff like Stun it's obvious when it wears off, but for knockdown it might vary? For a skill like Wagon Wheel, it smacks you up into the air, and presumably you don't start getting up until you hit the ground again.
Well, technically we will know at some point, because it can all be calculated. Our current knock down class even has a time property. The only issue is that we don't have the algorithm to calculate the knock down distance and time yet.
There's a variety of states that an entity can be in that prevent it from taking certain actions, which we currently don't really have any support for. Among these, knockdown is kind of special because it's not tied to a buff, but we still need to be able to detect if an entity is in that state because some buffs do extra damage to knocked down targets.