| 14765 | } |
| 14766 | |
| 14767 | bool 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 | |
| 14804 | void batResetIdle(Entity* my) |
| 14805 | { |
no test coverage detected