Gambling
#5
The downgrading of uniques and sets is part of the actual item generation code which is used for ALL items in the game. It is independant on the actual source of the item. The item creation code doesn't even know it is an item that is supposed to be gambled. All it knows is that it is an item of a specific type and a desired quality. It also has a item creation level (commonly refered to as ilvl) to use. That is basically it. If it can't create the item of the desired quality, it will downgrade the quality until it suceeds (which it always do for rare and magic items I think although it has built in ability to downgrade those too should one change the game so that rare items can't always be created, like no affixes being available in some cases).

As for the gamble code, it just decides the item type and then a quality it wants. It sends this info to the general item creation functions and get an item back (usually with the desired quality, but thus, not always).

As for the level used to determine for example which uniques are possible, it is the item creation level that is used by the function creating items (as I mentioned above). For items from monsters, it is set to equal the monster's level. For gamble, it is set to be a random value from 5 levels below the character's level to 4 above it (the character gambling).
There are three types of people in the world. Those who can count and those who can't.
Reply


Messages In This Thread
Gambling - by MadScientist - 09-04-2003, 12:51 PM
Gambling - by adeyke - 09-04-2003, 01:06 PM
Gambling - by MadScientist - 09-05-2003, 06:54 AM
Gambling - by adeyke - 09-05-2003, 01:17 PM
Gambling - by Jarulf - 09-08-2003, 10:05 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)