From: <gi...@cr...> - 2025-07-14 03:20:28
|
via 8647d90488a627269ca89e78dc4bfddfe108107c (commit) via 7f07463a0b2fb7ae9cba5da02a0062eb1dd2e474 (commit) from da5fd27e9c38b590af3b459cd8c32dfff707c66d (commit) ----------------------------------------------------------------------- commit 8647d90488a627269ca89e78dc4bfddfe108107c Author: hellmonk <nld...@gm...> Date: Sun Jul 13 22:17:38 2025 -0500 Amulets of Dissipation Make negative dispellable effects and contam go away ~ twice as fast. Not functional yet, need to rebase first. commit 7f07463a0b2fb7ae9cba5da02a0062eb1dd2e474 Author: hellmonk <nld...@gm...> Date: Sun Jul 13 20:59:27 2025 -0500 simplify wildshape amulets ----------------------------------------------------------------------- Summary of changes: crawl-ref/source/describe.cc | 6 ++++-- crawl-ref/source/item-name.cc | 2 ++ crawl-ref/source/item-prop-enum.h | 1 + crawl-ref/source/player-equip.cc | 4 ++++ crawl-ref/source/player-reacts.cc | 7 +++++++ crawl-ref/source/player.cc | 8 ++++---- crawl-ref/source/rltiles/dc-item.txt | 3 ++- crawl-ref/source/rltiles/item/amulet/i-dissipation.png | Bin 0 -> 275 bytes crawl-ref/source/shopping.cc | 1 + crawl-ref/source/status.cc | 6 ++++++ crawl-ref/source/status.h | 1 + crawl-ref/source/wiz-dump.cc | 2 ++ 12 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 crawl-ref/source/rltiles/item/amulet/i-dissipation.png diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index cfae7e4aee..14ebc80807 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -678,10 +678,12 @@ static const char* _jewellery_base_ability_description(int subtype) case AMU_REFLECTION: return "It reflects blocked missile attacks."; case AMU_WILDSHAPE: - return "It improves your ability with shapeshifting, depending on " - "your skill."; + return "It improves your skill with shapeshifting (+5)"; case AMU_ALCHEMY: return "It enhances your alchemy spells and reduces their mp cost."; + case AMU_DISSIPATION: + return "It reduces the duration of hostile enchantments and decays " + "magical contamination more quickly."; #if TAG_MAJOR_VERSION == 34 case AMU_INACCURACY: return "It reduces the accuracy of all your attacks."; diff --git a/crawl-ref/source/item-name.cc b/crawl-ref/source/item-name.cc index 0d0a116b42..2abf6fee80 100644 --- a/crawl-ref/source/item-name.cc +++ b/crawl-ref/source/item-name.cc @@ -820,6 +820,7 @@ const char* jewellery_effect_name(int jeweltype, bool terse) case AMU_REGENERATION: return "regeneration"; case AMU_WILDSHAPE: return "wildshape"; case AMU_ALCHEMY: return "alchemy"; + case AMU_DISSIPATION: return "dissipation"; default: return "buggy jewellery"; } } @@ -863,6 +864,7 @@ const char* jewellery_effect_name(int jeweltype, bool terse) case AMU_ACROBAT: return "Acrobat"; case AMU_WILDSHAPE: return "Wildshape"; case AMU_ALCHEMY: return "Alch"; + case AMU_DISSIPATION: return "Dissipate"; case AMU_NOTHING: return ""; default: return "buggy"; } diff --git a/crawl-ref/source/item-prop-enum.h b/crawl-ref/source/item-prop-enum.h index b3be883466..a232d33ae3 100644 --- a/crawl-ref/source/item-prop-enum.h +++ b/crawl-ref/source/item-prop-enum.h @@ -266,6 +266,7 @@ enum jewellery_type AMU_REGENERATION, AMU_WILDSHAPE, AMU_ALCHEMY, + AMU_DISSIPATION, NUM_JEWELLERY }; diff --git a/crawl-ref/source/player-equip.cc b/crawl-ref/source/player-equip.cc index 6617501232..98ca69edd9 100644 --- a/crawl-ref/source/player-equip.cc +++ b/crawl-ref/source/player-equip.cc @@ -2556,6 +2556,10 @@ static void _equip_jewellery_effect(item_def &item, bool unmeld) mpr("You feel more attuned to alchemy."); break; + case AMU_DISSIPATION: + mpr("You feel as though your troubles will go away faster."); + break; + case AMU_GUARDIAN_SPIRIT: _spirit_shield_message(unmeld); break; diff --git a/crawl-ref/source/player-reacts.cc b/crawl-ref/source/player-reacts.cc index c83f21d46d..f4a9250cdd 100644 --- a/crawl-ref/source/player-reacts.cc +++ b/crawl-ref/source/player-reacts.cc @@ -143,6 +143,13 @@ static bool _decrement_a_duration(duration_type dur, int delay, const int old_dur = you.duration[dur]; you.duration[dur] -= delay; + // Amulets of dissipation wear off negative statuses faster + if (duration_dispellable(dur) && duration_negative(dur) + && you.wearing_jewellery(AMU_DISSIPATION)) + { + you.duration[dur] -= delay * you.wearing_jewellery(AMU_DISSIPATION); + } + // If we start expiring, handle exploss and print the exppoint message. if (you.duration[dur] <= exppoint && old_dur > exppoint) { diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 70b07e010f..7ec5965e48 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -4153,6 +4153,9 @@ void contaminate_player(int change, bool controlled, bool msg) change *= 2; #endif + if (change < 0) + change *= 1 + you.wearing_jewellery(AMU_DISSIPATION); + you.magic_contamination = max(0, min(250000, you.magic_contamination + change)); @@ -6064,10 +6067,7 @@ int player::skill(skill_type sk, int scale, bool real, bool temp) const } if (sk == SK_SHAPESHIFTING) - { - level += min(level / 2, - you.wearing_jewellery(AMU_WILDSHAPE) * 6 * scale); - } + level += you.wearing_jewellery(AMU_WILDSHAPE) * 5 * scale; if (level > MAX_SKILL_LEVEL * scale) level = MAX_SKILL_LEVEL * scale; diff --git a/crawl-ref/source/rltiles/dc-item.txt b/crawl-ref/source/rltiles/dc-item.txt index d9d5d6547e..2ee4c4eafa 100644 --- a/crawl-ref/source/rltiles/dc-item.txt +++ b/crawl-ref/source/rltiles/dc-item.txt @@ -932,7 +932,8 @@ i-faith AMU_FAITH i-reflection AMU_REFLECTION i-regeneration AMU_REGENERATION i-wildshape AMU_WILDSHAPE -i-alchemy AMU_ALCHEMY AMU_ID_LAST +i-alchemy AMU_ALCHEMY +i-dissipation AMU_DISSIPATION AMU_ID_LAST ####################OBJ_POTIONS %sdir item/potion diff --git a/crawl-ref/source/rltiles/item/amulet/i-dissipation.png b/crawl-ref/source/rltiles/item/amulet/i-dissipation.png new file mode 100644 index 0000000000..d07b3db02e Binary files /dev/null and b/crawl-ref/source/rltiles/item/amulet/i-dissipation.png differ diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index e4cd9e97dd..25c158e9c3 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -627,6 +627,7 @@ unsigned int item_value(item_def item, bool ident) case AMU_REFLECTION: case AMU_WILDSHAPE: case AMU_ALCHEMY: + case AMU_DISSIPATION: valued += 300; break; diff --git a/crawl-ref/source/status.cc b/crawl-ref/source/status.cc index 0ef659911c..0a7a3aad0b 100644 --- a/crawl-ref/source/status.cc +++ b/crawl-ref/source/status.cc @@ -74,6 +74,12 @@ bool duration_dispellable(duration_type dur) return _lookup_duration(dur)->duration_has_flag(D_DISPELLABLE); } +bool duration_negative(duration_type dur) +{ + return false; + //_lookup_duration(dur)->duration_has_flag(D_NEGATIVE); +} + static int _bad_ench_colour(int lvl, int orange, int red) { if (lvl >= red) diff --git a/crawl-ref/source/status.h b/crawl-ref/source/status.h index d93df33f98..dbe9c1437c 100644 --- a/crawl-ref/source/status.h +++ b/crawl-ref/source/status.h @@ -78,6 +78,7 @@ bool fill_status_info(int status, status_info& info); const char *duration_name(duration_type dur); bool duration_dispellable(duration_type dur); +bool duration_negative(duration_type dur); void init_duration_index(); bool duration_decrements_normally(duration_type dur); diff --git a/crawl-ref/source/wiz-dump.cc b/crawl-ref/source/wiz-dump.cc index 3daf194342..c0cd07017e 100644 --- a/crawl-ref/source/wiz-dump.cc +++ b/crawl-ref/source/wiz-dump.cc @@ -85,6 +85,8 @@ static uint8_t _jewellery_type_from_artefact_prop(const string &s return AMU_WILDSHAPE; if (s == "Alchemy") return AMU_ALCHEMY; + if (s == "Dissipation") + return AMU_DISSIPATION; if (s == "rCorr") return RING_RESIST_CORROSION; -- Dungeon Crawl Stone Soup |