56 Runs the function `func` on all hedgehogs in the specified clan (`clan` = clan ID). |
60 Runs the function `func` on all hedgehogs in the specified clan (`clan` = clan ID). |
57 |
61 |
58 === `runOnHogsInOtherClans(func, clan)` === |
62 === `runOnHogsInOtherClans(func, clan)` === |
59 Runs the function `func` on all hedgehogs but those in the specified clan (`clan` = clan ID). |
63 Runs the function `func` on all hedgehogs but those in the specified clan (`clan` = clan ID). |
60 |
64 |
|
65 == Helper functions == |
|
66 === `getFirstHogOfClan(clan)` === |
|
67 Returns the first hedgehog (alive or not) in the clan with clan ID `clan`. |
|
68 |
61 == Key-value storage == |
69 == Key-value storage == |
62 For tracked gears, teams and clans, you can assign an arbitrary number of values. Each tracked object will have a simple key-value storage. Any data type (besides `nil`) can be used for keys and values. |
70 For tracked gears, teams and clans, you can assign an arbitrary number of values. Each tracked object will have a simple key-value storage. Any data type (besides `nil`) can be used for keys and values. Initially, all keys have the value `nil`. |
63 |
71 |
64 === `getGearValue(gear, key)` === |
72 === `getGearValue(gear, key)` === |
65 Returns the gear value of the given gear and key. |
73 Returns the gear value of the given `gear` for `key`. |
66 |
74 |
67 === `setGearValue(gear, key, value)` === |
75 === `setGearValue(gear, key, value)` === |
68 Sets the gear value with given `key` to `value`. |
76 Sets the gear value for given `key` to `value`. |
69 |
77 |
70 === `increaseGearValue(gear, value)` === |
78 === `increaseGearValue(gear, key)` === |
71 Increase a gear value by 1. This function *must not* be called if the current value is not a number. |
79 Increases the gear value for `key` by 1. This function *must not* be called if the current value is not a number. |
72 |
80 |
73 === `decreaseGearValue(gear, value)` === |
81 === `decreaseGearValue(gear, key)` === |
74 Decrease a gear value by 1. This function *must not* be called if the current value is not a number. |
82 Decreases the gear value for `key` by 1. This function *must not* be called if the current value is not a number. |
75 |
83 |
76 === `getTeamValue(team, key)` === |
84 === `getTeamValue(team, key)` === |
77 Returns the value of the given team (`team` is the team name) for the specified `key`. |
85 Returns the value of the given team (`team` is the team name) for the specified `key`. |
78 |
86 |
79 === `setTeamValue(team, key, value)` === |
87 === `setTeamValue(team, key, value)` === |
80 Sets the team value with given `key` to `value`. `team` is the team name. |
88 Sets the team value with given `key` to `value`. `team` is the team name. |
81 |
89 |
82 === `increaseTeamValue(team, key)` === |
90 === `increaseTeamValue(team, key)` === |
83 Increase a team value by 1. `team` is the team name. This function *must not* be called if the current value is not a number. |
91 Increases the team value for `key` by 1. `team` is the team name. This function *must not* be called if the current value is not a number. |
84 |
92 |
85 === `decreaseTeamValue(team, key)` === |
93 === `decreaseTeamValue(team, key)` === |
86 Decrease a team value by 1. `team` is the team name. This function *must not* be called if the current value is not a number. |
94 Decreases the team value for `key` by 1. `team` is the team name. This function *must not* be called if the current value is not a number. |
87 |
95 |
88 === `getClanValue(team, key)` === |
96 === `getClanValue(clan, key)` === |
89 Returns the value of the given clan (`clan` is the clan ID) for the specified `key`. |
97 Returns the value of the given clan (`clan` is the clan ID) for the specified `key`. |
90 |
98 |
91 === `setClanalue(team, key, value)` === |
99 === `setClanValue(clan, key, value)` === |
92 Sets the clan value with given `key` to `value`. `clan` is the clan ID. |
100 Sets the clan value with given `key` to `value`. `clan` is the clan ID. |
93 |
101 |
94 === `increaseClanValue(team, key)` === |
102 === `increaseClanValue(clan, key)` === |
95 Increase a clan value by 1. `clan` is the clan ID. This function *must not* be called if the current value is not a number. |
103 Increases the clan value for `key` by 1. `clan` is the clan ID. This function *must not* be called if the current value is not a number. |
96 |
104 |
97 === `decreaseClanValue(team, key)` === |
105 === `decreaseClanValue(clan, key)` === |
98 Decrease a clan value by 1. `clan` is the clan ID. This function *must not* be called if the current value is not a number. |
106 Decreases the clan value for `key` by 1. `clan` is the clan ID. This function *must not* be called if the current value is not a number. |
99 |
|
100 == Convenience functions == |
|
101 === `getFirstHogOfClan(clan)` === |
|
102 Returns the first hedgehog (alive or not) in the clan with clan ID `clan`. |
|