shithub: cstory

Download patch

ref: fb372d15a44fc421c9560724ebfa94b732373b52
parent: 21f83b6d56aba13e472bb3cc286f7f59575693a3
parent: f1beb30e701b5142e3b47b52880c0591006836a0
author: Cucky <44537737+cuckydev@users.noreply.github.com>
date: Wed Feb 6 15:01:13 EST 2019

Merge pull request #42 from Clownacy/master

More NPCs

--- a/src/NpcAct.h
+++ b/src/NpcAct.h
@@ -173,9 +173,21 @@
 void ActNpc168(NPCHAR *npc);
 void ActNpc169(NPCHAR *npc);
 void ActNpc170(NPCHAR *npc);
-
+void ActNpc171(NPCHAR *npc);
+void ActNpc172(NPCHAR *npc);
 void ActNpc173(NPCHAR *npc);
 void ActNpc174(NPCHAR *npc);
+void ActNpc175(NPCHAR *npc);
+void ActNpc176(NPCHAR *npc);
+void ActNpc177(NPCHAR *npc);
+
+void ActNpc180(NPCHAR *npc);
+void ActNpc181(NPCHAR *npc);
+void ActNpc182(NPCHAR *npc);
+void ActNpc183(NPCHAR *npc);
+
+void ActNpc187(NPCHAR *npc);
+void ActNpc188(NPCHAR *npc);
 
 void ActNpc192(NPCHAR *npc);
 void ActNpc193(NPCHAR *npc);
--- a/src/NpcAct160.cpp
+++ b/src/NpcAct160.cpp
@@ -12,6 +12,7 @@
 #include "Caret.h"
 #include "MycParam.h"
 #include "CommonDefines.h"
+#include "NpcHit.h"
 
 //Puu Black
 void ActNpc160(NPCHAR *npc)
@@ -908,6 +909,134 @@
 		npc->rect = rcRight[npc->ani_no];
 }
 
