Angband.oook.cz
Angband.oook.cz
AboutDownloadVariantsLadderForumCompetitionSpoilersComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old March 30, 2008, 19:29   #1
ChodTheWacko
Adept
 
Join Date: Jul 2007
Posts: 155
ChodTheWacko is on a distinguished road
Is good/great item creation wrong?

I'm looking at the last changeset, and I find apply_magic() to be a bit odd.

The initial code does some random rolls based on 'lvl' to determine if an object should be good or great. (and correspondingly sets power to 1 or 2'.

Assuming it does not generate an artifact, and creates a regular item (let's say, a sword), it does not take into account the decided 'power' when creating the sword.

Don't you need to set good or great in order to pass this info on to make_ego_item ala:

/* Roll for "good" */
if (good || (rand_int(100) < f1))
{
/* Assume "good" */
power = 1;
good = TRUE;

/* Roll for "great" */
if (great || (rand_int(100) < f2))
{
power = 2;
great = TRUE;
}
}


Right now, the only thing the random rolls do is affect the odds of creating an artifact.

Last edited by ChodTheWacko; March 30, 2008 at 19:36.
ChodTheWacko is offline   Reply With Quote
Old March 31, 2008, 11:12   #2
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,603
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by ChodTheWacko View Post
I'm looking at the last changeset, and I find apply_magic() to be a bit odd.

The initial code does some random rolls based on 'lvl' to determine if an object should be good or great. (and correspondingly sets power to 1 or 2'.

Assuming it does not generate an artifact, and creates a regular item (let's say, a sword), it does not take into account the decided 'power' when creating the sword.

Don't you need to set good or great in order to pass this info on to make_ego_item ...
make_ego_item()'s third argument is actually a "force uncursed" flag: it makes sure that any egos generated don't have curses. Apparently the original author of the code wanted that to only be the case when "good" or "great" are specified, but not if it were rolled by chance. Thanks for this, I've cleaned it up now.
takkaria 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
Item name: !Slow Poison Garrie Vanilla 13 February 22, 2008 20:19
[Feature Request]: 'g' gets top item from stack awldune Vanilla 0 December 14, 2007 21:31
[FA] A Good Start! Slonk AAR 0 October 20, 2007 22:20
Item stacking prob ish Vanilla 3 September 2, 2007 13:51
Item names Kiyoshi Aman Vanilla 3 May 5, 2007 23:01


All times are GMT +1. The time now is 00:32.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.