mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-14 21:26:09 +00:00
Initial PAL/JP/Trilogy imps, various cleanup
This commit is contained in:
@@ -240,36 +240,44 @@ bool CDamageVulnerability::WeaponHits(const CWeaponMode& mode, bool checkDirect)
|
||||
}
|
||||
|
||||
EVulnerability CDamageVulnerability::GetVulnerability(const CWeaponMode& mode, bool ignoreDirect) const {
|
||||
if (mode.GetType() == EWeaponType::None || mode.GetType() > EWeaponType::OrangePhazon)
|
||||
if (mode.GetType() == EWeaponType::None || mode.GetType() > EWeaponType::OrangePhazon) {
|
||||
return EVulnerability::Deflect;
|
||||
}
|
||||
|
||||
if (mode.IsInstantKill())
|
||||
if (mode.IsInstantKill()) {
|
||||
return EVulnerability::Normal;
|
||||
}
|
||||
|
||||
EVulnerability vuln = (&x0_power)[u32(mode.GetType())];
|
||||
if (mode.IsCharged()) {
|
||||
if (mode.GetType() < EWeaponType::Bomb)
|
||||
if (mode.GetType() < EWeaponType::Bomb) {
|
||||
vuln = (&x3c_chargedPower)[u32(mode.GetType())];
|
||||
else
|
||||
} else {
|
||||
vuln = EVulnerability::Normal;
|
||||
}
|
||||
}
|
||||
|
||||
if (mode.IsComboed()) {
|
||||
if (mode.GetType() < EWeaponType::Bomb)
|
||||
if (mode.GetType() < EWeaponType::Bomb) {
|
||||
vuln = (&x3c_chargedPower)[u32(mode.GetType())];
|
||||
else
|
||||
} else {
|
||||
vuln = EVulnerability::Normal;
|
||||
}
|
||||
}
|
||||
|
||||
if (ignoreDirect)
|
||||
if (ignoreDirect) {
|
||||
return vuln;
|
||||
}
|
||||
|
||||
if (vuln == EVulnerability::DirectWeak)
|
||||
if (vuln == EVulnerability::DirectWeak) {
|
||||
return EVulnerability::Weak;
|
||||
else if (vuln == EVulnerability::DirectNormal)
|
||||
}
|
||||
if (vuln == EVulnerability::DirectNormal) {
|
||||
return EVulnerability::Normal;
|
||||
else if (vuln == EVulnerability::DirectImmune)
|
||||
}
|
||||
if (vuln == EVulnerability::DirectImmune) {
|
||||
return EVulnerability::Immune;
|
||||
}
|
||||
|
||||
return vuln;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user