diff options
author | Bardur Arantsson <bardur@scientician.net> | 2016-06-20 22:49:05 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2016-06-20 22:49:05 +0200 |
commit | 68e2a10b2d76cb3a2f5aa6818b4b184b6a02ef14 (patch) | |
tree | ec51a0b9156c6a28fa2764441ca66db36441604b /src/q_bounty.cc | |
parent | fc41a7d28d8896da79963d23ed1afba408e27470 (diff) |
Rework RF{1,2,3,7,8,9}_* monster flags to use flag_set<>
Diffstat (limited to 'src/q_bounty.cc')
-rw-r--r-- | src/q_bounty.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/q_bounty.cc b/src/q_bounty.cc index dac4fef7..26d3f6cd 100644 --- a/src/q_bounty.cc +++ b/src/q_bounty.cc @@ -2,6 +2,7 @@ #include "monster2.hpp" #include "monster_race.hpp" +#include "monster_race_flag.hpp" #include "monster_spell_flag.hpp" #include "object1.hpp" #include "object2.hpp" @@ -23,29 +24,29 @@ static bool_ lua_mon_hook_bounty(int r_idx) monster_race* r_ptr = &r_info[r_idx]; /* Reject uniques */ - if (r_ptr->flags1 & RF1_UNIQUE) return (FALSE); + if (r_ptr->flags & RF_UNIQUE) return (FALSE); /* Reject those who cannot leave anything */ - if (!(r_ptr->flags9 & RF9_DROP_CORPSE)) return (FALSE); + if (!(r_ptr->flags & RF_DROP_CORPSE)) return (FALSE); /* Accept only monsters that can be generated */ - if (r_ptr->flags9 & RF9_SPECIAL_GENE) return (FALSE); - if (r_ptr->flags9 & RF9_NEVER_GENE) return (FALSE); + if (r_ptr->flags & RF_SPECIAL_GENE) return (FALSE); + if (r_ptr->flags & RF_NEVER_GENE) return (FALSE); /* Reject pets */ - if (r_ptr->flags7 & RF7_PET) return (FALSE); + if (r_ptr->flags & RF_PET) return (FALSE); /* Reject friendly creatures */ - if (r_ptr->flags7 & RF7_FRIENDLY) return (FALSE); + if (r_ptr->flags & RF_FRIENDLY) return (FALSE); /* Accept only monsters that are not breeders */ if (r_ptr->spells & SF_MULTIPLY) return (FALSE); /* Forbid joke monsters */ - if (r_ptr->flags8 & RF8_JOKEANGBAND) return (FALSE); + if (r_ptr->flags & RF_JOKEANGBAND) return (FALSE); /* Accept only monsters that are not good */ - if (r_ptr->flags3 & RF3_GOOD) return (FALSE); + if (r_ptr->flags & RF_GOOD) return (FALSE); /* The rest are acceptable */ return (TRUE); |