3 * Summary: Functions for handling player mutations.
4 * Written by: Linley Henzell
13 class formatted_string
;
25 mutation_type muts
[3];
29 struct demon_mutation_info
35 demon_mutation_info(mutation_type m
, int t
, int f
)
36 : mut(m
), tier(t
), facet(f
) { }
41 mutation_type mutation
;
42 short rarity
; // Rarity of the mutation.
43 short levels
; // The number of levels of the mutation.
44 bool bad
; // A mutation that's more bad than good. Xom uses
45 // this to decide which mutations to hand out as
47 bool physical
; // A mutation affecting a character's outward
49 const char* short_desc
;// What appears on the '%' screen.
50 const char* have
[3]; // What appears on the 'A' screen.
51 const char* gain
[3]; // Message when you gain the mutation.
52 const char* lose
[3]; // Message when you lose the mutation.
53 const char* wizname
; // For gaining it in wizmode.
56 void init_mut_index();
58 bool is_valid_mutation(mutation_type mut
);
59 bool is_body_facet(mutation_type mut
);
60 const mutation_def
& get_mutation_def(mutation_type mut
);
62 void fixup_mutations();
64 bool mutate(mutation_type which_mutation
, bool failMsg
= true,
65 bool force_mutation
= false, bool god_gift
= false,
66 bool stat_gain_potion
= false, bool demonspawn
= false);
68 inline bool give_bad_mutation(bool failMsg
= true, bool force_mutation
= false)
70 return (mutate(RANDOM_BAD_MUTATION
, failMsg
, force_mutation
,
71 false, false, false));
74 void display_mutations();
75 bool mutation_is_fully_active(mutation_type mut
);
76 formatted_string
describe_mutations();
78 bool delete_mutation(mutation_type which_mutation
, bool failMsg
= true,
79 bool force_mutation
= false, bool god_gift
= false,
80 bool disallow_mismatch
= false);
82 bool delete_all_mutations();
84 std::string
mutation_name(mutation_type which_mutat
, int level
= -1,
87 void roll_demonspawn_mutations();
89 bool perma_mutate(mutation_type which_mut
, int how_much
);
90 int how_mutated(bool all
= false, bool levels
= false);
92 void check_demonic_guardian();
93 void check_antennae_detect();
94 int handle_pbd_corpses(bool do_rot
);