Meat drop: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle mNo edit summary |
imported>Bale No edit summary |
||
Line 21: | Line 21: | ||
code= | code= | ||
<syntaxhighlight> | <syntaxhighlight> | ||
float monster_drop( | float monster_drop(monster mob) { | ||
int monster_drop = meat_drop( | int monster_drop = meat_drop(mob); | ||
float adjust_drop = monster_drop * (meat_drop_modifier() / 100); | float adjust_drop = monster_drop * (meat_drop_modifier() / 100.0 + 1); | ||
return adjust_drop; | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 06:25, 3 March 2010
needs(better_code_samples);
Function Syntax
Returns the base meat drop of the monster specified by m.
Code Samples
Uses your current meat drop modifier to determine how much you can expect to get, on average, from a monster.
float monster_drop(monster mob) {
int monster_drop = meat_drop(mob);
float adjust_drop = monster_drop * (meat_drop_modifier() / 100.0 + 1);
return adjust_drop;
}
See Also