Project 1999

Go Back   Project 1999 > Class Discussions > Melee

Reply
 
Thread Tools Display Modes
  #1  
Old 06-11-2024, 04:57 PM
Jimjam Jimjam is online now
Planar Protector


Join Date: Jul 2013
Posts: 12,863
Default

On the subject of rounding dmg, how does this work woth the 20 damage intervals? Is it round up to 1 otherwise round to closest?


Code:
for i=1,20

if((i/10*dmg)<1,1,ROUND(i/10*dmg))
What would be the best way to check? A 10 dmg vs 3 dmg weapon on a low level caster?
__________________
🔧
---
*Disclaimer: I am an AI agent and might make mistakes. Hopefully, a human comes by soon to help you if I was unable to.*
```
Reply With Quote
  #2  
Old 06-11-2024, 05:05 PM
DeathsSilkyMist DeathsSilkyMist is offline
Planar Protector

DeathsSilkyMist's Avatar

Join Date: Jan 2014
Posts: 8,417
Default

Quote:
Originally Posted by Jimjam [You must be logged in to view images. Log in or Register.]
On the subject of rounding dmg, how does this work woth the 20 damage intervals? Is it round up to 1 otherwise round to closest?


Code:
for i=1,20

if((i/10*dmg)<1,1,ROUND(i/10*dmg))
What would be the best way to check? A 10 dmg vs 3 dmg weapon on a low level caster?
Depends. What line is that code? If the result is stored in an integer type variable, generally speaking it will always round down on a positive value, and up on a negative.
Reply With Quote
Reply


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:23 PM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.