Snippet – Sacrificing Food to the Gods

Snippet – Sacrificing Food to the Gods

As Athens had a very large religious influence (being Greek fantasy and all), having a working sacrifice code was important. This snippet allowed players to sacrifice food offerings to the gods. Compatible with version R of Dawn of Time.

/*
sac.cpp
- Melissa Moritz
  Aka Phaedra at Lands of Oneiro www.lands-of-oneio.net:6000
  Formerly Hera of Athens
*/
 
#include "include.h" 

void do_sacrifice( char_data *ch, char *argument ) 
{ 
    char arg[MIL]; 
    OBJ_DATA *obj; 

    one_argument( argument, arg ); 

    if ( arg[0] == '\0' || !str_cmp( arg, ch->name ) ) 
    { 
   act( "`c$n offers $mself to the gods, who graciously decline.`x", 
       ch, NULL, NULL, TO_ROOM ); 
   act( 
       "`cThe gods appreciate your offer and may accept it later.`x", ch, NULL, NULL, TO_CHAR ); 
   return; 
    } 

    obj = get_obj_list( ch, arg, ch->in_room->contents ); 
    if ( obj == NULL ) 
    { 
   ch->printlnf( "`cYou can't find it.`x\n\r"); 
   return; 
    } 

    if ( obj->item_type == ITEM_CORPSE_PC ) 
    { 
   if (obj->contains) 
        { 
      ch->printlnf( 
        "`cThe gods would not appreciate that.`x"); 
      return; 
        } 
    } 


    if ( !obj->item_type == ITEM_FOOD ) 
    { 
   ch->printlnf( "`cThat is not an acceptable sacrifice.`x" ); 
   return; 
    } 


     if ( obj->item_type == ITEM_FOOD ) 
	{   
        ch->printlnf( 
       	"`mYou send up a burnt offering to the gods`m.`x"); 
   	act( "`c$n's offering sends a spiral of smoke to the gods.`x", 
       		ch, NULL, NULL, TO_ROOM );     
   	wiznet("$N sends up $p as a burnt offering.", ch,obj,0,0,0); 
    	extract_obj( obj ); 
    	return; 
	}else{
   	ch->printlnf( "`cThat is not an acceptable sacrifice.`x" ); 
   	return; 
    	} 
}