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

Method monsterIsTargetable

src/actmonster.cpp:14767–14802  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14765}
14766
14767bool Entity::monsterIsTargetable(bool targetInertMimics) const
14768{
14769 if ( flags[PASSABLE] )
14770 {
14771 return false;
14772 }
14773 if ( behavior == &actPlayer )
14774 {
14775 return true;
14776 }
14777 else if ( behavior == &actMonster )
14778 {
14779 Monster type = getMonsterTypeFromSprite();
14780 if ( type == GYROBOT )
14781 {
14782 return false;
14783 }
14784 else if ( type == BAT_SMALL && isUntargetableBat() )
14785 {
14786 return false;
14787 }
14788 else if ( type == MOTH_SMALL && getStats() && getStats()->getAttribute("fire_sprite") != "" )
14789 {
14790 return false;
14791 }
14792 else if ( type == DUCK_SMALL )
14793 {
14794 return false;
14795 }
14796 else if ( type == MIMIC && !targetInertMimics && isInertMimic() )
14797 {
14798 return false;
14799 }
14800 }
14801 return true;
14802}
14803
14804void batResetIdle(Entity* my)
14805{

Callers 15

entityWantsJewelFunction · 0.80
actColliderMushroomCapFunction · 0.80
actColliderDecorationFunction · 0.80
duckAreaQuckFunction · 0.80
actFociGibFunction · 0.80
actGreasePuddleSpawnerFunction · 0.80
actLeafPileFunction · 0.80
actBeartrapFunction · 0.80
actBombFunction · 0.80
barony_clearFunction · 0.80
findEntityInLineFunction · 0.80

Calls 1

getAttributeMethod · 0.80

Tested by

no test coverage detected