dragon.c
demise/src/dragon.c · 84.7 KB
From the archive dodbackup-final.tar.gz
Download the archive « Back to the archive contents
/***************************************************************************
* God Wars Mud originally written by KaVir aka Richard Woolcock. *
* Changes done to the code done by Sage aka Walter Howard, this mud is *
* for the public, however if you run this code it means you agree *
* to the license.low, license.gw, and license.merc have fun. :) *
***************************************************************************/
#if defined(macintosh)
#include <types.h>
#else
#include <sys/types.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "merc.h"
#include "dragon.h"
void set_fighting args ((CHAR_DATA * ch, CHAR_DATA * victim));
void dpowers args ((CHAR_DATA * ch));
int
dragdam (CHAR_DATA * ch, CHAR_DATA * victim, int dam)
{
int gen = 0;
int stat = 0;
int div = 0;
bool doubledam = FALSE;
bool halfdam = FALSE;
if (IS_NPC (ch))
return dam;
if (IS_SET (mudconfig->world_affects, WORLD_DOUBLEDAMCAP))
doubledam = TRUE;
if (IS_SET (mudconfig->world_affects, WORLD_HALFDAMCAP))
halfdam = TRUE;
gen = ch->pcdata->dpowers[DRAGON_AGE];
if (dam < 1)
dam = number_range (10, 40);
stat = ch->max_hit / 1000;
stat *= gen;
dam += stat;
dam += number_range (1, 999);
if (dam > 4000)
dam = 3000 + number_range (199, 1399);
if (IS_NPC (victim))
dam *= 3;
if (IS_NPC (victim))
{
if (doubledam)
dam *= 2;
if (halfdam)
dam /= 2;
}
return dam;
}
const char *dcolor[12] = {
"",
"#RR#re#Rd#n",
"#GG#gree#Gn#n",
"#LB#llu#Le#n",
"#oB#cras#os#n",
"#CS#7ilve#Cr#n",
"#7White#n",
"#0Black#n",
"#yG#oo#yl#od#n",
"#0Sh#cad#0ow#n",
"#PP#pin#Pk#n",
"Grey"
};
const char *dcolor2[12] = {
"",
"Red",
"Green",
"Blue",
"Brass",
"Silver",
"White",
"Black",
"Gold",
"Shadow",
"Pink",
"Grey"
};
const char *dtransformation_message[13] = {
"Your body shrinks and resumes your human form.\n\r",
"Your body grows and disorts into a hatchling dragon..\n\r",
"Your body grows and disorts into a very young dragon..\n\r",
"Your body grows and disorts into a young dragon..\n\r",
"Your body grows and disorts into a juvenile dragon..\n\r",
"Your body grows and disorts into a young adult dragon..\n\r",
"Your body grows and disorts into an adult dragon..\n\r",
"Your body grows and disorts into a mature adult dragon..\n\r",
"Your body grows and disorts into an old dragon..\n\r",
"Your body grows and disorts into a very old dragon..\n\r",
"Your body grows and disorts into a venerable dragon..\n\r",
"Your body grows and disorts into a wyrm dragon..\n\r",
"Your body grows and disorts into a supreme dragon..\n\r"
};
const struct dform_type dform_data[MAX_DFORMS] = {
// Short Long Claws? Fangs? Tail? Wings? +hit +dam -ac
{"", "", FALSE, FALSE, FALSE, FALSE, 0, 0, 0},
// Hatchling
{"A Small %s Dragon Hatchling is here.",
"A %s Hatchling", FALSE, FALSE, FALSE, FALSE, 5, 5, 10},
// Very_Young
{"A Small Young %s Dragon is here.",
"A %s Small Young Dragon", FALSE, FALSE, FALSE, FALSE, 10, 10, 15},
// Young
{"A Small %s Dragon is here.",
"A Young %s Dragon", TRUE, FALSE, FALSE, FALSE, 15, 15, 25},
// Juvenile
{"A Juvenile %s Dragon stands here.",
"A Juvenile %s Dragon", TRUE, FALSE, FALSE, FALSE, 25, 25, 50},
// Young Adult
{"A Medium Sized %s Dragon stands here.",
"A %s Dragon", TRUE, TRUE, FALSE, FALSE, 40, 40, 75},
// Adult
{"A Large, Adult %s Dragon stands here.",
"An Adult %s Dragon", TRUE, TRUE, FALSE, FALSE, 80, 80, 100},
// Mature Adult
{"A Large Mature %s Dragon stands here.",
"A Mature %s Dragon", TRUE, TRUE, TRUE, FALSE, 100, 100, 125},
// Old
{"An Huge Old %s Dragon stands here.",
"A Old %s Dragon", TRUE, TRUE, TRUE, FALSE, 150, 150, 150},
// Very Old
{"A Huge Very Old %s Dragon stands here.",
"A Very Old %s Dragon", TRUE, TRUE, TRUE, TRUE, 200, 200, 175},
// Venerable
{"A Giant %s Venerable Dragon is here, towering over you.",
"A Venerable %s Dragon", TRUE, TRUE, TRUE, TRUE, 250, 250, 200},
// Wyrm
{"A Giant %s Wyrm is here, towering over you.",
"A %s Wyrm", TRUE, TRUE, TRUE, TRUE, 350, 350, 250},
// Supreme Dragon
{"A Colossal Ancient %s Dragon towers over you.",
"An Ancient %s Dragon", TRUE, TRUE, TRUE, TRUE, 450, 450, 300}
};
void
add_dragon_bonuses (CHAR_DATA * ch)
{
int gen;
gen = ch->pcdata->dpowers[DRAGON_AGE];
if (dform_data[gen].claws == TRUE)
{
send_to_char
("Your hands and feet transform into big sharps claws.\n\r", ch);
act ("$n's hands and feet transform into big sharps claws.", ch, NULL,
NULL, TO_ROOM);
SET_BIT (ch->vampaff, VAM_CLAWS);
SET_BIT (ch->pcdata->disc[C_CURRENT], DEM_HOOVES);
}
if (dform_data[gen].fangs == TRUE)
{
send_to_char
("As your head transforms into that of a dragon your teeth become as sharp as razors.\n\r",
ch);
act
("As $n's head transforms into that of a dragon $s teeth become as sharp as razors.",
ch, NULL, NULL, TO_ROOM);
SET_BIT (ch->vampaff, VAM_FANGS);
}
if (dform_data[gen].tail == TRUE)
{
send_to_char ("A mighty tail slides from your back.\n\r", ch);
act ("A mighty tail extends from $n's back.", ch, NULL, NULL, TO_ROOM);
SET_BIT (ch->dpwrs, DRA_TAIL);
}
if (dform_data[gen].wings == TRUE)
{
send_to_char ("Large scaly wings burst from your back.\n\r", ch);
act ("A pair of Large scaly wings burst from $n's back.", ch, NULL,
NULL, TO_ROOM);
SET_BIT (ch->dpwrs, DRA_WINGS);
}
return;
}
void
remove_dragon_bonuses (CHAR_DATA * ch)
{
int gen;
gen = ch->pcdata->dpowers[DRAGON_AGE];
if (IS_VAMPAFF (ch, VAM_CLAWS))
{
send_to_char ("Your claws return back into normal hands and feet.\n\r",
ch);
act ("$n's claws return back into normal hands and feet.", ch, NULL,
NULL, TO_ROOM);
REMOVE_BIT (ch->vampaff, VAM_CLAWS);
}
if (IS_VAMPAFF (ch, VAM_FANGS))
{
send_to_char
("Your teeth reform their original form as your head shrinks.\n\r",
ch);
act ("$n's teeth reform their original form as $s head shrinks.", ch,
NULL, NULL, TO_ROOM);
REMOVE_BIT (ch->vampaff, VAM_FANGS);
}
if (IS_SET (ch->dpwrs, DRA_TAIL))
{
send_to_char ("The mighty tail disapears from your back .\n\r", ch);
act ("$n's tail disapear from $s back.", ch, NULL, NULL, TO_ROOM);
REMOVE_BIT (ch->dpwrs, DRA_TAIL);
}
if (IS_SET (ch->dpwrs, DRA_WINGS))
{
send_to_char ("Your large scaly wings slide into your back.\n\r", ch);
act ("$n's large scaly wings slide into $s back.", ch, NULL, NULL,
TO_ROOM);
REMOVE_BIT (ch->dpwrs, DRA_WINGS);
}
if (IS_DEMAFF (ch, DEM_HOOVES))
{
REMOVE_BIT (ch->pcdata->disc[C_CURRENT], DEM_HOOVES);
}
return;
}
void
set_dragon_form (CHAR_DATA * ch)
{
char buf[MSL];
int gen;
gen = ch->pcdata->dpowers[DRAGON_AGE];
SET_BIT (ch->polyaff, POLY_DRAGONFORM);
SET_BIT (ch->affected_by, AFF_POLYMORPH);
SET_BIT (ch->vampaff, VAM_DISGUISED);
free_string (ch->morph);
ch->morph = str_dup (get_form (ch));
sprintf (buf, dtransformation_message[gen]);
send_to_char (buf, ch);
ch->pcdata->dpowers[DRAGON_FORM] = gen;
add_dragon_bonuses (ch);
return;
}
void
remove_dragon_form (CHAR_DATA * ch)
{
char buf[MSL];
REMOVE_BIT (ch->polyaff, POLY_DRAGONFORM);
free_string (ch->morph);
ch->morph = str_dup (get_form (ch));
if (strlen (ch->morph) < 2)
{
REMOVE_BIT (ch->affected_by, AFF_POLYMORPH);
REMOVE_BIT (ch->vampaff, VAM_DISGUISED);
}
sprintf (buf, dtransformation_message[0]);
send_to_char (buf, ch);
remove_dragon_bonuses (ch);
ch->pcdata->dpowers[DRAGON_FORM] = 0;
return;
}
void
do_dform (CHAR_DATA * ch, char *argument)
{
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->dpowers[DRAGON_FORM] > 0)
{
remove_dragon_form (ch);
return;
}
if (!IS_POLYAFF (ch, POLY_DRACOFORM))
{
stc
("You need to be in the Draconian form to take the form of a True Dragon.\n\r",
ch);
return;
}
else
{
set_dragon_form (ch);
}
return;
}
void
do_gemform (CHAR_DATA * ch, char *argument)
{
OBJ_DATA *obj;
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
do_huh (ch, "");
return;
}
if (ch->pcdata->cpowers[DRAC_DEFENSIVE] < 6)
{
send_to_char ("You haven't learned this skill yet.\n\r", ch);
return;
}
if (IS_AFFECTED (ch, AFF_POLYMORPH))
{
send_to_char ("You cannot do this while polymorphed.\n\r", ch);
return;
}
if ((obj = create_object (get_obj_index (3611), 60)) == NULL)
{
send_to_char ("Object is missing contact Corim now.\n\r", ch);
return;
}
if (has_artifact (ch))
{
stc ("Not with an artifact.\n\r", ch);
return;
}
if (IS_AFFECTED (ch, AFF_WEBBED))
{
send_to_char ("Not with all this sticky webbing on.\n\r", ch);
return;
}
obj_to_room (obj, ch->in_room);
SET_BIT (obj->quest, QUEST_VANISH);
act ("$n transforms into $p and falls to the ground.", ch, obj, NULL,
TO_ROOM);
act ("You transform into $p and fall to the ground.", ch, obj, NULL,
TO_CHAR);
ch->pcdata->obj_vnum = 3611;
obj->chobj = ch;
ch->pcdata->chobj = obj;
SET_BIT (ch->affected_by, AFF_POLYMORPH);
SET_BIT (ch->extra, EXTRA_OSWITCH);
free_string (ch->morph);
ch->morph = str_dup (obj->short_descr);
return;
}
void
do_dgain (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
char arg1[MIL];
char arg2[MIL];
int count = 1, cost;
argument = one_argument (argument, arg1);
argument = one_argument (argument, arg2);
if (IS_NPC (ch))
return;
if (!IS_NPC (ch)) // leave it like this untill i get it recoded. Corim
{
do_huh (ch, "");
return;
}
if (IS_SET (ch->dpwrs, DRA_GEMFORM))
count += 1;
if (IS_SET (ch->dpwrs, DRA_FROST_BREATH))
count += 1;
if (IS_SET (ch->dpwrs, DRA_FIRE_BREATH))
count += 1;
if (IS_SET (ch->dpwrs, DRA_LIGHTNING_BREATH))
count += 1;
if (IS_SET (ch->dpwrs, DRA_GAS_BREATH))
count += 1;
if (IS_SET (ch->dpwrs, DRA_SHADOW_BREATH))
count += 1;
if (IS_SET (ch->dpwrs, DRA_ACID_BREATH))
count += 1;
if (IS_SET (ch->dpwrs, DRA_TERROR))
count += 1;
if (IS_SET (ch->dpwrs, DRA_AUTOBREATH))
count += 1;
if (IS_SET (ch->dpwrs, DRA_MASK))
count += 1;
if (IS_SET (ch->dpwrs, DRA_MAGIC))
count += 1;
if (IS_SET (ch->dpwrs, DRA_LUCK))
count += 1;
if (IS_SET (ch->dpwrs, DRA_VENOM))
count += 1;
// if (IS_SET (ch->dpwrs, DRA_SCRY))
// count += 1;
// if (IS_SET (ch->dpwrs, DRA_PEER))
// count += 1;
// if (IS_SET (ch->dpwrs, DRA_TRUESIGHT))
// count += 1;
if (IS_SET (ch->dpwrs, DRA_TOUGHNESS))
count += 1;
// if (IS_SET (ch->dpwrs, DRA_SHIELD))
// count += 1;
if (IS_SET (ch->dpwrs, DRA_SWOOP))
count += 1;
if (arg1[0] == '\0')
{
send_to_char
("#R---------------------------------------------------------\n\r",
ch);
send_to_char
("#0 :: #7Dragon Powers #0::#n \n\r",
ch);
send_to_char
("#R---------------------------------------------------------\n\r",
ch);
send_to_char ("#7Terror - Magic - Breath#n", ch);
if (ch->pcdata->dpowers[DRAGON_AGE] > YOUNG)
send_to_char ("#7 - Gemform", ch);
if (ch->pcdata->dpowers[DRAGON_AGE] > JUVENILE)
send_to_char ("#7 - AutoBreath\n\r", ch);
if (ch->pcdata->dpowers[DRAGON_AGE] > YOUNG_ADULT) //Corim aka Infinity
send_to_char ("#7Luck - Breath", ch);
if (ch->pcdata->dpowers[DRAGON_AGE] > ADULT)
send_to_char ("#7 - Venom", ch);
if (ch->pcdata->dpowers[DRAGON_AGE] > MATURE_ADULT)
send_to_char ("#7 - Mask - Breath", ch);
if (ch->pcdata->dpowers[DRAGON_AGE] > OLD)
send_to_char ("#7 - Swoop - Breath", ch);
if (ch->pcdata->dpowers[DRAGON_AGE] > VERY_OLD)
send_to_char ("#7 - Breath", ch);
if (ch->pcdata->dpowers[DRAGON_AGE] > WYRM)
send_to_char ("#7\n\rScales - Breath0#n", ch);
send_to_char
("\n\r#R---------------------------------------------------------\n\r",
ch);
send_to_char
("#0To view what powers you have gained, type 'dgain powers'.\n\r",
ch);
send_to_char
("#R---------------------------------------------------------\n\r",
ch);
return;
}
cost = count * 1000;
if (!str_cmp (arg1, "powers"))
{
send_to_char
("#R---------------------------------------------------------\n\r",
ch);
send_to_char
("#0 :: #7Dragon Powers #0::#n \n\r",
ch);
send_to_char
("#R---------------------------------------------------------\n\r",
ch);
dpowers (ch);
send_to_char
("#R---------------------------------------------------------\n\r",
ch);
return;
}
if (!str_cmp (arg1, "terror") && !IS_SET (ch->dpwrs, DRA_TERROR))
{
sprintf (buf, "You don't have the required %d %s Power Points.\n\r",
cost);
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
send_to_char (buf, ch);
return;
}
SET_BIT (ch->dpwrs, DRA_TERROR);
ch->pcdata->power[POWER_CURRENT] -= cost;
send_to_char ("You now inspire terror in victims.\n\r", ch);
return;
}
if (!str_cmp (arg1, "magic")
&& ch->pcdata->dpowers[DRAGON_AGE] > YOUNG_ADULT
&& !IS_SET (ch->dpwrs, DRA_MAGIC))
{
sprintf (buf, "You don't have the required %d %s Power Points.\n\r",
cost);
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
send_to_char (buf, ch);
return;
}
SET_BIT (ch->dpwrs, DRA_MAGIC);
ch->pcdata->power[POWER_CURRENT] -= cost;
send_to_char
("You now have the knowledge of how to use the draconic magic.\n\r",
ch);
return;
}
if (!str_cmp (arg1, "autobreath")
&& ch->pcdata->dpowers[DRAGON_AGE] > JUVENILE
&& !IS_SET (ch->dpwrs, DRA_AUTOBREATH))
{
sprintf (buf, "You don't have the required %d %s Power Points.\n\r",
cost);
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
send_to_char (buf, ch);
return;
}
SET_BIT (ch->dpwrs, DRA_AUTOBREATH);
ch->pcdata->power[POWER_CURRENT] -= cost;
send_to_char
("You now have the knowledge of how to use your auto-breath.\n\r",
ch);
return;
}
if (!str_cmp (arg1, "luck") && ch->pcdata->dpowers[DRAGON_AGE] > YOUNG_ADULT
&& !IS_SET (ch->dpwrs, DRA_LUCK))
{
sprintf (buf, "You don't have the required %d %s Power Points.\n\r",
cost);
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
send_to_char (buf, ch);
return;
}
SET_BIT (ch->dpwrs, DRA_LUCK);
ch->pcdata->power[POWER_CURRENT] -= cost;
send_to_char
("You now have the knowledge of how to give the luck of the dragon.\n\r",
ch);
return;
}
if (!str_cmp (arg1, "mask")
&& ch->pcdata->dpowers[DRAGON_AGE] > MATURE_ADULT
&& !IS_SET (ch->dpwrs, DRA_MASK))
{
sprintf (buf, "You don't have the required %d %s Power Points.\n\r",
cost);
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
send_to_char (buf, ch);
return;
}
SET_BIT (ch->dpwrs, DRA_MASK);
ch->pcdata->power[POWER_CURRENT] -= cost;
send_to_char
("You now have the knowledge of how to put on an disguise.\n\r", ch);
return;
}
if (!str_cmp (arg1, "gemform") && ch->pcdata->dpowers[DRAGON_AGE] > YOUNG
&& !IS_SET (ch->dpwrs, DRA_GEMFORM))
{
sprintf (buf, "You don't have the required %d %s Power Points.\n\r",
cost);
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
send_to_char (buf, ch);
return;
}
SET_BIT (ch->dpwrs, DRA_GEMFORM);
ch->pcdata->power[POWER_CURRENT] -= cost;
send_to_char
("You now have the knowledge of how to turn into a tiny gem.\n\r",
ch);
return;
}
if (!str_cmp (arg1, "swoop") && ch->pcdata->dpowers[DRAGON_AGE] > OLD
&& !IS_SET (ch->dpwrs, DRA_SWOOP))
{
sprintf (buf, "You don't have the required %d %s Power Points.\n\r",
cost);
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
send_to_char (buf, ch);
return;
}
SET_BIT (ch->dpwrs, DRA_SWOOP);
ch->pcdata->power[POWER_CURRENT] -= cost;
send_to_char
("You now have the knowledge of how to fly to and attack others.\n\r",
ch);
return;
}
if (!str_cmp (arg1, "scales") && ch->pcdata->dpowers[DRAGON_AGE] > WYRM
&& !IS_SET (ch->dpwrs, DRA_TOUGHNESS))
{
sprintf (buf, "You don't have the required %d %s Power Points.\n\r",
cost);
if (ch->pcdata->power[POWER_CURRENT] < cost)
{
send_to_char (buf, ch);
return;
}
SET_BIT (ch->dpwrs, DRA_TOUGHNESS);
ch->pcdata->power[POWER_CURRENT] -= cost;
send_to_char ("You now have the scales for help in fights.\n\r", ch);
return;
}
do_dgain (ch, "");
return;
}
void
do_luck (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
char arg[MIL];
AFFECT_DATA af;
int mcost = 200, gen, sn;
gen = ch->pcdata->dpowers[DRAGON_AGE];
one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (!IS_SET (ch->dpwrs, DRA_LUCK))
{
send_to_char ("You haven't learned this skill yet.\n\r", ch);
return;
}
if (ch->mana < mcost)
{
send_to_char
("You need more mystical power before you can use this skill.\n\r",
ch);
return;
}
if (arg[1] == '\0')
{
send_to_char ("Who will become lucky?\n\r", ch);
return;
}
if ((victim = get_char_room (ch, arg)) == NULL)
{
send_to_char ("They aren't here.\n\r", ch);
return;
}
if ((sn = skill_lookup ("dragon luck")) < 0)
return;
if (is_affected (victim, sn))
return;
act ("You bestow the Luck of the Dragons on $N.", ch, NULL, victim,
TO_CHAR);
act ("$n bestows the Luck of the Dragons on you.", ch, NULL, victim,
TO_VICT);
act ("$n bestows the Luck of the Dragons on $N.", ch, NULL, victim,
TO_NOTVICT);
af.type = sn;
af.location = APPLY_HITROLL;
af.modifier = 100;
af.duration = gen * 10;
af.bitvector = 0;
affect_to_char (victim, &af);
af.location = APPLY_DAMROLL;
af.modifier = 100;
af.bitvector = 0;
affect_to_char (victim, &af);
ch->mana -= mcost;
return;
}
void
do_consume (CHAR_DATA * ch, char *argument)
{
OBJ_DATA *corpse;
OBJ_DATA *c_next;
OBJ_DATA *obj;
OBJ_DATA *obj_next;
char arg[MIL];
char buf[MIL];
int points, gen, heal;
bool doublexp = FALSE;
bool halfexp = FALSE;
if (IS_SET (mudconfig->world_affects, WORLD_DOUBLEXP))
doublexp = TRUE;
if (IS_SET (mudconfig->world_affects, WORLD_HALFEXP))
halfexp = TRUE;
one_argument (argument, arg);
if (!IS_DRAGON (ch))
return;
gen = ch->pcdata->dpowers[DRAGON_AGE];
for (corpse = ch->in_room->contents; corpse != NULL; corpse = c_next)
{
c_next = corpse->next_content;
if (corpse->item_type != ITEM_CORPSE_NPC)
continue;
points = ((number_range (50, 100) * gen));
heal = points * number_range (2, 4);
if (doublexp)
points *= 2;
if (halfexp)
points /= 2;
ch->dps += points;
act_brief ("You savagely devour $p.", ch, corpse, NULL, TO_CHAR,
PLR_BRIEF3);
act_brief ("$n savagely devours $p.", ch, corpse, NULL, TO_ROOM,
PLR_BRIEF4);
sprintf (buf, "You gain #y%d#n dragon energy points.\n\r", points);
send_to_char (buf, ch);
if (ch->pcdata->cpowers[DRAC_OFFENSIVE] > 9)
{
sprintf (buf, "You gain #R%d#n hitpoints from $p", heal);
act_brief (buf, ch, corpse, NULL, TO_CHAR, PLR_BRIEF3);
ch->hit += heal;
if (ch->hit >= ch->max_hit)
ch->hit = ch->max_hit;
}
for (obj = corpse->contains; obj; obj = obj_next)
{
obj_next = obj->next_content;
obj_from_obj (obj);
obj_to_room (obj, ch->in_room);
}
if (corpse != NULL)
extract_obj (corpse);
}
return;
}
void
do_gem (CHAR_DATA * ch, char *argument)
{
char arg1[MIL];
char buf[MSL];
OBJ_INDEX_DATA *pObjIndex;
OBJ_DATA *obj;
int value;
argument = one_argument (argument, arg1);
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (IS_NPC (ch) || (ch->dps < 1))
{
send_to_char ("You are unable to make a gem.\n\r", ch);
return;
}
else if (arg1[0] == '\0' || !is_number (arg1))
{
send_to_char ("Please specify a value for gem.\n\r", ch);
return;
}
else
{
value = atoi (arg1);
if (value < 1 || value > 100000)
{
send_to_char
("Gem value should have a value between 1 and 100000.\n\r", ch);
return;
}
else if (value > ch->dps)
{
sprintf (buf,
"You only have %d Dragon Growth Points left to put into a gem.\n\r",
ch->dps);
send_to_char (buf, ch);
return;
}
}
if ((pObjIndex = get_obj_index (OBJ_VNUM_PROTOPLASM)) == NULL)
{
send_to_char ("Error...missing object, please inform Corim.\n\r", ch);
return;
}
ch->dps -= value;
if (ch->dps < 0)
ch->dps = 0;
obj = create_object (pObjIndex, value);
obj->value[0] = value;
obj->level = 1;
obj->cost = value * 1000;
obj->item_type = ITEM_DRAGONGEM;
obj_to_char (obj, ch);
if (obj->questmaker != NULL)
free_string (obj->questmaker);
obj->questmaker = str_dup (ch->name);
free_string (obj->name);
obj->name = str_dup ("dragon gem");
sprintf (buf, "a %d point gem", value);
free_string (obj->short_descr);
obj->short_descr = str_dup (buf);
sprintf (buf, "A %d point gem lies on the floor.", value);
free_string (obj->description);
obj->description = str_dup (buf);
act ("You breath a small flame which forms into $p.", ch, obj, NULL,
TO_CHAR);
act ("$n breathes out a small flame which forms into $p.", ch, obj, NULL,
TO_ROOM);
return;
}
void
do_dragonarmor (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
char arg1[MSL];
OBJ_INDEX_DATA *pObjIndex;
OBJ_DATA *obj;
int vnum = 0;
int cost = 0;
argument = one_argument (argument, arg1);
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (arg1[0] == '\0')
{
send_to_char ("Usage: dragonarmor <piece>\n\r", ch);
send_to_char
("piece = Ring, Collar, Shirt, Helmet, Leggings, Boots, Gloves, Sleeves, Cape, Belt, Bracer, Mask\n\r",
ch);
return;
}
if (!str_cmp (arg1, "ring"))
{
cost = 5000;
vnum = 32500;
}
else if (!str_cmp (arg1, "collar"))
{
cost = 5000;
vnum = 32501;
}
else if (!str_cmp (arg1, "shirt"))
{
cost = 5000;
vnum = 32502;
}
else if (!str_cmp (arg1, "helmet"))
{
cost = 5000;
vnum = 32503;
}
else if (!str_cmp (arg1, "leggings"))
{
cost = 5000;
vnum = 32504;
}
else if (!str_cmp (arg1, "boots"))
{
cost = 5000;
vnum = 32505;
}
else if (!str_cmp (arg1, "gloves"))
{
cost = 5000;
vnum = 32506;
}
else if (!str_cmp (arg1, "sleeves"))
{
cost = 5000;
vnum = 32507;
}
else if (!str_cmp (arg1, "cape"))
{
cost = 5000;
vnum = 32508;
}
else if (!str_cmp (arg1, "belt"))
{
cost = 5000;
vnum = 32509;
}
else if (!str_cmp (arg1, "bracer"))
{
cost = 5000;
vnum = 32510;
}
else if (!str_cmp (arg1, "mask"))
{
cost = 5000;
vnum = 32511;
}
else
{
send_to_char ("Usage: dragonarmor <piece>\n\r", ch);
send_to_char
("piece = Ring, Collar, Shirt, Helmet, Leggings, Boots, Gloves, Sleeves, Cape, Belt, Bracer, Mask\n\r",
ch);
return;
}
if (ch->dps < cost)
{
send_to_char ("You don't have enough dragon growth points.\n\r", ch);
return;
}
if (vnum == 0 || (pObjIndex = get_obj_index (vnum)) == NULL)
{
send_to_char ("Missing object, please inform Corim.\n\r", ch);
return;
}
ch->dps -= cost;
obj = create_object (pObjIndex, 50);
obj->value[0] = 65;
free_string (obj->questmaker);
obj->questmaker = str_dup (ch->name);
free_string (obj->questowner);
obj->questowner = str_dup (ch->name);
free_string (obj->creator);
sprintf (buf, "%s (Dragonarmor)", ch->name);
obj->creator = str_dup (buf);
SET_BIT (obj->quest, QUEST_RELIC);
SET_BIT (obj->spectype, SITEM_DRAGON);
obj->condition = 100;
obj->toughness = 100;
obj->resistance = 1;
obj_to_char (obj, ch);
act ("$p appears in your hands while you let out a mighty roar!", ch, obj,
NULL, TO_CHAR);
act ("$p appears in $n's hands while $n lets out a mighty roar!", ch, obj,
NULL, TO_ROOM);
return;
}
void
do_fbreath (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
char buf[MSL];
int dam = 0;
int max = 0;
int mcost = 0;
int gen = ch->pcdata->dpowers[DRAGON_AGE];
char arg[MIL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to use your breathweapon on?\n\r", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
if ((victim = get_char_room (ch, arg)) == NULL)
{
send_to_char ("They aren't here.\n\r", ch);
return;
}
}
mcost = gen * 25;
if (mcost > ch->dps)
{
send_to_char ("You don't have enough Dragon Energy Points.", ch);
return;
}
dam = number_range (1, 30);
dam = dragdam (ch, victim, dam);
if (IS_NPC (victim))
{
dam = dam * 2;
}
if (is_safe (ch, victim) == TRUE)
return;
if (dam <= 0)
dam = 1;
sprintf (buf, "#RYou breathe forth a cone of fire!#n\n\r");
act (buf, ch, NULL, victim, TO_CHAR);
if (ch->spl[RED_MAGIC] >= 240)
max = number_range (2, 5);
else if (ch->spl[RED_MAGIC] >= 200)
max = number_range (2, 4);
else if (ch->spl[RED_MAGIC] >= 150)
max = number_range (2, 3);
else if (ch->spl[RED_MAGIC] >= 100)
max = number_range (1, 2);
else
max = 1;
sev_hit (ch, victim, dam, gsn_dfire_breath, DAM_FIRE, max, TRUE, TRUE,
FALSE);
if (!IS_AFFECTED (victim, AFF_FLAMING))
{
send_to_char ("You are engulfed in flames!\n\r", victim);
act ("$n is engulfed in flames!", victim, NULL, NULL, TO_ROOM);
SET_BIT (victim->affected_by, AFF_FLAMING);
}
ch->dps -= mcost;
return;
}
void
do_lbreath (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
char buf[MSL];
int dam = 0;
int max = 0;
int mcost = 0;
int gen = ch->pcdata->dpowers[DRAGON_AGE];
char arg[MSL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to use your breathweapon on?\n\r", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
if ((victim = get_char_room (ch, arg)) == NULL)
{
send_to_char ("They aren't here.\n\r", ch);
return;
}
}
mcost = gen * 30;
if (mcost > ch->dps)
{
send_to_char ("You don't have enough Dragon Energy Points.", ch);
return;
}
dam = number_range (1, 30);
dam = dragdam (ch, victim, dam);
if (is_safe (ch, victim) == TRUE)
return;
if (dam <= 0)
dam = 1;
sprintf (buf,
"#yYour breath forth a beam of pure white sparkling light!\n\r");
act (buf, ch, NULL, victim, TO_CHAR);
if (ch->spl[YELLOW_MAGIC] >= 240)
max = number_range (2, 5);
else if (ch->spl[YELLOW_MAGIC] >= 200)
max = number_range (2, 4);
else if (ch->spl[YELLOW_MAGIC] >= 150)
max = number_range (2, 3);
else if (ch->spl[YELLOW_MAGIC] >= 100)
max = number_range (1, 2);
else
max = 1;
sev_hit (ch, victim, dam, gsn_dlightning_breath, DAM_SHOCK, max, TRUE, TRUE,
FALSE);
if (!IS_NPC (victim))
{
if (number_range (1, 10) < 4)
{
act ("$N screams as your lightning bolt knocks $M senseless.", ch,
NULL, victim, TO_CHAR);
act ("$N screams as $n's lightning bolt knocks $M senseless.", ch,
NULL, victim, TO_NOTVICT);
act
("You scream in pain as $n's lightning bolt hits you, then your lights go out.",
ch, NULL, victim, TO_VICT);
stop_fighting (victim, TRUE);
victim->position = POS_STUNNED;
}
}
ch->dps -= mcost;
return;
}
void
do_sbreath (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
char buf[MSL];
int dam = 0;
int max = 0;
int heal = 0;
int mcost = 0;
int gen = ch->pcdata->dpowers[DRAGON_AGE];
char arg[MSL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to use your breathweapon on?\n\r", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
if ((victim = get_char_room (ch, arg)) == NULL)
{
send_to_char ("They aren't here.\n\r", ch);
return;
}
}
mcost = gen * 35;
if (mcost > ch->dps)
{
send_to_char ("You don't have enough Dragon Energy Points.", ch);
return;
}
dam = number_range (1, 30);
dam = dragdam (ch, victim, dam);
if (is_safe (ch, victim) == TRUE)
return;
if (dam <= 0)
dam = 1;
send_to_char
("#0You open your jaws and breathe out a cone of despair.#n\n\r", ch);
send_to_char
("#0You drain the life from you victim, adding to your own.#n\n\r", ch);
if (ch->spl[PURPLE_MAGIC] >= 240)
max = number_range (2, 5);
else if (ch->spl[PURPLE_MAGIC] >= 200)
max = number_range (2, 4);
else if (ch->spl[PURPLE_MAGIC] >= 150)
max = number_range (2, 3);
else if (ch->spl[PURPLE_MAGIC] >= 100)
max = number_range (1, 2);
else
max = 1;
if (ch->spl[PURPLE_MAGIC] >= 240)
{
heal = dam * 3;
}
else if (ch->spl[PURPLE_MAGIC] >= 200)
{
heal = dam * 2;
}
else
{
heal = dam;
}
sprintf (buf, "You are healed #r[#L%d#r]#n hitpoints#n.\n\r", heal);
sev_hit (ch, victim, dam, gsn_dshadow_breath, DAM_SHADOW, max, TRUE, TRUE,
FALSE);
act_brief (buf, ch, NULL, NULL, TO_CHAR, PLR_BRIEF3);
ch->hit += heal;
if (ch->hit > (ch->max_hit + 10000))
ch->hit = ch->max_hit + 10000;
ch->dps -= mcost;
return;
}
void
do_cbreath (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
char buf[MSL];
int dam = 0;
int max = 0;
int mcost = 0;
int gen = ch->pcdata->dpowers[DRAGON_AGE];
char arg[MSL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to use your breathweapon on?\n\r", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
if ((victim = get_char_room (ch, arg)) == NULL)
{
send_to_char ("They aren't here.\n\r", ch);
return;
}
}
mcost = gen * 35;
if (mcost > ch->dps)
{
send_to_char ("You don't have enough Dragon Energy Points.", ch);
return;
}
dam = number_range (1, 30);
dam = dragdam (ch, victim, dam);
if (is_safe (ch, victim) == TRUE)
return;
if (dam <= 0)
dam = 1;
sprintf (buf, "#LYour breath forth a cloud of freezing air!\n\r");
act (buf, ch, NULL, victim, TO_CHAR);
if (ch->spl[BLUE_MAGIC] >= 240)
max = number_range (2, 5);
else if (ch->spl[BLUE_MAGIC] >= 200)
max = number_range (2, 4);
else if (ch->spl[BLUE_MAGIC] >= 150)
max = number_range (2, 3);
else if (ch->spl[BLUE_MAGIC] >= 100)
max = number_range (1, 2);
else
max = 1;
sev_hit (ch, victim, dam, gsn_dfrost_breath, DAM_COLD, max, TRUE, TRUE,
FALSE);
if (number_range (1, 10) < 5)
{
if (!IS_NPC (victim))
{
sprintf (buf, "%s freeze's solid.\n\r", victim->name);
}
else
{
sprintf (buf, "%s freeze's solid.\n\r", victim->short_descr);
}
stc (buf, ch);
stc ("You freeze solid.\n\r", victim);
act ("$n freeze's solid.", ch, NULL, victim, TO_NOTVICT);
waiting (victim, 16);
}
ch->dps -= mcost;
return;
}
void
do_gbreath (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
CHAR_DATA *vch;
CHAR_DATA *vch_next;
int gen = ch->pcdata->dpowers[DRAGON_AGE];
int mcost = 0;
int dam = 0;
int number_hit = 0;
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
mcost = 20 * gen;
if (mcost > ch->dps)
{
send_to_char ("You don't have enough Dragon Energy Points.", ch);
return;
}
send_to_char ("#pYou breathe forth a cloud of deadly steaming gas.#n\n\r",
ch);
for (vch = ch->in_room->people; vch != NULL; vch = vch_next)
{
vch_next = vch->next_in_room;
if (vch == ch)
continue;
if (number_hit > 9)
continue;
if (!IS_NPC (vch))
continue;
if (is_safe (ch, vch))
continue;
{
dam = number_range (1, 30);
dam = dragdam (ch, vch, dam);
dam *= 4;
if (dam <= 0)
dam = 1;
damage (ch, vch, dam, gsn_dgas_breath, DAM_GAS, TRUE, TRUE, FALSE);
number_hit++;
}
}
ch->dps -= mcost;
return;
}
void
do_vbreath (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
CHAR_DATA *vch;
CHAR_DATA *vch_next;
int gen = ch->pcdata->dpowers[DRAGON_AGE];
int dam = 0;
int max = 0;
int number_hit = 0;
int mcost = 0;
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
mcost = 25 * gen;
if (mcost > ch->dps)
{
send_to_char ("You don't have enough Dragon Energy Points.", ch);
return;
}
send_to_char ("#7You breathe forth a wave of super sonic sound.#n\n\r", ch);
for (vch = ch->in_room->people; vch != NULL; vch = vch_next)
{
vch_next = vch->next_in_room;
if (vch == ch)
continue;
if (number_hit > 9)
continue;
if (!IS_NPC (vch))
{
if (is_same_group (vch, ch))
continue;
}
if (is_safe (ch, vch))
continue;
{
if (ch->spl[PURPLE_MAGIC] >= 240)
max = number_range (2, 5);
else if (ch->spl[PURPLE_MAGIC] >= 200)
max = number_range (2, 4);
else if (ch->spl[PURPLE_MAGIC] >= 150)
max = number_range (2, 3);
else if (ch->spl[PURPLE_MAGIC] >= 100)
max = number_range (1, 2);
else
max = 1;
dam = number_range (1, 30);
dam = dragdam (ch, vch, dam);
if (dam <= 0)
dam = 1;
sev_hit (ch, vch, dam, gsn_dsonic_breath, DAM_SONIC, max, TRUE, TRUE,
FALSE);
number_hit++;
if (!IS_NPC (vch))
{
if (number_range (1, 10) < 4)
{
act ("$N screams as your sound wave overwhelms $M.", ch, NULL,
vch, TO_CHAR);
act ("$N screams as $n's sound wave overwhelms $M.", ch, NULL,
vch, TO_NOTVICT);
act
("You scream as $n's sound wave overwhelms you, then your lights go out.",
ch, NULL, vch, TO_VICT);
stop_fighting (vch, FALSE);
vch->position = POS_STUNNED;
}
}
}
}
ch->dps -= mcost;
return;
}
void
do_abreath (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *obj;
char buf[MSL];
int critical = number_range (1, 4);
int dam = 0;
int gen = ch->pcdata->dpowers[DRAGON_AGE];
int max = 0;
int mcost = 0;
char arg[MSL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (arg[0] == '\0' && ch->fighting == NULL)
{
send_to_char ("Who do you wish to use your breathweapon on?\n\r", ch);
return;
}
if ((victim = ch->fighting) == NULL)
{
if ((victim = get_char_room (ch, arg)) == NULL)
{
send_to_char ("They aren't here.\n\r", ch);
return;
}
}
mcost = gen * 35;
if (mcost > ch->dps)
{
send_to_char ("You don't have enough Dragon Energy Points.", ch);
return;
}
dam = number_range (1, 30);
dam = dragdam (ch, victim, dam);
if (dam <= 0)
dam = 1;
if (is_safe (ch, victim) == TRUE)
return;
send_to_char ("#gYou breath forth a stream of acid!#n\n\r", ch);
if (ch->spl[GREEN_MAGIC] >= 240)
max = number_range (2, 5);
else if (ch->spl[GREEN_MAGIC] >= 200)
max = number_range (2, 4);
else if (ch->spl[GREEN_MAGIC] >= 150)
max = number_range (2, 3);
else if (ch->spl[GREEN_MAGIC] >= 100)
max = number_range (1, 2);
else
max = 1;
sev_hit (ch, victim, dam, gsn_dacid_breath, DAM_ACID, max, TRUE, TRUE,
FALSE);
ch->dps -= mcost;
if (IS_NPC (victim))
return;
if (limbsafe (ch, victim))
return;
if (number_range (1, 10) < 4)
{
if (critical == 1)
{
if (IS_ARM_L (victim, LOST_ARM))
return;
SET_BIT (victim->loc_hp[2], LOST_ARM);
if (IS_BLEEDING (victim, BLEEDING_HAND_L))
REMOVE_BIT (victim->loc_hp[6], BLEEDING_HAND_L);
act
("You scream in agony as your left arm is disolved by $n's blast of acid",
ch, NULL, victim, TO_VICT);
act
("$N screams in agony as $S left arm is disolved by $n's blast of acid",
ch, NULL, victim, TO_NOTVICT);
act
("$N screams in agony as $S left arm is disolved by your blast of acid",
ch, NULL, victim, TO_CHAR);
if (IS_ARM_L (victim, LOST_ARM) && IS_ARM_R (victim, LOST_ARM))
{
if ((obj = get_eq_char (victim, WEAR_ARMS)) != NULL)
take_item (victim, obj);
}
if ((obj = get_eq_char (victim, WEAR_HOLD)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_HANDS)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_WRIST_L)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_FINGER_L)) != NULL)
take_item (victim, obj);
}
else if (critical == 2)
{
if (IS_ARM_R (victim, LOST_ARM))
return;
SET_BIT (victim->loc_hp[3], LOST_ARM);
if (IS_BLEEDING (victim, BLEEDING_HAND_R))
REMOVE_BIT (victim->loc_hp[6], BLEEDING_HAND_R);
act
("You scream in agony as your right arm is disolved by $n's blast of acid",
ch, NULL, victim, TO_VICT);
act
("$N screams in agony as $S right arm is disolved by $n's blast of acid",
ch, NULL, victim, TO_NOTVICT);
act
("$N screams in agony as $S right arm is disolved by your blast of acid",
ch, NULL, victim, TO_CHAR);
if (IS_ARM_L (victim, LOST_ARM) && IS_ARM_R (victim, LOST_ARM))
{
if ((obj = get_eq_char (victim, WEAR_ARMS)) != NULL)
take_item (victim, obj);
}
if ((obj = get_eq_char (victim, WEAR_WIELD)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_HANDS)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_WRIST_R)) != NULL)
take_item (victim, obj);
if ((obj = get_eq_char (victim, WEAR_FINGER_R)) != NULL)
take_item (victim, obj);
}
else if (critical == 3)
{
if (IS_LEG_L (victim, LOST_LEG))
return;
SET_BIT (victim->loc_hp[4], LOST_LEG);
if (IS_BLEEDING (victim, BLEEDING_FOOT_L))
REMOVE_BIT (victim->loc_hp[6], BLEEDING_FOOT_L);
act
("You scream in agony as your left leg is disolved by $n's blast of acid",
ch, NULL, victim, TO_VICT);
act
("$N screams in agony as $S left leg is disolved by $n's blast of acid",
ch, NULL, victim, TO_NOTVICT);
act
("$N screams in agony as $S left leg is disolved by your blast of acid",
ch, NULL, victim, TO_CHAR);
if (IS_LEG_L (victim, LOST_LEG) && IS_LEG_R (victim, LOST_LEG))
{
if ((obj = get_eq_char (victim, WEAR_LEGS)) != NULL)
take_item (victim, obj);
}
if ((obj = get_eq_char (victim, WEAR_FEET)) != NULL)
take_item (victim, obj);
}
else if (critical == 4)
{
if (IS_LEG_R (victim, LOST_LEG))
return;
SET_BIT (victim->loc_hp[5], LOST_LEG);
if (IS_BLEEDING (victim, BLEEDING_FOOT_R))
REMOVE_BIT (victim->loc_hp[6], BLEEDING_FOOT_R);
act
("You scream in agony as your right leg is disolved by $n's blast of acid",
ch, NULL, victim, TO_VICT);
act
("$N screams in agony as $S right leg is disolved by $n's blast of acid",
ch, NULL, victim, TO_NOTVICT);
act
("$N screams in agony as $S right leg is disolved by your blast of acid",
ch, NULL, victim, TO_CHAR);
if (IS_LEG_L (victim, LOST_LEG) && IS_LEG_R (victim, LOST_LEG))
{
if ((obj = get_eq_char (victim, WEAR_LEGS)) != NULL)
take_item (victim, obj);
}
if ((obj = get_eq_char (victim, WEAR_FEET)) != NULL)
take_item (victim, obj);
}
}
return;
}
void
do_dragoneye (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (!IS_SET (ch->dpwrs, DRA_TRUESIGHT))
{
send_to_char ("You need to be gain the truesight power first.\n\r", ch);
return;
}
if (IS_SET (ch->mflags, MAGE_PERCEPTION))
{
REMOVE_BIT (ch->mflags, MAGE_PERCEPTION);
REMOVE_BIT (ch->affected_by, AFF_SHADOWSIGHT);
REMOVE_BIT (ch->vampaff, VAM_NIGHTSIGHT);
REMOVE_BIT (ch->act, PLR_HOLYLIGHT);
send_to_char ("Sight returns to normal.\n\r", ch);
return;
}
SET_BIT (ch->mflags, MAGE_PERCEPTION);
SET_BIT (ch->affected_by, AFF_SHADOWSIGHT);
SET_BIT (ch->vampaff, VAM_NIGHTSIGHT);
SET_BIT (ch->act, PLR_HOLYLIGHT);
send_to_char
("Your sight becomes imbued with the power of the ancients.\n\r", ch);
return;
}
void
do_fly (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
char buf[MSL];
CHAR_DATA *victim;
one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (!IS_SET (ch->dpwrs, DRA_FLY))
{
send_to_char ("You need to gain the fly power first.\n\r", ch);
return;
}
if (ch->fight_timer > 0)
{
send_to_char ("Not until your fight timer expires.\n\r", ch);
return;
}
if (ch->position == POS_FIGHTING)
{
send_to_char ("Not while fighting!\n\r", ch);
return;
}
if ((victim = get_char_world (ch, arg)) == NULL)
{
send_to_char ("Fly to whom?\n\r", ch);
return;
}
if (is_inarena (victim))
return;
if (is_inarena (ch))
return;
if (travelsafe (ch, victim))
return;
if (!IS_NPC (victim) && !IS_IMMUNE (victim, IMM_SUMMON))
{
send_to_char ("He doesnt want you near him!\n\r", ch);
return;
}
if (ch == victim)
{
send_to_char ("But you're already at yourself!\n\r", ch);
return;
}
if (victim->in_room == ch->in_room)
{
send_to_char ("But you're already there!\n\r", ch);
return;
}
if (victim->in_room == NULL)
{
send_to_char ("Nothing happens.\n\r", ch);
return;
}
if (IS_SET (victim->evenmore, EM_JAILED))
{
send_to_char ("What??? You wish to go to jail too?\n\r", ch);
return;
}
if (IS_IMMORTAL (victim))
{
stc ("The spell failed.\n\r", ch);
sprintf (buf, "%s just tried to step to you.\n\r", ch->name);
stc (buf, victim);
return;
}
char_from_room (ch);
char_to_room (ch, victim->in_room);
act ("You spread your wings and take off.", ch, NULL, NULL, TO_CHAR);
act ("$n spreads $s wings and takes off.", ch, NULL, NULL, TO_ROOM);
act ("You spot your target and start circling above him.", ch, NULL, NULL,
TO_CHAR);
act ("$n starts circling in the sky.", ch, NULL, NULL, TO_ROOM);
do_look (ch, "auto");
return;
}
void
do_breathforge (CHAR_DATA * ch, char *argument)
{
OBJ_DATA *obj;
int temp = 0;
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (!IS_SET (ch->dpwrs, DRA_FORGE))
{
send_to_char ("You dont have that power yet.\n\r", ch);
return;
}
if (argument[0] == '\0')
{
send_to_char ("Which item do you wish to breathforge?\n\r", ch);
return;
}
if ((obj = get_obj_carry (ch, argument)) == NULL)
{
send_to_char ("You are not carrying that item.\n\r", ch);
return;
}
if (obj->item_type != ITEM_WEAPON)
{
send_to_char ("That is not a weapon!\n\r", ch);
return;
}
temp = (number_range (1, 4));
switch (temp)
{
case 1:
{ //sets flaming
if (IS_WEAP (obj, WEAPON_FLAMING))
{
act ("$p is already flaming.", ch, obj, NULL, TO_CHAR);
return;
}
act ("$p bursts into flames.", ch, obj, NULL, TO_CHAR);
act ("$p, carried by $n bursts into flames.", ch, obj, NULL, TO_ROOM);
waiting (ch, 8);
SET_BIT (obj->weapflags, WEAPON_FLAMING);
break;
}
case 2:
{ //sets cold
if (IS_WEAP (obj, WEAPON_FROST))
{
act ("$p is already frozen.", ch, obj, NULL, TO_CHAR);
return;
}
act ("$p glows blue off cold.", ch, obj, NULL, TO_CHAR);
act ("$p, carried by $n glows blue of cold.", ch, obj, NULL, TO_ROOM);
waiting (ch, 8);
SET_BIT (obj->weapflags, WEAPON_FROST);
break;
}
case 3:
{ //sets acid
if (IS_WEAP (obj, WEAPON_ACID))
{
act ("$p is dripping with acid.", ch, obj, NULL, TO_CHAR);
return;
}
act ("$p drips with a deadly acid.", ch, obj, NULL, TO_CHAR);
act ("$p, carried by $n starts drippin acid.", ch, obj, NULL,
TO_ROOM);
waiting (ch, 8);
SET_BIT (obj->weapflags, WEAPON_ACID);
break;
}
case 4:
{ //sets ligntning
if (IS_WEAP (obj, WEAPON_SHOCKING))
{
act ("$p is sparkling with electricity.", ch, obj, NULL, TO_CHAR);
return;
}
act ("$p sparkles with electricity.", ch, obj, NULL, TO_CHAR);
act ("$p, carried by $n sparkles with electricity.", ch, obj, NULL,
TO_ROOM);
waiting (ch, 8);
SET_BIT (obj->weapflags, WEAPON_SHOCKING);
break;
}
}
return;
}
void
do_age (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
int hpcost = 0;
int dcost = 0, gen;
gen = ch->pcdata->dpowers[DRAGON_AGE];
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->dpowers[DRAGON_COLOR] >= 11)
{
stc ("You need to chose a color before you can age.\n\r", ch);
return;
}
hpcost = gen * 6000;
hpcost += 105000;
dcost = gen * 100000;
if (gen > 11)
{
sprintf (buf, "You are already as old age as you can get.\n\r");
send_to_char (buf, ch);
return;
}
do_cast (ch, "'dispel magic' self");
do_remove (ch, "all");
do_mclear (ch, "self");
do_save (ch, "");
if (hpcost > ch->max_hit)
{
sprintf (buf, "You need %d more life essence to age.\n\r",
(hpcost - ch->max_hit));
send_to_char (buf, ch);
return;
}
if (dcost > ch->dps)
{
sprintf (buf,
"You need %d more Dragon Energy Points before you can age.\n\r",
(dcost - ch->dps));
send_to_char (buf, ch);
return;
}
ch->pcdata->dpowers[DRAGON_AGE] += 1;
ch->dps -= dcost;
send_to_char ("Your age has increased.\n\r", ch);
return;
}
void
do_hatch (CHAR_DATA * ch, char *argument)
{
CHAR_DATA *victim;
char arg[MIL];
argument = one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (arg[0] == '\0')
{
send_to_char ("Hatch whom?\n\r", ch);
return;
}
if (ch->pcdata->dpowers[DRAGON_AGE] < 9)
{
send_to_char ("You are not old enough to make hatchlings.", ch);
return;
}
if (ch->pcdata->dpowers[NUMBER_HATCHED] == 2);
{
send_to_char ("You may not hatch more hatchlings", ch);
return;
}
if ((victim = get_char_room (ch, arg)) == NULL)
{
send_to_char ("They aren't here.\n\r", ch);
return;
}
if (IS_NPC (victim))
{
send_to_char ("Not on NPC's.\n\r", ch);
return;
}
if (IS_IMMORTAL (victim))
{
send_to_char ("Not on Immortals's.\n\r", ch);
return;
}
if (ch == victim)
{
send_to_char ("You cannot hatch yourself.\n\r", ch);
return;
}
if (IS_DRAGON (victim))
{
send_to_char ("They are already hatched.\n\r", ch);
return;
}
if (victim->level != LEVEL_AVATAR && !IS_IMMORTAL (victim))
{
send_to_char ("You can only guide avatars.\n\r", ch);
return;
}
if (victim->class != 0)
{
send_to_char ("They are already classed.\n\r", ch);
return;
}
if (!IS_IMMUNE (victim, IMM_VAMPIRE))
{
send_to_char ("You cannot hatch an unwilling person.\n\r", ch);
return;
}
if (ch->exp < 50000)
{
send_to_char
("You cannot afford the 50000 exp required to hatch them.\n\r", ch);
return;
}
if (victim->exp < 50000)
{
send_to_char
("They cannot afford the 50000 exp required to be hatched by you.\n\r",
ch);
return;
}
ch->exp -= 50000;
victim->exp -= 50000;
act ("You put $N inside an egg an hatch $m out.", ch, NULL, victim,
TO_CHAR);
act ("$n puts $N inside an egg and hatches $m out.", ch, NULL, victim,
TO_NOTVICT);
act ("$n puts you in an egg end hatches you.", ch, NULL, victim, TO_VICT);
send_to_char ("You are now a dragon.\n\r", victim);
free_string (victim->lord);
victim->lord = str_dup (ch->name);
victim->class = CLASS_DRAGON;
victim->pcdata->dpowers[DRAGON_AGE] = 1;
victim->pcdata->dpowers[DRAGON_COLOR] = number_range (1, 9);
ch->pcdata->dpowers[NUMBER_HATCHED]++;
save_char_obj (ch);
save_char_obj (victim);
return;
}
void
do_swoop (CHAR_DATA * ch, char *argument)
{
char buf[MSL];
char arg[MIL];
CHAR_DATA *victim;
one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (!IS_DRAGON (ch))
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (!IS_SET (ch->dpwrs, DRA_SWOOP))
{
send_to_char ("You need to gain the swoop power first.\n\r", ch);
return;
}
if (ch->fight_timer > 0)
{
send_to_char ("Not until your fight timer expires.\n\r", ch);
return;
}
if (ch->position == POS_FIGHTING)
{
send_to_char ("Not while fighting.\n\r", ch);
return;
}
if ((victim = get_char_world (ch, arg)) == NULL)
{
send_to_char ("Swoop to whom??\n\r", ch);
return;
}
if (is_inarena (victim))
return;
if (is_inarena (ch))
return;
if (travelsafe (ch, victim))
return;
if (IS_IMMORTAL (victim))
{
stc ("The spell failed.\n\r", ch);
sprintf (buf, "%s just tried to step to you.\n\r", ch->name);
stc (buf, victim);
return;
}
if (ch->move < 250)
{
send_to_char ("You are too tired to swoop.\n\r", ch);
return;
}
if (!IS_NPC (victim) && !IS_IMMUNE (victim, IMM_SUMMON))
{
send_to_char ("He doesnt want you near him!\n\r", ch);
return;
}
if (IS_SET (victim->evenmore, EM_JAILED))
{
send_to_char ("What??? You wish to go to jail too?\n\r", ch);
return;
}
if (victim->in_room == NULL || victim->in_room == ch->in_room)
{
send_to_char ("Nothing happens.\n\r", ch);
return;
}
if ((victim == ch)
|| victim->in_room == NULL
|| IS_IMMORTAL (victim) || victim->in_room == NULL
// || victim->pcdata->chobj != NULL
|| IS_SET (victim->in_room->room_flags, ROOM_PRIVATE))
return;
if (ch->in_room != victim->in_room)
{
act ("$n leaps into the air", ch, NULL, NULL, TO_ROOM);
act ("You leap into the air", ch, NULL, NULL, TO_CHAR);
char_from_room (ch);
char_to_room (ch, victim->in_room);
act
("$n swoops down from the heavens lashing out at you with $s mighty jaws!",
ch, NULL, victim, TO_VICT);
act
("$n swoops down from the heavens lashing out at $N with $s mighty jaws!",
ch, NULL, victim, TO_ROOM);
act ("You swoop down and attack $N with your mighty jaws!", ch, NULL,
victim, TO_CHAR);
}
multi_hit (ch, victim, gsn_fangs);
waiting (ch, 8);
return;
}
void
do_breathweapon (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
char arg2[MIL];
argument = one_argument (argument, arg);
argument = one_argument (argument, arg2);
if (IS_NPC (ch))
return;
if (ch->class == CLASS_DRACONIAN)
{
do_dbreathweapon (ch, arg);
return;
}
if (!IS_DRAGON (ch))
{
do_huh (ch, "");
return;
}
if (ch->pcdata->dpowers[DRAGON_COLOR] == 11)
{
do_dbreathweapon (ch, arg);
return;
}
if (arg[0] == '\0')
{
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE))
send_to_char ("#7You have set your breathweapon to (#RFIRE#7).#n\n\r",
ch);
else if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT))
send_to_char
("#7You have set your breathweapon to (#yLIGHTNING#7).#n\n\r", ch);
else if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC))
send_to_char
("#7You have set your breathweapon to (#CSONIC#7).#n\n\r", ch);
else if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD))
send_to_char ("#7You have set your breathweapon to (#LCOLD#7).#n\n\r",
ch);
else if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS))
send_to_char ("#7You have set your breathweapon to (#PGAS#7).#n\n\r",
ch);
else if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWACID))
send_to_char ("#7You have set your breathweapon to (#gACID#7).#n\n\r",
ch);
else if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW))
send_to_char
("#7You have set your breathweapon to (#0SHADOW#7).#n\n\r", ch);
else if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE))
send_to_char ("#7You havent set your breathweapon.#n\n\r", ch);
send_to_char
("#7You can set your breathweapon to the following types:#n\n\r", ch);
send_to_char ("#7Syntax: breathweapon <breath>.#n\n\r", ch);
send_to_char
("\n\r#u#RSyntax to Attack with it: breathweapon breath.#n\n\r\n\r",
ch);
send_to_char ("#7None#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_GBREATH))
send_to_char ("#PGasbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_FBREATH))
send_to_char ("#RFirebreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_LBREATH))
send_to_char ("#yLightningbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_ABREATH))
send_to_char ("#gAcidbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_VBREATH))
send_to_char ("#gSonicbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_CBREATH))
send_to_char ("#LColdbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_SBREATH))
send_to_char ("#0Shadowbreath#n\n\r", ch);
return;
}
else if (!str_cmp (arg, "gasbreath") && IS_DRACWEAP (ch, DRAC_GBREATH))
{
if (IS_SET (ch->pcdata->dpowers[BREATH], BGAS))
{
send_to_char
("#7You are already using your gas breath as your automatic breath weapon.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS))
{
send_to_char
("#7You already have your breathweapon set to gas.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWACID))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWACID);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE);
SET_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS);
send_to_char ("#7Your breathweapon is now set to gas.#n\n\r", ch);
if (ch->fighting != NULL)
{
waiting (ch, 9);
}
return;
}
else if (!str_cmp (arg, "sonicbreath") && IS_DRACWEAP (ch, DRAC_VBREATH))
{
if (IS_SET (ch->pcdata->dpowers[BREATH], BSONIC))
{
send_to_char
("#7You are already using your sonic breath as your automatic breath weapon.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC))
{
send_to_char
("#7You already have your breathweapon set to sonic.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWACID))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWACID);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE);
SET_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC);
send_to_char ("#7Your breathweapon is now set to sonic.#n\n\r", ch);
if (ch->fighting != NULL)
{
waiting (ch, 9);
}
return;
}
else if (!str_cmp (arg, "firebreath") && IS_DRACWEAP (ch, DRAC_FBREATH))
{
if (IS_SET (ch->pcdata->dpowers[BREATH], BFIRE))
{
send_to_char
("#7You are already using your fire breath as your automatic breath weapon.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE))
{
send_to_char
("#7You already have your breathweapon set to fire.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWACID))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWACID);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE);
SET_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE);
send_to_char ("#7Your breathweapon is now set to fire.#n\n\r", ch);
if (ch->fighting != NULL)
{
waiting (ch, 9);
}
return;
}
else if (!str_cmp (arg, "lightningbreath")
&& IS_DRACWEAP (ch, DRAC_LBREATH))
{
if (IS_SET (ch->pcdata->dpowers[BREATH], BLIGHT))
{
send_to_char
("#7You are already using your lightning breath as your automatic breath weapon.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT))
{
send_to_char
("#7Your breathweapon is already set to lightning.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWACID))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWACID);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE);
SET_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT);
send_to_char ("#7Your breathweapon is now set to lighting#n.\n\r", ch);
if (ch->fighting != NULL)
{
waiting (ch, 9);
}
return;
}
else if (!str_cmp (arg, "coldbreath") && IS_DRACWEAP (ch, DRAC_CBREATH))
{
if (IS_SET (ch->pcdata->dpowers[BREATH], BCOLD))
{
send_to_char
("#7You are already using your cold breath as your automatic breath weapon.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD))
{
send_to_char
("#7Your breathweapon is already freezing your victims.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWACID))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWACID);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE);
SET_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD);
send_to_char ("#7Your breathweapon now freezes your opponents.#n\n\r",
ch);
if (ch->fighting != NULL)
{
waiting (ch, 9);
}
return;
}
else if (!str_cmp (arg, "acidbreath") && IS_DRACWEAP (ch, DRAC_ABREATH))
{
if (IS_SET (ch->pcdata->dpowers[BREATH], BACID))
{
send_to_char
("#7You are already using your acid breath as your automatic breath weapon.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWACID))
{
send_to_char
("#7Your breathweapon is already set to acid.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE);
SET_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWACID);
send_to_char ("#7Your breathweapon is now set to acid.#n\n\r", ch);
if (ch->fighting != NULL)
{
waiting (ch, 9);
}
return;
}
else if (!str_cmp (arg, "shadowbreath") && IS_DRACWEAP (ch, DRAC_SBREATH))
{
if (IS_SET (ch->pcdata->dpowers[BREATH], BGAS))
{
send_to_char
("#7You are already using your shadow breath as your automatic breath weapon.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW))
{
send_to_char
("#7Your breathweapon is already set to shadow.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWACID))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWACID);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE);
SET_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW);
send_to_char ("#7Your breathweapon is now set to shadow.#n\n\r", ch);
if (ch->fighting != NULL)
{
waiting (ch, 9);
}
return;
}
else if (!str_cmp (arg, "none"))
{
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE))
{
send_to_char ("#7Your breathweapon is already cleared.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWACID))
REMOVE_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWACID);
SET_BIT (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE);
send_to_char ("#7Your breathweapon is cleared.#n\n\r", ch);
if (ch->fighting != NULL)
{
waiting (ch, 9);
}
return;
}
else if (!str_cmp (arg, "breath"))
{
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE))
{
send_to_char ("#7You need to set your breathweapon first.#n\n\r",
ch);
return;
}
if (IS_DRAGON (ch) && !IS_POLYAFF (ch, POLY_DRAGONFORM))
{
send_to_char
("#7You need to be in dragonform to use your breathweapon.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE))
{
do_fbreath (ch, arg2);
if (ch->fighting != NULL)
waiting (ch, 12);
}
else if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWACID))
{
do_abreath (ch, arg2);
if (ch->fighting != NULL)
waiting (ch, 12);
}
else if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT))
{
do_lbreath (ch, arg2);
if (ch->fighting != NULL)
waiting (ch, 12);
}
else if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS))
{
do_gbreath (ch, arg2);
waiting (ch, 12);
}
else if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD))
{
do_cbreath (ch, arg2);
if (ch->fighting != NULL)
waiting (ch, 12);
}
else if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW))
{
do_sbreath (ch, arg2);
if (ch->fighting != NULL)
waiting (ch, 12);
}
else if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC))
{
do_vbreath (ch, arg2);
waiting (ch, 12);
}
else
{
stc ("You need to set it first.\n\r", ch);
return;
}
return;
}
else if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE))
send_to_char ("#7You have set your breathweapon to (#RFIRE#7).#n\n\r",
ch);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC))
send_to_char ("#7You have set your breathweapon to (#CSONIC#7).#n\n\r",
ch);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT))
send_to_char
("#7You have set your breathweapon to (#yLIGHTNING#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWACID))
send_to_char ("#7You have set your breathweapon to (#gACID#7).#n\n\r",
ch);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW))
send_to_char ("#7You have set your breathweapon to (#0SHADOW#7).#n\n\r",
ch);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD))
send_to_char ("#7You have set your breathweapon to (#LCOLD#7).#n\n\r",
ch);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS))
send_to_char ("#7You have set your breathweapon to (#PGAS#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWNONE))
send_to_char ("#7You havent set your breathweapon.#n\n\r", ch);
send_to_char
("#7You can set your breathweapon to the following types:#n\n\r", ch);
send_to_char ("#7Syntax: breathweapon <breath>.#n\n\r", ch);
send_to_char
("\n\r#u#RSyntax to Attack with it: breathweapon breath.#n\n\r\n\r", ch);
send_to_char ("#7None#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_GBREATH))
send_to_char ("#PGasbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_FBREATH))
send_to_char ("#RFirebreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_LBREATH))
send_to_char ("#yLightningbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_ABREATH))
send_to_char ("#gAcidbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_VBREATH))
send_to_char ("#gSonicbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_CBREATH))
send_to_char ("#LColdbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_SBREATH))
send_to_char ("#0Shadowbreath#n\n\r", ch);
return;
}
void
do_set_breath (CHAR_DATA * ch, char *argument)
{
char arg[MIL];
one_argument (argument, arg);
if (IS_NPC (ch))
return;
if (ch->class != CLASS_DRAGON)
{
send_to_char ("Huh?\n\r", ch);
return;
}
if (ch->pcdata->cpowers[DRAC_OFFENSIVE] < 8)
{
stc ("You need atleast 8 in your Conflict discipline first.\n\r", ch);
return;
}
if (ch->fighting != NULL)
{
send_to_char ("Not while fighting!", ch);
return;
}
if (arg[0] == '\0')
{
if (IS_SET (ch->pcdata->dpowers[BREATH], BFIRE))
send_to_char
("#7You have set your auto breathweapon to (#RFIRE#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->dpowers[BREATH], BLIGHT))
send_to_char
("#7You have set your auto breathweapon to (#yLIGHTNING#7).#n\n\r",
ch);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSONIC))
send_to_char
("#7You have set your auto breathweapon to (#CSONIC#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->dpowers[BREATH], BCOLD))
send_to_char
("#7You have set your auto breathweapon to (#LCOLD#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->dpowers[BREATH], BACID))
send_to_char
("#7You have set your auto breathweapon to (#gACID#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->dpowers[BREATH], BGAS))
send_to_char
("#7You have set your auto breathweapon to (#PGAS#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSHADOW))
send_to_char
("#7You have set your auto breathweapon to (#0SHADOW#7).#n\n\r",
ch);
if (IS_SET (ch->pcdata->dpowers[BREATH], BNONE))
send_to_char ("#7You havent set your auto breathweapon.#n\n\r", ch);
send_to_char ("#7You can set your breath to the following types:#n\n\r",
ch);
send_to_char ("#7Syntax: setbreath <breath>.#n\n\r", ch);
send_to_char ("#7None#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_GBREATH))
send_to_char ("#PGasbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_FBREATH))
send_to_char ("#RFirebreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_LBREATH))
send_to_char ("#yLightningbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_ABREATH))
send_to_char ("#gAcidbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_VBREATH))
send_to_char ("#CSonicbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_CBREATH))
send_to_char ("#LColdbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_SBREATH))
send_to_char ("#0Shadowbreath#n\n\r", ch);
return;
}
else if (!str_cmp (arg, "gasbreath") && IS_DRACWEAP (ch, DRAC_GBREATH))
{
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWGAS))
{
send_to_char
("#7You are already using your gas breath as your manual breath weapon.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH], BGAS))
{
send_to_char
("#7You already have your breath set to gas whilst in combat.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH], BFIRE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BFIRE);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSONIC))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BSONIC);
if (IS_SET (ch->pcdata->dpowers[BREATH], BCOLD))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BCOLD);
if (IS_SET (ch->pcdata->dpowers[BREATH], BLIGHT))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BLIGHT);
if (IS_SET (ch->pcdata->dpowers[BREATH], BACID))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BACID);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSHADOW))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BSHADOW);
if (IS_SET (ch->pcdata->dpowers[BREATH], BNONE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BNONE);
SET_BIT (ch->pcdata->dpowers[BREATH], BGAS);
send_to_char ("#7You now breathe gas whilst in combat.#n\n\r", ch);
return;
}
else if (!str_cmp (arg, "firebreath") && IS_DRACWEAP (ch, DRAC_FBREATH))
{
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWFIRE))
{
send_to_char
("#7You are already using your fire breath as your manual breath weapon.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH], BFIRE))
{
send_to_char ("#7You are already breathing fire in combat.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH], BGAS))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BGAS);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSONIC))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BSONIC);
if (IS_SET (ch->pcdata->dpowers[BREATH], BLIGHT))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BLIGHT);
if (IS_SET (ch->pcdata->dpowers[BREATH], BACID))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BACID);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSHADOW))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BSHADOW);
if (IS_SET (ch->pcdata->dpowers[BREATH], BCOLD))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BCOLD);
if (IS_SET (ch->pcdata->dpowers[BREATH], BNONE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BNONE);
SET_BIT (ch->pcdata->dpowers[BREATH], BFIRE);
send_to_char ("#7You now spew fire while you are fighting.#n\n\r", ch);
return;
}
else if (!str_cmp (arg, "lightningbreath")
&& IS_DRACWEAP (ch, DRAC_LBREATH))
{
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWLIGHT))
{
send_to_char
("#7You are already using your lightning breath as your manual breath weapon.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH], BLIGHT))
{
send_to_char
("#7You are already breathing lightning in combat.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH], BFIRE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BFIRE);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSONIC))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BSONIC);
if (IS_SET (ch->pcdata->dpowers[BREATH], BGAS))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BGAS);
if (IS_SET (ch->pcdata->dpowers[BREATH], BACID))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BACID);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSHADOW))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BSHADOW);
if (IS_SET (ch->pcdata->dpowers[BREATH], BCOLD))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BCOLD);
if (IS_SET (ch->pcdata->dpowers[BREATH], BNONE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BNONE);
SET_BIT (ch->pcdata->dpowers[BREATH], BLIGHT);
send_to_char
("#7You now discharge lightning while you are fighting.#n\n\r", ch);
return;
}
else if (!str_cmp (arg, "sonicbreath") && IS_DRACWEAP (ch, DRAC_VBREATH))
{
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSONIC))
{
send_to_char
("#7You are already using your sonic breath as your manual breath weapon.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH], BSONIC))
{
send_to_char
("#7You are already breathing sonic waves in combat.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH], BFIRE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BFIRE);
if (IS_SET (ch->pcdata->dpowers[BREATH], BLIGHT))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BLIGHT);
if (IS_SET (ch->pcdata->dpowers[BREATH], BGAS))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BGAS);
if (IS_SET (ch->pcdata->dpowers[BREATH], BACID))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BACID);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSHADOW))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BSHADOW);
if (IS_SET (ch->pcdata->dpowers[BREATH], BCOLD))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BCOLD);
if (IS_SET (ch->pcdata->dpowers[BREATH], BNONE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BNONE);
SET_BIT (ch->pcdata->dpowers[BREATH], BSONIC);
send_to_char
("#7You now breathe sonic waves while you are fighting.#n\n\r", ch);
return;
}
else if (!str_cmp (arg, "acidbreath") && IS_DRACWEAP (ch, DRAC_ABREATH))
{
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWACID))
{
send_to_char
("#7You are already using your acid breath as your manual breath weapon.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH], BACID))
{
send_to_char
("#7You are already breathing acid at your victims.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH], BFIRE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BFIRE);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSONIC))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BSONIC);
if (IS_SET (ch->pcdata->dpowers[BREATH], BLIGHT))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BLIGHT);
if (IS_SET (ch->pcdata->dpowers[BREATH], BGAS))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BGAS);
if (IS_SET (ch->pcdata->dpowers[BREATH], BCOLD))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BCOLD);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSHADOW))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BSHADOW);
if (IS_SET (ch->pcdata->dpowers[BREATH], BNONE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BNONE);
SET_BIT (ch->pcdata->dpowers[BREATH], BACID);
send_to_char
("#7You will now breathe acid at your opponents while fighting.#n\n\r",
ch);
return;
}
else if (!str_cmp (arg, "coldbreath") && IS_DRACWEAP (ch, DRAC_CBREATH))
{
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWCOLD))
{
send_to_char
("#7You are already using your cold breath as your manual breath weapon.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH], BCOLD))
{
send_to_char ("#7You are already freezing your victims.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH], BFIRE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BFIRE);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSONIC))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BSONIC);
if (IS_SET (ch->pcdata->dpowers[BREATH], BLIGHT))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BLIGHT);
if (IS_SET (ch->pcdata->dpowers[BREATH], BGAS))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BGAS);
if (IS_SET (ch->pcdata->dpowers[BREATH], BACID))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BACID);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSHADOW))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BSHADOW);
if (IS_SET (ch->pcdata->dpowers[BREATH], BNONE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BNONE);
SET_BIT (ch->pcdata->dpowers[BREATH], BCOLD);
send_to_char
("#7You will now freeze your opponents while fighting.#n\n\r", ch);
return;
}
else if (!str_cmp (arg, "shadowbreath") && IS_DRACWEAP (ch, DRAC_SBREATH))
{
if (IS_SET (ch->pcdata->dpowers[BREATH_WEAPON], BWSHADOW))
{
send_to_char
("#7You are already using your shadow breath as your manual breath weapon.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH], BSHADOW))
{
send_to_char
("#7You are already breathing despair at your victims.#n\n\r",
ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH], BFIRE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BFIRE);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSONIC))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BSONIC);
if (IS_SET (ch->pcdata->dpowers[BREATH], BLIGHT))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BLIGHT);
if (IS_SET (ch->pcdata->dpowers[BREATH], BGAS))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BGAS);
if (IS_SET (ch->pcdata->dpowers[BREATH], BACID))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BACID);
if (IS_SET (ch->pcdata->dpowers[BREATH], BCOLD))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BCOLD);
if (IS_SET (ch->pcdata->dpowers[BREATH], BNONE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BNONE);
SET_BIT (ch->pcdata->dpowers[BREATH], BSHADOW);
send_to_char
("#7You will now breathe despair at your opponents while fighting.#n\n\r",
ch);
return;
}
else if (!str_cmp (arg, "none"))
{
if (IS_SET (ch->pcdata->dpowers[BREATH], BNONE))
{
send_to_char
("#7You are not yet breathing anything in combat.#n\n\r", ch);
return;
}
if (IS_SET (ch->pcdata->dpowers[BREATH], BFIRE))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BFIRE);
if (IS_SET (ch->pcdata->dpowers[BREATH], BLIGHT))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BLIGHT);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSONIC))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BSONIC);
if (IS_SET (ch->pcdata->dpowers[BREATH], BCOLD))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BCOLD);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSHADOW))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BSHADOW);
if (IS_SET (ch->pcdata->dpowers[BREATH], BACID))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BACID);
if (IS_SET (ch->pcdata->dpowers[BREATH], BGAS))
REMOVE_BIT (ch->pcdata->dpowers[BREATH], BGAS);
SET_BIT (ch->pcdata->dpowers[BREATH], BNONE);
send_to_char ("#7You will now stop breathing during combat.#n\n\r", ch);
return;
}
else if (IS_SET (ch->pcdata->dpowers[BREATH], BFIRE))
send_to_char
("#7You have set your auto breathweapon to (#RFIRE#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->dpowers[BREATH], BLIGHT))
send_to_char
("#7You have set your auto breathweapon to (#yLIGHTNING#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSONIC))
send_to_char
("#7You have set your auto breathweapon to (#CSONIC#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->dpowers[BREATH], BACID))
send_to_char
("#7You have set your auto breathweapon to (#gACID#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->dpowers[BREATH], BCOLD))
send_to_char
("#7You have set your auto breathweapon to (#LCOLD#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->dpowers[BREATH], BSHADOW))
send_to_char
("#7You have set your auto breathweapon to (#0SHADOW#7).#n\n\r", ch);
if (IS_SET (ch->pcdata->dpowers[BREATH], BGAS))
send_to_char ("#7You have set your auto breathweapon to (#PGAS#7).#n\n\r",
ch);
if (IS_SET (ch->pcdata->dpowers[BREATH], BNONE))
send_to_char ("#7You havent set your auto breathweapon.#n\n\r", ch);
send_to_char ("#7You can set your breath to the following types:#n\n\r",
ch);
send_to_char ("#7Syntax: setbreath <breath>.#n\n\r", ch);
send_to_char ("#7None#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_GBREATH))
send_to_char ("#PGasbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_FBREATH))
send_to_char ("#RFirebreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_LBREATH))
send_to_char ("#yLightningbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_ABREATH))
send_to_char ("#gAcidbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_VBREATH))
send_to_char ("#gSonicbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_CBREATH))
send_to_char ("#LColdbreath#n\n\r", ch);
if (IS_DRACWEAP (ch, DRAC_SBREATH))
send_to_char ("#0Shadowbreath#n\n\r", ch);
return;
}
void
dpowers (CHAR_DATA * ch)
{
if (IS_SET (ch->dpwrs, DRA_AUTOBREATH))
{
send_to_char
("\n\r#7Setbreath: Set what breath you will use automatically in combat.\n\r",
ch);
}
send_to_char ("#7Breathweapon: Set and use your mighty breathweapon.\n\r",
ch);
send_to_char
("#7Autoconsume: Automatically consume corpses for dragon points.\n\r\n\r",
ch);
if (IS_SET (ch->dpwrs, DRA_MAGIC))
send_to_char
("#7Magic: Use your draconic magic while in dragonform.\n\r",
ch);
if (IS_SET (ch->dpwrs, DRA_TERROR))
send_to_char ("#7Terror: Scare your enemies.\n\r", ch);
if (IS_SET (ch->dpwrs, DRA_MASK))
send_to_char ("#7Mask: Mask your appearance.\n\r", ch);
if (IS_SET (ch->dpwrs, DRA_LUCK))
send_to_char ("#7Luck: Luck of the Dragon's.\n\r", ch);
if (IS_SET (ch->dpwrs, DRA_SWOOP))
send_to_char
("#7Swoop: Fly through the air and swoop down on your enemies.\n\r",
ch);
if (IS_SET (ch->dpwrs, DRA_TOUGHNESS))
send_to_char
("#7Scales: Hard scales shields you from damage.\n\r\n\r", ch);
if (IS_SET (ch->evenmore, EM_AUTOCONSUME))
send_to_char ("#7Autoconsume: {#yON#7}#n\n\r\n\r", ch);
if (!IS_SET (ch->evenmore, EM_AUTOCONSUME))
send_to_char ("#7Autoconsume: {#yoff#7}#n\n\r\n\r", ch);
}