Max Additional Damage of Critical Hits

08/30/2013 18:03 raventh1984#1
Hello Epvpers,

I am wondering how can i add an restriction to the ADOCH type.

I want to try something out for testing purpose atm But i am not quite sure on how to add them. I have searched for DST_CRITICAL_BONUS and it shows in several files. I was thinking that i need the file MoverAttack.cpp and change it there. Any tips in this will be highly appreciated.
08/31/2013 16:52 Mognakor#2
Search for the getter-function of ADOCH.

And change it from something like this:

...
return m_ADOCH (ADOCH variable)
...

to

...
if(m_ADOCH>x)
return x
else
return m_ADOCH
...
09/02/2013 08:30 raventh1984#3
i this the correct way to do it?

PHP Code:
float fCriticalBonus    + (float)GetParamDST_CRITICAL_BONUS0  ) / 100.0F;
#ifdef __JEFF_11
        
if( fCriticalBonus 0.1F )
            
fCriticalBonus    0.1F;
        else if( 
fCriticalBonus 500 )
            
fCriticalBonus 150;
#endif    // __JEFF_11 
09/02/2013 10:14 Pumaaa#4
Code:
float fCriticalBonus    = 1 + (float)GetParam( DST_CRITICAL_BONUS, 0  ) / 100.0F;
#ifdef __JEFF_11
        if( fCriticalBonus < 0.1F )
            fCriticalBonus    = 0.1F;
        else if( fCriticalBonus > 500.0f )
            fCriticalBonus = 150.0f;
#endif    // __JEFF_11
09/02/2013 12:02 raventh1984#5
I have 1 final question in this matter then it can be closed.

how does the flyff source see this
500.0F is it 5000 or is it 500?

with kind regards.
09/02/2013 14:02 Pumaaa#6
Code:
        else if( fCriticalBonus > 500.0f )
            fCriticalBonus = 150.0f;
I see no reason why you want to set the CritBonus back to 150 when it is over 500, because that'd mean a player with 499 Critbonus would have far more bonus than a player with 501 CritBonus.

The 500.0f refers to a "float" value.

500 will be converted to the 500.0f in general, though using 500 instead of 500.0f will cause a warning because 500 is an int value, while 500.0f is as I said a float value.

The warning will be produced because int and float are different types, it would also produce a warning when you compare a unsigned int with a (signed) int.


To understand why it is like that , you should take a look at a documentation of the different types in C++.
09/02/2013 14:58 raventh1984#7
Yes i understand what you mean by it and i found it an excellent explanation.

The reason was that i wanted to test something out. i already was are that if someone has 499% it has better damage then someone over 500 still when i test things out i get some experience and such. This of course will not be implanted cause i see no reasons for it.

Again thank you for your effort.

#closerequest
09/02/2013 15:38 Reavern#8
Please report this next time.

#closed