Implementing the restructure changes
Collapse
X
-
Another annoying change concerning effect handling: before, the return value for each effect denoted the fact that the effect was applied or not; now, it simply denotes the fact that the effect is handled or not. Basically every effect handler returns TRUE. This means that pressing ESC while doing something with an object that has an effect on something (scroll of ID, enchant) wastes the object.
Seems also that ID by use is broken: I aimed an unid wand (magic missiles) at something, killed it and the wand didn't get identified.PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!Comment
-
Another annoying change concerning effect handling: before, the return value for each effect denoted the fact that the effect was applied or not; now, it simply denotes the fact that the effect is handled or not. Basically every effect handler returns TRUE. This means that pressing ESC while doing something with an object that has an effect on something (scroll of ID, enchant) wastes the object.
Seems also that ID by use is broken: I aimed an unid wand (magic missiles) at something, killed it and the wand didn't get identified.
You might like to note that I had already filed those bugsOne for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.Comment
-
In variants such as PWMAngband that has a wilderness, it's not so simple. There need to be another flag for illumination/darkening code, which has to be set on floor squares, as well as non-floor squares (water, grass, ...).One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.Comment
-
Checkpoint 1
OK, these issues are all fixed in development (this message is largely for future Nick, who from past experience has a worse memory even than present Nick).One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.Comment
-
Just a little gameplay change I've noted, which is probably due to changing "do_poly" from integer to boolean. This change even occured before 3.5, so it's unrelated to the restructure.
Prior to 3.5, "do_poly" was an integer, the polymorphing effect was using "p_ptr->lev" to compute the chance of a monster resisting it:
- dam = p_ptr->lev
- do_poly = dam
- savelvl = randint1(MAX(1, do_poly - 10)) + 10
In 3.5, "do_poly" was changed into a boolean without anything else changed. This made the formula bugged (the second affectation probably turns do_poly to 1 on most systems), making savelvl always equal to 11.
In the latest code, the formula was simply changed to "savelvl = 11".
This change wasn't probably intended?PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!Comment
-
Just a little gameplay change I've noted, which is probably due to changing "do_poly" from integer to boolean. This change even occured before 3.5, so it's unrelated to the restructure.
Prior to 3.5, "do_poly" was an integer, the polymorphing effect was using "p_ptr->lev" to compute the chance of a monster resisting it:
- dam = p_ptr->lev
- do_poly = dam
- savelvl = randint1(MAX(1, do_poly - 10)) + 10
In 3.5, "do_poly" was changed into a boolean without anything else changed. This made the formula bugged (the second affectation probably turns do_poly to 1 on most systems), making savelvl always equal to 11.
In the latest code, the formula was simply changed to "savelvl = 11".
This change wasn't probably intended?One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.Comment
-
Another glitch due to the restructure in project_m():
Code:if (monster_handler != NULL) monster_handler(&context); /* Force obviousness for certain types if seen. */ if (gf_force_obvious(typ) && context.seen) context.obvious = TRUE;
Code:static void project_monster_handler_OLD_DRAIN(project_monster_handler_context_t *context) { if (context->seen) { rf_on(context->l_ptr->flags, RF_UNDEAD); rf_on(context->l_ptr->flags, RF_DEMON); } if (monster_is_nonliving(context->m_ptr->race)) { context->hurt_msg = MON_MSG_UNAFFECTED; [COLOR="Red"]context->obvious = FALSE;[/COLOR] context->dam = 0; } }
PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!Comment
-
Ah yes, thanks - I thought there was still something not quite right there.One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.Comment
-
In project_m(), GF_ flags with no associated handlers are not processed anymore. Before the restructure, there was a big switch with a default section at the end:
Code:switch (typ) { case GF_MISSILE (and all obvious effects): ... case GF_FIRE (and all handled effects): ... default: context.skipped = TRUE; context.dam = 0; }
Code:if (!gf_force_obvious(typ) && (monster_handler == NULL)) { context.skipped = TRUE; context.dam = 0; }
PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!Comment
-
Code:context.skipped = TRUE;
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.Comment
-
In dice_parse_state_transition(), there's no way to add a "bonus" part when the spell has a random component. For example, PWMAngband has an elemental bolt spell which fires four bolts, one of each element. I've tried "dice:$Dd8+m4" to be able to display "dam 5d8x4", but the state_table doesn't allow that (only "base" + "bonus" is allowed, like for Meteor Swarm).
Here's an updated, more complete state_table:
Code:static unsigned char state_table[DICE_STATE_MAX][DICE_INPUT_MAX] = { /* Input: -+dm$DU0 */ /*[DICE_STATE_START] = */ /* A */ "B.EHKB..", /*[DICE_STATE_BASE_DIGIT] = */ /* B */ ".CE..B.C", /*[DICE_STATE_FLUSH_BASE] = */ /* C */ "..EHKD..", /*[DICE_STATE_DICE_DIGIT] = */ /* D */ "..E..D..", /*[DICE_STATE_FLUSH_DICE] = */ /* E */ "....KF..", /*[DICE_STATE_SIDE_DIGIT] = */ /* F */ ".G.H.F.G", /*[DICE_STATE_FLUSH_SIDE] = */ /* G */ "...H....", /*[DICE_STATE_BONUS] = */ /* H */ "....KI..", /*[DICE_STATE_BONUS_DIGIT] = */ /* I */ ".....I.J", /*[DICE_STATE_FLUSH_BONUS] = */ /* J */ "........", /*[DICE_STATE_VAR] = */ /* K */ "......L.", /*[DICE_STATE_VAR_CHAR] = */ /* L */ ".CEH..LM", /*[DICE_STATE_FLUSH_ALL] = */ /* M */ "........" };
PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!Comment
-
Bah, there's also a Thunderstorm spell that uses the format "dice:$B+$Dd$S+m8" to display something like "dam 100+5d6x8" and that still doesn't work because the dice parser doesn't expect a "+" after anything else than the "base" value. For PWMAngband, I've simple hacked the parser to be able to use "-" as separator between dice and bonus so that the "dice" component is properly flushed.
The state table becomes:
Code:static unsigned char state_table[DICE_STATE_MAX][DICE_INPUT_MAX] = { /* Input: -+dm$DU0 */ /*[DICE_STATE_START] = */ /* A */ "B.EHKB..", /*[DICE_STATE_BASE_DIGIT] = */ /* B */ ".CE..B.C", /*[DICE_STATE_FLUSH_BASE] = */ /* C */ "..EHKD..", /*[DICE_STATE_DICE_DIGIT] = */ /* D */ "..E..D..", /*[DICE_STATE_FLUSH_DICE] = */ /* E */ "....KF..", /*[DICE_STATE_SIDE_DIGIT] = */ /* F */ "G..H.F.G", /*[DICE_STATE_FLUSH_SIDE] = */ /* G */ "...H....", /*[DICE_STATE_BONUS] = */ /* H */ "....KI..", /*[DICE_STATE_BONUS_DIGIT] = */ /* I */ ".....I.J", /*[DICE_STATE_FLUSH_BONUS] = */ /* J */ "........", /*[DICE_STATE_VAR] = */ /* K */ "......L.", /*[DICE_STATE_VAR_CHAR] = */ /* L */ "GCEH..LM", /*[DICE_STATE_FLUSH_ALL] = */ /* M */ "........" };
PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!Comment
-
And it doesn't work...
I also need to declare the expression as "S-" instead of "S" because the parser considers the minus sign as a digit and not an operator.PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!Comment
-
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.Comment
Comment