{ id: "starburst_shooting_plant", prototype: ["stationary_vulnerable"], solid_area: [4,13,23,27], hitpoints: 200, zorder: 30, properties: { handle_knockback: "def(collide_with) null", }, vars: { points_value: 7, }, tmp: { anim_repeat: 0, }, consts: { basic_type: "starburst_shooting_plant", frogourmet_tag: "starburst_shooting_plant", }, on_end_normal_anim: "if(tmp.anim_repeat > vars.normal_repeat, [animation('prepare'), set(tmp.anim_repeat, 0)], [animation('normal'), add(tmp.anim_repeat, 1)])", on_end_prepare_anim: "animation('chargeup')", on_end_chargeup_anim: "if(tmp.anim_repeat > consts.vars, [animation('shoot'), set(tmp.anim_repeat, 0), sound('droplet-eject'+1d4+'.wav')], [animation('chargeup'), add(tmp.anim_repeat, 1)])", on_end_shoot_anim: "animation('normal')", on_shoot: "[ add_object(obj), set(obj.velocity_y, -500*down-500), set(obj.down, down), ] where obj = object( '${self.type}.stage_1_pollen_ball', midpoint_x, midpoint_y -10*down, facing, { 'inside_type' -> '${self.type}.stage_2_pollen_ball', })", editor_info: { category: "enemies, forest", help: "says to leaf him alone!", var: [ { name: "normal_repeat", value: 1, }, { name: "chargeup_repeat", value: 1, }, ], }, animation: [ { image: "enemies/starburst-shooting-plant.png", pad: 3, accel_y: 0, body_area: "all", id: "normal", duration: 6, frames: 4, frames_per_row: 4, rect: [2,2,28,28], reverse: true, }, { image: "enemies/starburst-shooting-plant.png", pad: 3, accel_y: 0, body_area: "all", id: "hurt", frames: 5, duration: 6, frames_per_row: 5, rect: [2,104,32,136], solid_area: [6,19,25,33], }, { image: "enemies/starburst-shooting-plant.png", pad: 3, accel_y: 0, body_area: "all", id: "shoot", rect: [104,32,134,64], reverse: false, frames: 2, duration: 4, events: "4:shoot", frames_per_row: 2, solid_area: [6,19,25,33], }, { image: "enemies/starburst-shooting-plant.png", pad: 3, accel_y: 0, body_area: "all", id: "chargeup", duration: 4, frames: 2, frames_per_row: 2, rect: [2,68,32,100], reverse: true, solid_area: [6,19,25,33], }, { image: "enemies/starburst-shooting-plant.png", pad: 3, accel_y: 0, body_area: "all", id: "prepare", duration: 6, frames: 2, frames_per_row: 2, rect: [2,32,32,64], reverse: false, solid_area: [6,19,25,33], }, ], object_type: [ { id: "stage_1_pollen_ball", prototype: ["shot"], always_active: true, affected_by_currents: true, object_level_collisions: true, properties: { team: "'evil'", attack_damage: 2, }, vars: { inside_type: "Location Y3tuk9OA: object type not set by parent", }, on_die: "[set(type,'starburst_shooting_plant.particle_system_holder'),set(particles.generation_rate,0)]", on_end_anim: "animation(animation)", on_create: "[schedule(50,fire_event('pop')),add_particles('particles')]", on_pop: "[ spawn('pollen_impact_particle',midpoint_x,midpoint_y,0), sound('droplet-burst'+1d4+'.wav'), transform(range(0,18), spawn(inside_type, midpoint_x, midpoint_y, facing, [set(velocity_x, 300*sin(v)+velocity_x), set(velocity_y, 300*cos(v)-200*down+velocity_y)]) where v = v*20 ), die()]", particle_system: { id: "particles", type: "point", generation_rate_millis: 250, time_to_live: 12, dot_size: 5, dot_rounded: true, time_to_live_rand: 24, colors: ["b0f555ff","b0f555ff","4cd02c55","4cd02c55","4cd02c55"], pos_x: 20, pos_y: 20, velocity_x: -1500, velocity_x_rand: 3000, velocity_y: -1500, velocity_y_rand: 3000, }, animation: { id: "normal", image: "enemies/starburst-shooting-plant.png", rect: [1,157,18,174], frames: 4, duration: 2, pad: 3, velocity_x: 0, accel_y: 20, body_area: "all", attack_area: "all", }, }, { id: "stage_2_pollen_ball", always_active: true, affected_by_currents: true, object_level_collisions: true, prototype: ["shot"], on_create: "[set(time_in_animation,1d14),add_particles('particles'),schedule(250,die())]", on_die: "[sound('droplet-impact'+1d18+'.wav'), spawn('starburst_shooting_plant.splash_effect',midpoint_x,midpoint_y,0)]", timer_frequency: 4, on_timer: "set(rotate, sin(cycle)*10)", on_end_anim: "animation(animation)", on_enter_water: "[add_wave(midpoint_x, y2, 500, velocity_y, 10*velocity_y, 100, 100), add_wave(midpoint_x, y2, -500, velocity_y, 10*velocity_y, 100, 100), die()]", zorder: 10, animation: { id: "normal", image: "enemies/starburst-shooting-plant.png", rect: [1,144,10,153], frames: 8, reverse: true, pad: 3, duration: 2, accel_y: 20, body_area: "all", attack_area: "all", }, particle_system: { id: "particles", type: "point", generation_rate_millis: 250, time_to_live: 12, dot_size: 3, dot_rounded: true, time_to_live_rand: 24, colors: ["b0f555ff","b0f555ff","4cd02c55","4cd02c55","4cd02c55"], pos_x: 10, pos_y: 10, velocity_x: -1500, velocity_x_rand: 3000, velocity_y: -1500, velocity_y_rand: 3000, }, }, { id: "splash_effect", on_end_anim: "die()", animation: { id: "normal", image: "enemies/starburst-shooting-plant.png", rect: [1,178,24,201], frames: 8, frames_per_row: 4, pad: 3, duration: 3, }, }, { id: "particle_system_holder", serializable: false, on_create: "schedule(20,die())", animation: { id: "normal", image: "enemies/starburst-shooting-plant.png", rect: [1,178,2,179], }, }, ], }