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

Function monsterChangesColorWhenAlly

src/entity.cpp:30795–30827  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30793}
30794
30795bool monsterChangesColorWhenAlly(Stat* myStats, Entity* entity)
30796{
30797 int race = NOTHING;
30798 if ( !myStats )
30799 {
30800 if ( !entity )
30801 {
30802 return true;
30803 }
30804 race = entity->getMonsterTypeFromSprite();
30805 }
30806 else
30807 {
30808 race = myStats->type;
30809 }
30810
30811 if ( race == HUMAN || race == SENTRYBOT || race == NOTHING || race == SLIME
30812 || race == SPELLBOT || race == AUTOMATON || race == GYROBOT || race == DUMMYBOT || race == DUCK_SMALL )
30813 {
30814 return false;
30815 }
30816 if ( race == MOTH_SMALL && (entity
30817 && ((entity->sprite == 1822 || entity->sprite == 1822 + 1 || entity->sprite == 1822 + 2)
30818 || (myStats && myStats->getAttribute("fire_sprite") != ""))) )
30819 {
30820 return false;
30821 }
30822 if ( race == FLAME_ELEMENTAL || race == EARTH_ELEMENTAL )
30823 {
30824 return false;
30825 }
30826 return true;
30827}
30828
30829int monsterTinkeringConvertHPToAppearance(Stat* myStats)
30830{

Callers 15

jewelItemRecruitFunction · 0.70
initEarthElementalFunction · 0.70
makeFollowerFunction · 0.70
actMonsterFunction · 0.70
uploadLightUniformsFunction · 0.70
item_ScrollSummonFunction · 0.70
actThrownFunction · 0.70
initMothFunction · 0.70
net.cppFile · 0.70
actParticleSapCenterFunction · 0.50
spellEffectDominateFunction · 0.50
spellEffectCharmMonsterFunction · 0.50

Calls 2

getAttributeMethod · 0.80

Tested by

no test coverage detected