remove.c

gurba-0.40/lib/cmds/verb/remove.c · 752 B

From the archive gurba.tgz

Download the archive   « Back to the archive contents

mixed *query_verb_info( void ) {
  return( ({ "", "OBJI" }) );
}

mixed can_remove( void ) {
  return( "Remove what?" );
}

mixed can_remove_obj( object obj ) {

  if( !obj->is_worn() && !obj->is_wielded() ) {
    return( "You're not using the " + obj->query_id() + "." );
  }

  if( obj->is_cursed() ) {
    this_player()->targetted_action( "$N $vtry to remove $o, but $vfumble.", 0, obj );
    return( "Strange..." );
  }

  return( 1 );
}

mixed do_remove_obj( object obj ) {
  if( obj->is_wielded() ) {
    this_player()->do_unwield( obj );
    this_player()->targetted_action( obj->query_unwield_message(), 0, obj );
  } else {
    this_player()->do_remove( obj );
    this_player()->targetted_action( obj->query_remove_message(), 0, obj );
  }
}

Site Stats

Snippets: 1791
Codebases: 571