2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CDAMAGEVULNERABILITY
|
|
|
|
#define _CDAMAGEVULNERABILITY
|
2022-09-18 05:55:13 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#include "MetroidPrime/Weapons/WeaponTypes.hpp"
|
|
|
|
|
2022-09-18 05:55:13 +00:00
|
|
|
enum EVulnerability {
|
|
|
|
kVN_Weak,
|
|
|
|
kVN_Normal,
|
|
|
|
kVN_Deflect,
|
|
|
|
kVN_Immune,
|
|
|
|
kVN_PassThrough,
|
|
|
|
kVN_DirectWeak,
|
|
|
|
kVN_DirectNormal,
|
|
|
|
kVN_DirectImmune,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum EDeflectionType {
|
|
|
|
kDT_None,
|
|
|
|
kDT_One,
|
|
|
|
kDT_Two,
|
|
|
|
kDT_Three,
|
|
|
|
kDT_Four,
|
|
|
|
};
|
|
|
|
|
|
|
|
class CInputStream;
|
|
|
|
|
|
|
|
class CDamageVulnerability {
|
|
|
|
public:
|
|
|
|
CDamageVulnerability(CInputStream& in);
|
2022-10-01 21:38:39 +00:00
|
|
|
CDamageVulnerability(EVulnerability power, EVulnerability ice, EVulnerability wave,
|
|
|
|
EVulnerability plasma, EVulnerability bomb, EVulnerability powerBomb,
|
|
|
|
EVulnerability missile, EVulnerability boostBall, EVulnerability phazon,
|
|
|
|
EVulnerability enemyWp1, EVulnerability enemyWp2, EVulnerability enemyWp3,
|
|
|
|
EVulnerability enemyWp4, EVulnerability v1, EVulnerability v2,
|
|
|
|
EDeflectionType deflectType);
|
|
|
|
|
|
|
|
EDeflectionType GetDeflectionType(const CWeaponMode& mode) const;
|
2022-09-18 05:55:13 +00:00
|
|
|
|
2022-10-01 21:38:39 +00:00
|
|
|
bool WeaponHurts(const CWeaponMode&, int ignoreDirect) const;
|
|
|
|
bool WeaponHits(const CWeaponMode& mode, int checkDirect) const;
|
|
|
|
EVulnerability GetVulnerability(const CWeaponMode& mode, int ignoreDirect) const;
|
|
|
|
|
|
|
|
static const CDamageVulnerability& NormalVulnerabilty() { return sNormalVulnerability; }
|
|
|
|
static const CDamageVulnerability& ImmuneVulnerabilty() { return sImmuneVulnerability; }
|
|
|
|
static const CDamageVulnerability& ReflectVulnerabilty() { return sReflectVulnerability; }
|
|
|
|
static const CDamageVulnerability& PassThroughVulnerabilty() { return sPassThroughVulnerability; }
|
2022-09-18 05:55:13 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
EVulnerability x0_normal[15];
|
|
|
|
EVulnerability x3c_charged[4];
|
|
|
|
EVulnerability x4c_combo[4];
|
|
|
|
EDeflectionType x5c_deflect;
|
|
|
|
EDeflectionType x60_chargedDeflect;
|
|
|
|
EDeflectionType x64_comboDeflect;
|
2022-10-01 21:38:39 +00:00
|
|
|
|
|
|
|
void LoadData(CInputStream& in, int propCount);
|
|
|
|
|
|
|
|
static const CDamageVulnerability sNormalVulnerability;
|
|
|
|
static const CDamageVulnerability sImmuneVulnerability;
|
|
|
|
static const CDamageVulnerability sReflectVulnerability;
|
|
|
|
static const CDamageVulnerability sPassThroughVulnerability;
|
2022-09-18 05:55:13 +00:00
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CDamageVulnerability, 0x68)
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CDAMAGEVULNERABILITY
|