+//Fire Whirrr
+void ActNpc171(NPCHAR *npc)
+{
+	RECT rcLeft[2];
+	RECT rcRight[2];
+
+	rcLeft[0] = {120, 48, 152, 80};
+	rcLeft[1] = {152, 48, 184, 80};
+
+	rcRight[0] = {184, 48, 216, 80};
+	rcRight[1] = {216, 48, 248, 80};
+
+	if (gMC.x < npc->x)
+		npc->direct = 0;
+	else
+		npc->direct = 2;
+
+	switch (npc->act_no)
+	{
+		case 0:
+			npc->act_no = 1;
+			npc->act_wait = Random(0, 50);
+			npc->tgt_y = npc->y;
+			// Fallthrough
+		case 1:
+			if (npc->act_wait)
+			{
+				--npc->act_wait;
+			}
+			else
+			{
+				npc->act_no = 10;
+				npc->ym = 0x200;
+			}
+			// Fallthrough
+		case 10:
+			if (++npc->ani_wait > 0)
+			{
+				npc->ani_wait = 0;
+				++npc->ani_no;
+			}
+
+			if (npc->ani_no > 1)
+				npc->ani_no = 0;
+
+			if (npc->tgt_y > npc->y)
+				npc->ym += 0x10;
+			else
+				npc->ym -= 0x10;
+
+			if (npc->ym > 0x200)
+				npc->ym = 0x200;
+			if (npc->ym < -0x200)
+				npc->ym = -0x200;
+
+			npc->y += npc->ym;
+
+			if (npc->direct == 0)
+			{
+				if (gMC.y < npc->y + 0xA000 && gMC.y > npc->y - 0xA000 && gMC.x < npc->x && gMC.x > npc->x - 0x14000)
+					++npc->count1;
+			}
+			else
+			{
+				if (gMC.y < npc->y + 0xA000 && gMC.y > npc->y - 0xA000 && gMC.x < npc->x + 0x14000 && gMC.x > npc->x)
+					++npc->count1;
+			}
+
+			if (npc->count1 > 20)
+			{
+				SetNpChar(172, npc->x, npc->y, 0, 0, npc->direct, 0, 0x100);
+				npc->count1 = -100;
+				gCurlyShoot_wait = Random(80, 100);
+				gCurlyShoot_x = npc->x;
+				gCurlyShoot_y = npc->y;
+			}
+
+			break;
+	}
+
+	if (npc->direct == 0)
+		npc->rect = rcLeft[npc->ani_no];
+	else
+		npc->rect = rcRight[npc->ani_no];
+}
+
+//Fire Whirr projectile
+void ActNpc172(NPCHAR *npc)
+{
+	RECT rect[3];
+
+	rect[0] = {248, 48, 264, 80};
+	rect[1] = {264, 48, 280, 80};
+	rect[2] = {280, 48, 296, 80};
+
+	switch (npc->act_no)
+	{
+		case 0:
+			npc->act_no = 1;
+			// Fallthrough
+		case 1:
+			if (++npc->ani_wait > 1)
+			{
+				npc->ani_wait = 0;
+				++npc->ani_no;
+			}
+
+			if (npc->ani_no > 2)
+				npc->ani_no = 0;
+
+			if (npc->direct == 0)
+				npc->x -= 0x200;
+			else
+				npc->x += 0x200;
+
+			if (npc->flag & 1 || npc->flag & 4)
+			{
+				SetCaret(npc->x, npc->y, 2, 0);
+				VanishNpChar(npc);
+				return;
+			}
+
+			break;
+	}
+
+	npc->rect = rect[npc->ani_no];
+}
+
 //Gaudi (armoured)
 void ActNpc173(NPCHAR *npc)
 {
@@ -1151,4 +1280,240 @@
 		npc->ani_no = 0;
 
 	npc->rect = rect_left[npc->ani_no];
+}
+
+//Gaudi egg
+void ActNpc175(NPCHAR *npc)
+{
+	RECT rcLeft[2];
+	RECT rcRight[2];
+
+	rcLeft[0] = {168, 80, 192, 104};
+	rcLeft[1] = {192, 80, 216, 104};
+
+	rcRight[0] = {216, 80, 240, 104};
+	rcRight[1] = {240, 80, 264, 104};
+
+	if (npc->act_no < 3 && npc->life < 90)
+	{
+		LoseNpChar(npc, 0);
+		npc->act_no = 10;
+		npc->ani_no = 1;
+		npc->bits &= ~0x20;
+		npc->damage = 0;
+	}
+
+	if (npc->act_no == 0)
+	{
+		npc->ani_no = 0;
+		npc->act_no = 1;
+	}
+
+	if (npc->direct == 0)
+		npc->ym += 0x20;
+	else
+		npc->ym -= 0x20;
+
+	if (npc->ym < -0x5FF)
+		npc->ym = -0x5FF;
+	if (npc->ym > 0x5FF)
+		npc->ym = 0x5FF;
+
+	npc->y += npc->ym;
+
+	if (npc->direct == 0)
+		npc->rect = rcLeft[npc->ani_no];
+	else
+		npc->rect = rcRight[npc->ani_no];
+}
+
+//BuyoBuyo Base
+void ActNpc176(NPCHAR *npc)
+{
+	RECT rcLeft[3];
+	RECT rcRight[3];
+
+	rcLeft[0] = {96, 128, 128, 144};
+	rcLeft[1] = {128, 128, 160, 144};
+	rcLeft[2] = {160, 128, 192, 144};
+
+	rcRight[0] = {96, 144, 128, 160};
+	rcRight[1] = {128, 144, 160, 160};
+	rcRight[2] = {160, 144, 192, 160};
+
+	if (npc->act_no < 3 && npc->life < 940)
+	{
+		LoseNpChar(npc, 0);
+		npc->act_no = 10;
+		npc->ani_no = 2;
+		npc->bits &= ~0x20;
+		npc->damage = 0;
+	}
+
+	switch (npc->act_no)
+	{
+		case 0:
+			npc->act_no = 1;
+			npc->ani_no = 0;
+			npc->ani_wait = 0;
+			// Fallthrough
+		case 1:
+			if (npc->direct == 0)
+			{
+				if (npc->x < gMC.x + 0x14000 && npc->x > gMC.x - 0x14000 && npc->y < gMC.y + 0x14000 && npc->y > gMC.y - 0x2000)
+					++npc->count1;
+			}
+			else
+			{
+				if (npc->x < gMC.x + 0x14000 && npc->x > gMC.x - 0x14000 && npc->y < gMC.y + 0x2000 && npc->y > gMC.y - 0x14000)
+					++npc->count1;
+			}
+
+			if (npc->count1 > 10)
+			{
+				npc->act_no = 2;
+				npc->act_wait = 0;
+			}
+
+			break;
+
+		case 2:
+			if (++npc->ani_wait > 3)
+			{
+				npc->ani_wait = 0;
+				++npc->ani_no;
+			}
+
+			if (npc->ani_no > 1)
+				npc->ani_no = 0;
+
+			if (++npc->act_wait > 10)
+			{
+				if (++npc->count2 > 2)
+				{
+					npc->count2 = 0;
+					npc->count1 = -90;
+				}
+				else
+				{
+					npc->count1 = -10;
+				}
+
+				if (npc->direct == 0)
+					SetNpChar(177, npc->x, npc->y - 0x1000, 0, 0, 0, 0, 0x100);
+				else
+					SetNpChar(177, npc->x, npc->y + 0x1000, 0, 0, 2, 0, 0x100);
+
+				PlaySoundObject(39, 1);
+
+				npc->act_no = 0;
+				npc->ani_no = 0;
+
+				gCurlyShoot_wait = Random(80, 100);
+				gCurlyShoot_x = npc->x;
+				gCurlyShoot_y = npc->y;
+			}
+
+			break;
+	}
+
+	if (npc->direct == 0)
+		npc->rect = rcLeft[npc->ani_no];
+	else
+		npc->rect = rcRight[npc->ani_no];
+}
+
+//BuyoBuyo
+void ActNpc177(NPCHAR *npc)
+{
+	RECT rc[2];
+
+	rc[0] = {192, 128, 208, 144};
+	rc[1] = {208, 128, 224, 144};
+
+	if (npc->flag & 0xFF)
+	{
+		SetCaret(npc->x, npc->y, 3, 0);
+		npc->cond = 0;
+		return;
+	}
+
+	switch (npc->act_no)
+	{
+		case 0:
+			npc->act_no = 1;
+
+			if (npc->direct == 0)
+				npc->ym = -0x600;
+			else
+				npc->ym = 0x600;
+			// Fallthrough
+		case 1:
+			if (npc->y < gMC.y + 0x2000 && npc->y > gMC.y - 0x2000)
+			{
+				npc->act_no = 10;
+
+				npc->tgt_x = npc->x;
+				npc->tgt_y = npc->y;
+
+				if (gMC.x < npc->x)
+					npc->direct = 0;
+				else
+					npc->direct = 2;
+
+				npc->xm = (Random(0, 1) * 0x400) - 0x200;
+				npc->ym = (Random(0, 1) * 0x400) - 0x200;
+			}
+
+			break;
+
+		case 10:
+			if (npc->tgt_x > npc->x)
+				npc->xm += 0x20;
+			else
+				npc->xm -= 0x20;
+
+			if (npc->tgt_y > npc->y)
+				npc->ym += 0x20;
+			else
+				npc->ym -= 0x20;
+
+			if (++npc->act_wait > 300)
+			{
+				SetCaret(npc->x, npc->y, 3, 0);
+				npc->cond = 0;
+				return;
+			}
+
+			if (npc->direct == 0)
+				npc->tgt_x -= 0x200;
+			else
+				npc->tgt_x += 0x200;
+
+			break;
+	}
+
+	if (npc->xm > 0x400)
+		npc->xm = 0x400;
+	if (npc->xm < -0x400)
+		npc->xm = -0x400;
+
+	if (npc->ym > 0x400)
+		npc->ym = 0x400;
+	if (npc->ym < -0x400)
+		npc->ym = -0x400;
+
+	npc->x += npc->xm;
+	npc->y += npc->ym;
+
+	if (++npc->ani_wait > 6)
+	{
+		npc->ani_wait = 0;
+		++npc->ani_no;
+	}
+
+	if (npc->ani_no > 1)
+		npc->ani_no = 0;
+
+	npc->rect = rc[npc->ani_no];
 }
