MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / getPhysicalDefense

Method getPhysicalDefense

source/entities/Creature.cpp:1516–1525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1514}
1515
1516double Creature::getPhysicalDefense() const
1517{
1518 double defense = mPhysicalDefense;
1519 if (mWeaponL != nullptr)
1520 defense += mWeaponL->getPhysicalDefense();
1521 if (mWeaponR != nullptr)
1522 defense += mWeaponR->getPhysicalDefense();
1523
1524 return defense;
1525}
1526
1527double Creature::getMagicalDefense() const
1528{

Callers 3

CreatureMethod · 0.45
buildStatsMethod · 0.45
setDefenseModifierMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected