Go Back   Angband Forums > Angband > Development

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old September 22, 2009, 05:15   #1
Sirridan's Avatar
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
r1676 - Random Ability Bug on Ego

When getting egos, (Blessed), Lothlorien, and Magi, I seem to only get slow metabolism as the random ability, and random resists on gear (Aman / Preservation) give rPoison. Not that I mind the rpoison, I always seem to lack it... but yeah.

2 aman, 1 preservation both had rPoison, and at least 30 random ability egos or more were all slow metabolism.

Unless this was found and fixed in a later version?


Checked out the code, seems that rPoison and Slow Digest are both the first element of their ego_xtra arrays... is anything wrong with get_new_attr?

u32b get_new_attr(u32b flags, const u32b attrs[])
	size_t i;
	int options = 0;
	u32b flag = 0;
	for (i = 0; i < N_ELEMENTS(attrs); i++)
		/* skip this one if the flag is already present */
		if (flags & attrs[i]) continue;

		/* each time we find a new possible option, we have a 1-in-N chance of
		 * choosing it and an (N-1)-in-N chance of keeping a previous one */
		if (one_in_(++options)) flag = attrs[i];
	return flag;
looking at this, it should be 1 in 1 for poison, then 1 in 2 to change it to the next, and so on... but it always chooses poison. The code segment looks fine to me, unless one_in_(x) was changed recently?

More edits:

Also noticed for random sustains, it always picks strength, which is also first in the sustain list...

EVEN MORE EDITS OMG: One more elvenkind with rPoison...

Last edited by Sirridan; September 22, 2009 at 06:34.
Sirridan is offline   Reply With Quote

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
Ego weapons you always wanted to find... Pete Mack AAR 5 July 5, 2009 04:37
pricing on slay ego weapons Malak Darkhunter Vanilla 2 July 1, 2009 21:02
Ego-Item indexes in defines.h PaulBlay Development 0 April 17, 2009 09:21
3.1 bug: ego armor squelch quality ChodTheWacko Vanilla 1 April 11, 2009 19:19
(Ego) weapons should not be immediately destroyed by acid Pete Mack Vanilla 0 April 26, 2007 18:34

All times are GMT +1. The time now is 12:41.

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