MCPcopy Create free account
hub / github.com/TurningWheel/Barony / monsterNameIsGeneric

Function monsterNameIsGeneric

src/entity.cpp:28461–28492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28459}
28460
28461bool monsterNameIsGeneric(Stat& monsterStats)
28462{
28463 if ( monsterStats.MISC_FLAGS[STAT_FLAG_MONSTER_NAME_GENERIC] == 1 )
28464 {
28465 return true;
28466 }
28467 if ( strstr(monsterStats.name, "lesser")
28468 || strstr(monsterStats.name, "young")
28469 || strstr(monsterStats.name, "enslaved")
28470 || strstr(monsterStats.name, "damaged")
28471 || strstr(monsterStats.name, "corrupted")
28472 || strstr(monsterStats.name, "cultist")
28473 || strstr(monsterStats.name, "encased")
28474 || strstr(monsterStats.name, "knight")
28475 || strstr(monsterStats.name, "sentinel")
28476 || strstr(monsterStats.name, "mage")
28477 || strstr(monsterStats.name, "inner")
28478 || strstr(monsterStats.name, "training")
28479 || strstr(monsterStats.name, "Training")
28480 || strstr(monsterStats.name, "Mysterious")
28481 || strstr(monsterStats.name, "shaman")
28482 || !strcmp(monsterStats.name, Language::get(6807)) // revenant skeleton
28483 || !strcmp(monsterStats.name, Language::get(6302)) // gnome thief
28484 || !strcmp(monsterStats.name, Language::get(6303)) // gnome thief leader
28485 || MonsterData_t::nameMatchesSpecialNPCName(monsterStats, "fire sprite")
28486 || strstr(monsterStats.name, getMonsterLocalizedName(SLIME).c_str()) )
28487 {
28488 // If true, pretend the monster doesn't have a name and use the generic message "You hit the lesser skeleton!"
28489 return true;
28490 }
28491 return false;
28492}
28493
28494node_t* TileEntityListHandler::addEntity(Entity& entity)
28495{

Callers 12

makeFollowerFunction · 0.85
actMonsterFunction · 0.85
forceFollowerFunction · 0.85
gameLogicFunction · 0.85
doNewGameFunction · 0.85
attackMethod · 0.85
net.cppFile · 0.85
setCalloutTextMethod · 0.85
actMagicMissileFunction · 0.85
spellEffectPolymorphFunction · 0.85

Calls 2

getMonsterLocalizedNameFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected