glqgamemaster/Gentle-Love-Quest — pull request #19 by gegerlan (2012-01-02 01:05:16+00:00)
Title: Added methods to Game_Party for easier handling of attributes.

Game_Party
:sum(attribute)
returns the sum of the given attribute for all members of the party.
:max(attribute)
returns the highest attribute value that exists in the party.
:min(attribute)
returns the lowest attribute value that exists in the party.
:raise(attribute, delta, max)
calls raise for all members of the party.
:lower(attribute, delta, min)
calls lower for all members of the party.

Example
$game_party.raise("pervert", 10, 50) # raise the pervert attribute for all party members, up to 50
$game_party.sum(pervert)
=> 20 # 10 + 10
$game_party.avg("pervert")
=> 10 # (10 + 10) / 2