More like math support :P

RoninGT

Citizen
Ok so I wont lie and say math is not my strong suit. So below is my problem

Code:
if ( FSHSR.HSRTournamentSystem.TournamentRunning() && skillValue >= 60.0 )
{
                double chance = ( skillValue - 60.0 ) / ( 560.0 - 60.0 ); // Default 12% Chance at 120??? Will Confirm.
             
                if ( DateTime.Now.DayOfWeek == FSHSR.HSRTournamentSystem.TournyOne && dungeon == true && chance > Utility.RandomDouble() )
                {
                    return typeof( ToxicTrout );
                }
                else if ( DateTime.Now.DayOfWeek == FSHSR.HSRTournamentSystem.TournyTwo && deepWater == true && chance > Utility.RandomDouble() )
                {
                    return typeof( CottonCandySwordfish );
                }
}

So if a player had say 120 skill (skillValue) and that math formula above... Would it not be a 12% chance??? or do I maybe need to go back to school :)

Ronin
 
Last edited:

Insanity

Rookie
C#:
double chance = ( skillValue - 60.0 ) / ( 560.0 - 60.0 );

Why start with 560 and subtract 60 before dividing? Why not just divide by 500 to begin with?

But yes, the min and max range for this formula would be 0.0-0.12