Пример #1
0
static void createLightBeam()
{
	Entity *e;

	self->thinkTime--;

	if (self->thinkTime <= 0)
	{
		e = getFreeEntity();

		loadProperties("boss/azriel_light_beam", e);

		setEntityAnimation(e, "APPEAR");

		e->animationCallback = &beamAppearFinish;

		self->target = e;

		e->head = self;

		e->x = self->x + self->w / 2 - e->w / 2;

		e->y = getMapFloor(self->x + self->w / 2, self->y) - e->h;

		e->startY = e->y;

		e->action = &beamWait;
		e->draw = &drawBeam;
		e->touch = &entityTouch;

		e->face = RIGHT;

		e->type = ENEMY;

		e->thinkTime = 3600;

		e->mental = 0;

		self->action = &introRaise;

		self->thinkTime = 120;

		self->mental = 1;

		playDefaultBossMusic();
	}
}
Пример #2
0
static void entityWait()
{
	self->thinkTime--;

	if (self->thinkTime <= 0)
	{
		playDefaultBossMusic();

		playSoundToMap("sound/boss/boulder_boss/roll", BOSS_CHANNEL, self->x, self->y, -1);

		setEntityAnimation(self, "WALK");

		self->action = &chasePlayer;

		self->thinkTime = 1;
	}
}
Пример #3
0
static void initialise()
{
    Target *t;

    self->flags |= NO_DRAW;

    if (self->active == TRUE)
    {
        if (cameraAtMinimum())
        {
            createBody();

            centerMapOnEntity(NULL);

            t = getTargetByName("SNAKE_BOSS_TARGET_RIGHT");

            if (t == NULL)
            {
                showErrorAndExit("Snake boss cannot find target");
            }

            setSnakePosition(t->x, t->y);

            self->targetY = self->y - 64;

            self->thinkTime = 60;

            self->face = LEFT;

            self->flags |= LIMIT_TO_SCREEN;

            self->action = &riseUp;

            playDefaultBossMusic();

            initBossHealthBar();

            setContinuePoint(FALSE, self->name, NULL);
        }
    }
}
Пример #4
0
static void introPause()
{
	checkToMap(self);

	if (self->startX <= 0)
	{
		self->takeDamage = &takeDamage;

		self->action = &attackFinished;

		playDefaultBossMusic();

		initBossHealthBar();

		self->touch = &entityTouch;

		self->mental = 15;

		self->endY = self->y;
	}
}
Пример #5
0
static void entityWait()
{
    if (self->thinkTime > 0)
    {
        self->thinkTime--;

        if (self->thinkTime == 0)
        {
            playDefaultBossMusic();

            initEnergyBar();

            self->head->active = TRUE;

            self->action = &teleportOut;

            self->touch = &entityTouch;
        }
    }

    checkToMap(self);
}
Пример #6
0
static void doIntro()
{
	self->thinkTime--;

	if (self->thinkTime <= 0)
	{
		self->flags |= LIMIT_TO_SCREEN;

		playDefaultBossMusic();

		initBossHealthBar();

		self->action = &attackFinished;

		self->startX = 0;

		self->endX = 0;

		self->thinkTime = 0;
	}

	checkToMap(self);
}
Пример #7
0
static void introPause()
{
	hover();

	self->dirX = 0.5;

	checkToMap(self);

	self->thinkTime--;

	if (self->thinkTime <= 0)
	{
		playDefaultBossMusic();

		initBossHealthBar();

		self->action = &entityWait;

		self->flags |= LIMIT_TO_SCREEN;
	}

	facePlayer();
}
Пример #8
0
static void initialise()
{
	if (self->active == TRUE)
	{
		if (self->mental == 0)
		{
			if (strcmpignorecase(getWeather(), "HEAVY_RAIN") != 0)
			{
				self->flags &= ~NO_DRAW;

				setWeather(HEAVY_RAIN);

				playDefaultBossMusic();
			}

			centerMapOnEntity(NULL);

			self->action = &doIntro;

			self->thinkTime = 60;

			self->endX = 0;

			self->touch = &entityTouch;

			setContinuePoint(FALSE, self->name, NULL);
		}

		else
		{
			self->action = &appear;
		}
	}

	checkToMap(self);
}