• [slashem] Donwgrading objects (and a bug?)

    From Janis Papanagnou@21:1/5 to All on Tue May 31 17:54:45 2022
    In Slashem it is possible to upgrade some objects to a better version
    (e.g. tin whistle -> magic whistle) using a potion of gain level.

    Just now I observed that it's also possible to downgrade objects by
    dipping it into a potion of amnesia or into the Castle's moat "lethe
    water". Some observations...

    Randomly found gauntlets of defense (-1) won't lose the enchantment
    (valid for all artifacts, it seems from inspecting the source code).
    A ring with positive enchantment will lose it, but not one with a
    negative enchantment. (Strange.)
    You can uncurse most cursed items by dipping into amnesia water.
    Some items change (similar to upgrading); dipping a cursed health
    stone will not only uncurse it but also morph to a flint stone.
    That seems to open another way to get rid of loadstones; they not
    only uncurse (as the source code shows) but also morph to flint.

    And here I suspect a bug in the code of function downgrade()...

    downgrade_obj(obj, nomagic, used)
    ...
    obj->owt = weight(obj);

    where this function is called in context of e.g.

    if (amnesia && (obj->otyp == LUCKSTONE ||
    obj->otyp == LOADSTONE || obj->otyp == HEALTHSTONE ||
    obj->otyp == TOUCHSTONE))
    downgrade_obj(obj, FLINT, &used);

    The "new" weight seems to be taken from the original object instead
    of the new "nomagic" item. (Or am I missing something?)

    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pat Rankin@21:1/5 to Janis on Tue May 31 11:00:39 2022
    On Tuesday, May 31, 2022 at 8:54:48 AM UTC-7, Janis wrote:
    The "new" weight seems to be taken from the original object instead
    of the new "nomagic" item. (Or am I missing something?)

    There's only one object, and the weight is calculated after setting
    that object's otyp field to the new type.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to Pat Rankin on Tue May 31 20:05:42 2022
    On 31.05.2022 20:00, Pat Rankin wrote:
    On Tuesday, May 31, 2022 at 8:54:48 AM UTC-7, Janis wrote:
    The "new" weight seems to be taken from the original object instead
    of the new "nomagic" item. (Or am I missing something?)

    There's only one object, and the weight is calculated after setting
    that object's otyp field to the new type.

    Ah, yes, you're right. (Need more coffee.) Thanks.

    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)