OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Classes | Functions | Variables
MonsterEnumFunctions.cpp File Reference
#include "MonsterEnumFunctions.h"
#include <vector>
#include "Utility/IndexedArray.h"

Classes

struct  MonsterData
 
struct  BountyHuntableMask
 

Functions

std::span< const MonsterIdallArenaMonsters ()
 
CharacterSex sexForMonsterType (MonsterType monsterType)
 
Race raceForMonsterType (MonsterType monsterType)
 
bool isBountyHuntable (MonsterType monsterType, HouseId townHall)
 
ItemId itemDropForMonsterType (MonsterType monsterType)
 
MonsterSupertype supertypeForMonsterType (MonsterType monsterType)
 
std::span< const MonsterAttackPreferenceallMonsterAttackPreferences ()
 

Variables

static constexpr IndexedArray< MonsterData, MONSTER_TYPE_FIRST, MONSTER_TYPE_LASTdataByMonsterType
 
static const std::vector< MonsterIdarenaMonsters
 
static constexpr IndexedArray< BountyHuntableMask, MONSTER_TYPE_FIRST, MONSTER_TYPE_LASTbountyHuntableMaskByMonsterType
 

Function Documentation

◆ allArenaMonsters()

std::span< const MonsterId > allArenaMonsters ( )
Returns
A span of all monsters that can appear in Arena.

◆ allMonsterAttackPreferences()

std::span< const MonsterAttackPreference > allMonsterAttackPreferences ( )

◆ isBountyHuntable()

bool isBountyHuntable ( MonsterType  monsterType,
HouseId  townHall 
)

◆ itemDropForMonsterType()

ItemId itemDropForMonsterType ( MonsterType  monsterType)

◆ raceForMonsterType()

Race raceForMonsterType ( MonsterType  monsterType)

◆ sexForMonsterType()

CharacterSex sexForMonsterType ( MonsterType  monsterType)

◆ supertypeForMonsterType()

MonsterSupertype supertypeForMonsterType ( MonsterType  monsterType)
Original binary offset:
0x00438BDF
Parameters
monsterTypeMonster type to check.
Returns
Supertype for the provided monster type.

Variable Documentation

◆ arenaMonsters

const std::vector<MonsterId> arenaMonsters
static
Initial value:
= [] {
std::vector<MonsterId> result;
for (MonsterType monsterType : dataByMonsterType.indices())
if (dataByMonsterType[monsterType].appearsInArena)
for (MonsterId monsterId : monsterIdsForMonsterType(monsterType))
result.push_back(monsterId);
return result;
}()
static constexpr IndexedArray< MonsterData, MONSTER_TYPE_FIRST, MONSTER_TYPE_LAST > dataByMonsterType
Definition: MonsterEnumFunctions.cpp:17
Segment< MonsterId > monsterIdsForMonsterType(MonsterType monsterType)
Definition: MonsterEnumFunctions.h:40
MonsterId
Definition: MonsterEnums.h:14
MonsterType
Definition: MonsterEnums.h:306

◆ bountyHuntableMaskByMonsterType

constexpr IndexedArray<BountyHuntableMask, MONSTER_TYPE_FIRST, MONSTER_TYPE_LAST> bountyHuntableMaskByMonsterType
staticconstexpr

Table of monster types that can be targeted in bounty hunts in each of the game's town halls.

This is autogenerated code. It was, however, generated from code that was subsequently deleted, and then the data here was edited. Feel free to edit.

See also
runBountyHuntCodeGen

◆ dataByMonsterType

constexpr IndexedArray<MonsterData, MONSTER_TYPE_FIRST, MONSTER_TYPE_LAST> dataByMonsterType
staticconstexpr