diff -r 62b6105e09c9 src/defines.h --- a/src/defines.h Thu Jul 29 12:48:11 2010 -0700 +++ b/src/defines.h Thu Jul 29 13:16:09 2010 -0700 @@ -1295,7 +1295,7 @@ #define TR2_SLOW_DIGEST 0x00000001L /* Slow digest */ #define TR2_FEATHER 0x00000002L /* Feather Falling */ #define TR2_LIGHT 0x00000004L /* Perma-Light */ -#define TR2_REGEN 0x00000008L /* Regeneration */ +#define TR2_XXX1 0x00000008L /* (reserved) */ #define TR2_TELEPATHY 0x00000010L /* Telepathy */ #define TR2_SEE_INVIS 0x00000020L /* See Invis */ #define TR2_FREE_ACT 0x00000040L /* Free action */ @@ -1312,8 +1312,8 @@ #define TR2_IGNORE_ELEC 0x00020000L /* Item ignores Elec Damage */ #define TR2_IGNORE_FIRE 0x00040000L /* Item ignores Fire Damage */ #define TR2_IGNORE_COLD 0x00080000L /* Item ignores Cold Damage */ -#define TR2_XXX5 0x00100000L /* (reserved) */ -#define TR2_XXX6 0x00200000L /* (reserved) */ +#define TR2_REGEN_HP 0x00100000L /* HP regeneration */ +#define TR2_REGEN_MANA 0x00200000L /* Mana regeneration */ #define TR2_BLESSED 0x00400000L /* Item has been blessed */ #define TR2_XXX8 0x00800000L /* (was: activatable) */ #define TR2_INSTA_ART 0x01000000L /* Item makes an artifact */ diff -r 62b6105e09c9 src/dungeon.c --- a/src/dungeon.c Thu Jul 29 12:48:11 2010 -0700 +++ b/src/dungeon.c Thu Jul 29 13:16:09 2010 -0700 @@ -108,7 +108,7 @@ { /* Redraw */ p_ptr->redraw |= (PR_HP); - wieldeds_notice_flag(2, TR2_REGEN); + wieldeds_notice_flag(2, TR2_REGEN_HP); wieldeds_notice_flag(2, TR2_IMPAIR_HP); } } @@ -153,7 +153,7 @@ { /* Redraw */ p_ptr->redraw |= (PR_MANA); - wieldeds_notice_flag(2, TR2_REGEN); + wieldeds_notice_flag(2, TR2_REGEN_MANA); wieldeds_notice_flag(2, TR2_IMPAIR_MANA); } } @@ -608,7 +608,8 @@ i = extract_energy[p_ptr->state.speed] * 2; /* Regeneration takes more food */ - if (p_ptr->state.regenerate) i += 30; + if (p_ptr->state.regenerate_hp) i += 30; + if (p_ptr->state.regenerate_mana) i += 30; /* Slow digestion takes less food */ if (p_ptr->state.slow_digest) i -= 10; @@ -667,7 +668,7 @@ regen_amount = PY_REGEN_WEAK; /* Various things speed up regeneration */ - if (p_ptr->state.regenerate) + if (p_ptr->state.regenerate_hp) regen_amount *= 2; if (p_ptr->searching || p_ptr->resting) regen_amount *= 2; @@ -693,7 +694,7 @@ regen_amount = PY_REGEN_NORMAL; /* Various things speed up regeneration */ - if (p_ptr->state.regenerate) + if (p_ptr->state.regenerate_mana) regen_amount *= 2; if (p_ptr->searching || p_ptr->resting) regen_amount *= 2; diff -r 62b6105e09c9 src/files.c --- a/src/files.c Thu Jul 29 12:48:11 2010 -0700 +++ b/src/files.c Thu Jul 29 13:16:09 2010 -0700 @@ -183,13 +183,15 @@ { "Feath", 2, TR2_FEATHER, 0, 0 }, { "Light", 2, TR2_LIGHT, 0, 0 }, - { "Regen", 2, TR2_REGEN, 0, 0 }, + { "HPgen", 2, TR2_REGEN_HP, 0, 0 }, + { "SPgen", 2, TR2_REGEN_MANA, 0, 0 }, { " ESP", 2, TR2_TELEPATHY, 0, 0 }, { "Invis", 2, TR2_SEE_INVIS, 0, 0 }, { "FrAct", 2, TR2_FREE_ACT, 0, 0 }, { "HLife", 2, TR2_HOLD_LIFE, 0, 0 }, { "ImpHP", 2, TR2_IMPAIR_HP, 0, 0 }, - { "ImpSP", 2, TR2_IMPAIR_MANA, 0, 0 }, + /* HACK: no room for this flag now that we've split HP/mana regen */ +// { "ImpSP", 2, TR2_IMPAIR_MANA, 0, 0 }, { " Fear", 2, TR2_AFRAID, 0, 0 }, { "Aggrv", 2, TR2_AGGRAVATE, 0, 0 }, diff -r 62b6105e09c9 src/init1.c --- a/src/init1.c Thu Jul 29 12:48:11 2010 -0700 +++ b/src/init1.c Thu Jul 29 13:16:09 2010 -0700 @@ -450,7 +450,7 @@ "SLOW_DIGEST", "FEATHER", "LIGHT", - "REGEN", + "XXX1", "TELEPATHY", "SEE_INVIS", "FREE_ACT", @@ -467,8 +467,8 @@ "IGNORE_ELEC", "IGNORE_FIRE", "IGNORE_COLD", - "XXX5", - "XXX6", + "REGEN_HP", + "REGEN_MANA", "BLESSED", "XXX8", "INSTA_ART", diff -r 62b6105e09c9 src/object/identify.c --- a/src/object/identify.c Thu Jul 29 12:48:11 2010 -0700 +++ b/src/object/identify.c Thu Jul 29 13:16:09 2010 -0700 @@ -861,7 +861,8 @@ { { 0, TR0_STEALTH, "Your %s glows." }, { 2, TR2_SLOW_DIGEST, "You feel your %s slow your metabolism." }, - { 2, TR2_REGEN, "You feel your %s speed up your recovery." }, + { 2, TR2_REGEN_HP, "You feel your %s speed up your recovery." }, + { 2, TR2_REGEN_MANA, "You feel your %s speed up your mana recovery." }, { 2, TR2_AGGRAVATE, "You feel your %s aggravate things around you." }, { 2, TR2_IMPAIR_HP, "You feel your %s slow your recovery." }, { 2, TR2_IMPAIR_MANA, "You feel your %s slow your mana recovery." }, diff -r 62b6105e09c9 src/object/obj-info.c --- a/src/object/obj-info.c Thu Jul 29 12:48:11 2010 -0700 +++ b/src/object/obj-info.c Thu Jul 29 13:16:09 2010 -0700 @@ -152,7 +152,8 @@ { TR2_IMPAIR_MANA, "Impairs mana recovery" }, { TR2_AFRAID, "Makes you afraid of melee, and worse at shooting and casting spells" }, { TR2_FEATHER, "Feather Falling" }, - { TR2_REGEN, "Speeds regeneration" }, + { TR2_REGEN_HP, "Speeds hitpoint regeneration" }, + { TR2_REGEN_MANA, "Speeds mana regeneration" }, { TR2_FREE_ACT, "Prevents paralysis" }, { TR2_HOLD_LIFE, "Sustains your life force" }, { TR2_TELEPATHY, "Grants telepathy" }, diff -r 62b6105e09c9 src/object/obj-make.c --- a/src/object/obj-make.c Thu Jul 29 12:48:11 2010 -0700 +++ b/src/object/obj-make.c Thu Jul 29 13:16:09 2010 -0700 @@ -845,7 +845,8 @@ TR2_SLOW_DIGEST, TR2_FEATHER, TR2_LIGHT, - TR2_REGEN, + TR2_REGEN_HP, + TR2_REGEN_MANA, TR2_TELEPATHY, TR2_SEE_INVIS, TR2_FREE_ACT, diff -r 62b6105e09c9 src/object/obj-power.c --- a/src/object/obj-power.c Thu Jul 29 12:48:11 2010 -0700 +++ b/src/object/obj-power.c Thu Jul 29 13:16:09 2010 -0700 @@ -828,7 +828,8 @@ ADD_POWER2("resist nether", 20, TR1_RES_NETHR, 1, highres++); ADD_POWER2("resist chaos", 20, TR1_RES_CHAOS, 1, highres++); ADD_POWER2("resist disenchantment", 20, TR1_RES_DISEN, 1, highres++); - ADD_POWER2("regeneration", 9, TR2_REGEN, 2, misc++); + ADD_POWER2("hitpoint regeneration", 9, TR2_REGEN_HP, 2, misc++); + ADD_POWER2("mana regeneration", 9, TR2_REGEN_MANA, 2, misc++); ADD_POWER1("blessed", 1, TR2_BLESSED, 2); ADD_POWER1("no fuel", 5, TR2_NO_FUEL, 2); diff -r 62b6105e09c9 src/object/randart.c --- a/src/object/randart.c Thu Jul 29 12:48:11 2010 -0700 +++ b/src/object/randart.c Thu Jul 29 13:16:09 2010 -0700 @@ -125,7 +125,7 @@ #define ART_IDX_GEN_SINV 51 #define ART_IDX_GEN_ESP 52 #define ART_IDX_GEN_SDIG 53 -#define ART_IDX_GEN_REGEN 54 +#define ART_IDX_GEN_REGEN_HP 54 #define ART_IDX_GEN_LRES 55 #define ART_IDX_GEN_RPOIS 56 #define ART_IDX_GEN_RFEAR 57 @@ -141,6 +141,7 @@ #define ART_IDX_GEN_RDISEN 67 #define ART_IDX_GEN_AC 68 #define ART_IDX_GEN_TUNN 69 +#define ART_IDX_GEN_REGEN_MANA 70 #define ART_IDX_GEN_ACTIV 82 /* Supercharged abilities - treated differently in algorithm */ @@ -209,13 +210,13 @@ ART_IDX_GEN_SEARCH, ART_IDX_GEN_INFRA, ART_IDX_GEN_SPEED, ART_IDX_GEN_IMMUNE, ART_IDX_GEN_FA, ART_IDX_GEN_HLIFE, ART_IDX_GEN_FEATHER, ART_IDX_GEN_LIGHT, ART_IDX_GEN_SINV, - ART_IDX_GEN_ESP, ART_IDX_GEN_SDIG, ART_IDX_GEN_REGEN, - ART_IDX_GEN_LRES, ART_IDX_GEN_RPOIS, ART_IDX_GEN_RFEAR, - ART_IDX_GEN_RLIGHT, ART_IDX_GEN_RDARK, ART_IDX_GEN_RBLIND, - ART_IDX_GEN_RCONF, ART_IDX_GEN_RSOUND, ART_IDX_GEN_RSHARD, - ART_IDX_GEN_RNEXUS, ART_IDX_GEN_RNETHER, ART_IDX_GEN_RCHAOS, - ART_IDX_GEN_RDISEN, ART_IDX_GEN_AC, ART_IDX_GEN_TUNN, - ART_IDX_GEN_ACTIV}; + ART_IDX_GEN_ESP, ART_IDX_GEN_SDIG, ART_IDX_GEN_REGEN_HP, + ART_IDX_GEN_REGEN_MANA, ART_IDX_GEN_LRES, ART_IDX_GEN_RPOIS, + ART_IDX_GEN_RFEAR, ART_IDX_GEN_RLIGHT, ART_IDX_GEN_RDARK, + ART_IDX_GEN_RBLIND, ART_IDX_GEN_RCONF, ART_IDX_GEN_RSOUND, + ART_IDX_GEN_RSHARD, ART_IDX_GEN_RNEXUS, ART_IDX_GEN_RNETHER, + ART_IDX_GEN_RCHAOS, ART_IDX_GEN_RDISEN, ART_IDX_GEN_AC, + ART_IDX_GEN_TUNN, ART_IDX_GEN_ACTIV}; static s16b art_idx_high_resist[] = {ART_IDX_GEN_RPOIS, ART_IDX_GEN_RFEAR, ART_IDX_GEN_RLIGHT, ART_IDX_GEN_RDARK, ART_IDX_GEN_RBLIND, @@ -1456,12 +1457,20 @@ (artprobs[ART_IDX_GEN_SDIG])++; } - if (a_ptr->flags[2] & TR2_REGEN) + if (a_ptr->flags[2] & TR2_REGEN_HP) { /* Regeneration case - generic. */ - LOG_PRINT("Adding 1 for regeneration - general.\n"); + LOG_PRINT("Adding 1 for hitpoint regeneration - general.\n"); - (artprobs[ART_IDX_GEN_REGEN])++; + (artprobs[ART_IDX_GEN_REGEN_HP])++; + } + + if (a_ptr->flags[2] & TR2_REGEN_MANA) + { + /* Regeneration case - generic. */ + LOG_PRINT("Adding 1 for mana regeneration - general.\n"); + + (artprobs[ART_IDX_GEN_REGEN_MANA])++; } if ( (a_ptr->flags[1] & TR1_RES_ACID) || (a_ptr->flags[1] & TR1_RES_ELEC) || @@ -2228,10 +2237,16 @@ LOG_PRINT("Adding ability: permanent light\n"); } -static void add_regeneration(artifact_type *a_ptr) +static void add_regeneration_hp(artifact_type *a_ptr) { - a_ptr->flags[2] |= TR2_REGEN; - LOG_PRINT("Adding ability: regeneration\n"); + a_ptr->flags[2] |= TR2_REGEN_HP; + LOG_PRINT("Adding ability: HP regeneration\n"); +} + +static void add_regeneration_mana(artifact_type *a_ptr) +{ + a_ptr->flags[2] |= TR2_REGEN_MANA; + LOG_PRINT("Adding ability: mana regeneration\n"); } static void add_telepathy(artifact_type *a_ptr) @@ -2832,8 +2847,12 @@ add_slow_digestion(a_ptr); break; - case ART_IDX_GEN_REGEN: - add_regeneration(a_ptr); + case ART_IDX_GEN_REGEN_HP: + add_regeneration_hp(a_ptr); + break; + + case ART_IDX_GEN_REGEN_MANA: + add_regeneration_mana(a_ptr); break; case ART_IDX_GEN_RPOIS: diff -r 62b6105e09c9 src/player/calcs.c --- a/src/player/calcs.c Thu Jul 29 12:48:11 2010 -0700 +++ b/src/player/calcs.c Thu Jul 29 13:16:09 2010 -0700 @@ -716,7 +716,8 @@ /* Good flags */ if (collect_f[2] & TR2_SLOW_DIGEST) state->slow_digest = TRUE; if (collect_f[2] & TR2_FEATHER) state->ffall = TRUE; - if (collect_f[2] & TR2_REGEN) state->regenerate = TRUE; + if (collect_f[2] & TR2_REGEN_HP) state->regenerate_hp = TRUE; + if (collect_f[2] & TR2_REGEN_MANA) state->regenerate_mana = TRUE; if (collect_f[2] & TR2_TELEPATHY) state->telepathy = TRUE; if (collect_f[2] & TR2_SEE_INVIS) state->see_inv = TRUE; if (collect_f[2] & TR2_FREE_ACT) state->free_act = TRUE; diff -r 62b6105e09c9 src/player/types.h --- a/src/player/types.h Thu Jul 29 12:48:11 2010 -0700 +++ b/src/player/types.h Thu Jul 29 13:16:09 2010 -0700 @@ -77,7 +77,8 @@ bool impair_hp; /* Slow HP regeneration */ bool impair_mana; /* Slow mana regeneration */ bool ffall; /* Feather falling */ - bool regenerate; /* Regeneration */ + bool regenerate_hp; /* HP regeneration */ + bool regenerate_mana; /* Mana regeneration */ bool telepathy; /* Telepathy */ bool see_inv; /* See invisible */ bool free_act; /* Free action */