diff --git a/source/enemy/nanemone.cpp b/source/enemy/nanemone.cpp index f2b5778f8..759b57bea 100644 --- a/source/enemy/nanemone.cpp +++ b/source/enemy/nanemone.cpp @@ -140,4 +140,21 @@ void CNpc::processCloseAnemone2Attack( int _frames ) m_timerFunc = NPC_TIMER_ATTACK_DONE; m_timerTimer = GameState::getOneSecondInFrames(); m_sensorFunc = NPC_SENSOR_NONE; +} + +void CNpc::processCloseAnemone3Attack( int _frames ) +{ + CProjectile *projectile; + + DVECTOR newPos = Pos; + + newPos.vy -= 100; + + projectile = new( "test projectile" ) CProjectile; + projectile->init( newPos, m_heading, CProjectile::PROJECTILE_GAS_CLOUD, CProjectile::PROJECTILE_FINITE_LIFE ); + + m_controlFunc = NPC_CONTROL_MOVEMENT; + m_timerFunc = NPC_TIMER_ATTACK_DONE; + m_timerTimer = 4 * GameState::getOneSecondInFrames(); + m_sensorFunc = NPC_SENSOR_NONE; } \ No newline at end of file diff --git a/source/enemy/npc.cpp b/source/enemy/npc.cpp index 079e2dcd6..6b8858fe4 100644 --- a/source/enemy/npc.cpp +++ b/source/enemy/npc.cpp @@ -54,7 +54,7 @@ s32 CNpc::playerYDistSqr; void CNpc::init() { - m_type = NPC_ANEMONE_1; + m_type = NPC_ANEMONE_3; m_heading = m_fireHeading = 0; m_movementTimer = 0; @@ -894,6 +894,11 @@ void CNpc::processClose(int _frames) break; + case NPC_CLOSE_ANEMONE_3_ATTACK: + processCloseAnemone3Attack( _frames ); + + break; + case NPC_CLOSE_EYEBALL_ATTACK: processCloseEyeballAttack( _frames ); diff --git a/source/enemy/npc.h b/source/enemy/npc.h index d53f20da2..cd17c0422 100644 --- a/source/enemy/npc.h +++ b/source/enemy/npc.h @@ -45,6 +45,7 @@ public: NPC_LARGE_JELLYFISH, NPC_ANEMONE_1, NPC_ANEMONE_2, + NPC_ANEMONE_3, NPC_CLAM, NPC_SQUID_DART, NPC_FISH_FOLK, @@ -144,6 +145,7 @@ protected: NPC_CLOSE_GENERIC_USER_SEEK, NPC_CLOSE_ANEMONE_1_ATTACK, NPC_CLOSE_ANEMONE_2_ATTACK, + NPC_CLOSE_ANEMONE_3_ATTACK, NPC_CLOSE_EYEBALL_ATTACK, NPC_CLOSE_SKULL_STOMPER_ATTACK, NPC_CLOSE_BOOGER_MONSTER_ATTACK, @@ -297,6 +299,7 @@ protected: void processCloseAnemone1Attack( int _frames ); void processCloseAnemone2Attack( int _frames ); + void processCloseAnemone3Attack( int _frames ); // eyeball functions diff --git a/source/enemy/npcdata.cpp b/source/enemy/npcdata.cpp index f781ce0a4..c449b80a2 100644 --- a/source/enemy/npcdata.cpp +++ b/source/enemy/npcdata.cpp @@ -178,6 +178,19 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] = DAMAGE__LAVA, }, + { // NPC_ANEMONE_3 + NPC_INIT_DEFAULT, + NPC_SENSOR_ANEMONE_USER_CLOSE, + NPC_MOVEMENT_STATIC, + NPC_MOVEMENT_MODIFIER_NONE, + NPC_CLOSE_ANEMONE_3_ATTACK, + NPC_TIMER_NONE, + false, + 0, + 128, + DAMAGE__LAVA, + }, + { // NPC_CLAM NPC_INIT_DEFAULT, NPC_SENSOR_CLAM_USER_CLOSE, diff --git a/source/projectl/projectl.cpp b/source/projectl/projectl.cpp index a518507a4..d4fba8e5f 100644 --- a/source/projectl/projectl.cpp +++ b/source/projectl/projectl.cpp @@ -214,6 +214,13 @@ void CProjectile::think(int _frames) break; } + case PROJECTILE_GAS_CLOUD: + { + // expand but don't move + + break; + } + case PROJECTILE_DUMBFIRE: default: { diff --git a/source/projectl/projectl.h b/source/projectl/projectl.h index a6a64477e..e716fc2e3 100644 --- a/source/projectl/projectl.h +++ b/source/projectl/projectl.h @@ -26,6 +26,7 @@ public: { PROJECTILE_DUMBFIRE = 0, PROJECTILE_USER_SEEK = 1, + PROJECTILE_GAS_CLOUD, }; enum PROJECTILE_LIFETIME_TYPE