Very small bug.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Spacebux
    Adept
    • Apr 2009
    • 231

    Very small bug.

    When quaffing a Dragon Breath potion, close to a wall, and the breath type happens to be Cold/Ice-breath, the deflection of the breath will cause the potion to "shatter". I.e., the item is not removed before the breath effect occurs. Hence, one can quaff and breathe before the item is destroyed from the floor, causing the potion to "shatter". There is no game play effect, however, it is a puzzling which came first, the chicken or the egg concept.

    In cmd-obj.c:
    In function:
    void do_cmd_use(cmd_code code, cmd_arg args[])
    {


    The code is written such that the effect effect_do takes place prior to the object---a potion on the floor in this case---is destroyed by floor_item_increase(0 - item, -1);
    .

    The solution does not look simple---putting a convoluted check in the cmd-obj code flow to check whether the idiot (like me) was quaffing the potion too close to a wall or not. An easy solution seems to be to put an IGNORE_COLD flag into the objects edit file... but, that would also change the dynamic of the game where most potions, save the dragon breath potion would be susceptible to destruction by wayward cold spells & breaths.

    It's really a small thing, but, if you really cared about squashing it, perhaps you could put the item destruction sequence prior to the effect. I haven't thought deeply about all the ramifications of that, so if I'm missing something obvious, please tell me.

    --Spacebux--
  • d_m
    Angband Devteam member
    • Aug 2008
    • 1517

    #2
    Originally posted by Spacebux
    It's really a small thing, but, if you really cared about squashing it, perhaps you could put the item destruction sequence prior to the effect. I haven't thought deeply about all the ramifications of that, so if I'm missing something obvious, please tell me.
    Thanks for reporting this. We've seen similar kinds of things before, and I think it should be possible to figure out a way to avoid this.
    linux->xterm->screen->pmacs

    Comment

    Working...
    😀
    😂
    🥰
    😘
    🤢
    😎
    😞
    😡
    👍
    👎