if (global.monster[myself] == 1) { if (pinneddown == false) { idlesprite = spr_leafling_idle2; hurtsprite = spr_leafling_hurt; sparedsprite = spr_leafling_spare2; } else { idlesprite = spr_leafling_serious_idle; hurtsprite = spr_leafling_hurt; sparedsprite = spr_leafling_serious_spare; } if (scr_isphase("enemytalk") && talked == 0) { scr_randomtarget(); setbattlemsg = false; myattackchoice = choose(0, 1); myattackpriority = 1; if (myattackchoice == 2) myattackpriority = 50; scr_attackpriority(myattackpriority - 1); if (!instance_exists(obj_darkener)) instance_create(0, 0, obj_darkener); global.typer = 50; rr = choose(0, 1, 2, 3, 4); if (rr == 0) msgsetloc(0, "Fly away,&fly away...", "obj_leafling_enemy_slash_Step_0_gml_38_0"); if (rr == 1) msgsetloc(0, "Let the&breeze take you...", "obj_leafling_enemy_slash_Step_0_gml_39_0"); if (rr == 2) msgsetloc(0, "Any way&the wind&blows...", "obj_leafling_enemy_slash_Step_0_gml_40_0"); if (rr == 3) msgsetloc(0, "Let's float,&float through&the sky... ", "obj_leafling_enemy_slash_Step_0_gml_41_0"); if (rr == 4) msgsetloc(0, "The world&revolves&with&freedom...", "obj_leafling_enemy_slash_Step_0_gml_42_0"); if (pinneddown) { rr = choose(0, 1, 2, 3); if (rr == 0) msgsetloc(0, "I'm too&busy for&this.", "obj_leafling_enemy_slash_Step_0_gml_47_0"); if (rr == 1) msgsetloc(0, "I'll try&and pencil&it in.", "obj_leafling_enemy_slash_Step_0_gml_48_0"); if (rr == 2) msgsetloc(0, "Sorry^1, I&have to&take a&call.", "obj_leafling_enemy_slash_Step_0_gml_49_0"); if (rr == 3) msgsetloc(0, "Don't have&time to&talk now.", "obj_leafling_enemy_slash_Step_0_gml_50_0"); } scr_enemyblcon(x - 10, y + 40, 10); talked = 1; talktimer = 0; rtimer = 0; } if (talked == 1 && scr_isphase("enemytalk")) scr_blconskip(15); if (global.mnfight == 1.5) { if (scr_attackpriority(myattackpriority)) { if (!instance_exists(obj_growtangle)) instance_create(__view_get(e__VW.XView, 0) + 320, __view_get(e__VW.YView, 0) + 170, obj_growtangle); if (!instance_exists(obj_moveheart)) scr_moveheart(); global.mnfight = 2; scr_turntimer(90); } } if (scr_isphase("bullets") && attacked == 0) { rtimer += 1; if (rtimer == 12) { if (myattackchoice == 0) { global.monsterattackname[myself] = "PetalBurst"; dc = scr_bulletspawner(x, y, obj_dbulletcontroller); dc.type = 142; } else if (myattackchoice == 1) { global.monsterattackname[myself] = "PetalWind"; dc = scr_bulletspawner(x, y, obj_dbulletcontroller); dc.type = 143; with (obj_leafling_enemy) { if (pinneddown) { with (obj_dbulletcontroller) { if (type == 143) made = true; } } if (blowaway) { with (obj_dbulletcontroller) { if (type == 143) made = false; } } } } scr_turntimer(240); blowaway = false; turns += 1; attacked = 1; } } if (global.mnfight == 2 && global.turntimer <= 1) { if (setbattlemsg == false) { global.typer = 6; global.fc = 0; rr = choose(0, 1, 2, 3); if (scr_messagepriority(random(2))) { if (rr == 0) global.battlemsg[0] = stringsetloc("* Leafling dances freely on the wind.", "obj_leafling_enemy_slash_Step_0_gml_140_0"); if (rr == 1) global.battlemsg[0] = stringsetloc("* Leafling sings in dandelion language.", "obj_leafling_enemy_slash_Step_0_gml_141_0"); if (rr == 2) global.battlemsg[0] = stringsetloc("* Leafling flies into a scenery object and gets stuck for a while.", "obj_leafling_enemy_slash_Step_0_gml_142_0"); if (rr == 3) global.battlemsg[0] = stringsetloc("* Leafling plays with ribbons of sunshine.", "obj_leafling_enemy_slash_Step_0_gml_143_0"); if (irandom(100) < 3) global.battlemsg[0] = stringsetloc("* Smells like sunshine and green.", "obj_leafling_enemy_slash_Step_0_gml_144_0"); } if (global.monsterstatus[myself] == 1) { if (scr_messagepriority(100)) global.battlemsg[0] = stringsetloc("* Leafling seems to be breathing oxygen and not CO2.", "obj_leafling_enemy_slash_Step_0_gml_169_0"); } if (global.monsterhp[myself] <= (global.monstermaxhp[myself] / 4)) { if (scr_messagepriority(101)) global.battlemsg[0] = stringsetloc("* Leafling looks shriveled.", "obj_leafling_enemy_slash_Step_0_gml_159_0"); } if (global.mercymod[myself] >= 100) { if (scr_messagepriority(102)) global.battlemsg[0] = stringsetloc("* Leafling seems ready to be spared.", "obj_leafling_enemy_slash_Step_0_gml_164_0"); } if (pinneddown) { if (scr_messagepriority(102)) { if (rr == 0) global.battlemsg[0] = stringsetloc("* Leafling stays staring at its newspaper.", "obj_leafling_enemy_slash_Step_0_gml_149_0"); if (rr == 1) global.battlemsg[0] = stringsetloc("* Leafling checks for work notifications on the weekend.", "obj_leafling_enemy_slash_Step_0_gml_150_0"); if (rr == 2) global.battlemsg[0] = stringsetloc("* Leafling doesn't take a lunch break.", "obj_leafling_enemy_slash_Step_0_gml_151_0"); if (rr == 3) global.battlemsg[0] = stringsetloc("* Leafling grunts that it's going to be late.", "obj_leafling_enemy_slash_Step_0_gml_152_0"); if (irandom(100) < 3) global.battlemsg[0] = stringsetloc("* Smells like burnt leaves.", "obj_leafling_enemy_slash_Step_0_gml_153_0"); } } setbattlemsg = true; } } } if (global.myfight == 3) { xx = __view_get(e__VW.XView, 0); yy = __view_get(e__VW.YView, 0); if (acting == 1 && actcon == 0) { actcon = 1; msgsetloc(0, "* Leafling - An irresponsibly carefree leaf^1. It doesn't realize it creates its own wind./%", "obj_leafling_enemy_slash_Step_0_gml_188_0"); if (pinneddown) msgsetloc(0, "* Leafling - A responsible leaf^1. The air feels stagnant around it./%", "obj_leafling_enemy_slash_Step_0_gml_189_0"); scr_battletext_default(); } if (acting == 2 && actcon == 0) { scr_act_charsprite("kris", spr_krisb_pirouette, 1, 1); scr_act_charsprite("susie", spr_susieb_looksup, 1, 1); msgsetloc(0, "* Kris spun extremely fast!/%", "obj_leafling_enemy_slash_Step_0_gml_198_0"); scr_battletext_default(); acting = 2.1; with (obj_leafling_enemy) { inst = instance_create(x + 20, y + 72, obj_turbospin_sprite); inst.sprite_index = spr_leafling_spin; if (global.mercymod[myself] >= 100) inst.sprite_index = spr_leafling_spin_spared; inst.image_index = 0; inst.image_xscale = 2; inst.image_yscale = 2; state = 9; } } if (acting == 2.1) { spinsfxtimer++; if (spinsfxtimer >= 12) { snd_stop(snd_pirouette); snd_play_x(snd_pirouette, 0.4, 1.4); spinsfxtimer = 0; } } if (acting == 2.1 && actcon == 0 && !i_ex(obj_writer)) { msgsetloc(0, "Stop it!^1! You're&making me dizzy!!/%", "obj_leafling_enemy_slash_Step_0_gml_230_0"); global.typer = 75; scr_heroblcon("susie"); scr_act_charsprite_end(); with (obj_herosusie) x -= 46; with (obj_herosusie) y += 6; scr_battle_sprite_set("susie", spr_dizzy_susie, 0.16666666666666666, 1); acting = 2.2; spinsfxtimer = 0; } if (acting == 2.2 && actcon == 0) { talktimer++; if ((button3_h() && talktimer > 15) || !instance_exists(obj_writer)) { with (obj_writer) instance_destroy(); acting = 0; actcon = 1; with (obj_herosusie) x = xstart; with (obj_herosusie) y = ystart; scr_battle_sprite_reset("susie"); with (obj_leafling_enemy) state = 0; with (obj_turbospin_sprite) instance_destroy(); with (obj_monsterparent) scr_mercyadd(myself, 100); } } if (acting == 3 && actcon == 0) { scr_battle_sprite_set("susie", spr_susie_jump_back, 1, 1); obj_herosusie.vspeed = -40; snd_play(snd_jump); acting = 3.01; } if (acting == 3.01 && actcon == 0) { timer++; if (timer == 20) { obj_herosusie.x = x - 6; obj_herosusie.y = cameray() - 100; obj_herosusie.vspeed = 30; obj_herosusie.depth = depth - 1; } if ((obj_herosusie.y + obj_herosusie.vspeed) > (y - 30) && timer > 20) { obj_herosusie.y = y - 30; obj_herosusie.vspeed = 0; snd_play(snd_bump); scr_battle_sprite_set("susie", spr_susie_kneel_heal_alt_right, 0, 1); scr_shakeobj(); with (obj_herosusie) scr_shakeobj(); msgsetloc(0, "* Susie reminded Leafling of its responsibilities!/%", "obj_leafling_enemy_slash_Step_0_gml_296_0"); scr_battletext_default(); state = 10; if (pinneddown) state = 11; timer = 0; acting = 3.1; } } if (acting == 3.1 && actcon == 0 && !i_ex(obj_writer)) { var rand = choose(0, 1, 2); if (rand == 0) msgsetloc(0, "Hey^1, you gotta do&your group project&or whatever!/%", "obj_leafling_enemy_slash_Step_0_gml_310_0"); if (rand == 1) msgsetloc(0, "Hurry^1! Your^1, uh^1, date&is waiting for you!/%", "obj_leafling_enemy_slash_Step_0_gml_311_0"); if (rand == 2) msgsetloc(0, "The pizza place just&trashed dough and&it's still hot!/%", "obj_leafling_enemy_slash_Step_0_gml_312_0"); global.typer = 75; scr_enemyblcon(x - 10, y + 20, 10); scr_guardpeek(obj_herosusie); acting = 3.15; } if (acting == 3.15 && actcon == 0 && !i_ex(obj_writer)) { if (!pinneddown) msgsetloc(0, "* Leafling became responsible..^1. the wind no longer blows./%", "obj_leafling_enemy_slash_Step_0_gml_324_0"); else msgsetloc(0, "* ..^1. but^1, it was already responsible./%", "obj_leafling_enemy_slash_Step_0_gml_325_0"); scr_battletext_default(); state = 11; scr_mercyadd(myself, 50); with (obj_monsterparent) scr_monster_make_tired(myself); acting = 3.2; } if (acting == 3.2 && actcon == 0 && !i_ex(obj_writer)) { timer++; if (timer == 1) { obj_herosusie.vspeed = -30; scr_battle_sprite_set("susie", spr_susie_jump_back, 1, 1); snd_stop(snd_jump); snd_play(snd_jump); shrinktimer = 3; state = 12; pinneddown = true; } if (timer == 11) { obj_herosusie.x = obj_herosusie.xstart; obj_herosusie.vspeed = 30; } if (timer > 11 && (obj_herosusie.y + obj_herosusie.vspeed) > obj_herosusie.ystart) { obj_herosusie.vspeed = 0; obj_herosusie.x = obj_herosusie.xstart; obj_herosusie.y = obj_herosusie.ystart; scr_battle_sprite_reset("susie"); with (obj_herosusie) scr_shakeobj(); snd_play(snd_bump); acting = 0; timer = 0; actcon = 1; } } if (acting == 4 && actcon == 0) { msgsetsubloc(0, "* ~1 repeatedly to blow away!", scr_get_input_name(4), scr_get_input_name(6), "obj_leafling_enemy_slash_Step_0_gml_372_0"); scr_battletext_default(); with (obj_writer) { rate = 33; pos = 60; } acting = 101; actcon = 0; } if (acting == 101 && actcon == 0) { if (progress > 0) progress -= 0.5; if (button1_p() == 1) presscount_1++; if (button1_p() == 1 && presscount_1 < 5) { snd_stop(snd_whistlebreath); snd_play_x(snd_whistlebreath, 1, 1 + (presstimer / 100)); progress += 10; starttimer = true; blown = 1; blowanimtimer = 20; onoff = 0; shakeamt = 5; repeat (6) event_user(2); } presstimer++; if (presstimer == 30) { presstimer = 0; presscount_1 = 0; } if (progress >= 100) progress = 100; if (starttimer == true) acttimer++; if (acttimer >= acttimermax || progress >= 100) { starttimer = false; acting = 4.4; blown = 0; acttimer = 0; with (obj_writer) instance_destroy(); } } if (acting == 4.4 && actcon == 0) { if (progress < 100) { msgsetloc(0, "* You ran out of time!/%", "obj_leafling_enemy_slash_Step_0_gml_426_0"); } else { blowaway = true; if (pinneddown == false) { msgsetloc(0, "* It floated on the wind carefree!/%", "obj_leafling_enemy_slash_Step_0_gml_432_0"); } else { msgsetloc(0, "* It floated on the wind carefree once again!/%", "obj_leafling_enemy_slash_Step_0_gml_437_0"); pinneddown = false; marker = instance_create(x, y, obj_marker); with (marker) { sprite_index = spr_leafling_hat_briefcase; hspeed = 6; image_xscale = 2; image_yscale = 2; vspeed = -4; gravity = 0.3; gravity_direction = 270; scr_script_delayed(instance_destroy, 25); } } scr_mercyadd(myself, 70); } scr_battletext_default(); acting = 0; actcon = 1; progress = 0; } if (actingsus == 1 && actconsus == 1) { var rand = choose(0, 1, 2); if (rand == 0) msgsetloc(0, "* Susie blows on a dandelion!", "obj_leafling_enemy_slash_Step_0_gml_468_0"); if (rand == 1) msgsetloc(0, "* Susie slacks off!", "obj_leafling_enemy_slash_Step_0_gml_469_0"); if (rand == 2) msgsetloc(0, "* Susie takes the wind face on!", "obj_leafling_enemy_slash_Step_0_gml_470_0"); scr_simultext("susie"); scr_mercyadd(myself, 35); global.flag[1888] = 1; if (simulordersus == 0) actconsus = 20; else actconsus = 0; } if (actingral == 1 && actconral == 1) { var rand = choose(0, 1, 2); if (rand == 0) msgsetloc(0, "* Ralsei counts petals daintily!", "obj_leafling_enemy_slash_Step_0_gml_482_0"); if (rand == 1) msgsetloc(0, "* Ralsei floats fuzzily!", "obj_leafling_enemy_slash_Step_0_gml_483_0"); if (rand == 2) msgsetloc(0, "* Ralsei puts soil in his hat!", "obj_leafling_enemy_slash_Step_0_gml_484_0"); scr_simultext("ralsei"); scr_mercyadd(myself, 35); global.flag[1888] = 1; if (simulorderral == 0) actconral = 20; else actconral = 0; } if (actcon == 20 || actconsus == 20 || actconral == 20) { if (scr_terminate_writer()) { actconsus = -1; actconral = -1; actcon = 1; } } if (actcon == 1 && !instance_exists(obj_writer)) scr_nextact(); } if (state == 3) { scr_enemyhurt_tired_after_damage(0.5); scr_enemy_hurt(); } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }