_feed.c

nightmare3_fluffos_v2/lib/cmds/skills/_feed.c · 1.1 KB

From the archive nightmare3_fluffos_v2.zip

Download the archive   « Back to the archive contents

//	/bin/users/_feed.c
//	from the Nightmare mudlib
//	Mage ability
//	created by Descartes of Borg

#include <std.h>

inherit DAEMON;

int cmd_feed(string str) {
    int amount;
    string Class;

    if(!str) {
	notify_fail("Feed on what?\n");
	return 0;
    }
    if(sscanf(str, "on %s", str) != 1 && str != "corpse") {
	notify_fail("You can only feed on corpses.\n");
	return 0;
    }
    if(!present("remains", environment(this_player()))) {
	notify_fail("No corpse here!\n");
	return 0;
    }
    Class = (string)this_player()->query_class();
    if(Class != "mage" && Class != "monk" && Class != "cleric") {
	notify_fail("Yuck!\n");
	return 0;
    }
    write("You feed on the soul of the recently deceased.\n");
    say(this_player()->query_cap_name()+" feeds on the soul of the recently deceased.\n", this_player());
    amount = random((int)this_player()->query_skill("conjuring")/7 + 6);
    this_player()->heal(amount);
    present("remains", environment(this_player()))->remove();
    return 1;
}

void help() { 
    write("Syntax: <feed on corpse>\n\n"+
	"Allows the magic user to gain strength through feeding on the souls\n"+
	"of the recently deceased.\n");
}

Site Stats

Snippets: 1791
Codebases: 571