--- a/src/NpcAct180.cpp
+++ b/src/NpcAct180.cpp
@@ -9,6 +9,691 @@
 #include "Back.h"
 #include "Triangle.h"
 #include "Caret.h"
+#include "Bullet.h"
+#include "Flags.h"
+
+//Curly AI
+void ActNpc180(NPCHAR *npc)
+{
+	RECT rcLeft[11];
+	RECT rcRight[11];
+
+	rcLeft[0] = {0, 96, 16, 112};
+	rcLeft[1] = {16, 96, 32, 112};
+	rcLeft[2] = {0, 96, 16, 112};
+	rcLeft[3] = {32, 96, 48, 112};
+	rcLeft[4] = {0, 96, 16, 112};
+	rcLeft[5] = {48, 96, 64, 112};
+	rcLeft[6] = {64, 96, 80, 112};
+	rcLeft[7] = {48, 96, 64, 112};
+	rcLeft[8] = {80, 96, 96, 112};
+	rcLeft[9] = {48, 96, 64, 112};
+	rcLeft[10] = {144, 96, 160, 112};
+
+	rcRight[0] = {0, 112, 16, 128};
+	rcRight[1] = {16, 112, 32, 128};
+	rcRight[2] = {0, 112, 16, 128};
+	rcRight[3] = {32, 112, 48, 128};
+	rcRight[4] = {0, 112, 16, 128};
+	rcRight[5] = {48, 112, 64, 128};
+	rcRight[6] = {64, 112, 80, 128};
+	rcRight[7] = {48, 112, 64, 128};
+	rcRight[8] = {80, 112, 96, 128};
+	rcRight[9] = {48, 112, 64, 128};
+	rcRight[10] = {144, 112, 160, 128};
+
+	if (npc->y < gMC.y - 0x14000)
+	{
+		if ( npc->y >= 0x20000 )
+		{
+			npc->tgt_x = 0;
+			npc->tgt_y = npc->y;
+		}
+		else
+		{
+			npc->tgt_x = 0x280000;
+			npc->tgt_y = npc->y;
+		}
+	}
+	else
+	{
+		if (gCurlyShoot_wait)
+		{
+			npc->tgt_x = gCurlyShoot_x;
+			npc->tgt_y = gCurlyShoot_y;
+		}
+		else
+		{
+			npc->tgt_x = gMC.x;
+			npc->tgt_y = gMC.y;
+		}
+	}
+
+	if (npc->xm < 0 && npc->flag & 1)
+		npc->xm = 0;
+	if (npc->xm > 0 && npc->flag & 4)
+		npc->xm = 0;
+
+	switch (npc->act_no)
+	{
+		case 20:
+			npc->x = gMC.x;
+			npc->y = gMC.y;
+			npc->act_no = 100;
+			npc->ani_no = 0;
+			SetNpChar(183, 0, 0, 0, 0, 0, npc, 0x100);
+
+			if (GetNPCFlag(563))
+				SetNpChar(182, 0, 0, 0, 0, 0, npc, 0x100);
+			else
+				SetNpChar(181, 0, 0, 0, 0, 0, npc, 0x100);
+
+			break;
+
+		case 40:
+			npc->act_no = 41;
+			npc->act_wait = 0;
+			npc->ani_no = 10;
+			// Fallthrough
+		case 41:
+			if (++npc->act_wait == 750)
+			{
+				npc->bits &= ~0x2000;
+				npc->ani_no = 0;
+			}
+
+			if (npc->act_wait > 1000)
+			{
+				npc->act_no = 100;
+				npc->ani_no = 0;
+				SetNpChar(183, 0, 0, 0, 0, 0, npc, 0x100);
+
+				if (GetNPCFlag(563))
+					SetNpChar(182, 0, 0, 0, 0, 0, npc, 0x100);
+				else
+					SetNpChar(181, 0, 0, 0, 0, 0, npc, 0x100);
+			}
+
+			break;
+
+		case 100:
+			npc->ani_no = 0;
+			npc->xm = 7 * npc->xm / 8;
+			npc->count1 = 0;
+
+			if (npc->x > npc->tgt_x + 0x2000)
+			{
+				npc->act_no = 200;
+				npc->ani_no = 1;
+				npc->direct = 0;
+				npc->act_wait = Random(20, 60);
+			}
+			else if (npc->x < npc->tgt_x - 0x2000)
+			{
+				npc->act_no = 300;
+				npc->ani_no = 1;
+				npc->direct = 2;
+				npc->act_wait = Random(20, 60);
+			}
+
+			break;
+
+		case 200:
+			npc->xm -= 0x20;
+			npc->direct = 0;
+
+			if (npc->flag & 1)
+				++npc->count1;
+			else
+				npc->count1 = 0;
+
+			break;
+
+		case 210:
+			npc->xm -= 0x20;
+			npc->direct = 0;
+
+			if (npc->flag & 8)
+				npc->act_no = 100;
+
+			break;
+
+		case 300:
+			npc->xm += 0x20;
+			npc->direct = 2;
+
+			if (npc->flag & 4)
+				++npc->count1;
+			else
+				npc->count1 = 0;
+
+			break;
+
+		case 310:
+			npc->xm += 0x20;
+			npc->direct = 2;
+
+			if (npc->flag & 8)
+				npc->act_no = 100;
+
+			break;
+	}
+
+	if (gCurlyShoot_wait)
+		--gCurlyShoot_wait;
+
+	if (gCurlyShoot_wait == 70)
+		npc->count2 = 10;
+
+	if (gCurlyShoot_wait == 60 && npc->flag & 8 && Random(0, 2))
+	{
+		npc->count1 = 0;
+		npc->ym = -0x600;
+		npc->ani_no = 1;
+		PlaySoundObject(15, 1);
+
+		if (npc->tgt_x < npc->x)
+			npc->act_no = 210;
+		else
+			npc->act_no = 310;
+	}
+
+	int xx = npc->x - npc->tgt_x;
+	int yy = npc->y - npc->tgt_y;
+
+	if ( xx < 0 )
+		xx = -xx;
+
+	if (npc->act_no == 100)
+	{
+		if (xx + 0x400 < yy)
+			npc->ani_no = 5;
+		else
+			npc->ani_no = 0;
+	}
+
+	if (npc->act_no == 210 || npc->act_no == 310)
+	{
+		if ( xx + 0x400 < yy )
+			npc->ani_no = 6;
+		else
+			npc->ani_no = 1;
+	}
+
+	if (npc->act_no == 200 || npc->act_no == 300)
+	{
+		++npc->ani_wait;
+
+		if (xx + 0x400 < yy)
+			npc->ani_no = 6 + (npc->ani_wait / 4 % 4);
+		else
+			npc->ani_no = 1 + (npc->ani_wait / 4 % 4);
+
+		if (npc->act_wait)
+		{
+			--npc->act_wait;
+
+			if (npc->flag && npc->count1 > 10)
+			{
+				npc->count1 = 0;
+				npc->ym = -0x600;
+				npc->act_no += 10;
+				npc->ani_no = 1;
+				PlaySoundObject(15, 1);
+			}
+		}
+		else
+		{
+			npc->act_no = 100;
+			npc->ani_no = 0;
+		}
+	}
+
+	if (npc->act_no >= 100 && npc->act_no < 500)
+	{
+		if (npc->x >= gMC.x - 0xA000 && npc->x <= gMC.x + 0xA000)
+		{
+			npc->ym += 0x33;
+		}
+		else
+		{
+			if (npc->flag)
+				npc->ym += 0x10;
+			else
+				npc->ym += 0x33;
+		}
+	}
+
+	if (npc->xm > 0x300)
+		npc->xm = 0x300;
+	if (npc->xm < -0x300)
+		npc->xm = -0x300u;
+
+	if (npc->ym > 0x5FF)
+		npc->ym = 0x5FF;
+
+	npc->x += npc->xm;
+	npc->y += npc->ym;
+
+	if (npc->act_no >= 100 && (npc->flag & 8) == 0 && npc->ani_no != 1000)
+	{
+		if (xx + 0x400 < yy)
+			npc->ani_no = 6;
+		else
+			npc->ani_no = 1;
+	}
+
+	if (npc->direct == 0)
+		npc->rect = rcLeft[npc->ani_no];
+	else
+		npc->rect = rcRight[npc->ani_no];
+}
+
+//Curly AI Machine Gun
+void ActNpc181(NPCHAR *npc)
+{
+	RECT rcLeft[2];
+	RECT rcRight[2];
+
+	rcLeft[0] = {216, 152, 232, 168};
+	rcLeft[1] = {232, 152, 248, 168};
+
+	rcRight[0] = {216, 168, 232, 184};
+	rcRight[1] = {232, 168, 248, 184};
+
+	if (npc->pNpc)
+	{
+		if (npc->pNpc->ani_no < 5)
+		{
+			if (npc->pNpc->direct == 0)
+			{
+				npc->direct = 0;
+				npc->x = npc->pNpc->x - 0x1000;
+			}
+			else
+			{
+				npc->direct = 2;
+				npc->x = npc->pNpc->x + 0x1000;
+			}
+
+			npc->y = npc->pNpc->y;
+			npc->ani_no = 0;
+		}
+		else
+		{
+			if (npc->pNpc->direct == 0)
+			{
+				npc->direct = 0;
+				npc->x = npc->pNpc->x;
+			}
+			else
+			{
+				npc->direct = 2;
+				npc->x = npc->pNpc->x;
+			}
+
+			npc->y = npc->pNpc->y - 0x1400;
+			npc->ani_no = 1;
+		}
+
+		if (npc->pNpc->ani_no == 1 || npc->pNpc->ani_no == 3 || npc->pNpc->ani_no == 6 || npc->pNpc->ani_no == 8)
+			npc->y -= 0x200;
+
+		switch (npc->act_no)
+		{
+			case 0:
+				if (npc->pNpc->count2 == 10)
+				{
+					npc->pNpc->count2 = 0;
+					npc->act_no = 10;
+					npc->act_wait = 0;
+				}
+
+				break;
+
+			case 10:
+				if (++npc->act_wait % 6 == 1)
+				{
+					if (npc->ani_no)
+					{
+						if (npc->direct == 0)
+						{
+							SetBullet(12, npc->x - 0x400, npc->y - 0x800, 1);
+							SetCaret(npc->x - 0x400, npc->y - 0x800, 3, 0);
+						}
+						else
+						{
+							SetBullet(12, npc->x + 0x400, npc->y - 0x800, 1);
+							SetCaret(npc->x + 0x400, npc->y - 0x800, 3, 0);
+						}
+					}
+					else
+					{
+						if (npc->direct == 0)
+						{
+							SetBullet(12, npc->x - 0x800, npc->y + 0x600, 0);
+							SetCaret(npc->x - 0x800, npc->y + 0x600, 3, 0);
+						}
+						else
+						{
+							SetBullet(12, npc->x + 0x800, npc->y + 0x600, 2);
+							SetCaret(npc->x + 0x800, npc->y + 0x600, 3, 0);
+						}
+					}
+				}
+
+				if (npc->act_wait == 60)
+					npc->act_no = 0;
+
+				break;
+		}
+
+		if (npc->direct == 0)
+			npc->rect = rcLeft[npc->ani_no];
+		else
+			npc->rect = rcRight[npc->ani_no];
+	}
+}
+
+//Curly AI Polar Star
+void ActNpc182(NPCHAR *npc)
+{
+	RECT rcLeft[2];
+	RECT rcRight[2];
+
+	rcLeft[0] = {184, 152, 200, 168};
+	rcLeft[1] = {200, 152, 216, 168};
+
+	rcRight[0] = {184, 168, 200, 184};
+	rcRight[1] = {200, 168, 216, 184};
+
+	if (npc->pNpc)
+	{
+		if (npc->pNpc->ani_no < 5)
+		{
+			if (npc->pNpc->direct == 0)
+			{
+				npc->direct = 0;
+				npc->x = npc->pNpc->x - 0x1000;
+			}
+			else
+			{
+				npc->direct = 2;
+				npc->x = npc->pNpc->x + 0x1000;
+			}
+
+			npc->y = npc->pNpc->y;
+			npc->ani_no = 0;
+		}
+		else
+		{
+			if (npc->pNpc->direct == 0)
+			{
+				npc->direct = 0;
+				npc->x = npc->pNpc->x;
+			}
+			else
+			{
+				npc->direct = 2;
+				npc->x = npc->pNpc->x;
+			}
+
+			npc->y = npc->pNpc->y - 0x1400;
+			npc->ani_no = 1;
+		}
+
+		if (npc->pNpc->ani_no == 1 || npc->pNpc->ani_no == 3 || npc->pNpc->ani_no == 6 || npc->pNpc->ani_no == 8)
+			npc->y -= 0x200;
+
+		switch (npc->act_no)
+		{
+			case 0:
+				if (npc->pNpc->count2 == 10)
+				{
+					npc->pNpc->count2 = 0;
+					npc->act_no = 10;
+					npc->act_wait = 0;
+				}
+
+				break;
+
+			case 10:
+				if (++npc->act_wait % 12 == 1)
+				{
+					if (npc->ani_no)
+					{
+						if (npc->direct == 0)
+						{
+							SetBullet(6, npc->x - 0x400, npc->y - 0x800, 1);
+							SetCaret(npc->x - 0x400, npc->y - 0x800, 3, 0);
+						}
+						else
+						{
+							SetBullet(6, npc->x + 0x400, npc->y - 0x800, 1);
+							SetCaret(npc->x + 0x400, npc->y - 0x800, 3, 0);
+						}
+					}
+					else
+					{
+						if (npc->direct == 0)
+						{
+							SetBullet(6, npc->x - 0x800, npc->y + 0x600, 0);
+							SetCaret(npc->x - 0x800, npc->y + 0x600, 3, 0);
+						}
+						else
+						{
+							SetBullet(6, npc->x + 0x800, npc->y + 0x600, 2);
+							SetCaret(npc->x + 0x800, npc->y + 0x600, 3, 0);
+						}
+					}
+				}
+
+				if (npc->act_wait == 60)
+					npc->act_no = 0;
+
+				break;
+		}
+
+		if (npc->direct == 0)
+			npc->rect = rcLeft[npc->ani_no];
+		else
+			npc->rect = rcRight[npc->ani_no];
+	}
+}
+
+//Curly Air Tank Bubble
+void ActNpc183(NPCHAR *npc)
+{
+	RECT rect[2];
+
+	rect[0] = {56, 96, 80, 120};
+	rect[1] = {80, 96, 104, 120};
+
+	if (npc->pNpc)
+	{
+		if (npc->act_no == 0)
+		{
+			npc->x = npc->pNpc->x;
+			npc->y = npc->pNpc->y;
+			npc->act_no = 1;
+		}
+
+		npc->x += (npc->pNpc->x - npc->x) / 2;
+		npc->y += (npc->pNpc->y - npc->y) / 2;
+
+		if (++npc->ani_wait > 1)
+		{
+			npc->ani_wait = 0;
+			++npc->ani_no;
+		}
+
+		if (npc->ani_no > 1)
+			npc->ani_no = 0;
+
+		if (npc->pNpc->flag & 0x100)
+		{
+			npc->rect = rect[npc->ani_no];
+		}
+		else
+		{
+			npc->rect.right = 0;
+		}
+	}
+}
+
+//Fuzz Core
+void ActNpc187(NPCHAR *npc)
+{
+	switch (npc->act_no)
+	{
+		case 0:
+			npc->act_no = 1;
+			npc->tgt_x = npc->x;
+			npc->tgt_y = npc->y;
+			npc->count1 = 120;
+			npc->act_wait = Random(0, 50);
+
+			for (int i = 0; i < 5; ++i)
+				SetNpChar(188, 0, 0, 0, 0, 51 * i, npc, 0x100);
+			// Fallthrough
+		case 1:
+			if (++npc->act_wait >= 50)
+			{
+				npc->act_wait = 0;
+				npc->act_no = 2;
+				npc->ym = 0x300;
+			}
+
+			break;
+
+		case 2:
+			npc->count1 += 4;
+
+			if (gMC.x < npc->x)
+				npc->direct = 0;
+			else
+				npc->direct = 2;
+
+			if (npc->tgt_y < npc->y)
+				npc->ym -= 0x10;
+			if (npc->tgt_y > npc->y)
+				npc->ym += 0x10;
+
+			if (npc->ym > 0x355)
+				npc->ym = 0x355;
+			if (npc->ym < -0x355)
+				npc->ym = -0x355;
+
+			break;
+	}
+
+	npc->x += npc->xm;
+	npc->y += npc->ym;
+
+	RECT rect_left[2];
+	RECT rect_right[2];
+
+	rect_left[0] = {224, 104, 256, 136};
+	rect_left[1] = {256, 104, 288, 136};
+
+	rect_right[0] = {224, 136, 256, 168};
+	rect_right[1] = {256, 136, 288, 168};
+
+	if (++npc->ani_wait > 2)
+	{
+		npc->ani_wait = 0;
+		++npc->ani_no;
+	}
+
+	if (npc->ani_no > 1)
+		npc->ani_no = 0;
+
+	if (npc->direct == 0)
+		npc->rect = rect_left[npc->ani_no];
+	else
+		npc->rect = rect_right[npc->ani_no];
+}
+
+//Fuzz
+void ActNpc188(NPCHAR *npc)
+{
+	RECT rect_left[2];
+	RECT rect_right[2];
+
+	switch (npc->act_no)
+	{
+		case 0:
+			npc->act_no = 1;
+			npc->count1 = npc->direct;
+			// Fallthrough
+		case 1:
+			if (npc->pNpc->code_char == 187 && npc->pNpc->cond & 0x80)
+			{
+				const unsigned char deg = npc->count1 + npc->pNpc->count1;
+				npc->x = npc->pNpc->x + 20 * GetSin(deg);
+				npc->y = npc->pNpc->y + 0x20 * GetCos(deg);
+			}
+			else
+			{
+				npc->xm = Random(-0x200, 0x200);
+				npc->ym = Random(-0x200, 0x200);
+				npc->act_no = 10;
+			}
+
+			break;
+
+		case 10:
+			if (gMC.x < npc->x)
+				npc->xm -= 0x20;
+			else
+				npc->xm += 0x20;
+
+			if (gMC.y < npc->y)
+				npc->ym -= 0x20;
+			else
+				npc->ym += 0x20;
+
+			if (npc->xm > 0x800)
+				npc->xm = 0x800;
+			if (npc->xm < -0x800)
+				npc->xm = -0x800;
+
+			if (npc->ym > 0x200)
+				npc->ym = 0x200;
+			if (npc->ym < -0x200)
+				npc->ym = -0x200;
+
+			npc->x += npc->xm;
+			npc->y += npc->ym;
+
+			break;
+	}
+
+	if (gMC.x < npc->x)
+		npc->direct = 0;
+	else
+		npc->direct = 2;
+
+	if (++npc->ani_wait > 2)
+	{
+		npc->ani_wait = 0;
+		++npc->ani_no;
+	}
+
+	if (npc->ani_no > 1)
+		npc->ani_no = 0;
+
+	rect_left[0] = {288, 104, 304, 120};
+	rect_left[1] = {304, 104, 320, 120};
+
+	rect_right[0] = {288, 120, 304, 136};
+	rect_right[1] = {304, 120, 320, 136};
+
+	if (npc->direct == 0)
+		npc->rect = rect_left[npc->ani_no];
+	else
+		npc->rect = rect_right[npc->ani_no];
+}
 
 //Scooter
 void ActNpc192(NPCHAR *npc)
