forge.c
src/forge.c · 1.2 KB
From the archive cyhawk_mud.tar.gz
Download the archive « Back to the archive contents
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "merc.h"
#include "interp.h"
#include "forge.h"
void cmd_prospect(CHAR_DATA * ch, char *arg)
{
char buf[MAX_BUFFER];
if ( ch->in_room->sector_type != SECT_MOUNTAIN)
{
stc("This is not a mountinous area, you cannot prospect here.\n", ch);
return;
}
stc("You prospect the room...\n", ch);
sprintf(buf, "You are likely to find %s here.\n", return_ore(ch->in_room->ore_type));
stc(buf, ch);
return;
}
char * return_ore(int type)
{
switch(type)
{ default:
return "error";
break;
case ORE_BRONZE:
return "{ybronze{x";
break;
case ORE_IRON:
return "{Di{wro{Dn{x";
break;
case ORE_SILVER:
return "{WS{wilve{Wr{x";
break;
case ORE_GOLD:
return "{YG{yol{Yd{x";
break;
case ORE_PLATINUM:
return "{DP{Wl{watin{Wu{Dm{x";
break;
case ORE_METEORIC:
return "{CM{ce{Bt{beo{Br{ci{Cc{x";
break;
}
}