#include <Alignment.h>
Inheritance diagram for ogs::core::details::Alignment:
Public Types | |
enum | Value { LAW = 1 << 3, CHAOS = 1 << 2, NEUTRAL_ORDER = (LAW | CHAOS), GOOD = 1 << 1, EVIL = 1 << 0, NEUTRAL_MORAL = (GOOD | EVIL), LAWFUL_GOOD = LAW | GOOD, NEUTRAL_GOOD = NEUTRAL_ORDER | GOOD, CHAOTIC_GOOD = CHAOS | GOOD, LAWFUL_NEUTRAL = LAW | NEUTRAL_MORAL, TRUE_NEUTRAL = NEUTRAL_ORDER | NEUTRAL_MORAL, CHAOTIC_NEUTRAL = CHAOS | NEUTRAL_MORAL, LAWFUL_EVIL = LAW | EVIL, NEUTRAL_EVIL = NEUTRAL_ORDER | EVIL, CHAOTIC_EVIL = CHAOS | EVIL } |
An enumerated type representing the value of this alignment. More... | |
Public Member Functions | |
Alignment (Value value=TRUE_NEUTRAL) | |
Create a new alignment with a specified value. | |
bool | isAbsolute () const |
Determine if this alignment is an absolute alignment. | |
bool | isRelative () const |
Determine if this alignment is a relative alignment. | |
bool | isAligned (const Alignment &a) const |
Determine if this alignment is aligned with another alignment. | |
Value | getValue () const |
Determine the value of this alignment. | |
void | setValue (Value value) |
Change the value of this alignment. |
Alignments are typically associated with entities (characters and creatures) that delineate the concepts of good and evil, law and chaos, and neutrality. Items, and sometimes areas, can also be imbued with emanations of an alignment.
|
The values represent both absolute and relative alignments. The absolute alignments however are defined as bit masks that can be used in bitwise operators for the absolute alignments.
|
|
The default value is the relative alignment TRUE_NEUTRAL.
|
|
|
|
|
|
Two alignments are aligned if one is an absolute alignment and the other is a relative alignment and the relative alignment is composed of the absolute alignment.
|
|
|
|
|