Experience bonus: Difference between revisions
Jump to navigation
Jump to search
imported>Grotfang m moved Experience bonus() to Experience bonus: Conformity |
imported>Bale mNo edit summary |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
a | {{ | ||
#vardefine:name|experience_bonus}}{{ | |||
#vardefine:return_type|float}}{{ | |||
FunctionPage| | |||
name={{#var:name}}| | |||
function1={{Function| | |||
name={{#var:name}}| | |||
aggregate={{#var:aggregate}}| | |||
return_type={{#var:return_type}}| | |||
return_also={{#var:return_also}} | |||
}}| | |||
function_description=Returns your current combined mainstat bonuses from familiar, equipment, monster level and effects. This is the bonus to mainstat, not total experience bonus to all stats so multiply by 2 if you want to know total experience bonus.| | |||
code1={{CodeSample| | |||
title=Code Sample| | |||
description=Evaluate the best choice for the Penultimate Fantasy Airship's "Random Lack of an Encounter".| | |||
code= | |||
<syntaxhighlight> | |||
float gallery_stats = min(combat_rate_modifier(), 0) /(-2.0) + 20; | |||
float encounter_stats = experience_bonus(); // Mainstat experience bonus | |||
if(monster_level_adjustment() >= 20) | |||
encounter_stats = encounter_stats + 15; // Mainstat bonus for fighting a MechaMech | |||
else | |||
encounter_stats = encounter_stats + 12; // Mainstat bonus for fighting a weak airship monster | |||
if(gallery_stats > encounter_stats) | |||
print("Best stat gains in the Penultimate Fantasy Airship are from non-combats."); | |||
else | |||
print("Best stat gains in the Penultimate Fantasy Airship are from monsters."); | |||
</syntaxhighlight> | |||
}}| | |||
special=Returns 0 when not logged in. | |||
}} | |||
[[Category:Your Character]] |
Latest revision as of 21:36, 21 May 2010
Function Syntax
float experience_bonus()
Returns your current combined mainstat bonuses from familiar, equipment, monster level and effects. This is the bonus to mainstat, not total experience bonus to all stats so multiply by 2 if you want to know total experience bonus.
Code Sample
Evaluate the best choice for the Penultimate Fantasy Airship's "Random Lack of an Encounter".
float gallery_stats = min(combat_rate_modifier(), 0) /(-2.0) + 20;
float encounter_stats = experience_bonus(); // Mainstat experience bonus
if(monster_level_adjustment() >= 20)
encounter_stats = encounter_stats + 15; // Mainstat bonus for fighting a MechaMech
else
encounter_stats = encounter_stats + 12; // Mainstat bonus for fighting a weak airship monster
if(gallery_stats > encounter_stats)
print("Best stat gains in the Penultimate Fantasy Airship are from non-combats.");
else
print("Best stat gains in the Penultimate Fantasy Airship are from monsters.");
Special
Returns 0 when not logged in.