ncrsn
Joined: 10 Feb 2006 Posts: 173
|
Posted: Sun Mar 02, 2008 9:25 pm Post subject: Syshook: AttackDelay |
|
|
I know mobile.delay_mod exists.
As far as I'm concerned, during combat, if mobile has an opponent, core calculates time to actually do the hit: this delay is based on mobile.delay_mod, weapon's speed, dexterity, at least. What I'm suggesting, is AttackDelayHook, which, if exists, is called every time core is about to do the above calculation. Needed parameters would be attacker and defender. Needless to say, should the script exist, it's return value would be used as delay before the swing (making the core's calculation unnecessary).
Having hook like this would make it easier to create more dynamic combat situations and strategies, like: if you don't move between hits, your delay between hits will slowly decrease. Or, should this be affected by stamina? That could be easily done. Using mobile.delay_mod is possibility, but management of all instances that could affect it's value would soon become hard. What if attacker switched his/her weapon? Drank a dexterity potion? Died? -- Using hook the value would not be needed to be managed in scripts, as it would be re-evaluated every now and then.
This, I understand, would be somewhat CPU intensive hook, but being optional it should not harm no-one - and comparing to attack hook, this should have close to no impact in overall. Still, it would be nice if somehow (config setting?) this could be set to affect PCs only. NPCs would be nice to have but way less important, if so happens that this drains the last cycles out of my CPU.
Is there something wrong in the idea or did I overlook some very special thing? You tell me. |
|