31 this->rels[c] = util::clamp(this->rels[c] + amt, 0,
REL_MAX);
41 return FMT_8(
"{}/{}", this->rels[c],
REL_MAX);
48 bn::array<character::CHAR_ENUM, character::COUNT>
by_rel_desc(){
50 bn::array<character::CHAR_ENUM, character::COUNT> chars;
52 rels_cpy[c] = rels[c];
60 if(rels_cpy[s] > rels_cpy[max_idx]) {
65 if (max_idx != start) {
66 int temp_r = rels_cpy[start];
68 rels_cpy[start] = rels_cpy[max_idx];
69 chars[start] = chars[max_idx];
70 rels_cpy[max_idx] = temp_r;
71 chars[max_idx] = temp_c;
constexpr int COUNT
there are four characters
Definition character.h:6
const CHAR_ENUM characters[]
conviences array used in loop structures
Definition character.h:16
CHAR_ENUM
the character enum
Definition character.h:8
state encapslated relationship state and its operations
Definition relationship_state.h:5
constexpr int REL_INIT
the starting point of a relationship
Definition relationship_state.h:9
RELATION_INC_AMT
possible amounts to increase/decrease by
Definition relationship_state.h:11
@ GOOD
using at various points (various minigames, instant_message)
Definition relationship_state.h:19
@ NONE
TODO unused.
Definition relationship_state.h:17
@ GREAT
TODO unused.
Definition relationship_state.h:21
@ REALLY_BAD
used during weekend_event
Definition relationship_state.h:13
@ BAD
TODO unused.
Definition relationship_state.h:15
@ REALLY_GOOD
used during weekend_event
Definition relationship_state.h:23
constexpr int REL_MAX
the maximum points a relationship can have
Definition relationship_state.h:7
bn::array< character::CHAR_ENUM, character::COUNT > by_rel_desc()
used in weekend_event and during weekend emergencies
Definition relationship_state.h:48
bn::string< 8 > fmt(character::CHAR_ENUM c)
used in SaveScreen rendering and viewing in the Morning
Definition relationship_state.h:40
void modify_relation(character::CHAR_ENUM c, RELATION_INC_AMT amt)
update the relation by a fixed amount
Definition relationship_state.h:30
void reset(character::CHAR_ENUM c)
used in extreme story events
Definition relationship_state.h:44
void init()
initialize the struct
Definition relationship_state.h:34