Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old February 10, 2011, 04:30   #1
Spacebux
Adept
 
Join Date: Apr 2009
Posts: 231
Spacebux is on a distinguished road
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--
Spacebux is offline   Reply With Quote
Old February 10, 2011, 15:04   #2
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 42
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by Spacebux View Post
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
d_m is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Small (possible) bug in Vanilla Jungle_Boy Vanilla 11 June 14, 2011 15:43
Small bug with Player History and drained levels. Twilight Development 0 July 1, 2010 10:54
Small request Zikke Vanilla 0 June 12, 2010 07:29
Small bug in angband-3.0.9b-win.zip bdo Vanilla 1 May 2, 2008 19:34
Small Levels bonzo Variants 7 February 29, 2008 20:50


All times are GMT +1. The time now is 13:40.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.