Pages:<< prev 1 next >>
#1 Oct 18, 2017 3:52 pm
Conjurer
GroupMembers
Posts428
JoinedMar 7, 2005
Hi all,
By chance, having somewhere along the lines ported the changes to these functions from AFK to my FUSS derivative, I came upon some oddities in play testing something. Pretty sure this is a bug and not intended behavior, but by all means correct me if wrong.
In act_obj.cpp, in do_zap( ) (and do_brandish( ) is similar), you'll find this:
Methinks you meant to have a strict inequality there, rather than the weak one? i.e.
Otherwise you get the message on final use, rather than on 1st attempt after it runs out of charges. I doubt that was the intent, since it makes for silly situations where you'll successfully cast a spell and then tell the user the wand does nothing?
Anyway, hope this helps someone!
By chance, having somewhere along the lines ported the changes to these functions from AFK to my FUSS derivative, I came upon some oddities in play testing something. Pretty sure this is a bug and not intended behavior, but by all means correct me if wrong.
In act_obj.cpp, in do_zap( ) (and do_brandish( ) is similar), you'll find this:
if( --wand->value[2] <= 0 ) /* Modified to prevent extraction when reaching zero - Samson */ { wand->value[2] = 0; /* To prevent negative values - Samson */ act( AT_MAGIC, "$p hums softly, but does nothing.", ch, wand, nullptr, TO_ROOM ); act( AT_MAGIC, "$p hums softly, but does nothing.", ch, wand, nullptr, TO_CHAR ); }
Methinks you meant to have a strict inequality there, rather than the weak one? i.e.
if( --wand->value[2] < 0 ) /* Modified to prevent extraction when reaching zero - Samson */
{
wand->value[2] = 0; /* To prevent negative values - Samson */
act( AT_MAGIC, "$p hums softly, but does nothing.", ch, wand, nullptr, TO_ROOM );
act( AT_MAGIC, "$p hums softly, but does nothing.", ch, wand, nullptr, TO_CHAR );
}
Otherwise you get the message on final use, rather than on 1st attempt after it runs out of charges. I doubt that was the intent, since it makes for silly situations where you'll successfully cast a spell and then tell the user the wand does nothing?
Anyway, hope this helps someone!
Pages:<< prev 1 next >>