Exemple #1
0
void mag_assign_spells(void)
{
  int i;

  /* Do not change the loop below. */
  for (i = 0; i <= TOP_SPELL_DEFINE; i++)
    unused_spell(i);
  /* Do not change the loop above. */

  spello(SPELL_ANIMATE_DEAD, "animate dead", 35, 10, 3, POS_STANDING,
	TAR_OBJ_ROOM, FALSE, MAG_SUMMONS);

  spello(SPELL_ARMOR, "armor", 30, 15, 3, POS_FIGHTING,
	TAR_CHAR_ROOM, FALSE, MAG_AFFECTS);

  spello(SPELL_BLESS, "bless", 35, 5, 3, POS_STANDING,
	TAR_CHAR_ROOM | TAR_OBJ_INV, FALSE, MAG_AFFECTS | MAG_ALTER_OBJS);

  spello(SPELL_BLINDNESS, "blindness", 35, 25, 1, POS_STANDING,
	TAR_CHAR_ROOM | TAR_NOT_SELF, FALSE, MAG_AFFECTS);

  spello(SPELL_BURNING_HANDS, "burning hands", 30, 10, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE);

  spello(SPELL_CALL_LIGHTNING, "call lightning", 40, 25, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE);

  spello(SPELL_CHARM, "charm person", 75, 50, 2, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_NOT_SELF, TRUE, MAG_MANUAL);

  spello(SPELL_CHILL_TOUCH, "chill touch", 30, 10, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE | MAG_AFFECTS);

  spello(SPELL_CLONE, "clone", 80, 65, 5, POS_STANDING,
	TAR_SELF_ONLY, FALSE, MAG_SUMMONS);

  spello(SPELL_COLOR_SPRAY, "color spray", 30, 15, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE);

  spello(SPELL_CONTROL_WEATHER, "control weather", 75, 25, 5, POS_STANDING,
	TAR_IGNORE, FALSE, MAG_MANUAL);

  spello(SPELL_CREATE_FOOD, "create food", 30, 5, 4, POS_STANDING,
	TAR_IGNORE, FALSE, MAG_CREATIONS);

  spello(SPELL_CREATE_WATER, "create water", 30, 5, 4, POS_STANDING,
	TAR_OBJ_INV | TAR_OBJ_EQUIP, FALSE, MAG_MANUAL);

  spello(SPELL_CURE_BLIND, "cure blind", 30, 5, 2, POS_STANDING,
	TAR_CHAR_ROOM, FALSE, MAG_UNAFFECTS);

  spello(SPELL_CURE_CRITIC, "cure critic", 30, 10, 2, POS_FIGHTING,
	TAR_CHAR_ROOM, FALSE, MAG_POINTS);

  spello(SPELL_CURE_LIGHT, "cure light", 30, 10, 2, POS_FIGHTING,
	TAR_CHAR_ROOM, FALSE, MAG_POINTS);

  spello(SPELL_CURSE, "curse", 80, 50, 2, POS_STANDING,
	TAR_CHAR_ROOM | TAR_OBJ_INV, TRUE, MAG_AFFECTS | MAG_ALTER_OBJS);

  spello(SPELL_DETECT_ALIGN, "detect alignment", 20, 10, 2, POS_STANDING,
	TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS);

  spello(SPELL_DETECT_INVIS, "detect invisibility", 20, 10, 2, POS_STANDING,
	TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS);

  spello(SPELL_DETECT_MAGIC, "detect magic", 20, 10, 2, POS_STANDING,
	TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS);

  spello(SPELL_DETECT_POISON, "detect poison", 15, 5, 1, POS_STANDING,
	TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL);

  spello(SPELL_DISPEL_EVIL, "dispel evil", 40, 25, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE);

  spello(SPELL_DISPEL_GOOD, "dispel good", 40, 25, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE);

  spello(SPELL_EARTHQUAKE, "earthquake", 40, 25, 3, POS_FIGHTING,
	TAR_IGNORE, TRUE, MAG_AREAS);

  spello(SPELL_ENCHANT_WEAPON, "enchant weapon", 150, 100, 10, POS_STANDING,
	TAR_OBJ_INV, FALSE, MAG_MANUAL);

  spello(SPELL_ENERGY_DRAIN, "energy drain", 40, 25, 1, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE | MAG_MANUAL);

  spello(SPELL_GROUP_ARMOR, "group armor", 50, 30, 2, POS_STANDING,
	TAR_IGNORE, FALSE, MAG_GROUPS);

  spello(SPELL_FIREBALL, "fireball", 40, 30, 2, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE);

  spello(SPELL_GROUP_HEAL, "group heal", 80, 60, 5, POS_STANDING,
	TAR_IGNORE, FALSE, MAG_GROUPS);

  spello(SPELL_HARM, "harm", 75, 45, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE);

  spello(SPELL_HEAL, "heal", 60, 40, 3, POS_FIGHTING,
	TAR_CHAR_ROOM, FALSE, MAG_POINTS | MAG_UNAFFECTS);

  spello(SPELL_INFRAVISION, "infravision", 25, 10, 1, POS_STANDING,
	TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS);

  spello(SPELL_INVISIBLE, "invisibility", 35, 25, 1, POS_STANDING,
	TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_AFFECTS | MAG_ALTER_OBJS);

  spello(SPELL_LIGHTNING_BOLT, "lightning bolt", 30, 15, 1, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE);

  spello(SPELL_LOCATE_OBJECT, "locate object", 25, 20, 1, POS_STANDING,
	TAR_OBJ_WORLD, FALSE, MAG_MANUAL);

  spello(SPELL_MAGIC_MISSILE, "magic missile", 25, 10, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE);

  spello(SPELL_POISON, "poison", 50, 20, 3, POS_STANDING,
	TAR_CHAR_ROOM | TAR_NOT_SELF | TAR_OBJ_INV, TRUE,
	MAG_AFFECTS | MAG_ALTER_OBJS);

  spello(SPELL_PROT_FROM_EVIL, "protection from evil", 40, 10, 3, POS_STANDING,
	TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS);

  spello(SPELL_REMOVE_CURSE, "remove curse", 45, 25, 5, POS_STANDING,
	TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_EQUIP, FALSE,
	MAG_UNAFFECTS | MAG_ALTER_OBJS);

  spello(SPELL_REMOVE_POISON, "remove poison", 40, 8, 4, POS_STANDING,
	TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_UNAFFECTS | MAG_ALTER_OBJS);

  spello(SPELL_SANCTUARY, "sanctuary", 110, 85, 5, POS_STANDING,
	TAR_CHAR_ROOM, FALSE, MAG_AFFECTS);

  spello(SPELL_SENSE_LIFE, "sense life", 20, 10, 2, POS_STANDING,
	TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS);

  spello(SPELL_SHOCKING_GRASP, "shocking grasp", 30, 15, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE);

  spello(SPELL_SLEEP, "sleep", 40, 25, 5, POS_STANDING,
	TAR_CHAR_ROOM, TRUE, MAG_AFFECTS);

  spello(SPELL_STRENGTH, "strength", 35, 30, 1, POS_STANDING,
	TAR_CHAR_ROOM, FALSE, MAG_AFFECTS);

  spello(SPELL_SUMMON, "summon", 75, 50, 3, POS_STANDING,
	TAR_CHAR_WORLD | TAR_NOT_SELF, FALSE, MAG_MANUAL);

  spello(SPELL_TELEPORT, "teleport", 75, 50, 3, POS_STANDING,
	TAR_CHAR_ROOM, FALSE, MAG_MANUAL);

  spello(SPELL_WATERWALK, "waterwalk", 40, 20, 2, POS_STANDING,
	TAR_CHAR_ROOM, FALSE, MAG_AFFECTS);

  spello(SPELL_WORD_OF_RECALL, "word of recall", 20, 10, 2, POS_FIGHTING,
	TAR_CHAR_ROOM, FALSE, MAG_MANUAL);


  /* NON-castable spells should appear below here. */

  spello(SPELL_IDENTIFY, "identify", 0, 0, 0, 0,
	TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL);

  /*
   * These spells are currently not used, not implemented, and not castable.
   * Values for the 'breath' spells are filled in assuming a dragon's breath.
   */

  spello(SPELL_FIRE_BREATH, "fire breath", 0, 0, 0, POS_SITTING,
	TAR_IGNORE, TRUE, 0);

  spello(SPELL_GAS_BREATH, "gas breath", 0, 0, 0, POS_SITTING,
	TAR_IGNORE, TRUE, 0);

  spello(SPELL_FROST_BREATH, "frost breath", 0, 0, 0, POS_SITTING,
	TAR_IGNORE, TRUE, 0);

  spello(SPELL_ACID_BREATH, "acid breath", 0, 0, 0, POS_SITTING,
	TAR_IGNORE, TRUE, 0);

  spello(SPELL_LIGHTNING_BREATH, "lightning breath", 0, 0, 0, POS_SITTING,
	TAR_IGNORE, TRUE, 0);

  /*
   * Declaration of skills - this actually doesn't do anything except
   * set it up so that immortals can use these skills by default.  The
   * min level to use the skill for other classes is set up in class.c.
   */

  skillo(SKILL_BACKSTAB, "backstab");
  skillo(SKILL_BASH, "bash");
  skillo(SKILL_HIDE, "hide");
  skillo(SKILL_KICK, "kick");
  skillo(SKILL_PICK_LOCK, "pick lock");
  skillo(SKILL_PUNCH, "punch");
  skillo(SKILL_RESCUE, "rescue");
  skillo(SKILL_SNEAK, "sneak");
  skillo(SKILL_STEAL, "steal");
  skillo(SKILL_TRACK, "track");
}
Exemple #2
0
/* Arguments for spello calls:
 * spellnum, maxmana, minmana, manachng, minpos, targets, violent?, routines.
 * spellnum:  Number of the spell.  Usually the symbolic name as defined in
 *  spells.h (such as SPELL_HEAL).
 * spellname: The name of the spell.
 * maxmana :  The maximum mana this spell will take (i.e., the mana it
 *  will take when the player first gets the spell).
 * minmana :  The minimum mana this spell will take, no matter how high
 *  level the caster is.
 * manachng:  The change in mana for the spell from level to level.  This
 *  number should be positive, but represents the reduction in mana cost as
 *  the caster's level increases.
 * minpos  :  Minimum position the caster must be in for the spell to work
 *  (usually fighting or standing). targets :  A "list" of the valid targets
 *  for the spell, joined with bitwise OR ('|').
 * violent :  TRUE or FALSE, depending on if this is considered a violent
 *  spell and should not be cast in PEACEFUL rooms or on yourself.  Should be
 *  set on any spell that inflicts damage, is considered aggressive (i.e.
 *  charm, curse), or is otherwise nasty.
 * routines:  A list of magic routines which are associated with this spell
 *  if the spell uses spell templates.  Also joined with bitwise OR ('|').
 * See the documentation for a more detailed description of these fields. You
 * only need a spello() call to define a new spell; to decide who gets to use
 * a spell or skill, look in class.c.  -JE */
