OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Classes | Enumerations | Functions | Variables
Conditions.cpp File Reference
#include "Engine/Conditions.h"
#include <cassert>
#include "Engine/Engine.h"
#include "Engine/Party.h"

Classes

struct  ConditionEquipment
 
struct  ConditionTableEntry
 

Enumerations

enum class  ConditionFlag { AFFECTED_BY_PROTECTION_FROM_MAGIC = 0x1 , REQUIRES_GM_PROTECTION_FROM_MAGIC = 0x2 }
 

Functions

static bool blockConditionWithProtectionFromMagic (const ConditionTableEntry &entry)
 
bool blockCondition (Character *character, Condition condition)
 
const std::array< Condition, 18 > & conditionImportancyTable ()
 

Variables

static constexpr IndexedArray< ConditionTableEntry, CONDITION_CURSED, CONDITION_ZOMBIEconditionArray
 
static std::array< Condition, 18 > conditionImportancyTableDefault
 
static std::array< Condition, 18 > conditionImportancyTableAlternative
 

Enumeration Type Documentation

◆ ConditionFlag

enum class ConditionFlag
strong
Enumerator
AFFECTED_BY_PROTECTION_FROM_MAGIC 
REQUIRES_GM_PROTECTION_FROM_MAGIC 

Function Documentation

◆ blockCondition()

bool blockCondition ( Character character,
Condition  condition 
)
Parameters
characterCharacter that's about to receive a condition.
conditionCondition in question.
Returns
Whether the condition was successfully blocked, either by protection from magic spell, or by an item. In the former case, this function will decrement the protection from magic counter & expire the buff if the counter reaches zero.

◆ blockConditionWithProtectionFromMagic()

static bool blockConditionWithProtectionFromMagic ( const ConditionTableEntry entry)
static

◆ conditionImportancyTable()

const std::array< Condition, 18 > & conditionImportancyTable ( )

Variable Documentation

◆ conditionArray

constexpr IndexedArray<ConditionTableEntry, CONDITION_CURSED, CONDITION_ZOMBIE> conditionArray
staticconstexpr

◆ conditionImportancyTableAlternative

std::array<Condition, 18> conditionImportancyTableAlternative
static

◆ conditionImportancyTableDefault

std::array<Condition, 18> conditionImportancyTableDefault
static