diff --git a/source/enemy/nboss.cpp b/source/enemy/nboss.cpp index 080d334c2..eee5dd480 100644 --- a/source/enemy/nboss.cpp +++ b/source/enemy/nboss.cpp @@ -48,3 +48,69 @@ void CNpcBossEnemy::addHealthMeter() } } +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void CNpcBossEnemy::processShot( int _frames ) +{ + switch( m_data[m_type].shotFunc ) + { + case NPC_SHOT_NONE: + { + // do nothing + m_controlFunc = m_oldControlFunc; + + break; + } + + case NPC_SHOT_GENERIC: + { + switch ( m_state ) + { + case NPC_GENERIC_HIT_CHECK_HEALTH: + { + m_health--; + + if ( m_health <= 0 ) + { + m_state = NPC_GENERIC_HIT_DEATH_START; + m_isDying = true; + m_health = 0; + } + else + { + m_state = NPC_GENERIC_HIT_RECOIL; + + m_animPlaying = true; + m_animNo = m_data[m_type].recoilAnim; + m_frame = 0; + } + + break; + } + + case NPC_GENERIC_HIT_RECOIL: + { + processShotRecoil( _frames ); + + break; + } + + case NPC_GENERIC_HIT_DEATH_START: + { + processShotDeathStart( _frames ); + + break; + } + + case NPC_GENERIC_HIT_DEATH_END: + { + processShotDeathEnd( _frames ); + + break; + } + } + + break; + } + } +} diff --git a/source/enemy/nboss.h b/source/enemy/nboss.h index 1eaf78196..749d5040d 100644 --- a/source/enemy/nboss.h +++ b/source/enemy/nboss.h @@ -28,6 +28,7 @@ public: virtual void shutdown(); protected: void addHealthMeter(); + virtual void processShot( int _frames ); bool m_meterOn; CFXNRGBar *m_energyBar; diff --git a/source/enemy/ndogfish.cpp b/source/enemy/ndogfish.cpp index 3fd388378..cd40ee351 100644 --- a/source/enemy/ndogfish.cpp +++ b/source/enemy/ndogfish.cpp @@ -53,7 +53,7 @@ void CNpcIronDogfishEnemy::postInit() if ( CLevel::getIsBossRespawn() ) { m_health = CLevel::getBossHealth(); - m_speed = m_data[m_type].speed + ( ( 3 * ( m_data[m_type].initHealth - m_health ) ) / m_data[m_type].initHealth ); + //m_speed = m_data[m_type].speed + ( ( 3 * ( m_data[m_type].initHealth - m_health ) ) / m_data[m_type].initHealth ); } CNpcBossEnemy::postInit(); diff --git a/source/enemy/nmjfish.cpp b/source/enemy/nmjfish.cpp index e4e8812c6..19d98d6ed 100644 --- a/source/enemy/nmjfish.cpp +++ b/source/enemy/nmjfish.cpp @@ -780,9 +780,9 @@ void CNpcMotherJellyfishEnemy::processShot( int _frames ) { case NPC_GENERIC_HIT_CHECK_HEALTH: { - if ( m_health > 3 ) + if ( m_health > 1 ) { - m_health -= 3; + m_health--; m_renderScale = 2048 + ( ( ( 4096 - 2048 ) * m_health ) / m_data[m_type].initHealth ); m_speed = m_data[m_type].speed + ( ( 2 * ( m_data[m_type].initHealth - m_health ) ) / m_data[m_type].initHealth ); diff --git a/source/enemy/npcdata.cpp b/source/enemy/npcdata.cpp index 68eefd98d..7593e4a59 100644 --- a/source/enemy/npcdata.cpp +++ b/source/enemy/npcdata.cpp @@ -801,7 +801,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] = 256, DETECT_ALL_COLLISION, DAMAGE__SHOCK_ENEMY, - 30, + 10, 0, NPC_SHOT_GENERIC, 0, @@ -827,7 +827,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] = 2048, DETECT_ALL_COLLISION, DAMAGE__HIT_ENEMY, - 30, + 10, 0, NPC_SHOT_GENERIC, ANIM_SHARKSUB_DEATH, @@ -879,7 +879,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] = 2048, DETECT_ALL_COLLISION, DAMAGE__HIT_ENEMY, - 30, + 10, ANIM_FLYINGDUTCHMAN_FLY, NPC_SHOT_GENERIC, ANIM_FLYINGDUTCHMAN_DEATH, @@ -906,7 +906,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] = //DETECT_ALL_COLLISION, DETECT_ATTACK_COLLISION_GENERIC, DAMAGE__HIT_ENEMY, - 30, + 10, ANIM_IRONDOGFISH_WALK, NPC_SHOT_GENERIC, ANIM_IRONDOGFISH_DIE, diff --git a/source/enemy/nsshark.cpp b/source/enemy/nsshark.cpp index ee81de2ac..dc0eff18a 100644 --- a/source/enemy/nsshark.cpp +++ b/source/enemy/nsshark.cpp @@ -678,7 +678,7 @@ void CNpcSubSharkEnemy::processShot( int _frames ) { case NPC_GENERIC_HIT_CHECK_HEALTH: { - m_health -= 3; + m_health--; if ( m_health <= 0 ) {