Hey, i'm trying to make a RuneScape Classic calculator in Simba,
this is the formula for the RuneScape Classic calculator!(in Java):
Code:
public static double combatFormulaRSC(int attack, int strength, int defence, int hitpoints, int prayer, int ranged, int magic)
{
double combatLevel = ((defence + hitpoints) * 0.25) + ((magic + prayer) * 0.125);
double warrior = (attack + strength) * 0.25;
double ranger = ranged * 0.375;
return combatLevel + (((ranged * 1.5) > (attack + strength)) ? ranger : warrior);
}
I understand a bit of the calculator but i'm having a problem with this:
Code:
return combatLevel + (((ranged * 1.5) > (attack + strength)) ? ranger : warrior);
what does the '?' represent in the formula? and the (ranger: warrior) thanks in advance.