2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-04-19 00:17:49 +00:00
|
|
|
|
|
|
|
#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,
|
2018-02-12 05:30:21 +00:00
|
|
|
Deflect,
|
2016-04-19 00:17:49 +00:00
|
|
|
Immune,
|
|
|
|
PassThrough,
|
|
|
|
DirectDouble,
|
2017-02-10 05:43:07 +00:00
|
|
|
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;
|
2018-09-07 03:37:39 +00:00
|
|
|
/* FIXME: What's going on here? */
|
2016-04-19 00:17:49 +00:00
|
|
|
EVulnerability x38_unk2;
|
2018-09-07 03:37:39 +00:00
|
|
|
bool x38_25 : 1;
|
2016-04-19 00:17:49 +00:00
|
|
|
|
|
|
|
EVulnerability x3c_chargedPower;
|
|
|
|
EVulnerability x40_chargedIce;
|
|
|
|
EVulnerability x44_chargedWave;
|
|
|
|
EVulnerability x48_chargedPlasma;
|
|
|
|
|
|
|
|
EVulnerability x4c_superMissile;
|
|
|
|
EVulnerability x50_iceSpreader;
|
|
|
|
EVulnerability x54_wavebuster;
|
|
|
|
EVulnerability x58_flamethrower;
|
|
|
|
|
2018-02-12 05:30:21 +00:00
|
|
|
EVulnerability x5c_deflected;
|
|
|
|
EVulnerability x60_chargedDeflected;
|
|
|
|
EVulnerability x64_comboDeflected;
|
2016-04-19 00:17:49 +00:00
|
|
|
|
2017-02-10 05:43:07 +00:00
|
|
|
void ConstructNew(CInputStream& in, int propCount);
|
2016-04-19 00:17:49 +00:00
|
|
|
|
2017-03-01 03:42:06 +00:00
|
|
|
static const CDamageVulnerability sNormalVulnerability;
|
|
|
|
static const CDamageVulnerability sImmuneVulnerability;
|
|
|
|
static const CDamageVulnerability sReflectVulnerability;
|
|
|
|
static const CDamageVulnerability sPassThroughVulnerability;
|
|
|
|
|
2016-04-19 00:17:49 +00:00
|
|
|
public:
|
2017-02-10 05:43:07 +00:00
|
|
|
CDamageVulnerability(CInputStream& in);
|
2017-03-01 03:42:06 +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, EVulnerability chargedPower, EVulnerability chargedIce,
|
|
|
|
EVulnerability chargedWave, EVulnerability chargedPlasma, EVulnerability superMissile,
|
|
|
|
EVulnerability iceSpreader, EVulnerability waveBuster, EVulnerability flameThrower,
|
2018-02-12 05:30:21 +00:00
|
|
|
EVulnerability deflected);
|
2016-04-19 00:17:49 +00:00
|
|
|
|
2018-02-12 05:30:21 +00:00
|
|
|
EVulnerability GetDeflectionType(const CWeaponMode& mode) const;
|
2016-04-19 00:17:49 +00:00
|
|
|
|
2017-02-10 05:43:07 +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;
|
2017-03-01 03:42:06 +00:00
|
|
|
|
2017-07-05 18:34:12 +00:00
|
|
|
static const CDamageVulnerability& NormalVulnerabilty() { return sNormalVulnerability; }
|
|
|
|
static const CDamageVulnerability& ImmuneVulnerabilty() { return sImmuneVulnerability; }
|
|
|
|
static const CDamageVulnerability& ReflectVulnerabilty() { return sReflectVulnerability; }
|
|
|
|
static const CDamageVulnerability& PasshThroughVulnerabilty() { return sPassThroughVulnerability; }
|
2018-09-07 03:37:39 +00:00
|
|
|
void SetX38_25(bool) { x38_25 = true; }
|
2016-04-19 00:17:49 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|