From 4bd11a2119ce0fd7f137233e16cd7f745c13a2dd Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Mon, 28 Dec 2009 01:52:41 -0800 Subject: Rename MF_CREATED_FRIENDLY to MF_NO_REWARD, since that's all it's used for these days. --- crawl-ref/source/attitude-change.cc | 2 +- crawl-ref/source/directn.cc | 4 ++-- crawl-ref/source/enum.h | 2 +- crawl-ref/source/godabil.cc | 4 ++-- crawl-ref/source/misc.cc | 2 +- crawl-ref/source/mon-place.cc | 4 ++-- crawl-ref/source/mon-stuff.cc | 4 ++-- crawl-ref/source/monster.cc | 2 +- crawl-ref/source/religion.cc | 6 +++--- crawl-ref/source/spl-cast.cc | 2 +- crawl-ref/source/tags.cc | 2 +- crawl-ref/source/wiz-mon.cc | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/attitude-change.cc b/crawl-ref/source/attitude-change.cc index fcfcf2d2a9..ef5ef2fcef 100644 --- a/crawl-ref/source/attitude-change.cc +++ b/crawl-ref/source/attitude-change.cc @@ -864,7 +864,7 @@ void beogh_convert_orc(monsters *orc, bool emergency, // The monster is not really *created* friendly, but should it // become hostile later on, it won't count as a good kill. - orc->flags |= MF_CREATED_FRIENDLY; + orc->flags |= MF_NO_REWARD; // Prevent assertion if the orc was previously worshipping a // different god, rather than already worshipping Beogh or being an diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 3b0a1262b3..047dcd3974 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -1498,7 +1498,7 @@ void direction(dist& moves, const targetting_type restricts, { case ATT_FRIENDLY: m->attitude = ATT_GOOD_NEUTRAL; - m->flags &= ~MF_CREATED_FRIENDLY; + m->flags &= ~MF_NO_REWARD; m->flags |= MF_WAS_NEUTRAL; break; case ATT_GOOD_NEUTRAL: @@ -1513,7 +1513,7 @@ void direction(dist& moves, const targetting_type restricts, break; case ATT_HOSTILE: m->attitude = ATT_FRIENDLY; - m->flags |= MF_CREATED_FRIENDLY; + m->flags |= MF_NO_REWARD; break; } diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 61dbeb3b2f..48bcb16db5 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -2122,7 +2122,7 @@ enum mon_attitude_type // These are now saved in an unsigned long in the monsters struct. enum monster_flag_type { - MF_CREATED_FRIENDLY = 0x01, // no benefit from killing + MF_NO_REWARD = 0x01, // no benefit from killing MF_JUST_SUMMONED = 0x02, // monster skips next available action MF_TAKING_STAIRS = 0x04, // is following player through stairs MF_INTERESTING = 0x08, // Player finds monster interesting diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc index f8b6ce9960..8888f868ab 100644 --- a/crawl-ref/source/godabil.cc +++ b/crawl-ref/source/godabil.cc @@ -279,7 +279,7 @@ void yred_make_enslaved_soul(monsters *mon, bool force_hostile, mon->colour = ETC_UNHOLY; - mon->flags |= MF_CREATED_FRIENDLY; + mon->flags |= MF_NO_REWARD; mon->flags |= MF_ENSLAVED_SOUL; if (twisted) @@ -1146,7 +1146,7 @@ bool evolve_flora() current_plant->upgrade_type(current_target.new_type, true, true); current_plant->god = GOD_FEDHAS; current_plant->attitude = ATT_FRIENDLY; - current_plant->flags |= MF_CREATED_FRIENDLY; + current_plant->flags |= MF_NO_REWARD; current_plant->flags |= MF_ATT_CHANGE_ATTEMPT; // Try to remove slowly dying in case we are upgrading a diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index b5c9e6bb40..2cc226f127 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -3219,7 +3219,7 @@ bool stop_attack_prompt(const monsters *mon, bool beam_attack, const bool isUnchivalric = is_unchivalric_attack(&you, mon); const bool isHoly = mon->is_holy() && (mon->attitude != ATT_HOSTILE - || testbits(mon->flags, MF_CREATED_FRIENDLY) + || testbits(mon->flags, MF_NO_REWARD) || testbits(mon->flags, MF_WAS_NEUTRAL)); if (isFriendly) diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc index 3a88d27774..27b6c8fe20 100644 --- a/crawl-ref/source/mon-place.cc +++ b/crawl-ref/source/mon-place.cc @@ -1036,7 +1036,7 @@ int place_monster(mgen_data mg, bool force_pos) // Don't give XP for the slaves to discourage hunting. Pikel // has an artificially large XP modifier to compensate for // this. - menv[band_id].flags |= MF_CREATED_FRIENDLY; + menv[band_id].flags |= MF_NO_REWARD; menv[band_id].props["pikel_band"] = true; } } @@ -2578,7 +2578,7 @@ int mons_place(mgen_data mg) if (mg.behaviour > NUM_BEHAVIOURS) { if (mg.behaviour == BEH_FRIENDLY) - creation->flags |= MF_CREATED_FRIENDLY; + creation->flags |= MF_NO_REWARD; if (mg.behaviour == BEH_NEUTRAL || mg.behaviour == BEH_GOOD_NEUTRAL || mg.behaviour == BEH_STRICT_NEUTRAL) diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc index 730fb54ef2..7a85194ea2 100644 --- a/crawl-ref/source/mon-stuff.cc +++ b/crawl-ref/source/mon-stuff.cc @@ -595,7 +595,7 @@ static void _give_adjusted_experience(monsters *monster, killer_type killer, const int experience = exper_value(monster); const bool created_friendly = - testbits(monster->flags, MF_CREATED_FRIENDLY); + testbits(monster->flags, MF_NO_REWARD); const bool was_neutral = testbits(monster->flags, MF_WAS_NEUTRAL); const bool no_xp = monster->has_ench(ENCH_ABJ) || !experience; const bool already_got_half_xp = testbits(monster->flags, MF_GOT_HALF_XP); @@ -1616,7 +1616,7 @@ int monster_die(monsters *monster, killer_type killer, && monster->visible_to(&you); const bool exploded = monster->flags & MF_EXPLODE_KILL; - const bool created_friendly = testbits(monster->flags, MF_CREATED_FRIENDLY); + const bool created_friendly = testbits(monster->flags, MF_NO_REWARD); bool anon = (killer_index == ANON_FRIENDLY_MONSTER); const mon_holy_type targ_holy = monster->holiness(); diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 862aa075c4..f9d18c97d9 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -5955,7 +5955,7 @@ void monsters::react_to_damage(int damage, beam_type flavour, kill_category whos if (nmons != -1 && nmons != NON_MONSTER) { // Don't allow milking the royal jelly. - menv[nmons].flags |= MF_CREATED_FRIENDLY; + menv[nmons].flags |= MF_NO_REWARD; spawned++; } } diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 763f1c0709..3a0c43fb0f 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -2683,7 +2683,7 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known, } if (thing_done == DID_ATTACK_HOLY && victim - && !testbits(victim->flags, MF_CREATED_FRIENDLY) + && !testbits(victim->flags, MF_NO_REWARD) && !testbits(victim->flags, MF_WAS_NEUTRAL)) { break; @@ -3029,7 +3029,7 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known, case GOD_SHINING_ONE: case GOD_ELYVILON: if (victim - && !testbits(victim->flags, MF_CREATED_FRIENDLY) + && !testbits(victim->flags, MF_NO_REWARD) && !testbits(victim->flags, MF_WAS_NEUTRAL)) { break; @@ -3097,7 +3097,7 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known, case GOD_SHINING_ONE: case GOD_ELYVILON: if (victim - && !testbits(victim->flags, MF_CREATED_FRIENDLY) + && !testbits(victim->flags, MF_NO_REWARD) && !testbits(victim->flags, MF_WAS_NEUTRAL)) { break; diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 7a65c84f2e..9f875c298f 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -1058,7 +1058,7 @@ static void _try_monster_cast(spell_type spell, int powc, mon->type = MONS_HUMAN; mon->behaviour = BEH_SEEK; mon->attitude = ATT_FRIENDLY; - mon->flags = (MF_CREATED_FRIENDLY | MF_JUST_SUMMONED | MF_SEEN + mon->flags = (MF_NO_REWARD | MF_JUST_SUMMONED | MF_SEEN | MF_WAS_IN_VIEW | MF_HARD_RESET); mon->hit_points = you.hp; mon->hit_dice = you.experience_level; diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index 6d12c323ab..82a2f462ab 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -2426,7 +2426,7 @@ void tag_missing_level_attitude() if (menv[i].type < 0) continue; - is_friendly = testbits(menv[i].flags, MF_CREATED_FRIENDLY); + is_friendly = testbits(menv[i].flags, MF_NO_REWARD); menv[i].foe = MHITNOT; diff --git a/crawl-ref/source/wiz-mon.cc b/crawl-ref/source/wiz-mon.cc index d7270d082a..632b716b54 100644 --- a/crawl-ref/source/wiz-mon.cc +++ b/crawl-ref/source/wiz-mon.cc @@ -285,7 +285,7 @@ void debug_list_monsters() int exp = exper_value(*mi); total_exp += exp; - if ((mi->flags & (MF_WAS_NEUTRAL | MF_CREATED_FRIENDLY)) + if ((mi->flags & (MF_WAS_NEUTRAL | MF_NO_REWARD)) || mi->has_ench(ENCH_ABJ)) { continue; -- cgit v1.2.3-54-g00ecf