Boolean modifier: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle mNo edit summary |
imported>Heeheehee m Removed some cruft by linking to the shiny new Modifiers page! |
||
Line 27: | Line 27: | ||
function_description=Accesses fields of your current modifiers for all of your current equipment and effects. This is the same mechanism that lets mafia decide whether you can adventure underwater, or how many songs you can keep in your head. <br /><br /> | function_description=Accesses fields of your current modifiers for all of your current equipment and effects. This is the same mechanism that lets mafia decide whether you can adventure underwater, or how many songs you can keep in your head. <br /><br /> | ||
For a list of fields that this function takes, see [[Modifiers]].| | |||
code1={{CodeSample| | code1={{CodeSample| |
Revision as of 23:59, 17 March 2010
Function Syntax
boolean boolean_modifier(string str )
int boolean_modifier(item it ,string str )
- it is the (optional) item in question
- str is the modifier name
Accesses fields of your current modifiers for all of your current equipment and effects. This is the same mechanism that lets mafia decide whether you can adventure underwater, or how many songs you can keep in your head.
For a list of fields that this function takes, see Modifiers.
Simple Example
Tells you if you can adventure underwater or not.
if(!(boolean_modifier("Adventure Underwater"))||!(boolean_modifier("Underwater Familiar"))) {
print("You can't adventure underwater. Either you won't be able to breathe, or your familiar won't.","red");
exit;
}
print("You can adventure underwater.")
See Also