Go to the documentation of this file.
20 #define _GNU_SOURCE // strcasestr() is a GNU extension in string.h
52 tmp->level =
op->level;
54 tmp->duration += lvl/5;
61 if (
tmp->duration >= 40)
64 tmp->stats.maxhp =
tmp->count;
65 if (
tmp->stats.maxhp == 0)
84 int recharge(
object *
op,
object *caster,
object *spell_ob) {
90 if (wand == NULL || wand->
type !=
WAND) {
92 "You need to mark the wand you want to recharge.");
98 "The %s vibrates violently, then explodes!",
107 tmp->stats.hp =
tmp->stats.dam/2;
108 if (
tmp->stats.hp < 2)
120 "Your %s is broken.",
130 "The %s glows with power.",
165 object *owner, *replacing;
179 std::vector<std::pair<archetype *, int>> candidates;
185 candidates.push_back(std::make_pair(at, pos));
189 if (candidates.empty()) {
195 choice =
rndm(0, candidates.size() - 1);
196 auto at = candidates[choice].first;
197 int pos = candidates[choice].second;
259 "The %s glow red, melt and evaporate!",
263 "The %s glows red, melts and evaporates!",
282 int max_value, difficulty, tries = 0, choice, charges =
op->stats.food;
288 max_value =
op->value*2;
289 if (max_value > 2000*(
level/10))
290 max_value = 2000*(
level/10)+(max_value-2000*(
level/10))/3;
292 std::vector<archetype *> candidates;
305 candidates.push_back(at);
308 if (candidates.empty())
311 difficulty =
op->magic*5;
316 choice =
rndm(0, candidates.size() - 1);
317 at = candidates[choice];
322 }
while (new_ob->
value > max_value && tries < 10);
324 LOG(
llevError,
"polymorph_item: fix_generated_object made %s invisible?!\n", new_ob->
name);
336 if (
op->nrof && new_ob->
nrof) {
339 if (new_ob->
nrof > 2)
347 op->stats.food = charges;
427 int range, mflags, maxrange,
level;
435 for (range = 1; range < maxrange; range++) {
494 int missile_plus = 0, bonus_plus = 0;
495 const char *missile_name;
496 object *
tmp, *missile;
500 missile_name =
tmp != NULL ?
tmp->race :
"arrow";
504 if (!strcmp(missile_name,
"arrows"))
505 missile_name =
"arrow";
506 else if (!strcmp(missile_name,
"crossbow bolts"))
507 missile_name =
"bolt";
510 if ( stringarg && strncmp(stringarg,
"of ",3)==0 ) stringarg +=3;
511 if ( stringarg && strncmp(stringarg,
"bolt",4)==0 ) {
512 missile_name =
"bolt";
514 while ( isalpha(*stringarg) ) ++stringarg;
515 while ( *stringarg==
' ' ) ++stringarg;
517 if ( stringarg && strncmp(stringarg,
"arrow",5)==0 ) {
518 missile_name =
"arrow";
520 while ( isalpha(*stringarg) ) ++stringarg;
521 while ( *stringarg==
' ' ) ++stringarg;
525 LOG(
llevDebug,
"Cast create_missile: could not find archetype %s\n", missile_name);
530 if ( stringarg && strncmp(stringarg,
"of ",3)==0 ) stringarg +=3;
533 if (isalpha(*stringarg)) {
535 auto ial = std::find_if(items.cbegin(), items.cend(), [&] (
const auto al) { return !strcasecmp(al->item->name, stringarg); });
536 if (ial == items.cend()) {
539 "No such object %ss of %s",
540 missile_name, stringarg);
547 "You are not allowed to create %ss of %s",
548 missile_name, stringarg);
558 }
else if (atoi(stringarg) < missile_plus)
559 missile_plus = atoi(stringarg);
561 if (missile_plus > 4)
563 else if (missile_plus < -4)
567 if (missile->
nrof <= (uint32_t)3 * (missile_plus + bonus_plus)) {
570 "This item is too powerful for you to create!");
573 missile->
nrof -= 3*(missile_plus+bonus_plus);
574 if (missile->
nrof < 1)
577 missile->
magic = missile_plus;
660 "You don't have enough experience to create any food.");
667 new_op->
nrof = food_value;
670 if (new_op->
nrof < 1)
699 int probe(
object *
op,
object *caster,
object *spell_ob,
int dir,
int level) {
700 int r, mflags, maxrange;
708 for (
r = 1;
r < maxrange;
r++) {
719 "Something blocks your magic.");
726 "You detect something.");
734 "You detect nothing.");
761 if (!
pl->contr->invis_race) {
772 if (strstr(
mon->
race,
pl->contr->invis_race))
804 if (
op->invisible > 1000) {
806 "You can not extend the duration of your invisibility any further");
815 if (
op->invisible > 1000)
816 op->invisible = 1000;
819 if (
op->contr->invis_race)
824 op->contr->tmp_invis = 0;
826 op->contr->tmp_invis = 1;
828 op->contr->hidden = 0;
832 "You can't see your hands!");
835 "You feel more transparent!");
856 int range, i, j, mflags;
865 for (i = -range; i < range; i++)
866 for (j = -range; j < range; j++) {
915 "You feel a force starting to build up inside you.");
922 "Oops, program error!");
923 LOG(
llevError,
"cast_word_of_recall: create_archetype(force) failed!\n");
934 dummy->
speed = 0.002;
949 "You feel a force starting to build up inside you.");
977 LOG(
llevError,
"cast_wonder: Unable to get a spell!\n");
981 LOG(
llevError,
"cast_wonder: spell returned is not a spell (%d, %s)!\n", newspell->
type, newspell->
name);
986 LOG(
llevError,
"cast_wonder: spell returned is another wonder spell!\n");
1020 "You worship no god");
1026 if (*cp ==
'\0' &&
tmp == NULL)
1028 "You feel very mundane");
1038 "Your %s is depleted by %d",
1046 if (
op->glow_radius > 0)
1048 "You glow in the dark.");
1053 if (immunity == NULL) {
1060 if (
tmp->level > 100)
1062 else if (
tmp->level > 70)
1064 else if (
tmp->level > 20)
1069 if (immunity != NULL) {
1082 if (
tmp->stats.exp == 0) {
1083 snprintf(
buf,
sizeof(
buf),
"Your metabolism isn't focused on anything.");
1111 object *dummy, *
force;
1117 if (dummy == NULL) {
1119 "Oops, program error!");
1120 LOG(
llevError,
"object_new failed (force in cast_create_town_portal for %s!\n",
op->name);
1125 if (
force == NULL) {
1138 "You fix this place in your mind and feel that you "
1139 "can come here from anywhere.");
1152 if (dummy == NULL) {
1154 "Oops, program error!");
1155 LOG(
llevError,
"object_new failed (force) in cast_create_town_portal for %s!\n",
op->name);
1160 if (perm_portal == NULL) {
1162 "Oops, program error!");
1174 int16_t exitx =
EXIT_X(old_force);
1175 int16_t exity =
EXIT_Y(old_force);
1176 LOG(
llevDebug,
"Trying to kill a portal in %s (%d,%d)\n", old_force->
race, exitx, exity);
1187 if (
tmp->name == old_force->
name) {
1199 if (
tmp->name == old_force->
name) {
1243 char portal_name [1024], portal_message [1024];
1254 "You can't cast that here.");
1260 if (
op->contr &&
op->contr->transport) {
1262 "You need to exit the transport to cast that.");
1267 if (
force == NULL) {
1307 if (exitmap == NULL) {
1309 "Something strange happens. You can't remember where to go!?");
1316 "The spell effect has expired.");
1325 snprintf(portal_message, 1024,
"The air moves around you and a huge smell of ammonia surrounds you as you pass through %s's tiny portal. Pouah!",
op->name);
1326 else if (op_level < 30)
1327 snprintf(portal_message, 1024,
"%s's portal smells of ozone. You do a lot of movements and finally pass through the small hole in the air.",
op->name);
1328 else if (op_level < 60)
1329 snprintf(portal_message, 1024,
"A shining door opens in the air in front of you, showing you the path to another place.");
1331 snprintf(portal_message, 1024,
"As you walk through %s's portal, flowers come out from the ground around you. You feel awed.",
op->name);
1338 snprintf(portal_name, 1024,
"%s's portal to %s",
op->name,
force->name);
1340 if (dummy == NULL) {
1342 "Oops, program error!");
1343 LOG(
llevError,
"object_new failed (perm_magic_portal) in cast_create_town_portal for %s!\n",
op->name);
1371 "Oops, program error!");
1372 LOG(
llevError,
"object_new failed (force) in cast_create_town_portal for %s!\n",
op->name);
1387 snprintf(portal_name, 1024,
"%s's portal to %s",
op->name,
op->map->path);
1389 if (dummy == NULL) {
1391 "Oops, program error!");
1392 LOG(
llevError,
"object_new failed (perm_magic_portal) in cast_create_town_portal for %s!\n",
op->name);
1419 "Oops, program error!");
1420 LOG(
llevError,
"object_new failed (force) in cast_create_town_portal for %s!\n",
op->name);
1432 "You see air moving and showing you the way home.");
1458 int i, posblocked, negblocked, maxrange;
1478 "Something is in the way.");
1483 }
else if (spell_ob->
race) {
1486 snprintf(buf1,
sizeof(buf1), spell_ob->
race, dir);
1489 LOG(
llevError,
"summon_wall: Unable to find archetype %s\n", buf1);
1491 "This spell is broken.");
1507 tmp->stats.maxhp =
tmp->stats.hp;
1517 tmp->stats.maxhp =
tmp->stats.hp;
1532 "Something destroys your %s",
1537 if (
tmp->other_arch &&
tmp->other_arch->clone.type ==
SPELL)
1550 for (i = 1; i <= maxrange; i++) {
1553 dir2 = (dir < 4) ? (dir+2) : dir-2;
1610 uint32_t dist, maxdist;
1620 "In what direction?");
1629 if (
op->contr->count) {
1630 if (
op->contr->count > maxdist) {
1632 "You can't dimension door that far!");
1636 for (dist = 0; dist <
op->contr->count; dist++) {
1650 if (dist < op->contr->count) {
1652 "Something blocks the magic of the spell.");
1653 op->contr->count = 0;
1656 op->contr->count = 0;
1670 "You cast your spell, but nothing happens.");
1679 for (dist = 0; dist < maxdist; dist++) {
1696 for (; dist > 0; dist--) {
1705 "Your spell failed!");
1710 if (
op->contr->transport &&
op->contr->transport->type ==
TRANSPORT) {
1712 if (
op->contr->transport) {
1714 "Your spell failed!");
1728 op->speed_left = -
FABS(
op->speed)*5;
1749 int heal = 0, success = 0;
1759 heal =
spell->stats.dam;
1760 if (
spell->stats.hp)
1766 "You are already fully healed.");
1778 "You feel just fine!");
1779 }
else if (heal > 50) {
1781 "Your wounds close!");
1782 }
else if (heal > 25) {
1784 "Your wounds mostly close.");
1785 }
else if (heal > 10) {
1787 "Your wounds start to fade.");
1790 "Your wounds start to close.");
1806 "Your body feels cleansed");
1816 "Your mind feels clearer");
1827 "Your vision begins to return.");
1838 "Magical energies surge through your body!");
1846 "You feel redeemed with you god!");
1855 "You feel your belly fill with food");
1858 if (
spell->other_arch != NULL && target->
map != NULL) {
1872 "You grow no stronger.",
1873 "You grow no more agile.",
1874 "You don't feel any healthier.",
1876 "You are no easier to look at.",
1902 object *
force = NULL;
1918 if (tmp2->name == spell_ob->
name) {
1921 }
else if (spell_ob->
race && spell_ob->
race == tmp2->name) {
1924 "You can not cast %s while %s is in effect",
1925 spell_ob->
name, tmp2->name_pl);
1930 if (
force == NULL) {
1944 if (duration >
force->duration) {
1945 force->duration = duration;
1947 "You recast the spell while in effect.");
1955 "Recasting the spell had no effect.");
1963 force->speed_left = -1.0;
1968 if (spell_ob->
resist[i]) {
1970 if (
force->resist[i] > 100)
1971 force->resist[i] = 100;
1984 for (k = 0; k < stat; k++)
2010 if (
op->speed > 0.5)
2063 if (tmp2->name == spell_ob->
name) {
2066 }
else if (spell_ob->
race && spell_ob->
race == tmp2->name) {
2068 "You can not cast %s while %s is in effect",
2069 spell_ob->
name, tmp2->name_pl);
2074 if (
force == NULL) {
2088 if (duration >
force->duration) {
2089 force->duration = duration;
2091 "You recast the spell while in effect.");
2094 "Recasting the spell had no effect.");
2100 force->speed_left = -1.0;
2104 "Your blessing seems empty.");
2109 if (god->
resist[i] > 0) {
2131 "You are blessed by %s!",
2173 #define SMALL_NUGGET "smallnugget"
2174 #define LARGE_NUGGET "largenugget"
2196 uint64_t small_value, large_value;
2207 if (small_nugget_arch == NULL) {
2212 if (large_nugget_arch == NULL) {
2224 if ((
obj->value > 0) &&
rndm(0, 29)) {
2227 assert(large_value != 0 && small_value != 0);
2229 *large_nuggets +=
count;
2232 *small_nuggets +=
count;
2239 if (*small_nuggets*small_value >= large_value) {
2240 assert(small_value != 0);
2242 *small_nuggets -= large_value/small_value;
2243 if (*small_nuggets && large_value%small_value)
2275 if (
x ==
op->x &&
y ==
op->y &&
op->map ==
m)
2278 if (small_nuggets) {
2280 tmp-> nrof = small_nuggets;
2283 if (large_nuggets) {
2285 tmp-> nrof = large_nuggets;
2305 int x,
y,
weight = 0, weight_max, large_nuggets, small_nuggets, mflags;
2326 if (value_adj > 0.40)
2329 for (
y =
op->y-1; y <= op->
y+1;
y++) {
2330 for (
x =
op->x-1; x <= op->
x+1;
x++) {
2367 if (
weight > weight_max) {
2385 op->contr->socket->look_position = 0;
2405 int success = 0, was_one = 0;
2429 "You feel like some of your items are looser now.");
2433 "You failed to remove the curse.");
2436 "You are not using any cursed items.");
2458 "You need to mark an item first!");
2465 "The spell has no effect");
2472 "Your %s emits a dark light for a few seconds.",
name);
2481 "Your %s glows blue for a few seconds.",
name);
2504 int success = 0, num_ident;
2521 "The item has a story:\n%s",
2541 "On the ground is %s.",
2545 "The item has a story:\n%s",
2559 "You can't reach anything unidentified.");
2579 object *
tmp, *last, *detect;
2582 int16_t
x,
y, nx, ny;
2592 for (
x =
op->x-range; x <= op->
x+range;
x++)
2593 for (
y =
op->y-range; y <= op->
y+range;
y++) {
2663 tmp->stats.Cha /= 4;
2698 int dx = nx, dy = ny;
2701 if (done_one == 2 && detect) {
2711 dx =
HEAD(detect)->x;
2712 dy =
HEAD(detect)->y;
2715 for (part = detect_ob; part != NULL; part = part->
more) {
2719 part->
type =
spell->other_arch->clone.type;
2720 for (flag = 0; flag < 4; flag++) {
2721 part->
flags[flag] =
spell->other_arch->clone.flags[flag];
2725 part->
speed =
spell->other_arch->clone.speed;
2753 if (!
tmp->invisible) {
2785 if (
victim->stats.maxsp <= 0)
2789 "You feel energy course through you.");
2795 "Your head explodes!");
2803 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.88) {
2805 "You feel like your head is going to explode.");
2806 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.66) {
2808 "You get a splitting headache!");
2809 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.5) {
2811 "Chaos fills your world.");
2813 }
else if (
victim->stats.sp >=
victim->stats.maxsp*1.25) {
2815 "You start hearing voices.");
2837 object *plyr = NULL;
2867 "There is no one there.");
2872 if (
spell->stats.dam > 0) {
2877 }
else if (
op != plyr) {
2885 sucked = (plyr->
stats.
sp*rate)/100;
2889 sucked = (sucked*rate)/100;
2890 op->stats.sp += sucked;
2944 && (
op->level > head->
level)) {
2947 }
else switch (head->
type) {
2949 if ((
op->level > head->
level) && !
op->stats.food && !
op->speed_left) {
2959 if (
rndm(0, 149) == 0) {
2991 "You can't consecrate anything if you don't worship a god!");
3001 "You are not powerful enough to reconsecrate the %s",
3018 "You fail to consecrate the altar.");
3029 "You consecrated the altar to %s!",
3036 "You are not standing over an altar!");
3064 object *weapon, *
tmp;
3071 if (!
spell->other_arch) {
3073 "Oops, program error!");
3074 LOG(
llevError,
"animate_weapon failed: spell %s missing other_arch!\n",
spell->name);
3093 "There is something in the way.");
3107 "There is something in the way.");
3116 "You must mark a weapon to use with this spell!");
3121 "The spell fails to transform your weapon.");
3126 "You need to mark a weapon to animate it.");
3131 "You need to pay for the weapon to animate it.");
3139 "You need to unequip %s before using it in this spell",
3144 if (weapon->
nrof > 1) {
3163 op->contr->golem_count =
tmp->count;
3187 tmp->stats.wc =
tmp->stats.wc
3192 if (
tmp->stats.wc < -127)
3193 tmp->stats.wc = -127;
3196 tmp->stats.maxhp =
tmp->stats.maxhp
3201 if (
tmp->stats.maxhp < 0)
3202 tmp->stats.maxhp = 10;
3203 tmp->stats.hp =
tmp->stats.maxhp;
3211 if (
tmp->stats.dam < 0)
3212 tmp->stats.dam = 127;
3215 if (!
tmp->attacktype)
3219 if (
op->materialname != NULL)
3223 tmp->resist[i] = 50-(mt->
save[i]*5);
3250 if (
tmp->speed > 3.33)
3254 snprintf(
buf,
sizeof(
buf),
"animated %s", weapon->
name);
3275 tmp->speed_left = -1;
3276 tmp->direction = dir;
3301 if (
spell->stats.dam < 0)
3303 "It can be no brighter here.");
3306 "It can be no darker here.");
3361 if (
spell->resist[i]) {
3390 "You recast the spell while in effect.");
3415 if (!
msg ||
msg[0] == 0) {
3423 "Trying to cheat are we?");
3424 LOG(
llevInfo,
"write_rune: player %s tried to write bogus rune %s\n",
op->name,
msg);
3428 if (!
spell->other_arch)
int SP_level_range_adjust(const object *caster, const object *spob)
#define object_was_destroyed(op, old_tag)
#define MSG_TYPE_SPELL_PERCEIVE_SELF
#define GET_MAP_OB(M, X, Y)
#define FORCE_CHANGE_ABILITY
#define HAS_RANDOM_ITEMS(op)
int write_mark(object *op, object *spell, const char *msg)
object * object_get_owner(object *op)
void set_spell_skill(object *op, object *caster, object *spob, object *dest)
#define FREE_OBJ_NO_DESTROY_CALLBACK
object * object_find_by_type_subtype(const object *who, int type, int subtype)
int cast_polymorph(object *op, object *caster, object *spell_ob, int dir)
TIPS on SURVIVING Crossfire is populated with a wealth of different monsters These monsters can have varying immunities and attack types In some of them can be quite a bit smarter than others It will be important for new players to learn the abilities of different monsters and learn just how much it will take to kill them This section discusses how monsters can interact with players Most monsters in the game are out to mindlessly kill and destroy the players These monsters will help boost a player s after he kills them When fighting a large amount of monsters in a single attempt to find a narrower hallway so that you are not being attacked from all sides Charging into a room full of Beholders for instance would not be open the door and fight them one at a time For there are several maps designed for them Find these areas and clear them out All throughout these a player can find signs and books which they can read by stepping onto them and hitting A to apply the book sign These messages will help the player to learn the system One more always keep an eye on your food If your food drops to your character will soon so BE CAREFUL ! NPCs Non Player Character are special monsters which have intelligence Players may be able to interact with these monsters to help solve puzzles and find items of interest To speak with a monster you suspect to be a simply move to an adjacent square to them and push the double ie Enter your and press< Return > You can also use say if you feel like typing a little extra Other NPCs may not speak to but display intelligence with their movement Some monsters can be friendly
static void place_alchemy_objects(object *op, mapstruct *m, int small_nuggets, int large_nuggets, int x, int y)
void remove_friendly_object(object *op)
int cast_change_ability(object *op, object *caster, object *spell_ob, int dir, int silent)
int remove_curse(object *op, object *caster, object *spell)
object * object_find_by_type_applied(const object *who, int type)
static bool CAN_PROBE(const object *ob)
void LOG(LogLevel logLevel, const char *format,...)
archetype * find_archetype_by_object_type_name(int type, const char *name)
int perceive_self(object *op)
mapstruct * ready_map_name(const char *name, int flags)
#define QUERY_FLAG(xyz, p)
int makes_invisible_to(object *pl, object *mon)
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
void archetypes_for_each(arch_op op)
int magic_wall(object *op, object *caster, int dir, object *spell_ob)
int cast_change_map_lightlevel(object *op, object *spell)
object * map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at)
void confuse_living(object *op, object *hitter, int dam)
materialtype_t * name_to_material(const char *name)
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
uint64_t price_base(const object *obj)
int cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
StringBuffer * stringbuffer_new(void)
int cast_wonder(object *op, object *caster, int dir, object *spell_ob)
#define FOR_BELOW_PREPARE(op_, it_)
std::vector< artifact * > items
static int food_value_choice
void give_artifact_abilities(object *op, const object *artifact)
int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
object * arch_present_in_ob(const archetype *at, const object *op)
void object_set_owner(object *op, object *owner)
non standard information is not specified or uptime this means how long since the executable has been started A particular host may have been running a server for quite a long time
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags)
int cast_consecrate(object *op, object *caster, object *spell)
#define MSG_TYPE_VICTIM_SPELL
int SP_level_duration_adjust(const object *caster, const object *spob)
void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action)
int dimension_door(object *op, object *caster, object *spob, int dir)
void object_copy(const object *src_ob, object *dest_ob)
#define MAP_PLAYER_UNIQUE
void fix_object(object *op)
static void polymorph_melt(object *who, object *op)
static archetype * food_choice
int apply_manual(object *op, object *tmp, int aflag)
#define FOR_OB_AND_ABOVE_FINISH()
static const char *const no_gain_msgs[NUM_STATS]
void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries)
int probe(object *op, object *caster, object *spell_ob, int dir, int level)
AssetsManager * getManager()
object * object_insert_in_ob(object *op, object *where)
int16_t resist[NROFATTACKS]
#define MSG_TYPE_SPELL_TARGET
#define MSG_TYPE_SPELL_HEAL
const object * find_god(const char *name)
Plugin animator file specs[Config] name
#define FOR_BELOW_FINISH()
void esrv_send_item(object *pl, object *op)
static void food_each(archetype *arch)
#define MSG_TYPE_SPELL_SUCCESS
#define FOR_OB_AND_ABOVE_PREPARE(op_)
void store_spell_expiry(object *spell)
void spell_effect(object *spob, int x, int y, mapstruct *map, object *originator)
static event_registration m
void polymorph(object *op, object *who, int level)
char * stringbuffer_finish(StringBuffer *sb)
void object_update(object *op, int action)
int cast_invisible(object *op, object *caster, object *spell_ob)
static void charge_mana_effect(object *victim, int caster_level)
sstring add_refcount(sstring str)
const char * determine_god(object *op)
short freearr_y[SIZEOFFREE]
object * object_present_in_ob_by_name(int type, const char *str, const object *op)
static void alchemy_object(float value_adj, object *obj, int *small_nuggets, int *large_nuggets, int *weight)
void query_name(const object *op, char *buf, size_t size)
int cast_word_of_recall(object *op, object *caster, object *spell_ob)
#define FLAG_KNOWN_BLESSED
#define FLAG_KNOWN_CURSED
#define EXPLODING_FIREBALL
Player Stats effect how well a character can survie and interact inside the crossfire world This section discusses the various what they and how they effect the player s actions Also in this section are the stat modifiers that specific classes professions bring Player and sps the current and maximum the Current and Maximum The Current Sp can go somewhat negative When Sp is negative not all spells can be and a more negative Sp makes spell casting less likey to succeed can affect Damage and how the characters as well as how often the character can attack this affects the prices when buying and selling items if this drops the player will start losing hit points wd Cleric or Dwarf sm Elf wd Fireborn ft Human ra Mage C Monk se Ninja hi Priest C Quetzalcoatl mw Swashbuckler si Thief st Viking ba Warrior or Wizard C Wraith C Class Prof Str Dex Con Wis Cha Int Pow Net Skills Enclosed are codes used for the skills above The ones in and fighting should all be pretty self explanatory For the other a brief description is for a more detailed look at the skills doc file Skill remove use magic items phys no fire cold Fireborns are supposed to be fire spirits They re closely in tune with magic and are powerful and learn magic easily Being fire they are immune to fire and poison
void examine_monster(object *op, object *tmp, int level)
sstring add_string(const char *str)
#define FOR_OB_AND_BELOW_FINISH()
int change_map_light(mapstruct *m, int change)
void query_short_name(const object *op, char *buf, size_t size)
void set_attr_value(living *stats, int attr, int8_t value)
const char *const change_resist_msg[NROFATTACKS]
int is_identified(const object *op)
char * ob_describe(const object *op, const object *observer, int use_media_tags, char *buf, size_t size)
void object_update_speed(object *op)
#define FREE_AND_COPY(sv, nv)
static void polymorph_living(object *op, int level)
int animate_weapon(object *op, object *caster, object *spell, int dir)
object * object_create_arch(archetype *at)
with a maximum of six This is not so if you are wearing plate you receive no benefit Armour is additive with all the supplementry forms of which means that it lasts until the next semi permanent spell effect is cast upon the character spell
void object_free(object *ob, int flags)
#define GET_MAP_MOVE_BLOCK(M, X, Y)
Archetypes * archetypes()
#define INS_BELOW_ORIGINATOR
int caster_level(const object *caster, const object *spell)
int cast_detection(object *op, object *caster, object *spell)
int cast_create_town_portal(object *op, object *caster, object *spell)
const char *const statname[NUM_STATS]
void stringbuffer_append_string(StringBuffer *sb, const char *str)
#define FOR_OB_AND_BELOW_PREPARE(op_)
int cast_item_curse_or_bless(object *op, object *spell_ob)
const Animations * animation
TIPS on SURVIVING Crossfire is populated with a wealth of different monsters These monsters can have varying immunities and attack types In some of them can be quite a bit smarter than others It will be important for new players to learn the abilities of different monsters and learn just how much it will take to kill them This section discusses how monsters can interact with players Most monsters in the game are out to mindlessly kill and destroy the players These monsters will help boost a player s after he kills them When fighting a large amount of monsters in a single attempt to find a narrower hallway so that you are not being attacked from all sides Charging into a room full of Beholders for instance would not be open the door and fight them one at a time For there are several maps designed for them Find these areas and clear them out All throughout these a player can find signs and books which they can read by stepping onto them and hitting A to apply the book sign These messages will help the player to learn the system One more always keep an eye on your food If your food drops to your character will soon so BE CAREFUL ! NPCs Non Player Character are special monsters which have intelligence Players may be able to interact with these monsters to help solve puzzles and find items of interest To speak with a monster you suspect to be a simply move to an adjacent square to them and push the double ie Enter your and press< Return > You can also use say if you feel like typing a little extra Other NPCs may not speak to but display intelligence with their movement Some monsters can be and may attack the nearest of your enemies Others can be in that they follow you around and help you in your quest to kill enemies and find treasure SPECIAL ITEMS There are many special items which can be found in of these the most important may be the signs all a player must do is apply the handle In the case of the player must move items over the button to hold it down Some of the larger buttons may need very large items to be moved onto before they can be activated Gates and locked but be for you could fall down into a pit full of ghosts or dragons and not be able to get back out Break away sometimes it may be worth a player s time to test the walls of a map for secret doors Fire such as missile weapons and spells you will notice them going up in smoke ! So be careful not to destroy valuable items Spellbooks sometimes a player can learn the other times they cannot There are many different types of books and scrolls out there Improve item have lower weight
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
struct archetype * other_arch
object * object_new(void)
StringBuffer * describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf)
object * create_archetype(const char *name)
void free_string(sstring str)
void monster_check_apply_all(object *monster)
void cast_magic_storm(object *op, object *tmp, int lvl)
#define FREE_AND_CLEAR_STR(xyz)
int cast_transfer(object *op, object *caster, object *spell, int dir)
#define FOR_MAP_PREPARE(map_, mx_, my_, it_)
#define FLAG_KNOWN_MAGICAL
int change_abil(object *op, object *tmp)
static object * town_portal_find_force(object *op, object *spell)
int SP_level_dam_adjust(const object *caster, const object *spob)
static void polymorph_item(object *who, object *op, int level)
void each(std::function< void(T *)> op)
#define MSG_TYPE_SPELL_FAILURE
int is_dragon_pl(const object *op)
void add_friendly_object(object *op)
uint8_t create_home_portals
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
#define ARCH_PORTAL_FAILED
#define FLAG_IS_BUILDABLE
int is_magical(const object *op)
void counterspell(object *op, int dir)
Magical Runes Runes are magical inscriptions on the dungeon floor
int cast_heal(object *op, object *caster, object *spell, int dir)
#define MSG_TYPE_SPELL_ERROR
object * object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
int cast_bless(object *op, object *caster, object *spell_ob, int dir)
int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
int cast_create_obj(object *op, object *new_op, int dir)
void object_set_msg(object *op, const char *msg)
void esrv_update_item(int flags, object *pl, object *op)
int did_make_save(const object *op, int level, int bonus)
int cast_create_missile(object *op, object *caster, object *spell, int dir, const char *stringarg)
#define FLAG_NO_FIX_PLAYER
int hit_player(object *op, int dam, object *hitter, uint32_t type, int full_hit)
#define CLEAR_FLAG(xyz, p)
int random_roll(int min, int max, const object *op, int goodbad)
method_ret ob_apply(object *op, object *applier, int aflags)
static int town_portal_destroy_existing(object *op, object *spell)
int cast_create_food(object *op, object *caster, object *spell_ob, int dir, const char *stringarg)
int atnr_is_dragon_enabled(int attacknr)
object * object_find_by_type_and_arch_name(const object *who, int type, const char *name)
void map_newmap_cmd(socket_struct *ns)
object * arch_to_object(archetype *at)
struct treasurelist * randomitems
void object_remove(object *op)
int cure_disease(object *sufferer, object *caster, sstring skill)
archetype * try_find_archetype(const char *name)
Magical Runes Runes are magical inscriptions on the dungeon which cast a spell or detonate when something steps on them Flying objects don t detonate runes Beware ! Runes are invisible most of the time They are only visible occasionally ! There are several runes which are there are some special runes which may only be called with the invoke and people may apply it to read it Maybe useful for mazes ! This rune will not nor is it ordinarily invisible Partial Visibility of they ll be visible only part of the time They have a(your level/2) chance of being visible in any given round
#define OB_TYPE_MOVE_BLOCK(ob1, type)
object * generate_treasure(treasurelist *t, int difficulty)
#define FREE_OBJ_FREE_INVENTORY
void update_all_los(const mapstruct *map, int x, int y)
int rndm(int min, int max)
int8_t get_attr_value(const living *stats, int attr)
object * find_target_for_friendly_spell(object *op, int dir)
int cast_identify(object *op, object *caster, object *spell)
short freearr_x[SIZEOFFREE]
void pets_control_golem(object *op, int dir)
int recharge(object *op, object *caster, object *spell_ob)
void pick_up(object *op, object *alt)
artifactlist * find_artifactlist(int type)
int cast_earth_to_dust(object *op, object *caster, object *spell_ob)
#define MSG_TYPE_ITEM_INFO
object * find_marked_object(object *op)
#define FOR_INV_PREPARE(op_, it_)
static const int32_t MAX_FOOD
int alchemy(object *op, object *caster, object *spell_ob)
int create_aura(object *op, object *caster, object *spell)
#define SP_WORD_OF_RECALL
int cast_cone(object *op, object *caster, int dir, object *spell)
int is_true_undead(object *op)
void player_update_bg_music(object *player)
object * identify(object *op)