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:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Major update on combat engine (damage/armor calculations)
Author Message
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #9
RE: Major update on combat engine (damage/armor calculations)
(01-29-2015 11:55 AM)Coruja Wrote:  AR resist calculation:
It's the old pre-AOS combat engine. It uses only 1 damage type and 1 resist (AR).

Sphere always used a wrong AR formula, where the AR is always a random value between 0~AR (example: if you have 50 AR, you will resist a random 0~50 damage).
Now the AR calculation is fixed and it uses the correct AR formula:

max resist = AR * rand(7, 35) / 100
min resist = max / 2

total resist = rand( min, (max-min)+1 )
final damage = total damage - total resist

There is something weird about this formula.
For example:
Code:
DAMAGE=50
ARMOR=50
Max resist = 50 * 15 / 10 == 7,5
Min Resist = 7,5 /2 == 4
Total resist = Random between (4, (7,5-4)+1) //(this last formula will be min +1 everytime!
Total resist = Random between (4,4)
final damage = 50-4

The unique "RANDOM" PART OF THE CODE will be the 7,35
is this right?

[Image: 2hy9q0y.png]
09-10-2015 11:01 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Major update on combat engine (damage/armor calculations) - Lazarus - 09-10-2015 11:01 AM

Forum Jump:


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