finished initial boss logic

This commit is contained in:
magicalfeyfenny 2021-06-12 17:57:20 -04:00
parent 90bc4247f3
commit b72515d61d
18 changed files with 277 additions and 29 deletions

View File

@ -0,0 +1,48 @@
1
0 Wriggle
1 Byakuren
Ohohohoho~ Speak of the bug!
0
3 Wriggle
1 Byakuren
Wait that's my catchphrase when did you learn it?
1
3 Wriggle
1 Byakuren
I lived in Makai. There's a lot of devils there.\n'Speak of the devil' simply didn't catch on.
0
4 Wriggle
1 Byakuren
You're saying I'm worse than a devil?
1
4 Wriggle
3 Byakuren
Neither devils nor bugs are bad things in my book. Devils are pretty cool.\nYou're also pretty cool, and also just pretty~~
0
3 Wriggle
3 Byakuren
W-wha? >/////////< Aren't you scared of what a bug can do?
1
3 Wriggle
1 Byakuren
With that cute face? I'd be more afraid of losing sight of Nirvana\nfor the sight in front of me!
0
3 Wriggle
1 Byakuren
T-thanks I guess? >////<\nI'm actually looking for my lady right now though... A UFO took her.
0
2 Wriggle
1 Byakuren
Do you know where they might have gone? She's about my height\nand has a cute hat and pink hair.
1
2 Wriggle
2 Byakuren
I might know a thing or two. Come, let us dance, get to know each other~
0
3 Wriggle
2 Byakuren
You mean... a date?
1
3 Wriggle
1 Byakuren
Yes, in the traditional Gensokyo way! A dance of bullets!

View File

@ -0,0 +1,48 @@
1
0 Wriggle
1 Byakuren
Ohohohoho~ Speak of the bug!
0
3 Wriggle
1 Byakuren
Wait that's my catchphrase when did you learn it?
1
3 Wriggle
1 Byakuren
I lived in Makai. There's a lot of devils there.\n'Speak of the devil' simply didn't catch on.
0
4 Wriggle
1 Byakuren
You're saying I'm worse than a devil?
1
4 Wriggle
3 Byakuren
Neither devils nor bugs are bad things in my book. Devils are pretty cool.\nYou're also pretty cool, and also just pretty~~
0
3 Wriggle
3 Byakuren
W-wha? >/////////< Aren't you scared of what a bug can do?
1
3 Wriggle
1 Byakuren
With that cute face? I'd be more afraid of losing sight of Nirvana\nfor the sight in front of me!
0
3 Wriggle
1 Byakuren
T-thanks I guess? >////<\nI'm actually looking for my lady right now though... A UFO took her.
0
2 Wriggle
1 Byakuren
Do you know where they might have gone? She's about my height\nand has a cute hat and pink hair.
1
2 Wriggle
2 Byakuren
I might know a thing or two. Come, let us dance, get to know each other~
0
3 Wriggle
2 Byakuren
You mean... a date?
1
3 Wriggle
1 Byakuren
Yes, in the traditional Gensokyo way! A dance of bullets!

View File

