The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Combat engine / Targetted Hit
Author Message
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #7
RE: Combat engine / Targetted Hit
the combat engine have 2 parts: one calculate the attack damage (@Hit), and the other one (@GetHit) will apply armor calculation over this damage -already defined before- by @Hit

but the problem of the current engine is that it doesnt follow this rule, it still calculate the damage value even when applying the armor calculation (where the damage value must be already set, not in progress), and @GetHit is called even when the armor calculation still unfinished

so the only difference is that @GetHit now will be called at the right moment (after the armor calculation, and not before), nothing more. The real damage -before- armor calculation still fully acessible on @Hit, which is where all damage values are calculated. And @GetHit will just apply armor calculations over this damage value already defined before on @Hit

the call sequence is something like this:
1) sphere does all damage calculations and call @Hit (ARGN1 is exactly the real attack damage including all damage bonuses)
3) now apply armor calculations and call @GetHit (ARGN1 is exactly the final damage that the char will get)
(This post was last modified: 01-20-2015 08:45 AM by Coruja.)
01-20-2015 08:37 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Coruja's post
Post Reply 


Messages In This Thread
Combat engine / Targetted Hit - Coruja - 01-19-2015, 11:39 AM
RE: Combat engine / Targetted Hit - Coruja - 01-20-2015, 03:27 AM
RE: Combat engine / Targetted Hit - Coruja - 01-20-2015 08:37 AM
RE: Combat engine / Targetted Hit - Coruja - 01-20-2015, 11:58 AM
RE: Combat engine / Targetted Hit - Coruja - 01-21-2015, 11:18 AM
RE: Combat engine / Targetted Hit - XuN - 03-21-2015, 06:00 PM

Forum Jump:


User(s) browsing this thread: 3 Guest(s)