Login
User Name:

Password:



Register

Forgot your password?
Hi - Clean SmaugFuss map/description issue..
Dec 15, 2024 7:29 pm
By Samson
AFKMud 2.2.4
Dec 10, 2024 4:09 pm
By Samson
I3 and IMC
Dec 8, 2024 6:35 pm
By Remcon
Ubuntu 22.04.5 LTS
Dec 5, 2024 5:10 pm
By Remcon
SmaugFUSS 1.8/1.9
Nov 29, 2024 11:46 am
By Remcon
SWFOTEFUSS 1.5.1
Author: Various
Submitted by: Samson
SWRFUSS 1.4.1
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.5
Author: Various
Submitted by: Samson
AFKMud 2.2.4
Author: AFKMud Team
Submitted by: Samson
LOP 1.5
Author: Remcon
Submitted by: Remcon
Users Online
AhrefsBot, DotBot

Members: 0
Guests: 23
Stats
Files
Topics
Posts
Members
Newest Member
494
3,808
19,707
588
Mortrex

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Codebases » SmaugFUSS » Bug: spell_animate_dead
Forum Rules | Mark all | Recent Posts

Bug: spell_animate_dead
< Newer Topic :: Older Topic > Doesn't consider specified target..

Pages:<< prev 1 next >>
Post is unread #1 Aug 25, 2024 2:25 pm   
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts423
JoinedMar 7, 2005

 
I will submit this under the "how did nobody notice this" category. Sometimes these things truly beggar belief.

The spell, "Animate Dead" which uses spell_animate_dead( ), professes in the help files to take a target parameter. That doesn't actually look to exist in the code, however. Instead, it just finds the first suitable corpse in the room:

     for (corpse = ch->in_room->first_content; corpse; corpse = corpse_next)
    {
	corpse_next = corpse->next_content;

	if (corpse->item_type == ITEM_CORPSE_NPC && corpse->cost != -5)
	{
	   found = TRUE;
	   break;
	}
    }


To me that's either a legit bug or someone gutted the functionality at some point and forgot to update the help file entry to account for the fact that no, there is no targeting capability.

That said, you can fix it pretty easily. Consider adding this just before the above section:

    if ( target_name[0] != '\0' )
    {
        if ( ( corpse = get_obj_here( ch, target_name ) ) == NULL )
        {
        	send_to_char( "You cannot find that here.\r\n", ch );
        	return rSPELL_FAILED;
        }
        else
        if ( corpse->item_type == ITEM_CORPSE_NPC && corpse->cost != -5 )
            found = TRUE;
        else
        {
        	send_to_char( "That's not a suitable corpse.\r\n", ch );
        	return rSPELL_FAILED;        
        }
    }
    
    else 


Or whatever you fancy. Just one suggestion. :imp:

Again, I have no idea how this got missed for so many years on MUDs with active players. Did people truly not care which corpse they animated? Or not notice they often didn't get the one they targeted? :blink:

Post is unread #2 Aug 25, 2024 9:16 pm   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,697
JoinedJan 1, 2002

 
Good catch. I wonder if most places just changed the help files instead of looking for the issue.

Post is unread #3 Aug 25, 2024 10:48 pm   
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts423
JoinedMar 7, 2005

 
I never cease to be amazed by some of the things I come across in play testing on an empty development server. :grinning:

Pages:<< prev 1 next >>