Raised This Month: $ Target: $400
 0% 

Damage Absorption


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 06-08-2010 , 09:41   Re: Damage Absorption
Reply With Quote #3

Asking a question and for some help...
That code is just how far I've gotten.
It's not manipulating the damage how I want to.
Say....
I do 75 damage on a player with 100hp and 100ap.

It should calculate 70% of the damage (75*0.7 = 52.5).
This is the damage absorbed.

The remaining 30% of the damage (75*0.3 = 22.5) should minus the players hp. (100 - 22.5 = 77.5)

With the damage absorbed values, it should half it (52.5 / 2 = 26.25) and deduct it from the player's armor. (100 - 26.26 = 73.75)

If player A with 100hp and 100ap gets damaged by 75. Player A should be left with 77.5hp and 73.75ap.

(I know the Engine will round the values in the end so I don't bother with it within the code)
__________________
It's a mystery.
Mini_Midget is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode