nightmare3_fluffos_v2/
nightmare3_fluffos_v2/bin/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/ChangeLog.old/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/Win32/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/compat/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/compat/simuls/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/include/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/clone/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/command/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/data/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/etc/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/include/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/inherit/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/inherit/master/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/log/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/tests/compiler/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/tests/efuns/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/tests/operators/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/u/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/tmp/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/windows/
nightmare3_fluffos_v2/lib/cmds/ambassador/
nightmare3_fluffos_v2/lib/cmds/database/
nightmare3_fluffos_v2/lib/cmds/hm/
nightmare3_fluffos_v2/lib/cmds/soul/
nightmare3_fluffos_v2/lib/daemon/cfg/
nightmare3_fluffos_v2/lib/daemon/cfg/mon_races/
nightmare3_fluffos_v2/lib/daemon/cfg/races/
nightmare3_fluffos_v2/lib/daemon/include/
nightmare3_fluffos_v2/lib/daemon/save/
nightmare3_fluffos_v2/lib/daemon/services/
nightmare3_fluffos_v2/lib/daemon/soul/
nightmare3_fluffos_v2/lib/doc/
nightmare3_fluffos_v2/lib/doc/TestPlans/
nightmare3_fluffos_v2/lib/doc/approval/
nightmare3_fluffos_v2/lib/doc/approval/QC/
nightmare3_fluffos_v2/lib/doc/approval/balance/
nightmare3_fluffos_v2/lib/doc/build/
nightmare3_fluffos_v2/lib/doc/build/armours/
nightmare3_fluffos_v2/lib/doc/build/economy/
nightmare3_fluffos_v2/lib/doc/build/etc/
nightmare3_fluffos_v2/lib/doc/build/monster/
nightmare3_fluffos_v2/lib/doc/build/room/
nightmare3_fluffos_v2/lib/doc/build/virtual/
nightmare3_fluffos_v2/lib/doc/build/weapon/
nightmare3_fluffos_v2/lib/doc/classes/
nightmare3_fluffos_v2/lib/doc/efun/
nightmare3_fluffos_v2/lib/doc/etc/
nightmare3_fluffos_v2/lib/doc/help/creator/
nightmare3_fluffos_v2/lib/doc/help/hm/
nightmare3_fluffos_v2/lib/doc/law/
nightmare3_fluffos_v2/lib/doc/lpc/basic/
nightmare3_fluffos_v2/lib/doc/lpc/data_types/
nightmare3_fluffos_v2/lib/doc/lpc/etc/
nightmare3_fluffos_v2/lib/doc/lpc/intermediate/
nightmare3_fluffos_v2/lib/doc/lpc/types/
nightmare3_fluffos_v2/lib/doc/mudlib/
nightmare3_fluffos_v2/lib/doc/mudlib/features/
nightmare3_fluffos_v2/lib/domains/Examples/etc/
nightmare3_fluffos_v2/lib/domains/Examples/room/
nightmare3_fluffos_v2/lib/domains/Examples/virtual/
nightmare3_fluffos_v2/lib/domains/Examples/virtual/exaA/
nightmare3_fluffos_v2/lib/domains/Examples/virtual/exaB/
nightmare3_fluffos_v2/lib/domains/Examples/weapon/
nightmare3_fluffos_v2/lib/domains/Praxis/
nightmare3_fluffos_v2/lib/domains/Praxis/adm/
nightmare3_fluffos_v2/lib/domains/Praxis/attic/
nightmare3_fluffos_v2/lib/domains/Praxis/cemetary/
nightmare3_fluffos_v2/lib/domains/Praxis/cemetary/mon/
nightmare3_fluffos_v2/lib/domains/Praxis/data/
nightmare3_fluffos_v2/lib/domains/Praxis/death/
nightmare3_fluffos_v2/lib/domains/Praxis/mountains/
nightmare3_fluffos_v2/lib/domains/Praxis/obj/armour/
nightmare3_fluffos_v2/lib/domains/Praxis/obj/magic/
nightmare3_fluffos_v2/lib/domains/Praxis/obj/weapon/
nightmare3_fluffos_v2/lib/domains/Praxis/orc_valley/
nightmare3_fluffos_v2/lib/domains/Praxis/quests/
nightmare3_fluffos_v2/lib/domains/Praxis/standardOld/
nightmare3_fluffos_v2/lib/include/
nightmare3_fluffos_v2/lib/log/
nightmare3_fluffos_v2/lib/log/errors/
nightmare3_fluffos_v2/lib/log/reports/
nightmare3_fluffos_v2/lib/log/watch/
nightmare3_fluffos_v2/lib/news/
nightmare3_fluffos_v2/lib/secure/cfg/
nightmare3_fluffos_v2/lib/secure/cmds/ambassador/
nightmare3_fluffos_v2/lib/secure/cmds/mortal/
nightmare3_fluffos_v2/lib/secure/save/users/d/
nightmare3_fluffos_v2/lib/secure/std/
nightmare3_fluffos_v2/lib/std/hm/
nightmare3_fluffos_v2/lib/std/living/
nightmare3_fluffos_v2/lib/std/room/
nightmare3_fluffos_v2/lib/std/user/
nightmare3_fluffos_v2/lib/std/virtual/
nightmare3_fluffos_v2/lib/www/
nightmare3_fluffos_v2/lib/www/errors/
nightmare3_fluffos_v2/lib/www/gateways/
nightmare3_fluffos_v2/win32/
#include <std.h>

inherit DAEMON;

int cmd_bump(string str) {
    object ob;
    string *sorties;
    string former, newroom;
    int kplah;

    if(this_player()->query_ghost()) return 0;
    if(!str) {
        notify_fail("Bump whom?\n");
        return 0;
    }
    if(!(ob = present(lower_case(str), environment(this_player())))) {
        notify_fail("No "+capitalize(str)+" here.\n");
	return 0;
    }
    if(!living(ob)) {
        write("You bump the "+str+".\n");
    	say(this_player()->query_cap_name()+" bumps the "+str+".\n");
	return 1;
    }
    if((ob->query_property("no bump")) || 
       (environment(ob)->query_property("no bump"))) {
        write(ob->query_cap_name()+" growls at you.\n");
	say(ob->query_cap_name()+" growls at "+this_player()->query_cap_name()+" as "+this_player()->query_subjective()+" tries to push "+ob->query_objective()+".\n", ob);
	return 1;
    }
    if((int)this_player()->query_sp() < 20) {
        notify_fail("You are too tired.\n");
        return 0;
    }
    kplah = (int)this_player()->query_stats("strength") -
      ((int)ob->query_stats("strength") + (int)ob->query_stats("dexterity"))/2;
    if(kplah < 1) {
        this_player()->add_hp(-(random(15)));
        this_player()->add_sp(-(random(20)));
	write(ob->query_cap_name()+" shoves you to the ground!\n");
	say(this_player()->query_cap_name()+" is shoved to the ground while trying to bump "+ob->query_cap_name()+".\n");
	tell_object(ob, this_player()->query_cap_name()+" is thrown to the ground while trying to bump you.\n");
	return 1;
    }
    kplah += random((int)ob->query_skill("melee"));
    if (kplah < random(101)) {
        write("The "+(string)ob->query_race()+" holds "+(string)ob->query_possessive()+" ground.\n");
	say(this_player()->query_cap_name()+" fails in an attempt to push "+ob->query_cap_name()+" aside.\n", ob);
	tell_object(ob, this_player()->query_cap_name()+" gives you a bit of a bruise trying to push you.\n");
	ob->add_hp(-(random(7)));
        this_player()->add_sp(-(random(10)));
	this_player()->add_hp(-(random(20)));
	return 1;
    }
    sorties = (string *)environment(ob)->query_exits();
    write("You push the "+(string)ob->query_race()+" out of the way.\n");
    say(this_player()->query_cap_name()+" pushes "+ob->query_cap_name()+" out of the way.\n", ob);
    tell_object(ob, this_player()->query_cap_name()+" pushes you out of the way.\n");
    this_player()->add_hp(-(random(10)));
   this_player()->add_sp(-(random(10)));
    ob->add_hp(-(random(5)));
    former = file_name(environment(ob));
    newroom = (string)environment(ob)->query_exit(sorties[random(sizeof(sorties))]);
    ob->move(newroom);
    if(!ob->is_player()) call_out("return_home", 14, ({ ob, former }) );
    return 1;
}

void return_home(mixed *borg) {
    if(!borg || !borg[0]) return;
    borg[0]->move_player(borg[1], "angrily");
}

void help() {
    write("Syntax: <bump [enemy]>\n\n"
      "Allows you to push people out of the way, but you better be strong!\n");
}