stage1: implement boss appearing mid-dialogue
Also reflow the dialogue a bit
This commit is contained in:
parent
731f22e083
commit
51648b2f0d
5 changed files with 28 additions and 33 deletions
|
@ -1000,6 +1000,7 @@ void process_boss(Boss **pboss) {
|
|||
return;
|
||||
}
|
||||
|
||||
move_update(&boss->pos, &boss->move);
|
||||
aniplayer_update(&boss->ani);
|
||||
update_hud(boss);
|
||||
|
||||
|
@ -1037,8 +1038,6 @@ void process_boss(Boss **pboss) {
|
|||
boss_call_rule(boss, time);
|
||||
}
|
||||
|
||||
move_update(&boss->pos, &boss->move);
|
||||
|
||||
if(extra) {
|
||||
float base = 0.2;
|
||||
float ampl = 0.2;
|
||||
|
|
|
@ -24,12 +24,14 @@ DIALOG_TASK(marisa, Stage1PreBoss) {
|
|||
FACE(marisa, puzzled);
|
||||
MSG(marisa, "Aw, snow again? I just put away my winter coat.");
|
||||
|
||||
MSG(cirno, "Nice, right?");
|
||||
EVENT(boss_appears);
|
||||
WAIT(60);
|
||||
WAIT(30);
|
||||
WAIT_SKIPPABLE(60);
|
||||
|
||||
SHOW(cirno);
|
||||
FACE(cirno, normal);
|
||||
MSG(cirno, "Nice, right? It’s my snow. I did it!");
|
||||
MSG(cirno, "It’s my snow. I did it!");
|
||||
|
||||
FACE(marisa, normal);
|
||||
MSG(marisa, "Mind if I borrow some money for the drycleanin’ bill?");
|
||||
|
|
|
@ -42,19 +42,20 @@ DIALOG_TASK(reimu, Stage1PreBoss) {
|
|||
// MSG() also implies FOCUS()
|
||||
MSG(reimu, "Unseasonable snow? I wonder if it’s that ’Secret God’ again…");
|
||||
|
||||
MSG_UNSKIPPABLE(cirno, 180, "’Secret God’?");
|
||||
MSG(cirno, "’Secret God’?");
|
||||
|
||||
// EVENT()s are handled by stage code.
|
||||
// You can find the list of events per dialogue in dialog_interface.h
|
||||
// All of them should be signaled eventually.
|
||||
EVENT(boss_appears);
|
||||
|
||||
// Reveal Cirno’s portrait, while she appears in the game viewport.
|
||||
SHOW(cirno);
|
||||
|
||||
// Wait until the boss slides in.
|
||||
// WAIT() can not be skipped.
|
||||
WAIT(30);
|
||||
WAIT_SKIPPABLE(60);
|
||||
|
||||
// Reveal Cirno’s portrait
|
||||
SHOW(cirno);
|
||||
|
||||
MSG(cirno, "What, are you *that* impressed by my invincible magic?!");
|
||||
|
||||
|
|
|
@ -24,9 +24,12 @@ DIALOG_TASK(youmu, Stage1PreBoss) {
|
|||
FACE(youmu, happy);
|
||||
MSG(youmu, "I suppose falling snow can be as pretty as cherry blossoms…");
|
||||
|
||||
MSG(cirno, "I’m cooler than you, so get off my lake!");
|
||||
FACE(youmu, normal);
|
||||
EVENT(boss_appears);
|
||||
MSG_UNSKIPPABLE(cirno, 120, "I’m cooler than you, so get off my lake!");
|
||||
SHOW(cirno);
|
||||
WAIT(30);
|
||||
WAIT_SKIPPABLE(60);
|
||||
|
||||
FACE(youmu, unamused);
|
||||
MSG(youmu, "I can see you’re quite cold, yes.");
|
||||
|
|
|
@ -13,18 +13,6 @@
|
|||
#include "stagetext.h"
|
||||
#include "common_tasks.h"
|
||||
|
||||
TASK(boss_appear_stub, NO_ARGS) {
|
||||
log_warn("FIXME");
|
||||
}
|
||||
|
||||
static void stage1_dialog_pre_boss(void) {
|
||||
PlayerMode *pm = global.plr.mode;
|
||||
Stage1PreBossDialogEvents *e;
|
||||
INVOKE_TASK_INDIRECT(Stage1PreBossDialog, pm->dialog->Stage1PreBoss, &e);
|
||||
INVOKE_TASK_WHEN(&e->boss_appears, boss_appear_stub);
|
||||
INVOKE_TASK_WHEN(&e->music_changes, common_start_bgm, "stage1boss");
|
||||
}
|
||||
|
||||
static void stage1_dialog_post_boss(void) {
|
||||
PlayerMode *pm = global.plr.mode;
|
||||
INVOKE_TASK_INDIRECT(Stage1PostBossDialog, pm->dialog->Stage1PostBoss);
|
||||
|
@ -61,18 +49,9 @@ Boss *stage1_spawn_cirno(cmplx pos) {
|
|||
return cirno;
|
||||
}
|
||||
|
||||
static void cirno_intro_boss(Boss *c, int time) {
|
||||
if(time < 0)
|
||||
return;
|
||||
TIMER(&time);
|
||||
GO_TO(c, VIEWPORT_W/2.0 + 100.0*I, 0.05);
|
||||
|
||||
AT(120)
|
||||
stage1_dialog_pre_boss();
|
||||
}
|
||||
|
||||
TASK_WITH_INTERFACE(boss_nonspell_1, BossAttack) {
|
||||
Boss *boss = INIT_BOSS_ATTACK();
|
||||
boss->move = move_towards(VIEWPORT_W/2.0 + 100.0*I, 0.05);
|
||||
BEGIN_BOSS_ATTACK();
|
||||
|
||||
for(;;) {
|
||||
|
@ -1506,12 +1485,23 @@ TASK(tritoss_fairy, { cmplx pos; cmplx velocity; cmplx end_velocity; }) {
|
|||
e->move = move_asymptotic_simple(ARGS.end_velocity, -1);
|
||||
}
|
||||
|
||||
TASK(boss_appear, { BoxedBoss boss; }) {
|
||||
Boss *boss = ENT_UNBOX(ARGS.boss);
|
||||
boss->move = move_towards(VIEWPORT_W/2.0 + 100.0*I, 0.05);
|
||||
}
|
||||
|
||||
TASK(spawn_boss, NO_ARGS) {
|
||||
STAGE_BOOKMARK_DELAYED(120, boss);
|
||||
STAGE_BOOKMARK(boss);
|
||||
|
||||
Boss *boss = global.boss = stage1_spawn_cirno(-230 + 100.0*I);
|
||||
|
||||
boss_add_attack(boss, AT_Move, "Introduction", 2, 0, cirno_intro_boss, NULL);
|
||||
PlayerMode *pm = global.plr.mode;
|
||||
Stage1PreBossDialogEvents *e;
|
||||
INVOKE_TASK_INDIRECT(Stage1PreBossDialog, pm->dialog->Stage1PreBoss, &e);
|
||||
INVOKE_TASK_WHEN(&e->boss_appears, boss_appear, ENT_BOX(boss));
|
||||
INVOKE_TASK_WHEN(&e->music_changes, common_start_bgm, "stage1boss");
|
||||
WAIT_EVENT(&global.dialog->events.fadeout_began);
|
||||
|
||||
boss_add_attack_task(boss, AT_Normal, "Iceplosion 0", 20, 23000, TASK_INDIRECT(BossAttack, boss_nonspell_1), NULL);
|
||||
boss_add_attack_from_info(boss, &stage1_spells.boss.crystal_rain, false);
|
||||
boss_add_attack(boss, AT_Normal, "Iceplosion 1", 20, 24000, cirno_iceplosion1, NULL);
|
||||
|
|
Loading…
Reference in a new issue