void mag_assign_spells(void)
{
  int i;

  /* Do not change the loop below. */
  for (i = 0; i <= TOP_SPELL_DEFINE; i++)
    unused_spell(i);
  /* Do not change the loop above. */

  spello(SPELL_ANIMATE_DEAD, "animate dead", 35, 10, 3, POS_STANDING,
	TAR_OBJ_ROOM, FALSE, MAG_SUMMONS,
	NULL);

  spello(SPELL_ARMOR, "armor", 30, 15, 3, POS_FIGHTING,
	TAR_CHAR_ROOM, FALSE, MAG_AFFECTS,
	"You feel less protected.");

  spello(SPELL_BLESS, "bless", 35, 5, 3, POS_STANDING,
	TAR_CHAR_ROOM | TAR_OBJ_INV, FALSE, MAG_AFFECTS | MAG_ALTER_OBJS,
	"You feel less righteous.");

  spello(SPELL_BLINDNESS, "blindness", 35, 25, 1, POS_STANDING,
	TAR_CHAR_ROOM | TAR_NOT_SELF, FALSE, MAG_AFFECTS,
	"You feel a cloak of blindness dissolve.");

  spello(SPELL_BURNING_HANDS, "burning hands", 30, 10, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE,
	NULL);

  spello(SPELL_CALL_LIGHTNING, "call lightning", 40, 25, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE,
	NULL);

  spello(SPELL_CHARM, "charm person", 75, 50, 2, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_NOT_SELF, TRUE, MAG_MANUAL,
	"You feel more self-confident.");

  spello(SPELL_CHILL_TOUCH, "chill touch", 30, 10, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE | MAG_AFFECTS,
	"You feel your strength return.");

  spello(SPELL_CLONE, "clone", 80, 65, 5, POS_STANDING,
	TAR_IGNORE, FALSE, MAG_SUMMONS,
	NULL);

  spello(SPELL_COLOR_SPRAY, "color spray", 30, 15, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE,
	NULL);

  spello(SPELL_CONTROL_WEATHER, "control weather", 75, 25, 5, POS_STANDING,
	TAR_IGNORE, FALSE, MAG_MANUAL,
	NULL);

  spello(SPELL_CREATE_FOOD, "create food", 30, 5, 4, POS_STANDING,
	TAR_IGNORE, FALSE, MAG_CREATIONS,
	NULL);

  spello(SPELL_CREATE_WATER, "create water", 30, 5, 4, POS_STANDING,
	TAR_OBJ_INV | TAR_OBJ_EQUIP, FALSE, MAG_MANUAL,
	NULL);

  spello(SPELL_CURE_BLIND, "cure blind", 30, 5, 2, POS_STANDING,
	TAR_CHAR_ROOM, FALSE, MAG_UNAFFECTS,
	NULL);

  spello(SPELL_CURE_CRITIC, "cure critic", 30, 10, 2, POS_FIGHTING,
	TAR_CHAR_ROOM, FALSE, MAG_POINTS,
	NULL);

  spello(SPELL_CURE_LIGHT, "cure light", 30, 10, 2, POS_FIGHTING,
	TAR_CHAR_ROOM, FALSE, MAG_POINTS,
	NULL);

  spello(SPELL_CURSE, "curse", 80, 50, 2, POS_STANDING,
	TAR_CHAR_ROOM | TAR_OBJ_INV, TRUE, MAG_AFFECTS | MAG_ALTER_OBJS,
	"You feel more optimistic.");

  spello(SPELL_DARKNESS, "darkness", 30, 5, 4, POS_STANDING,
	TAR_IGNORE, FALSE, MAG_ROOMS,
	NULL);

  spello(SPELL_DETECT_ALIGN, "detect alignment", 20, 10, 2, POS_STANDING,
	TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
	"You feel less aware.");

  spello(SPELL_DETECT_INVIS, "detect invisibility", 20, 10, 2, POS_STANDING,
	TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
	"Your eyes stop tingling.");

  spello(SPELL_DETECT_MAGIC, "detect magic", 20, 10, 2, POS_STANDING,
	TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
	"The detect magic wears off.");

  spello(SPELL_DETECT_POISON, "detect poison", 15, 5, 1, POS_STANDING,
	TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL,
	"The detect poison wears off.");

  spello(SPELL_DISPEL_EVIL, "dispel evil", 40, 25, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE,
	NULL);

  spello(SPELL_DISPEL_GOOD, "dispel good", 40, 25, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE,
	NULL);

  spello(SPELL_EARTHQUAKE, "earthquake", 40, 25, 3, POS_FIGHTING,
	TAR_IGNORE, TRUE, MAG_AREAS,
	NULL);

  spello(SPELL_ENCHANT_WEAPON, "enchant weapon", 150, 100, 10, POS_STANDING,
	TAR_OBJ_INV, FALSE, MAG_MANUAL,
	NULL);

  spello(SPELL_ENERGY_DRAIN, "energy drain", 40, 25, 1, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE | MAG_MANUAL,
	NULL);

  spello(SPELL_GROUP_ARMOR, "group armor", 50, 30, 2, POS_STANDING,
	TAR_IGNORE, FALSE, MAG_GROUPS,
	NULL);

  spello(SPELL_FIREBALL, "fireball", 40, 30, 2, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE,
	NULL);

  spello(SPELL_FLY, "fly", 40, 20, 2, POS_FIGHTING,
	TAR_CHAR_ROOM, FALSE, MAG_AFFECTS,
	"You drift slowly to the ground.");

  spello(SPELL_GROUP_HEAL, "group heal", 80, 60, 5, POS_STANDING,
	TAR_IGNORE, FALSE, MAG_GROUPS,
	NULL);

  spello(SPELL_HARM, "harm", 75, 45, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE,
	NULL);

  spello(SPELL_HEAL, "heal", 60, 40, 3, POS_FIGHTING,
	TAR_CHAR_ROOM, FALSE, MAG_POINTS | MAG_UNAFFECTS,
	NULL);

  spello(SPELL_INFRAVISION, "infravision", 25, 10, 1, POS_STANDING,
	TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
	"Your night vision seems to fade.");

  spello(SPELL_INVISIBLE, "invisibility", 35, 25, 1, POS_STANDING,
	TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_AFFECTS | MAG_ALTER_OBJS,
	"You feel yourself exposed.");

  spello(SPELL_LIGHTNING_BOLT, "lightning bolt", 30, 15, 1, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE,
	NULL);

  spello(SPELL_LOCATE_OBJECT, "locate object", 25, 20, 1, POS_STANDING,
	TAR_OBJ_WORLD, FALSE, MAG_MANUAL,
	NULL);

  spello(SPELL_MAGIC_MISSILE, "magic missile", 25, 10, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE,
	NULL);

  spello(SPELL_POISON, "poison", 50, 20, 3, POS_STANDING,
	TAR_CHAR_ROOM | TAR_NOT_SELF | TAR_OBJ_INV, TRUE,
	MAG_AFFECTS | MAG_ALTER_OBJS,
	"You feel less sick.");

  spello(SPELL_PROT_FROM_EVIL, "protection from evil", 40, 10, 3, POS_STANDING,
	TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
	"You feel less protected.");

  spello(SPELL_REMOVE_CURSE, "remove curse", 45, 25, 5, POS_STANDING,
	TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_EQUIP, FALSE,
	MAG_UNAFFECTS | MAG_ALTER_OBJS,
	NULL);

  spello(SPELL_REMOVE_POISON, "remove poison", 40, 8, 4, POS_STANDING,
	TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_UNAFFECTS | MAG_ALTER_OBJS,
	NULL);

  spello(SPELL_SANCTUARY, "sanctuary", 110, 85, 5, POS_STANDING,
	TAR_CHAR_ROOM, FALSE, MAG_AFFECTS,
	"The white aura around your body fades.");

  spello(SPELL_SENSE_LIFE, "sense life", 20, 10, 2, POS_STANDING,
	TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
	"You feel less aware of your surroundings.");

  spello(SPELL_SHOCKING_GRASP, "shocking grasp", 30, 15, 3, POS_FIGHTING,
	TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE,
	NULL);

  spello(SPELL_SLEEP, "sleep", 40, 25, 5, POS_STANDING,
	TAR_CHAR_ROOM, TRUE, MAG_AFFECTS,
	"You feel less tired.");

  spello(SPELL_STRENGTH, "strength", 35, 30, 1, POS_STANDING,
	TAR_CHAR_ROOM, FALSE, MAG_AFFECTS,
	"You feel weaker.");

  spello(SPELL_SUMMON, "summon", 75, 50, 3, POS_STANDING,
	TAR_CHAR_WORLD | TAR_NOT_SELF, FALSE, MAG_MANUAL,
	NULL);

  spello(SPELL_TELEPORT, "teleport", 75, 50, 3, POS_STANDING,
	TAR_CHAR_ROOM, FALSE, MAG_MANUAL,
	NULL);

  spello(SPELL_WATERWALK, "waterwalk", 40, 20, 2, POS_STANDING,
	TAR_CHAR_ROOM, FALSE, MAG_AFFECTS,
	"Your feet seem less buoyant.");

  spello(SPELL_WORD_OF_RECALL, "word of recall", 20, 10, 2, POS_FIGHTING,
	TAR_CHAR_ROOM, FALSE, MAG_MANUAL,
	NULL);

  spello(SPELL_IDENTIFY, "identify", 50, 25, 5, POS_STANDING,
        TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL,
        NULL);


  /* NON-castable spells should appear below here. */
  spello(SPELL_IDENTIFY, "identify", 0, 0, 0, 0,
	TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL,
	NULL);

  /* you might want to name this one something more fitting to your theme -Welcor*/
  spello(SPELL_DG_AFFECT, "Script-inflicted", 0, 0, 0, POS_SITTING,
	TAR_IGNORE, TRUE, 0,
	NULL);

  /* Declaration of skills - this actually doesn't do anything except set it up
   * so that immortals can use these skills by default.  The min level to use
   * the skill for other classes is set up in class.c. */
  skillo(SKILL_BACKSTAB, "backstab");
  skillo(SKILL_BASH, "bash");
  skillo(SKILL_HIDE, "hide");
  skillo(SKILL_KICK, "kick");
  skillo(SKILL_PICK_LOCK, "pick lock");
  skillo(SKILL_RESCUE, "rescue");
  skillo(SKILL_SNEAK, "sneak");
  skillo(SKILL_STEAL, "steal");
  skillo(SKILL_TRACK, "track");
  skillo(SKILL_WHIRLWIND, "whirlwind");
  skillo(SKILL_SECOND_ATTACK, "second attack");
  skillo(SKILL_THIRD_ATTACK, "third attack");
}
Exemple #3
0
void
mag_assign_spells (void)
{
	int i;

	/* Do not change the loop below. */
	for (i = 0; i <= TOP_SPELL_DEFINE; i++)
		unused_spell (i);
	/* Do not change the loop above. */

	spello (SPELL_ANIMATE_DEAD, "animate dead", 35, 10, 3, POS_STANDING,
			TAR_OBJ_ROOM, FALSE, MAG_SUMMONS, NULL);

	spello (SPELL_ARMOR, "netshield", 30, 15, 3, POS_FIGHTING,
			TAR_CHAR_ROOM, FALSE, MAG_AFFECTS, "Ti senti meno protetto.");

	spello (SPELL_BLESS, "privilege", 35, 5, 3, POS_STANDING,
			TAR_CHAR_ROOM | TAR_OBJ_INV, FALSE, MAG_AFFECTS | MAG_ALTER_OBJS,
			"Ti senti meno in forma.");

	spello (SPELL_BLINDNESS, "echooff", 35, 25, 1, POS_STANDING,
			TAR_CHAR_ROOM | TAR_NOT_SELF, FALSE, MAG_AFFECTS,
			"Ci vedi di nuovo.");

	spello (SPELL_BURNING_HANDS, "warm cpu", 30, 10, 3, POS_FIGHTING,
			TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);

	spello (SPELL_CALL_LIGHTNING, "call lightning", 40, 25, 3, POS_FIGHTING,
			TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);

	spello (SPELL_CHARM, "charm person", 75, 50, 2, POS_FIGHTING,
			TAR_CHAR_ROOM | TAR_NOT_SELF, TRUE, MAG_MANUAL,
			"You feel more self-confident.");

	spello (SPELL_CHILL_TOUCH, "mail bombing", 30, 10, 3, POS_FIGHTING,
			TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE | MAG_AFFECTS,
			"You feel your strength return.");

	spello (SPELL_CLONE, "clone", 80, 65, 5, POS_STANDING,
			TAR_SELF_ONLY, FALSE, MAG_SUMMONS, NULL);

	spello (SPELL_COLOR_SPRAY, "snow crash", 30, 15, 3, POS_FIGHTING,
			TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);

	spello (SPELL_CONTROL_WEATHER, "control weather", 75, 25, 5, POS_STANDING,
			TAR_IGNORE, FALSE, MAG_MANUAL, NULL);

	spello (SPELL_CREATE_FOOD, "load foodfile", 30, 5, 4, POS_STANDING,
			TAR_IGNORE, FALSE, MAG_CREATIONS, NULL);

	spello (SPELL_CREATE_WATER, "load waterfile", 30, 5, 4, POS_STANDING,
			TAR_OBJ_INV | TAR_OBJ_EQUIP, FALSE, MAG_MANUAL, NULL);

	spello (SPELL_CURE_BLIND, "echoon", 30, 5, 2, POS_STANDING,
			TAR_CHAR_ROOM, FALSE, MAG_UNAFFECTS, NULL);

	spello (SPELL_CURE_CRITIC, "restore critic", 30, 10, 2, POS_FIGHTING,
			TAR_CHAR_ROOM, FALSE, MAG_POINTS, NULL);

	spello (SPELL_CURE_LIGHT, "restore light", 30, 10, 2, POS_FIGHTING,
			TAR_CHAR_ROOM, FALSE, MAG_POINTS, NULL);

	spello (SPELL_CURSE, "curse", 80, 50, 2, POS_STANDING,
			TAR_CHAR_ROOM | TAR_OBJ_INV, TRUE, MAG_AFFECTS | MAG_ALTER_OBJS,
			"You feel more optimistic.");

	spello (SPELL_DETECT_ALIGN, "detect alignment", 20, 10, 2, POS_STANDING,
			TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
			"You feel less aware.");

	spello (SPELL_DETECT_INVIS, "show hidden", 20, 10, 2, POS_STANDING,
			TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
			"I tuoi occhi smettono di scintillare.");

	spello (SPELL_DETECT_MAGIC, "show property", 20, 10, 2, POS_STANDING,
			TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
			"si estingue la tua capacita' di percepire le proprieta' dei file");

	spello (SPELL_DETECT_POISON, "detect infected", 15, 5, 1, POS_STANDING,
			TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL,
			"The detect poison wears off.");

	spello (SPELL_DISPEL_EVIL, "dispel evil", 40, 25, 3, POS_FIGHTING,
			TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);

	spello (SPELL_DISPEL_GOOD, "dispel good", 40, 25, 3, POS_FIGHTING,
			TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);

	spello (SPELL_EARTHQUAKE, "earthquake", 40, 25, 3, POS_FIGHTING,
			TAR_IGNORE, TRUE, MAG_AREAS, NULL);

	spello (SPELL_ENCHANT_WEAPON, "enchant weapon", 150, 100, 10,
			POS_STANDING, TAR_OBJ_INV, FALSE, MAG_MANUAL, NULL);

	spello (SPELL_ENERGY_DRAIN, "energy drain", 40, 25, 1, POS_FIGHTING,
			TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE | MAG_MANUAL,
			NULL);

	spello (SPELL_GROUP_ARMOR, "group netshield", 50, 30, 2, POS_STANDING,
			TAR_IGNORE, FALSE, MAG_GROUPS, NULL);

	spello (SPELL_FIREBALL, "ping flood", 40, 30, 2, POS_FIGHTING,
			TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);

	spello (SPELL_GROUP_HEAL, "group heal", 80, 60, 5, POS_STANDING,
			TAR_IGNORE, FALSE, MAG_GROUPS, NULL);

	spello (SPELL_HARM, "harm", 75, 45, 3, POS_FIGHTING,
			TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);

	spello (SPELL_HEAL, "heal", 60, 40, 3, POS_FIGHTING,
			TAR_CHAR_ROOM, FALSE, MAG_POINTS | MAG_UNAFFECTS, NULL);

	spello (SPELL_INFRAVISION, "nightvision", 25, 10, 1, POS_STANDING,
			TAR_CHAR_ROOM, FALSE, MAG_AFFECTS,
			"Perdi la capacita' di vedere al buio.");

	spello (SPELL_INVISIBLE, "set hidden", 35, 25, 1, POS_STANDING,
			TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE,
			MAG_AFFECTS | MAG_ALTER_OBJS, "Ti senti di nuovo visibile.");

	spello (SPELL_LIGHTNING_BOLT, "electromagnetic pulse", 30, 15, 1,
			POS_FIGHTING, TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE,
			NULL);

	spello (SPELL_LOCATE_OBJECT, "find objectfile", 25, 20, 1, POS_STANDING,
			TAR_OBJ_WORLD, FALSE, MAG_MANUAL, NULL);

	spello (SPELL_MAGIC_MISSILE, "flame", 25, 10, 3, POS_FIGHTING,
			TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);

	spello (SPELL_POISON, "infect", 50, 20, 3, POS_STANDING,
			TAR_CHAR_ROOM | TAR_NOT_SELF | TAR_OBJ_INV, TRUE,
			MAG_AFFECTS | MAG_ALTER_OBJS, "Ti senti di nuovo bene.");

	spello (SPELL_PROT_FROM_EVIL, "protection from evil", 40, 10, 3,
			POS_STANDING, TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
			"You feel less protected.");

	spello (SPELL_REMOVE_CURSE, "remove curse", 45, 25, 5, POS_STANDING,
			TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_EQUIP, FALSE,
			MAG_UNAFFECTS | MAG_ALTER_OBJS, NULL);

	spello (SPELL_REMOVE_POISON, "remove poison", 40, 8, 4, POS_STANDING,
			TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE,
			MAG_UNAFFECTS | MAG_ALTER_OBJS, NULL);

	spello (SPELL_SANCTUARY, "firewall", 110, 85, 5, POS_STANDING,
			TAR_CHAR_ROOM, FALSE, MAG_AFFECTS,
			"The white aura around your body fades.");

	spello (SPELL_SENSE_LIFE, "sense life", 20, 10, 2, POS_STANDING,
			TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
			"You feel less aware of your surroundings.");

	spello (SPELL_SHOCKING_GRASP, "shortcut", 30, 15, 3, POS_FIGHTING,
			TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);

	spello (SPELL_SLEEP, "sleep", 40, 25, 5, POS_STANDING,
			TAR_CHAR_ROOM, TRUE, MAG_AFFECTS, "You feel less tired.");

	spello (SPELL_STRENGTH, "overclock", 35, 30, 1, POS_STANDING,
			TAR_CHAR_ROOM, FALSE, MAG_AFFECTS, "Ti senti piu' debole.");

	spello (SPELL_SUMMON, "summon", 75, 50, 3, POS_STANDING,
			TAR_CHAR_WORLD | TAR_NOT_SELF, FALSE, MAG_MANUAL, NULL);

	spello (SPELL_TELEPORT, "teleport", 75, 50, 3, POS_STANDING,
			TAR_CHAR_ROOM, FALSE, MAG_MANUAL, NULL);

	spello (SPELL_WATERWALK, "waterwalk", 40, 20, 2, POS_STANDING,
			TAR_CHAR_ROOM, FALSE, MAG_AFFECTS,
			"Your feet seem less buoyant.");

	spello (SPELL_FLY, "fly", 40, 20, 2, POS_STANDING,
			TAR_CHAR_ROOM, FALSE, MAG_AFFECTS,
			"Senti che la tua capacita' di volare sta svanendo.");


	spello (SPELL_WORD_OF_RECALL, "cdslash", 20, 10, 2, POS_FIGHTING,
			TAR_CHAR_ROOM, FALSE, MAG_MANUAL, NULL);

	spello (SPELL_GATE, "telnet", 50, 50, 0, POS_STANDING,
			TAR_CHAR_WORLD | TAR_NOT_SELF, FALSE, MAG_MANUAL, NULL);


	/* NON-castable spells should appear below here. */

	spello (SPELL_IDENTIFY, "identify", 0, 0, 0, 0,
			TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL,
			NULL);

	/*
	 * These spells are currently not used, not implemented, and not castable.
	 * Values for the 'breath' spells are filled in assuming a dragon's breath.
	 */

	spello (SPELL_FIRE_BREATH, "fire breath", 0, 0, 0, POS_SITTING,
			TAR_IGNORE, TRUE, 0, NULL);

	spello (SPELL_GAS_BREATH, "gas breath", 0, 0, 0, POS_SITTING,
			TAR_IGNORE, TRUE, 0, NULL);

	spello (SPELL_FROST_BREATH, "frost breath", 0, 0, 0, POS_SITTING,
			TAR_IGNORE, TRUE, 0, NULL);

	spello (SPELL_ACID_BREATH, "acid breath", 0, 0, 0, POS_SITTING,
			TAR_IGNORE, TRUE, 0, NULL);

	spello (SPELL_LIGHTNING_BREATH, "lightning breath", 0, 0, 0, POS_SITTING,
			TAR_IGNORE, TRUE, 0, NULL);

	/*
	 * Declaration of skills - this actually doesn't do anything except
	 * set it up so that immortals can use these skills by default.  The
	 * min level to use the skill for other classes is set up in class.c.
	 */

	skillo (SKILL_BACKSTAB, "backstab");
	skillo (SKILL_BASH, "bash");
	skillo (SKILL_HIDE, "hide");
	skillo (SKILL_KICK, "kick");
	skillo (SKILL_PICK_LOCK, "pick lock");
	skillo (SKILL_PUNCH, "punch");
	skillo (SKILL_RESCUE, "rescue");
	skillo (SKILL_SNEAK, "sneak");
	skillo (SKILL_STEAL, "steal");
	skillo (SKILL_TRACK, "track");
	skillo (SKILL_SHOOT, "fireweapon");
	skillo (SKILL_THROW, "throw");
	skillo (SKILL_SPY, "spy");
	skillo (SKILL_SECOND, "second attack");
	skillo (SKILL_THIRD, "third attack");
	skillo (SKILL_SEND, "send");
	skillo (SKILL_MESSENGER, "messenger");
	skillo (SKILL_SPRING_LEAP, "springleap");
	skillo (SKILL_SOMMERSAULT, "sommersault");
	skillo (SKILL_QUIVER_PALM, "quivering palm");
	skillo (SKILL_KAMEHAMEHA, "wave kamehameha");
	skillo (SKILL_FIRST_AID, "first aid");
	skillo (SKILL_DISARM, "disarm");
    skillo (SKILL_RETREAT,"retreat");
    //skillo (SKILL_KI_SHIELD,"ki shield");  
    /* caso speciale per Ki shield che deve far mostrare il msg quando si dissolve */
    spello (SKILL_KI_SHIELD, "ki shield", 0, 0, 0, 0, 0, 0, 0, 
			"La tua aura intorna al corpo si dissolve.");
    
	//skillo(SKILL_FIND_TRAP, "find trap");
	//skillo(SKILL_REMOVE_TRAP, "remove trap");



	/* Mettere qui le dichiarazioni dei poteri dei Psionici. 
	   * sintassi: come spello() ma al posto c'e psyco() e hanno gli stessi parametri 
	   * spellnum, maxmana, minmana, manachng, minpos, targets, violent?, routines.
	   *
	   * spellnum:  Number of the spell.  Usually the symbolic name as defined in
	   * spells.h (such as SPELL_HEAL).
	   *
	   * spellname: The name of the spell.
	   *
	   * maxmana :  The maximum mana this spell will take (i.e., the mana it
	   * will take when the player first gets the spell).
	   *
	   * minmana :  The minimum mana this spell will take, no matter how high
	   * level the caster is.
	   *
	   * manachng:  The change in mana for the spell from level to level.  This
	   * number should be positive, but represents the reduction in mana cost as
	   * the caster's level increases.
	   *
	   * minpos  :  Minimum position the caster must be in for the spell to work
	   * (usually fighting or standing). targets :  A "list" of the valid targets
	   * for the spell, joined with bitwise OR ('|').
	   *
	   * violent :  TRUE or FALSE, depending on if this is considered a violent
	   * spell and should not be cast in PEACEFUL rooms or on yourself.  Should be
	   * set on any spell that inflicts damage, is considered aggressive (i.e.
	   * charm, curse), or is otherwise nasty.
	   *
	   * routines:  A list of magic routines which are associated with this spell
	   * if the spell uses spell templates.  Also joined with bitwise OR ('|').
	 */
	/*
	   #define SPELL_PSI_CANIBALIZE        402 To Be Defined
	   #define SPELL_PSI_CHAMELEON         407
	   #define SPELL_PSI_CLAIRVOYANCE      413
	 */

	psyco (SPELL_PSI_BLAST, "mind blast", 25, 10, 3, POS_FIGHTING,
		   TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);

	psyco (SPELL_PSI_HYPNOSIS, "hypnosys", 50, 15, 2, POS_FIGHTING,
		   TAR_CHAR_ROOM | TAR_NOT_SELF, TRUE, MAG_MANUAL,
		   "You feel more self-confident.");

	psyco (SPELL_PSI_SHIELD, "mind shield", 30, 15, 3, POS_FIGHTING,
		   TAR_CHAR_ROOM, FALSE, MAG_AFFECTS, "Ti senti meno protetto.");

	psyco (SPELL_PSI_BURN, "mind burn", 40, 20, 2, POS_FIGHTING,
		   TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);

	psyco (SPELL_PSI_AURA, "aura sight", 20, 10, 2, POS_STANDING,
		   TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
		   "You feel less aware.");

	psyco (SPELL_PSI_STRENGHT, "mind strength", 35, 30, 1, POS_STANDING,
		   TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
		   "Ti senti piu' debole.");

	psyco (SPELL_PSI_LEVITATION, "levitation", 40, 20, 2, POS_STANDING,
		   TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
		   "Senti che la tua capacita' di volare sta svanendo.");

	psyco (SPELL_PSI_SIGHT, "great sight", 20, 10, 2, POS_STANDING,
		   TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
		   "I tuoi occhi smettono di scintillare.");

	psyco (SPELL_PSI_FLAME, "mind flame", 40, 20, 2, POS_FIGHTING,
		   TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, NULL);

	psyco (SPELL_PSI_SUMMON, "mind summon", 75, 50, 3, POS_STANDING,
		   TAR_CHAR_WORLD | TAR_NOT_SELF, FALSE, MAG_MANUAL, NULL);

	psyco (SPELL_PSI_TELEPORT, "psionic teleport", 75, 50, 3, POS_STANDING,
		   TAR_CHAR_ROOM, FALSE, MAG_MANUAL, NULL);

	psyco (SPELL_PSI_DOORWAY, "doorway", 0, 0, 0, 0, 0, 0, 0, NULL);

	psyco (SPELL_PSI_MIND_OVER_BODY, "mind over body", 20, 10, 2,
		   POS_STANDING, TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_MANUAL,
		   NULL);

	psyco (SPELL_PSI_CANIBALIZE, "canibalize", 20, 10, 2, POS_STANDING,
		   TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_MANUAL, NULL);

	psyco (SPELL_PSI_NIGHTVISION, "night sight", 20, 10, 2, POS_STANDING,
		   TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS,
		   "Perdi la capacita' di vedere al buio.");

}