--- a/src/NpcHit.h
+++ b/src/NpcHit.h
@@ -12,4 +12,5 @@
 void JudgeHitNpCharTriangleH(NPCHAR *npc, int x, int y);
 void JudgeHitNpCharWater(NPCHAR *npc, int x, int y);
 void HitNpCharMap();
+void LoseNpChar(NPCHAR *npc, bool bVanish);
 void HitNpCharBullet();
--- a/src/NpcTbl.cpp
+++ b/src/NpcTbl.cpp
@@ -227,24 +227,24 @@
 	ActNpc168,
 	ActNpc169,
 	ActNpc170,
-	nullptr,
-	nullptr,
+	ActNpc171,
+	ActNpc172,
 	ActNpc173,
 	ActNpc174,
+	ActNpc175,
+	ActNpc176,
+	ActNpc177,
 	nullptr,
 	nullptr,
+	ActNpc180,
+	ActNpc181,
+	ActNpc182,
+	ActNpc183,
 	nullptr,
 	nullptr,
 	nullptr,
-	nullptr,
-	nullptr,
-	nullptr,
-	nullptr,
-	nullptr,
-	nullptr,
-	nullptr,
-	nullptr,
-	nullptr,
+	ActNpc187,
+	ActNpc188,
 	nullptr,
 	nullptr,
 	nullptr,