Go to the documentation of this file.
68 if (
op->race != NULL) {
70 if (godname != NULL) {
97 return tmp->title != NULL ?
tmp->title :
"none";
115 return s2 != NULL && strcmp(s1, s2) == 0;
134 const char *given_by;
139 if (given_by == god->
name) {
146 "The %s crumble to dust!",
150 "The %s crumbles to dust!",
218 "%s lets %s appear in your hands.",
233 const uint64_t loss = angry * (
skill->stats.exp / 10);
265 if (!
altar->other_arch)
274 if (!strcmp(pl_god->
name,
altar->other_arch->clone.name)) {
279 if (
pl->stats.grace < 0)
280 pl->stats.grace += (
bonus > -1*(
pl->stats.grace/10) ?
bonus : -1*(
pl->stats.grace/10));
282 if (
pl->stats.grace < (2*
pl->stats.maxgrace)) {
285 if (
pl->stats.grace > (2*
pl->stats.maxgrace)) {
286 pl->stats.grace = (2*
pl->stats.maxgrace);
315 "Foul Priest! %s punishes you!",
321 "Foolish heretic! %s is livid!",
325 "Heretic! %s is angered!",
333 "A divine force pushes you off the altar.");
355 LOG(
llevError,
"BUG: remove_special_prayers(): god %s without randomitems\n", god->
name);
373 if (tr->
item == NULL)
389 "You lose knowledge of %s.",
447 "Fool! %s detests your kind!",
459 && tr->item->clone.invisible
461 && tr->item->clone.type !=
BOOK
462 && tr->item->clone.type !=
SPELL)
467 "You become a follower of %s!",
495 "%s's blessing is withdrawn from you.",
499 if (sk_applied || undeadified) {
541 "You are bathed in %s's aura.",
596 "You may use %s again.",
600 "You are forbidden to use %s.",
681 LOG(
llevError,
"BUG: determine_holy_arch(): no god or god without randomitems\n");
706 return item->other_arch;
743 "You feel like someone is helping you.");
757 if (difficulty < 1) {
758 LOG(
llevError,
"follower_level_to_enchantments(): difficulty %d is invalid\n", difficulty);
763 return level/difficulty;
765 return (20+(
level-20)/2)/difficulty;
766 return (30+(
level-40)/4)/difficulty;
792 "A phosphorescent glow envelops your weapon!");
833 "%s considers your %s is not worthy to be enchanted any more.",
847 const char *divine_owner =
object_get_value(weapon,
"divine_blessing_name");
849 object *skillop = NULL;
851 if (divine_owner != NULL && strcmp(divine_owner, god->
name) != 0) {
854 "Your %s already belongs to %s !",
855 weapon->
name, divine_owner);
859 if ((owner != NULL) && (strcmp(owner,
op->name) != 0)) {
862 "The %s is not yours, and is magically protected against such changes !",
867 if (skillop == NULL) {
868 LOG(
llevError,
"god_enchants_weapon: no praying skill object found ?!\n");
869 snprintf(
buf,
sizeof(
buf),
"%d", 1);
878 if (!weapon->
title) {
879 snprintf(
buf,
sizeof(
buf),
"of %s", god->
name);
884 "Your weapon quivers as if struck!");
891 "Your %s now hungers to slay enemies of your god!",
901 "Your weapon suddenly glows!");
930 LOG(
llevError,
"BUG: god_intervention(): no god or god without randomitems\n");
939 "You feel a holy presence!");
941 if (
altar->anim_suffix != NULL)
957 "Something appears before your eyes. You catch it before it falls to the ground.");
971 && strcmp(
item->name,
"grace limit") == 0) {
972 if (
op->stats.grace <
item->stats.grace
973 ||
op->stats.grace <
op->stats.maxgrace) {
989 && strcmp(
item->name,
"restore grace") == 0) {
990 if (
op->stats.grace >= 0)
994 "You are returned to a state of grace.");
1000 && strcmp(
item->name,
"restore hitpoints") == 0) {
1001 if (
op->stats.hp >=
op->stats.maxhp)
1004 "A white light surrounds and heals you!");
1005 op->stats.hp =
op->stats.maxhp;
1012 && strcmp(
item->name,
"restore spellpoints") == 0) {
1013 int max =
op->stats.maxsp*(
item->stats.maxsp/100.0);
1016 if (
op->stats.sp >=
max/2)
1019 "A blue lightning strikes your head but doesn't hurt you!");
1020 op->stats.sp = new_sp;
1025 && strcmp(
item->name,
"heal spell") == 0) {
1041 && strcmp(
item->name,
"remove curse") == 0) {
1050 && strcmp(
item->name,
"remove damnation") == 0) {
1059 && strcmp(
item->name,
"heal depletion") == 0) {
1062 "Shimmering light surrounds and restores you!");
1068 && strcmp(
item->name,
"voice_behind") == 0) {
1070 "You hear a voice from behind you, but you don't dare to "
1079 && strcmp(
item->name,
"message") == 0) {
1087 && strcmp(
item->name,
"enchant weapon") == 0) {
1102 "%s grants you use of a special prayer!",
1109 if (!
item->invisible) {
1119 "You feel rapture.");
1146 int loss = 10000000;
1147 int angry = abs(reaction);
1151 loss = 0.05*(float)skop->
stats.
exp;
1159 "%s becomes angry and punishes you!",
1190 snprintf(
buf,
sizeof(
buf),
"of %s", god->
name);
1191 if (!strcmp(
item->title,
buf))
1196 if (!strcmp(
item->title,
buf)) {
1202 "Heretic! You are using %s!",
1224 int caster_is_spell = 0;
1227 caster_is_spell = 1;
1237 if (!caster_is_spell)
1239 "This prayer is useless unless you worship an appropriate god");
1252 if (!caster_is_spell)
1267 if (spellop->
title) {
1270 snprintf(
buf,
sizeof(
buf),
"%s of %s", spellop->
name, spellop->
title);
object * object_get_owner(object *op)
object * object_find_by_type_subtype(const object *who, int type, int subtype)
#define MSG_TYPE_SKILL_PRAY
object * object_find_by_type_applied(const object *who, int type)
static int follower_level_to_enchantments(int level, int difficulty)
object * find_skill_by_number(object *who, int skillno)
void LOG(LogLevel logLevel, const char *format,...)
#define QUERY_FLAG(xyz, p)
#define FLAG_REFL_MISSILE
void do_learn_spell(object *op, object *spell, int special_prayer)
const char * determine_god(object *op)
object * give_skill_by_name(object *op, const char *skill_name)
static int worship_forbids_use(object *op, object *exp_obj, uint32_t flag, const char *string)
#define MSG_TYPE_ATTRIBUTE
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 move_player(object *op, int dir)
treasurelist * find_treasurelist(const char *name)
static void remove_special_prayers(object *op, const object *god)
const char * object_get_value(const object *op, const char *const key)
void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries)
int events_execute_object_event(object *op, int eventcode, object *activator, object *third, const char *message, int fix)
object * object_insert_in_ob(object *op, object *where)
int16_t resist[NROFATTACKS]
const object * find_god(const char *name)
Plugin animator file specs[Config] name
void cast_magic_storm(object *op, object *tmp, int lvl)
void object_free_drop_inventory(object *ob)
void pray_at_altar(object *pl, object *altar, object *skill)
int cast_heal(object *op, object *caster, object *spell, int dir)
static int improve_weapon_magic(object *op, object *tr, object *weapon, object *skill)
const object * get_rand_god(void)
object * object_present_in_ob_by_name(int type, const char *str, const object *op)
void query_name(const object *op, char *buf, size_t size)
#define FLAG_KNOWN_CURSED
sstring add_string(const char *str)
void apply_anim_suffix(object *who, const char *suffix)
void query_short_name(const object *op, char *buf, size_t size)
int become_follower(object *op, const object *new_god)
#define FREE_AND_COPY(sv, nv)
static int follower_has_similar_item(object *op, object *item)
void object_free(object *ob, int flags)
void change_exp(object *op, int64_t exp, const char *skill_name, int flag)
const char * get_god_for_race(const char *race)
static void follower_remove_given_items(object *pl, object *op, const object *god)
static bool try_leave_cult(object *pl, object *skill, int angry)
struct archetype * other_arch
uint8_t personalized_blessings
object * create_archetype(const char *name)
void free_string(sstring str)
int tailor_god_spell(object *spellop, object *caster)
#define MSG_TYPE_ITEM_ADD
int change_abil(object *op, object *tmp)
#define MSG_TYPE_ITEM_REMOVE
object * create_archetype_by_object_name(const char *name)
object * check_spell_known(object *op, const char *name)
#define MSG_TYPE_ATTRIBUTE_GOD
static int god_enchants_weapon(object *op, const object *god, object *tr, object *skill)
void esrv_update_item(int flags, object *pl, object *op)
#define CLEAR_FLAG(xyz, p)
static int god_examines_priest(object *op, const object *god)
#define SK_SUBTRACT_SKILL_EXP
static void god_intervention(object *op, const object *god, object *skill, object *altar)
int random_roll(int min, int max, const object *op, int goodbad)
int apply_special(object *who, object *op, int aflags)
static int god_removes_curse(object *op, int remove_damnation)
object * arch_to_object(archetype *at)
static void update_priest_flag(const object *god, object *exp_ob, uint32_t flag)
struct treasurelist * randomitems
archetype * get_archetype_by_type_subtype(int type, int subtype)
void object_remove(object *op)
int cast_change_ability(object *op, object *caster, object *spell_ob, int dir, int silent)
int remove_depletion(object *op, int level)
#define MSG_TYPE_ITEM_CHANGE
archetype * determine_holy_arch(const object *god, const char *type)
int rndm(int min, int max)
int object_set_value(object *op, const char *key, const char *value, int add_key)
static int same_string(const char *s1, const char *s2)
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 and vulnerable to cold They are vulnerable to ghosthit and drain because being mostly non anything which strikes directly at the spirit hits them harder race attacktype restrictions immunities prot vuln Quetzalcoatl physical no armour fire cold Quetzalcoatl s are now born knowing the spell of burning but because of their negative wisdom bonus
#define MAX_WEAPON_ITEM_POWER
void link_player_skills(object *op)
static int god_gives_present(object *op, const object *god, treasure *tr)
void player_unready_range_ob(player *pl, object *ob)
#define MSG_TYPE_ITEM_INFO
#define FOR_INV_PREPARE(op_, it_)
int64_t random_roll64(int64_t min, int64_t max, const object *op, int goodbad)
static int god_examines_item(const object *god, object *item)
static void stop_using_item(object *op, int type, int number)