FutureProg functions

addmagicresource

Magiccomputer function, computer program, standard futureprog

Overload 1

addmagicresource overload 1

Number addmagicresource(MagicResourceHaver thing, Number resourceId, Number amount)
Available in
  • computer function
  • computer program
  • standard futureprog
Adds to the specified magic resource on a character, item, or room and returns the resulting clamped amount.
ParameterTypeDescription
thing MagicResourceHaver The character, item, or room whose magic resource level should be altered
resourceId Number The id of the magic resource to alter
amount Number The amount to set, add, or subtract

Overload 2

addmagicresource overload 2

Number addmagicresource(MagicResourceHaver thing, Text resource, Number amount)
Available in
  • computer function
  • computer program
  • standard futureprog
Adds to the specified magic resource on a character, item, or room and returns the resulting clamped amount.
ParameterTypeDescription
thing MagicResourceHaver The character, item, or room whose magic resource level should be altered
resource Text The name or id of the magic resource to alter
amount Number The amount to set, add, or subtract