@ -4,15 +4,19 @@ face_dir = LEFT;
temp_speed = 0;
charge_timer = BOSS_APPROACH_TIME;
//these are default values and should be changed by any objects that inherit this object
phases = 3;
current_phase = 0;
phase_hp = [];
phase_hp[3] = 3200;
phase_hp[3] = 3000;
phase_hp[2] = 3500;
phase_hp[1] = 3000;
phase_hp[0] = 2500;
phase_hp[1] = 2500;
phase_hp[0] = 2000;
stagename = "stage1";
bossname = "midboss";
boss_title = "bossy person";
hp = phase_hp[current_phase];
//
with ( obj_enemy_bullet_parent ) {
instance_destroy();

View File

@ -0,0 +1,8 @@
image_xscale = face_dir;
draw_self();
draw_set_font(fn_GUI);
draw_text(1000, 70, "boss mode: " + string(phase_mode) );
draw_text(1000, 90, "boss invuln: " + string(invuln) );
draw_text(1000, 110, "boss HP: " + string(hp) + " / " + string(phase_hp[current_phase]) );
draw_text(1000, 130, "boss phase: " + string(current_phase) + " / " + string(phases) );

View File

@ -11,18 +11,18 @@ if (hp <= 0) {
}
}
//attack patterns
if ( phase_mode == MODE_ACTIVE ) {
invuln = false;
if ( obj_wriggle.emergency && !temp_speed ) {
temp_speed = speed;
speed = 0;
} else if ( !obj_wriggle.emergency && temp_speed ) {
speed = temp_speed;
temp_speed = 0;
if ( obj_wriggle.emergency ) {
charge_timer++
//stop shooting
} else if ( !obj_wriggle.emergency ) {
y += (( abs(charge_timer) % 60 ) - 30 ) / 30;
}
}
//animations in-between phases
if ( phase_mode == MODE_CHARGE ) {
invuln = true;
if ( !charge_timer ) {
@ -30,6 +30,7 @@ if ( phase_mode == MODE_CHARGE ) {
}
}
//dialogue
if ( phase_mode == MODE_CHAT ) {
invuln = true;
if ( !obj_dialogue.dialogue_mode ) {
@ -38,13 +39,15 @@ if ( phase_mode == MODE_CHAT ) {
}
}
//jumping on-screen
if ( phase_mode == MODE_APPROACH ) {
invuln = true;
hspeed = (10 - min( 10, BOSS_APPROACH_TIME - charge_timer ) ) * face_dir;
vspeed = 10 - min( 10, BOSS_APPROACH_TIME - charge_timer );
hspeed = (15 - min( 15, (BOSS_APPROACH_TIME - charge_timer) / 2 ) ) * face_dir;
vspeed = 15 - min( 15, (BOSS_APPROACH_TIME - charge_timer) / 2 );
image_angle += 24;
if ( !charge_timer ) {
if ( file_exists( "stage1_midboss_chat.txt" ) ) {
scr_dialogue_start( "stage1_midboss_chat.txt" );
if ( file_exists( stagename + "_" + bossname + "_dialogue.txt" ) ) { // "stage#_bossname_dialogue.txt"
scr_dialogue_start( stagename + "_" + bossname + "_dialogue.txt" );
phase_mode = MODE_CHAT;
} else {
charge_timer = BOSS_CHARGE_TIME;

View File

@ -25,15 +25,16 @@
{"isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
{"isDnD":false,"eventNum":0,"eventType":1,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
{"isDnD":false,"eventNum":0,"eventType":4,"collisionObjectId":{"name":"obj_player_shot","path":"objects/obj_player_shot/obj_player_shot.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
{"isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
],
"properties": [],
"overriddenProperties": [],
"parent": {
"name": "thpj3",
"path": "thpj3.yyp",
"name": "parent classes",
"path": "folders/enemies/parent classes.yy",
},
"resourceVersion": "1.0",
"name": "obj_midboss",
"name": "obj_boss_parent",
"tags": [],
"resourceType": "GMObject",
}

View File

@ -0,0 +1,14 @@
// Inherit the parent event
event_inherited();
phases = 3;
current_phase = 0;
phase_hp = [];
phase_hp[3] = 3000;
phase_hp[2] = 3500;
phase_hp[1] = 2500;
phase_hp[0] = 2000;
stagename = "stage1";
bossname = "Byakuren";
boss_title = "Superhuman Youkai Savior";
hp = phase_hp[current_phase];

View File

@ -0,0 +1,39 @@
{
"spriteId": {
"name": "spr_byakuren",
"path": "sprites/spr_byakuren/spr_byakuren.yy",
},
"solid": false,
"visible": true,
"spriteMaskId": null,
"persistent": false,
"parentObjectId": {
"name": "obj_boss_parent",
"path": "objects/obj_boss_parent/obj_boss_parent.yy",
},
"physicsObject": false,
"physicsSensor": false,
"physicsShape": 1,
"physicsGroup": 1,
"physicsDensity": 0.5,
"physicsRestitution": 0.1,
"physicsLinearDamping": 0.1,
"physicsAngularDamping": 0.1,
"physicsFriction": 0.2,
"physicsStartAwake": true,
"physicsKinematic": false,
"physicsShapePoints": [],
"eventList": [
{"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
],
"properties": [],
"overriddenProperties": [],
"parent": {
"name": "enemies",
"path": "folders/enemies.yy",
},
"resourceVersion": "1.0",
"name": "obj_boss_stage1_mid",
"tags": [],
"resourceType": "GMObject",
}

View File

@ -25,8 +25,8 @@
"properties": [],
"overriddenProperties": [],
"parent": {
"name": "enemies",
"path": "folders/enemies.yy",
"name": "parent classes",
"path": "folders/enemies/parent classes.yy",
},
"resourceVersion": "1.0",
"name": "obj_enemy_bullet_parent",

View File

@ -27,8 +27,8 @@
"properties": [],
"overriddenProperties": [],
"parent": {
"name": "enemies",
"path": "folders/enemies.yy",
"name": "parent classes",
"path": "folders/enemies/parent classes.yy",
},
"resourceVersion": "1.0",
"name": "obj_enemy_parent",

View File

@ -1,4 +1,4 @@
if ( obj_dialogue.dialogue_mode ) {
if ( obj_dialogue.dialogue_mode || instance_exists(obj_boss_parent) ) {
timeline_running = false;
} else {
timeline_running = true;

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1,79 @@
{
"bboxMode": 0,
"collisionKind": 1,
"type": 0,
"origin": 4,
"preMultiplyAlpha": false,
"edgeFiltering": false,
"collisionTolerance": 0,
"swfPrecision": 2.525,
"bbox_left": 26,
"bbox_right": 228,
"bbox_top": 3,
"bbox_bottom": 250,
"HTile": false,
"VTile": false,
"For3D": false,
"width": 256,
"height": 256,
"textureGroupId": {
"name": "Default",
"path": "texturegroups/Default",
},
"swatchColours": null,
"gridX": 0,
"gridY": 0,
"frames": [
{"compositeImage":{"FrameId":{"name":"8eeee4a9-7615-4a59-87e7-4ae184f6d4c4","path":"sprites/spr_byakuren/spr_byakuren.yy",},"LayerId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},"images":[
{"FrameId":{"name":"8eeee4a9-7615-4a59-87e7-4ae184f6d4c4","path":"sprites/spr_byakuren/spr_byakuren.yy",},"LayerId":{"name":"010797cb-bedd-42b2-bbb4-47170e361d5f","path":"sprites/spr_byakuren/spr_byakuren.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},
],"parent":{"name":"spr_byakuren","path":"sprites/spr_byakuren/spr_byakuren.yy",},"resourceVersion":"1.0","name":"8eeee4a9-7615-4a59-87e7-4ae184f6d4c4","tags":[],"resourceType":"GMSpriteFrame",},
],
"sequence": {
"spriteId": {"name":"spr_byakuren","path":"sprites/spr_byakuren/spr_byakuren.yy",},
"timeUnits": 1,
"playback": 1,
"playbackSpeed": 30.0,
"playbackSpeedType": 0,
"autoRecord": true,
"volume": 1.0,
"length": 1.0,
"events": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MessageEventKeyframe>",},
"moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MomentsEventKeyframe>",},
"tracks": [
{"name":"frames","spriteId":null,"keyframes":{"Keyframes":[
{"id":"1817c86c-5998-4b07-a982-e2967a810146","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"8eeee4a9-7615-4a59-87e7-4ae184f6d4c4","path":"sprites/spr_byakuren/spr_byakuren.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
],"resourceVersion":"1.0","resourceType":"KeyframeStore<SpriteFrameKeyframe>",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"modifiers":[],"isCreationTrack":false,"resourceVersion":"1.0","tags":[],"resourceType":"GMSpriteFramesTrack",},
],
"visibleRange": null,
"lockOrigin": false,
"showBackdrop": true,
"showBackdropImage": false,
"backdropImagePath": "",
"backdropImageOpacity": 0.5,
"backdropWidth": 1366,
"backdropHeight": 768,
"backdropXOffset": 0.0,
"backdropYOffset": 0.0,
"xorigin": 128,
"yorigin": 128,
"eventToFunction": {},
"eventStubScript": null,
"parent": {"name":"spr_byakuren","path":"sprites/spr_byakuren/spr_byakuren.yy",},
"resourceVersion": "1.3",
"name": "spr_byakuren",
"tags": [],
"resourceType": "GMSequence",
},
"layers": [
{"visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default","resourceVersion":"1.0","name":"010797cb-bedd-42b2-bbb4-47170e361d5f","tags":[],"resourceType":"GMImageLayer",},
],
"nineSlice": null,
"parent": {
"name": "enemies",
"path": "folders/enemies.yy",
},
"resourceVersion": "1.0",
"name": "spr_byakuren",
"tags": [],
"resourceType": "GMSprite",
}

View File

@ -5,24 +5,25 @@
{"id":{"name":"obj_options","path":"objects/obj_options/obj_options.yy",},"order":8,},
{"id":{"name":"spr_player_shot","path":"sprites/spr_player_shot/spr_player_shot.yy",},"order":1,},
{"id":{"name":"obj_stage_controller","path":"objects/obj_stage_controller/obj_stage_controller.yy",},"order":0,},
{"id":{"name":"spr_byakuren","path":"sprites/spr_byakuren/spr_byakuren.yy",},"order":6,},
{"id":{"name":"obj_disclaimer","path":"objects/obj_disclaimer/obj_disclaimer.yy",},"order":2,},
{"id":{"name":"obj_bomber_topologic","path":"objects/obj_bomber_topologic/obj_bomber_topologic.yy",},"order":13,},
{"id":{"name":"spr_wriggle_hitbox","path":"sprites/spr_wriggle_hitbox/spr_wriggle_hitbox.yy",},"order":3,},
{"id":{"name":"obj_title_moon","path":"objects/obj_title_moon/obj_title_moon.yy",},"order":1,},
{"id":{"name":"obj_option_shot","path":"objects/obj_option_shot/obj_option_shot.yy",},"order":7,},
{"id":{"name":"spr_title_star","path":"sprites/spr_title_star/spr_title_star.yy",},"order":7,},
{"id":{"name":"obj_bullet_test","path":"objects/obj_bullet_test/obj_bullet_test.yy",},"order":4,},
{"id":{"name":"obj_bullet_test","path":"objects/obj_bullet_test/obj_bullet_test.yy",},"order":3,},
{"id":{"name":"spr_fluff","path":"sprites/spr_fluff/spr_fluff.yy",},"order":1,},
{"id":{"name":"scr_dialogue_start","path":"scripts/scr_dialogue_start/scr_dialogue_start.yy",},"order":13,},
{"id":{"name":"rm_disclaimer","path":"rooms/rm_disclaimer/rm_disclaimer.yy",},"order":2,},
{"id":{"name":"spr_options","path":"sprites/spr_options/spr_options.yy",},"order":4,},
{"id":{"name":"obj_title_text","path":"objects/obj_title_text/obj_title_text.yy",},"order":3,},
{"id":{"name":"obj_wriggle","path":"objects/obj_wriggle/obj_wriggle.yy",},"order":5,},
{"id":{"name":"obj_midboss","path":"objects/obj_midboss/obj_midboss.yy",},"order":11,},
{"id":{"name":"obj_boss_parent","path":"objects/obj_boss_parent/obj_boss_parent.yy",},"order":0,},
{"id":{"name":"spr_title_bg","path":"sprites/spr_title_bg/spr_title_bg.yy",},"order":5,},
{"id":{"name":"spr_wriggle","path":"sprites/spr_wriggle/spr_wriggle.yy",},"order":2,},
{"id":{"name":"obj_enemy_bullet_parent","path":"objects/obj_enemy_bullet_parent/obj_enemy_bullet_parent.yy",},"order":5,},
{"id":{"name":"obj_enemy_test","path":"objects/obj_enemy_test/obj_enemy_test.yy",},"order":3,},
{"id":{"name":"obj_enemy_bullet_parent","path":"objects/obj_enemy_bullet_parent/obj_enemy_bullet_parent.yy",},"order":1,},
{"id":{"name":"obj_enemy_test","path":"objects/obj_enemy_test/obj_enemy_test.yy",},"order":2,},
{"id":{"name":"obj_player_shot","path":"objects/obj_player_shot/obj_player_shot.yy",},"order":6,},
{"id":{"name":"spr_bomber","path":"sprites/spr_bomber/spr_bomber.yy",},"order":11,},
{"id":{"name":"spr_option_shot","path":"sprites/spr_option_shot/spr_option_shot.yy",},"order":0,},
@ -37,7 +38,7 @@
{"id":{"name":"fn_contact","path":"fonts/fn_contact/fn_contact.yy",},"order":0,},
{"id":{"name":"obj_bomber","path":"objects/obj_bomber/obj_bomber.yy",},"order":10,},
{"id":{"name":"spr_title_moon","path":"sprites/spr_title_moon/spr_title_moon.yy",},"order":6,},
{"id":{"name":"obj_enemy_parent","path":"objects/obj_enemy_parent/obj_enemy_parent.yy",},"order":6,},
{"id":{"name":"obj_enemy_parent","path":"objects/obj_enemy_parent/obj_enemy_parent.yy",},"order":2,},
{"id":{"name":"spr_bg_forest","path":"sprites/spr_bg_forest/spr_bg_forest.yy",},"order":2,},
{"id":{"name":"fn_GUI","path":"fonts/fn_GUI/fn_GUI.yy",},"order":9,},
{"id":{"name":"obj_title_star","path":"objects/obj_title_star/obj_title_star.yy",},"order":2,},
@ -49,6 +50,7 @@
{"id":{"name":"obj_title_screen","path":"objects/obj_title_screen/obj_title_screen.yy",},"order":4,},
{"id":{"name":"obj_dialogue","path":"objects/obj_dialogue/obj_dialogue.yy",},"order":0,},
{"id":{"name":"obj_darkfade","path":"objects/obj_darkfade/obj_darkfade.yy",},"order":6,},
{"id":{"name":"obj_boss_stage1_mid","path":"objects/obj_boss_stage1_mid/obj_boss_stage1_mid.yy",},"order":5,},
{"id":{"name":"rm_title","path":"rooms/rm_title/rm_title.yy",},"order":0,},
],
"Options": [
@ -76,6 +78,7 @@
{"folderPath":"folders/player.yy","order":8,"resourceVersion":"1.0","name":"player","tags":[],"resourceType":"GMFolder",},
{"folderPath":"folders/enemies.yy","order":9,"resourceVersion":"1.0","name":"enemies","tags":[],"resourceType":"GMFolder",},
{"folderPath":"folders/stage.yy","order":10,"resourceVersion":"1.0","name":"stage","tags":[],"resourceType":"GMFolder",},
{"folderPath":"folders/enemies/parent classes.yy","order":4,"resourceVersion":"1.0","name":"parent classes","tags":[],"resourceType":"GMFolder",},
],
"AudioGroups": [
{"targets":-1,"resourceVersion":"1.3","name":"audiogroup_default","resourceType":"GMAudioGroup",},
@ -85,6 +88,7 @@
],
"IncludedFiles": [
{"CopyToMask":153157610357391598,"filePath":"datafiles","resourceVersion":"1.0","name":"dialogue_test.txt","resourceType":"GMIncludedFile",},
{"CopyToMask":-1,"filePath":"datafiles","resourceVersion":"1.0","name":"stage1_Byakuren_dialogue.txt","resourceType":"GMIncludedFile",},
],
"MetaData": {
"IDEVersion": "2.3.2.560",

View File

@ -1 +1 @@
scr_dialogue_start( "dialogue_test.txt" );
instance_create_layer(1350, 160, "enemy", obj_boss_stage1_mid);