metaforce/Runtime/World/CDamageVulnerability.hpp

68 lines
1.6 KiB
C++
Raw Normal View History

2016-04-19 00:17:49 +00:00
#ifndef __URDE_CDAMAGEVULNERABILITY_HPP__
#define __URDE_CDAMAGEVULNERABILITY_HPP__
#include "RetroTypes.hpp"
2017-01-15 03:59:37 +00:00
#include "Weapon/CWeaponMode.hpp"
2016-04-19 00:17:49 +00:00
namespace urde
{
enum class EVulnerability
{
DoubleDamage,
Normal,
Reflect,
Immune,
PassThrough,
DirectDouble,
DirectNormal,
DirectImmune
2016-04-19 00:17:49 +00:00
};
class CDamageVulnerability
{
EVulnerability x0_power;
EVulnerability x4_ice;
EVulnerability x8_wave;
EVulnerability xc_plasma;
EVulnerability x10_bomb;
EVulnerability x14_powerbomb;
EVulnerability x18_missile;
EVulnerability x1c_boostBall;
EVulnerability x20_phazon;
EVulnerability x24_enemyWp1;
EVulnerability x28_enemyWp2Poison;
EVulnerability x2c_enemyWp3Lava;
EVulnerability x30_enemyWp4;
EVulnerability x34_unk1;
EVulnerability x38_unk2;
EVulnerability x3c_chargedPower;
EVulnerability x40_chargedIce;
EVulnerability x44_chargedWave;
EVulnerability x48_chargedPlasma;
EVulnerability x4c_superMissile;
EVulnerability x50_iceSpreader;
EVulnerability x54_wavebuster;
EVulnerability x58_flamethrower;
2017-02-11 00:52:52 +00:00
EVulnerability x5c_;
EVulnerability x60_chargedPhazon;
EVulnerability x64_phazonCombo;
2016-04-19 00:17:49 +00:00
void ConstructNew(CInputStream& in, int propCount);
2016-04-19 00:17:49 +00:00
public:
CDamageVulnerability(CInputStream& in);
2016-04-19 00:17:49 +00:00
2017-02-11 00:52:52 +00:00
EVulnerability GetPhazonVulnerability(const CWeaponMode& mode) const;
2016-04-19 00:17:49 +00:00
bool WeaponHurts(const CWeaponMode&, bool ignoreDirect) const;
bool WeaponHits(const CWeaponMode& mode, bool checkDirect) const;
EVulnerability GetVulnerability(const CWeaponMode& mode, bool ignoreDirect) const;
2016-04-19 00:17:49 +00:00
};
}
#endif // __URDE_CDAMAGEVULNERABILITY_HPP__