ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Tue Feb 20, 2018 9:58 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Jan 01, 2018 3:19 pm 
Offline
Wayist

Joined: Sun Dec 10, 2017 12:27 am
Posts: 15
In combat.lua, the attackTargetWith function has the local variable repelled initialized just prior to the hook/callback 'combat:attackTargetWith:attackerBonuses', but not included in the passed table. This means the only way to add a new per-weapon evasion mechanic appears to be to superload the whole function.

The variables repelled, crit, evaded and deflect should be declared prior to the callback and passed. This would allow for easy insertion of new per-weapon defensive effects, and a nice refactoring of the function code as well.

EDIT: And I realize this is module code, so should really go in the ToME 4 Development subforum.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group