mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 17:07:41 +00:00
CDamageInfo and CDamageVulnerability imps
This commit is contained in:
@@ -5,8 +5,6 @@
|
||||
namespace urde
|
||||
{
|
||||
|
||||
float CDamageInfo::GetRadiusDamage(const CDamageVulnerability& dVuln) { return 0.f; }
|
||||
|
||||
CDamageInfo::CDamageInfo(const DataSpec::SShotParam& other)
|
||||
: x0_weaponMode(CWeaponMode(EWeaponType(other.weaponType), other.Charged(), other.Comboed(), other.InstaKill()))
|
||||
, x8_damage(other.damage)
|
||||
@@ -26,4 +24,27 @@ CDamageInfo& CDamageInfo::operator=(const DataSpec::SShotParam& other)
|
||||
x18_ = false;
|
||||
return *this;
|
||||
}
|
||||
|
||||
float CDamageInfo::GetDamage(const CDamageVulnerability& dVuln)
|
||||
{
|
||||
EVulnerability vuln = dVuln.GetVulnerability(x0_weaponMode, false);
|
||||
if (vuln == EVulnerability::Reflect)
|
||||
return 0.f;
|
||||
else if (vuln == EVulnerability::DoubleDamage)
|
||||
return 2.f * x8_damage;
|
||||
|
||||
return x8_damage;
|
||||
}
|
||||
|
||||
float CDamageInfo::GetRadiusDamage(const CDamageVulnerability& dVuln)
|
||||
{
|
||||
EVulnerability vuln = dVuln.GetVulnerability(x0_weaponMode, false);
|
||||
if (vuln == EVulnerability::Reflect)
|
||||
return 0.f;
|
||||
else if (vuln == EVulnerability::DoubleDamage)
|
||||
return 2.f * xc_radiusDamage;
|
||||
|
||||
return xc_radiusDamage;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user