diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-04-05 20:55:25 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-04-07 15:28:25 +0200 |
commit | c92f7bf932d6e36c1aecd704a2a69d742ef7748d (patch) | |
tree | fbcc218187413a4e734d54de12194e53a9f00224 | |
parent | bfa8fa32382c89259dbf4f9301b316b7e0239344 (diff) |
Lua: Remove HOOK_GF_EXEC and HOOK_GF_COLOR
-rw-r--r-- | lib/core/s_aux.lua | 29 | ||||
-rw-r--r-- | lib/mods/theme/core/s_aux.lua | 29 | ||||
-rw-r--r-- | lib/mods/theme/scpt/gods_new.lua | 16 | ||||
-rw-r--r-- | lib/mods/theme/scpt/mkeys.lua | 16 | ||||
-rw-r--r-- | lib/mods/theme/scpt/s_geom.lua | 20 | ||||
-rw-r--r-- | lib/scpt/mkeys.lua | 16 | ||||
-rw-r--r-- | lib/scpt/s_geom.lua | 20 | ||||
-rw-r--r-- | src/defines.h | 7 | ||||
-rw-r--r-- | src/spells.pkg | 11 | ||||
-rw-r--r-- | src/spells1.c | 149 | ||||
-rw-r--r-- | src/util.pkg | 156 |
11 files changed, 98 insertions, 371 deletions
diff --git a/lib/core/s_aux.lua b/lib/core/s_aux.lua index 29b22fd7..97643626 100644 --- a/lib/core/s_aux.lua +++ b/lib/core/s_aux.lua @@ -621,32 +621,3 @@ end function activate_activation(spl, item) __spell_spell[spl](item) end - - -------- Add new GF type ---------- -max_gf = MAX_GF -function add_spell_type(t) - t.index = max_gf - max_gf = max_gf + 1 - assert(t.color, "No GF color") - if not t.monster then t.monster = function() end end - if not t.angry then t.angry = function() end end - if not t.object then t.object = function() end end - if not t.player then t.player = function() end end - if not t.grid then t.grid = function() end end - - add_hooks - { - [HOOK_GF_COLOR] = function (gf, new_gfx) - local t = %t - if gf == t.index then return TRUE, t.color[new_gfx + 1] end - end, - [HOOK_GF_EXEC] = function (action, who, gf, dam, rad, y, x, extra) - local t = %t - if t.index == gf then - return t[action](who, dam, rad, y, x, extra) - end - end, - } - return t.index -end diff --git a/lib/mods/theme/core/s_aux.lua b/lib/mods/theme/core/s_aux.lua index 29b22fd7..97643626 100644 --- a/lib/mods/theme/core/s_aux.lua +++ b/lib/mods/theme/core/s_aux.lua @@ -621,32 +621,3 @@ end function activate_activation(spl, item) __spell_spell[spl](item) end - - -------- Add new GF type ---------- -max_gf = MAX_GF -function add_spell_type(t) - t.index = max_gf - max_gf = max_gf + 1 - assert(t.color, "No GF color") - if not t.monster then t.monster = function() end end - if not t.angry then t.angry = function() end end - if not t.object then t.object = function() end end - if not t.player then t.player = function() end end - if not t.grid then t.grid = function() end end - - add_hooks - { - [HOOK_GF_COLOR] = function (gf, new_gfx) - local t = %t - if gf == t.index then return TRUE, t.color[new_gfx + 1] end - end, - [HOOK_GF_EXEC] = function (action, who, gf, dam, rad, y, x, extra) - local t = %t - if t.index == gf then - return t[action](who, dam, rad, y, x, extra) - end - end, - } - return t.index -end diff --git a/lib/mods/theme/scpt/gods_new.lua b/lib/mods/theme/scpt/gods_new.lua index 8153d453..9a020915 100644 --- a/lib/mods/theme/scpt/gods_new.lua +++ b/lib/mods/theme/scpt/gods_new.lua @@ -192,14 +192,6 @@ GOD_VARDA = add_god player.cur_lite = player.cur_lite + 1 end end, - [HOOK_GF_EXEC] = function (target, who, type, dam, r, y, x, m_ptr) - if (player.pgod == GOD_VARDA) then - if ((type == GF_LITE) or (type == GF_LITE_WEAK)) then - -- Raise piety for using lite - set_grace(player.grace + 1) - end - end - end, }, } @@ -276,14 +268,6 @@ GOD_ULMO = add_god end end end, - [HOOK_GF_EXEC] = function (target, who, type, dam, r, y, x, m_ptr) - if (player.pgod == GOD_ULMO) then - if ((type == GF_FIRE) or (type == GF_HELL_FIRE) or (type == GF_HOLY_FIRE) or (type == GF_LAVA_FLOW) or (type == GF_METEOR) or (type == GF_NUKE) or (type == GF_PLASMA)) then - -- Reduce piety for using any kind of fire magic - set_grace(player.grace - 5) - end - end - end, [HOOK_PROCESS_WORLD] = function() if (player.pgod == GOD_ULMO) then GRACE_DELAY = GRACE_DELAY + 1 diff --git a/lib/mods/theme/scpt/mkeys.lua b/lib/mods/theme/scpt/mkeys.lua index 07105c64..96fc2934 100644 --- a/lib/mods/theme/scpt/mkeys.lua +++ b/lib/mods/theme/scpt/mkeys.lua @@ -1,21 +1,5 @@ -- Mkeys for skills & abilities -GF_INSTA_DEATH = add_spell_type -{ - ["color"] = { TERM_DARK, 0 }, - ["angry"] = function() return TRUE, TRUE end, - ["monster"] = function(who, dam, rad, y, x, monst) - local race = race_info_idx(monst.r_idx, monst.ego) - if magik(5) == FALSE or band(race.flags1, RF1_UNIQUE) ~= FALSE or band(race.flags3, RF3_UNDEAD) ~= FALSE or band(race.flags3, RF3_NONLIVING) ~= FALSE then - return TRUE, FALSE - else - -- Reduce the exp gained this way - monst.level = monst.level / 3 - return TRUE, FALSE, 32535, 0, 0, 0, 0, 0, 0, 0, " faints.", " is sucked out of life." - end - end, -} - -- Death touch ability add_mkey { diff --git a/lib/mods/theme/scpt/s_geom.lua b/lib/mods/theme/scpt/s_geom.lua index b9730318..52ebd49a 100644 --- a/lib/mods/theme/scpt/s_geom.lua +++ b/lib/mods/theme/scpt/s_geom.lua @@ -31,17 +31,6 @@ function geomancy_random_wall(y, x) end -GF_ELEMENTAL_WALL = add_spell_type -{ - ["color"] = { TERM_GREEN, 0 }, - ["angry"] = function() return TRUE, FALSE end, - ["grid"] = function(who, dam, rad, y, x) - if player.py ~= y or player.px ~= x then - geomancy_random_wall(y, x) - end - end, -} - function geomancy_random_floor(y, x, kill_wall) local c_ptr = cave(y, x) @@ -81,15 +70,6 @@ function geomancy_random_floor(y, x, kill_wall) end -GF_ELEMENTAL_GROWTH = add_spell_type -{ - ["color"] = { TERM_GREEN, 0 }, - ["angry"] = function() return TRUE, FALSE end, - ["grid"] = function(who, dam, rad, y, x) - geomancy_random_floor(y, x) - end, -} - CALL_THE_ELEMENTS = add_spell { ["name"] = "Call the Elements", diff --git a/lib/scpt/mkeys.lua b/lib/scpt/mkeys.lua index 07105c64..96fc2934 100644 --- a/lib/scpt/mkeys.lua +++ b/lib/scpt/mkeys.lua @@ -1,21 +1,5 @@ -- Mkeys for skills & abilities -GF_INSTA_DEATH = add_spell_type -{ - ["color"] = { TERM_DARK, 0 }, - ["angry"] = function() return TRUE, TRUE end, - ["monster"] = function(who, dam, rad, y, x, monst) - local race = race_info_idx(monst.r_idx, monst.ego) - if magik(5) == FALSE or band(race.flags1, RF1_UNIQUE) ~= FALSE or band(race.flags3, RF3_UNDEAD) ~= FALSE or band(race.flags3, RF3_NONLIVING) ~= FALSE then - return TRUE, FALSE - else - -- Reduce the exp gained this way - monst.level = monst.level / 3 - return TRUE, FALSE, 32535, 0, 0, 0, 0, 0, 0, 0, " faints.", " is sucked out of life." - end - end, -} - -- Death touch ability add_mkey { diff --git a/lib/scpt/s_geom.lua b/lib/scpt/s_geom.lua index b9730318..52ebd49a 100644 --- a/lib/scpt/s_geom.lua +++ b/lib/scpt/s_geom.lua @@ -31,17 +31,6 @@ function geomancy_random_wall(y, x) end -GF_ELEMENTAL_WALL = add_spell_type -{ - ["color"] = { TERM_GREEN, 0 }, - ["angry"] = function() return TRUE, FALSE end, - ["grid"] = function(who, dam, rad, y, x) - if player.py ~= y or player.px ~= x then - geomancy_random_wall(y, x) - end - end, -} - function geomancy_random_floor(y, x, kill_wall) local c_ptr = cave(y, x) @@ -81,15 +70,6 @@ function geomancy_random_floor(y, x, kill_wall) end -GF_ELEMENTAL_GROWTH = add_spell_type -{ - ["color"] = { TERM_GREEN, 0 }, - ["angry"] = function() return TRUE, FALSE end, - ["grid"] = function(who, dam, rad, y, x) - geomancy_random_floor(y, x) - end, -} - CALL_THE_ELEMENTS = add_spell { ["name"] = "Call the Elements", diff --git a/src/defines.h b/src/defines.h index 1569012b..e0851fd4 100644 --- a/src/defines.h +++ b/src/defines.h @@ -2674,7 +2674,10 @@ #define GF_TRAP_DEMONSOUL 108 #define GF_ATTACK 109 #define GF_CHARM_UNMOVING 110 -#define MAX_GF 111 +#define GF_INSTA_DEATH 111 +#define GF_ELEMENTAL_WALL 112 +#define GF_ELEMENTAL_GROWTH 113 +#define MAX_GF 114 /* * Some things which induce learning @@ -4488,8 +4491,6 @@ #define HOOK_EAT 55 #define HOOK_DIE 56 #define HOOK_CALC_HP 57 -#define HOOK_GF_COLOR 58 -#define HOOK_GF_EXEC 59 #define HOOK_CALC_MANA 60 #define HOOK_LOAD_END 61 #define HOOK_RECALL 62 diff --git a/src/spells.pkg b/src/spells.pkg index cbbc2dc5..5575d0f4 100644 --- a/src/spells.pkg +++ b/src/spells.pkg @@ -340,8 +340,17 @@ typedef unsigned int u32b; /** @def GF_CHARM_UNMOVING */ #define GF_CHARM_UNMOVING 110 +/** @def GF_INSTA_DEATH */ +#define GF_INSTA_DEATH 111 + +/** @def GF_ELEMENTAL_WALL */ +#define GF_ELEMENTAL_WALL 112 + +/** @def GF_ELEMENTAL_GROWTH */ +#define GF_ELEMENTAL_GROWTH 113 + /** @def MAX_GF */ -#define MAX_GF 111 +#define MAX_GF 114 /** @} */ /** @name Spell Projection Flags diff --git a/src/spells1.c b/src/spells1.c index 9bfc6fe2..e99bbc23 100644 --- a/src/spells1.c +++ b/src/spells1.c @@ -939,6 +939,36 @@ void recall_player(int d, int f) } +/* + * Check the gods + */ +static void project_check_gods(int typ) +{ + if (p_ptr->pgod == get_god_VARDA()) + { + if ((typ == GF_LITE) || (typ == GF_LITE_WEAK)) + { + /* Raise piety for using lite */ + set_grace(p_ptr->grace + 1); + } + } + + if (p_ptr->pgod == get_god_ULMO()) + { + if ((typ == GF_FIRE) || + (typ == GF_HELL_FIRE) || + (typ == GF_HOLY_FIRE) || + (typ == GF_LAVA_FLOW) || + (typ == GF_METEOR) || + (typ == GF_NUKE) || + (typ == GF_PLASMA)) + { + /* Reduce piety for using any kind of fire magic */ + set_grace(p_ptr->grace - 5); + } + } +} + /* * Get a legal "multi-hued" color for drawing "spells" @@ -988,12 +1018,6 @@ static byte mh_attr(int max) */ byte spell_color(int type) { - /* Hooks! */ - if (process_hooks_ret(HOOK_GF_COLOR, "d", "(d,d)", type, streq(ANGBAND_GRAF, "new"))) - { - return process_hooks_return[0].num; - } - /* Check if A.B.'s new graphics should be used (rr9) */ if (streq(ANGBAND_GRAF, "new")) { @@ -1075,6 +1099,11 @@ byte spell_color(int type) case GF_TELEKINESIS: case GF_DOMINATION: return (0x09); + case GF_INSTA_DEATH: + return 0; + case GF_ELEMENTAL_WALL: + case GF_ELEMENTAL_GROWTH: + return 0; } } @@ -1161,6 +1190,11 @@ byte spell_color(int type) case GF_TELEKINESIS: case GF_DOMINATION: return (randint(3) != 1 ? TERM_L_BLUE : TERM_WHITE); + case GF_INSTA_DEATH: + return TERM_DARK; + case GF_ELEMENTAL_WALL: + case GF_ELEMENTAL_GROWTH: + return TERM_GREEN; } } @@ -2975,6 +3009,9 @@ static bool_ project_f(int who, int r, int y, int x, int dam, int typ) /* Remember if the grid is with the LoS of player */ seen = player_can_see_bold(y, x); + /* Check gods */ + project_check_gods(typ); + /* Analyze the type */ switch (typ) { @@ -3793,14 +3830,19 @@ static bool_ project_f(int who, int r, int y, int x, int dam, int typ) obvious = TRUE; break; } - default: + + case GF_ELEMENTAL_WALL: { - /* Hooks! */ - if (process_hooks_ret(HOOK_GF_EXEC, "dd", "(s,d,d,d,d,d,d)", "grid", who, typ, dam, r, y, x)) - { - obvious = process_hooks_return[0].num; - flag = process_hooks_return[1].num; + if ((p_ptr->py != y) || (p_ptr->px != x)) { + exec_lua(format("geomancy_random_wall(%d,%d);", y, x)); } + + break; + } + + case GF_ELEMENTAL_GROWTH: + { + exec_lua(format("geomancy_random_floor(%d, %d)", y, x)); break; } } @@ -3879,6 +3921,8 @@ static bool_ project_o(int who, int r, int y, int x, int dam, int typ) /* Reduce damage by distance */ dam = (dam + r) / (r + 1); + /* Check new gods. */ + project_check_gods(typ); /* Scan all objects in the grid */ for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx) @@ -4173,15 +4217,7 @@ static bool_ project_o(int who, int r, int y, int x, int dam, int typ) break; } default: - { - /* Hooks! */ - if (process_hooks_ret(HOOK_GF_EXEC, "dd", "(s,d,d,d,d,d,d,O)", "object", who, typ, dam, r, y, x, o_ptr)) - { - obvious = process_hooks_return[0].num; - do_kill = process_hooks_return[1].num; - } - break; - } + break; } @@ -4385,6 +4421,9 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ) dam = (dam + r) / (r + 1); + /* Check gods */ + project_check_gods(typ); + /* Get the monster name (BEFORE polymorphing) */ monster_desc(m_name, m_ptr, 0); @@ -4484,14 +4523,13 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ) if (r_ptr->flags3 & RF3_HURT_LITE) get_angry = TRUE; break; - default: - /* Hooks! */ - if (process_hooks_ret(HOOK_GF_EXEC, "d", "(s,d,d,d,d,d,d,M)", "angry", who, typ, dam, r, y, x, m_ptr)) - { - get_angry = process_hooks_return[0].num; - } - else - get_angry = TRUE; + case GF_INSTA_DEATH: + get_angry = TRUE; + break; + case GF_ELEMENTAL_GROWTH: + case GF_ELEMENTAL_WALL: + get_angry = FALSE; + break; } /* Now anger it if appropriate */ @@ -6746,36 +6784,25 @@ bool_ project_m(int who, int r, int y, int x, int dam, int typ) break; } - /* Default */ - default: + case GF_INSTA_DEATH: { - /* Hooks! */ - if (process_hooks_ret(HOOK_GF_EXEC, "dddddddddss", "(s,d,d,d,d,d,d,M)", "monster", who, typ, dam, r, y, x, m_ptr)) - { - obvious = process_hooks_return[0].num; - dam = process_hooks_return[1].num; - do_stun = process_hooks_return[2].num; - do_fear = process_hooks_return[3].num; - do_conf = process_hooks_return[4].num; - do_dist = process_hooks_return[5].num; - do_pois = process_hooks_return[6].num; - do_cut = process_hooks_return[7].num; - do_poly = process_hooks_return[8].num; - if (process_hooks_return[9].str != NULL) - note = process_hooks_return[9].str; - if (process_hooks_return[10].str != NULL) - note_dies = process_hooks_return[10].str; - } - else - { - /* Irrelevant */ + if (magik(95) && !(r_ptr->flags1 & RF1_UNIQUE) && !(r_ptr->flags3 & RF3_UNDEAD) && !(r_ptr->flags3 & RF3_NONLIVING)) { + /* Kill outright, but reduce exp. */ + m_ptr->level = m_ptr->level / 3; + dam = 32535; /* Should be enough */ + note = " faints."; + note_dies = " is sucked out of life."; + } else { + /* No effect */ skipped = TRUE; - - /* No damage */ - dam = 0; } + break; } + + default: + skipped = TRUE; + break; } @@ -8018,17 +8045,9 @@ static bool_ project_p(int who, int r, int y, int x, int dam, int typ, int a_rad /* Default */ default: { - /* Hooks! */ - if (process_hooks_ret(HOOK_GF_EXEC, "dd", "(s,d,d,d,d,d,d)", "player", who, typ, dam, r, y, x)) - { - obvious = process_hooks_return[0].num; - dam = process_hooks_return[1].num; - } - else - { - /* No damage */ - dam = 0; - } + /* No damage */ + dam = 0; + break; } } diff --git a/src/util.pkg b/src/util.pkg index 183a28f2..50f69e79 100644 --- a/src/util.pkg +++ b/src/util.pkg @@ -713,162 +713,6 @@ typedef unsigned int u32b; */ #define HOOK_CALC_HP 57 -/** @def HOOK_GF_COLOR - * @brief Set color for spell. - * @param Number type \n type of spell. - * @brief Type - * @param Number file \n if this is 0 use ANGBAND_GRAF, otherwise use "new". - * @brief File - * @return Boolean \n TRUE if hook sets a color, otherwise FALSE. - * @return Number color \n The color for the spell. - * @note - * If the hook returns TRUE, spell_color() returns the hook's color, otherwise - * the function continues. - * @note (see file spells1.c) - */ -#define HOOK_GF_COLOR 58 - -/** @def HOOK_GF_EXEC - * @brief A spell to damage terrain features.\n - * @param String target \n "grid" to indicate spell damages terrain. - * @brief Target - * @param Number who \n the source of the spell. - * @brief Source - * @param Number type \n the type of spell. - * @brief Type - * @param Number dam \n the number of hit points of damage. - * @brief Damage - * @param Number r \n the radius of the spell. - * @brief Radius - * @param Number y \n the y-coordinate of the target. - * @brief Y-coordinate - * @param Number x \n the x-coordinate of the target. - * @brief X-coordinate - * @return Boolean \n TRUE if spell was cast, otherwise FALSE. - * @return Number obvious \n TRUE if the player notices the spell, otherwise - * FALSE. - * @return Number flag \n TRUE if the player is affected, otherwise FALSE. - * @note - * If the hook returns TRUE, the hook sets the "obvious" and "flag" fields. - * @note (see file spells1.c) - */ -/** @def HOOK_GF_EXEC - * @brief A spell to damage objects.\n - * @param String target \n "object" to indicate spell damages objects. - * @brief Target - * @param Number who \n the source of the spell. - * @brief Source - * @param Number type \n the type of spell. - * @brief Type - * @param Number dam \n the number of hit points of damage. - * @brief Damage - * @param Number r \n the radius of the spell. - * @brief Radius - * @param Number y \n the y-coordinate of the target. - * @brief Y-coordinate - * @param Number x \n the x-coordinate of the target. - * @brief X-coordinate - * @param Object o_ptr \n the object which is the target of the spell. - * @brief Object - * @return Boolean \n TRUE if spell was cast, otherwise FALSE. - * @return Number obvious \n TRUE if the player notices the spell, otherwise - * FALSE. - * @return Number flag \n TRUE if the player is affected, otherwise FALSE. - * @note - * If the hook returns TRUE, the hook sets the "obvious" and "do_kill" fields. - * @note (see file spells1.c) - */ -/** @def HOOK_GF_EXEC - * @brief A spell to damage monsters.\n - * @param String target \n "angry" to indicate spell angers a friend. - * @brief Target - * @param Number who \n the source of the spell. - * @brief Source - * @param Number type \n the type of spell. - * @brief Type - * @param Number dam \n the number of hit points of damage. - * @brief Damage - * @param Number r \n the radius of the spell. - * @brief Radius - * @param Number y \n the y-coordinate of the target. - * @brief Y-coordinate - * @param Number x \n the x-coordinate of the target. - * @brief X-coordinate - * @param Monster m_ptr \n the monster which is the target of the spell. - * @brief Monster - * @return Boolean \n TRUE if spell was cast, otherwise FALSE. - * @return Number get_angry \n TRUE if the monster gets angry, otherwise FALSE. - * @note - * If the hook returns TRUE, the hook sets the "get_angry" field. - * @note (see file spells1.c) - */ -/** @def HOOK_GF_EXEC - * @brief A spell to damage monsters.\n - * @param String target \n "monster" to indicate spell damages monsters. - * @brief Target - * @param Number who \n the source of the spell. - * @brief Source - * @param Number type \n the type of spell. - * @brief Type - * @param Number dam \n the number of hit points of damage. - * @brief Damage - * @param Number r \n the radius of the spell. - * @brief Radius - * @param Number y \n the y-coordinate of the target. - * @brief Y-coordinate - * @param Number x \n the x-coordinate of the target. - * @brief X-coordinate - * @param Monster m_ptr \n the monster which is the target of the spell. - * @brief Monster - * @return Boolean \n TRUE if spell was cast, otherwise FALSE. - * @return Number obvious \n TRUE if the player notices the spell, otherwise - * FALSE. - * @return Number dam \n The damage the monster takes. - * @return Number do_stun \n TRUE if the monster is stunned, otherwise FALSE. - * @return Number do_fear \n TRUE if the monster is frightened, otherwise - * FALSE. - * @return Number do_conf \n TRUE if the monster is confused, otherwise FALSE. - * @return Number do_dist \n TRUE if the monster is disturbed, otherwise FALSE. - * @return Number do_pois \n TRUE if the monster is poisoned, otherwise FALSE. - * @return Number do_cut \n TRUE if the monster is wounded, otherwise FALSE. - * @return Number do_poly \n TRUE if the monster is polymorphed, otherwise - * FALSE. - * @return String note \n The message displayed if the monster if affected. - * @return String note_dies \n The message displayed if the monster dies. - * @note - * If the hook returns TRUE, the hook sets the "obvious", "dam", "do_stun", - * "do_fear", "do_conf", "do_dist", "do_pois", "do_cut", "do_poly", "note", - * and "note dies" fields, otherwise the spell has no effect and does no - * damage. - * @note (see file spells1.c) - */ -/** @def HOOK_GF_EXEC - * @brief A spell to damage the player.\n - * @param String target \n "player" to indicate spell damages the player. - * @brief Target - * @param Number who \n the source of the spell. - * @brief Source - * @param Number type \n the type of spell. - * @brief Type - * @param Number dam \n the number of hit points of damage. - * @brief Damage - * @param Number r \n the radius of the spell. - * @brief Radius - * @param Number y \n the y-coordinate of the target. - * @brief Y-coordinate - * @param Number x \n the x-coordinate of the target. - * @brief X-coordinate - * @return Boolean \n TRUE if spell was cast, otherwise FALSE. - * @return Number obvious \n TRUE if the player notices the spell, otherwise - * FALSE. - * @return Number dam \n The damage the player takes. - * @note - * If the hook returns TRUE, the hook sets the "obvious" and "dam" fields, - * otherwise there is no damage. - * @note (see file spells1.c) - */ -#define HOOK_GF_EXEC 59 - /** @def HOOK_CALC_MANA * @brief Recalculate player SP (spell points).\n * @param Number msp \n the player's new maximum spell points. |