![]() |
#1 |
Prophet
Join Date: Apr 2008
Posts: 2,914
![]() |
[3.3] Potential problem with low power random artifacts
From scramble_artifact() in randart.c:
Code:
/* Set depth and rarity info according to power */ ... a_ptr->alloc_max = MIN(127, (ap * 4) / 5); a_ptr->alloc_min = MIN(100, ((ap + 100) * 100 / max_power)); From make_artifact(): Code:
/* Enforce maximum depth (strictly) */ if (a_ptr->alloc_max < p_ptr->depth) continue; Another problem, from make_artifact(): Code:
/* XXX XXX Enforce minimum "depth" (loosely) */ if (a_ptr->alloc_min > p_ptr->depth) { /* Get the "out-of-depth factor" */ int d = (a_ptr->alloc_min - p_ptr->depth) * 2; /* Roll for out-of-depth creation */ if (randint0(d) != 0) continue; } Fix: ensure that a_ptr->alloc_max is always greater than a_ptr->alloc_min
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant! |
![]() |
![]() |
![]() |
#2 |
Prophet
Join Date: Apr 2008
Posts: 2,914
![]() |
For a_ptr->alloc_max, something should also ensure that the artifact has some decent chance to be generated. This means checking somehow against kind->alloc_min...
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant! |
![]() |
![]() |
![]() |
#3 | |
Angband Devteam member
|
Quote:
Second, the special artifacts (which include the two lowest-powered, the Phial and Star) have different code governing their max depths, so they have a broader range. It does mean that very weak weapons and armour (which tend to start at power ~50) have a small range in which to be found, but ... ... I'm going to rewrite randart.c completely for 3.4, and the depth and alloc computation will be different.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila |
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[3.3] Potential crash with multiple pval system | PowerWyrm | Vanilla | 6 | October 7, 2011 11:11 |
Calculating potential damage... Maybe a stupid question... | saw | Vanilla | 5 | July 24, 2010 07:10 |
Low Brow Question | z118 | Vanilla | 6 | February 2, 2010 16:02 |
Random questions - randarts and artifacts | dhegler | Vanilla | 14 | December 24, 2009 01:24 |
My first real potential winner... | s0be | Vanilla | 6 | February 4, 2008 08:02 |