###### KAIJU ADULT ######

@colossus_scale = 30
@flowmap_speed = 0.17
@flowmap_intensity =  0.3

entity = {
	name = "kaiju_01_adult_entity"
	pdxmesh = "kaiju_01_adult_frame_mesh"


	default_state = "idle"
	state = { name = "idle" animation = "idle" }
#	state = { name = "idle" animation = "idle" }
#	state = { name = "moving" animation = "moving" }
#	state = { name = "working" animation = "idle" }
	state = { name = "death" animation = "closed_death" looping = no animation_speed = 0.5

		event = { time = 11.4 node = "spine7" particle = "biogenesis_01_25_ship_explosion_effect"  keep_particle = yes}
		event = { time = 11.4 node = "spine4" particle = "biogenesis_01_25_ship_explosion_effect"  keep_particle = yes}
		event = { time = 11.4 node = "neck1" particle = "biogenesis_01_25_ship_explosion_effect" keep_particle = yes }
		event = { time = 11.4 node = "body" particle = "biogenesis_01_25_ship_explosion_effect" keep_particle = yes }

		chance = {
			if_current_state = {
				"idle" = 100
				"moving" = 100
				"death" = 0
				"working" = 0
			}
		}
	}

	game_data = {
		#	size = @colossus_scale
		uv_animation_speed = @flowmap_speed
	}
}

entity = {
	name = "kaiju_01_adult_ship_entity"
	pdxmesh = "kaiju_01_adult_mesh"

	default_state = "idle" # Actual idle state when being in idle/moving.

	state = {
		name = "superweapon" animation = "superweapon" looping = no next_state = "idle"
		event = { time = 4.3 node = "head" particle = "kaiju_super_attack_effect" }
		event = { time = 3.93 sound = { soundeffect = kaiju_superweapon_initiate } }
		event = { time = 4.1 sound = { soundeffect = kaiju_adult_superweapon_roar } }
		event = { time = 4.2 sound = { soundeffect = kaiju_superweapon_fire_burst } }
		event = { time = 4.2 sound = { soundeffect = kaiju_superweapon_fire_swirl } }
		event = { time = 4.2 sound = { soundeffect = kaiju_superweapon_fire_whoosh } }
		event = { time = 4.6 sound = { soundeffect = kaiju_superweapon_energy_initiate } }
		event = { time = 4.73 sound = { soundeffect = kaiju_superweapon_energy_boom } }
		event = { time = 4.73 sound = { soundeffect = kaiju_superweapon_energy_pulse } }
	}
	state = { name = "rage" animation = "rage" looping = no next_state = "idle" animation_blend_time = 0.5
			event = { time = 4.1 sound = { soundeffect = kaiju_adult_rage_roar } }
			}
	state = { name = "combat_moving" animation = "combat_moving" animation_blend_time = 0.5
			event = { time = 0.87 sound = { soundeffect = kaiju_adult_tail_swish_long_low } }
			event = { time = 4.6 sound = { soundeffect = kaiju_adult_tail_swish_long_low } }
			}
	state = { name = "idle" animation = "idle" looping = no next_state = "idle" animation_blend_time = 0.5
		chance = {
			if_current_state = {
				"idle" = 100
				"moving" = 100
				"death" = 0
				"working" = 100
				"working_looping" = 0
			}
		}
		# Extra events for idle state (moved out of chance block)
		event = { time = 0.87 sound = { soundeffect = kaiju_adult_tail_swish_long_low } }
		event = { time = 4.6 sound = { soundeffect = kaiju_adult_tail_swish_long_low } }
		event = { time = 7.47 sound = { soundeffect = kaiju_adult_tail_swish_long_low } }
		event = { time = 10.27 sound = { soundeffect = kaiju_adult_tail_swish_long_low } }
	}
	# Actual moving state if going from idle/moving.
	state = { name = "moving" animation = "idle" looping = yes next_state = "moving" animation_blend_time = 0.5
		chance = {
			if_current_state = {
				"idle" = 100
				"moving" = 100
				"death" = 0
				"working" = 100
				"working_looping" = 0
			}
		}
		# Extra events for moving state (moved out of chance block)
		event = { time = 0.87 sound = { soundeffect = kaiju_adult_tail_swish_long_low } }
		event = { time = 4.6 sound = { soundeffect = kaiju_adult_tail_swish_long_low } }
		event = { time = 7.47 sound = { soundeffect = kaiju_adult_tail_swish_long_low } }
		event = { time = 10.27 sound = { soundeffect = kaiju_adult_tail_swish_long_low } }
	}
	# Idle state when going from opened state to idle.
	state = { name = "idle" animation = "closing" animation_speed = 1 looping = no next_state = "idle"
		chance = {
			if_current_state = {
				"idle" = 0
				"moving" = 0
				"death" = 0
				"working" = 100
				"working_looping" = 100
			}
		}
	}
	# Moving state if going from open/working, uses closing animation.
	state = { name = "moving" animation = "closing" animation_speed = 1 looping = no next_state = "moving"
		chance = {
			if_current_state = {
				"idle" = 0
				"moving" = 0
				"death" = 0
				"working" = 0
				"working_looping" = 100
			}
		}
	}
	# Opening state, goes into "working_looping" state when done.
	state = { name = "working" animation = "opening" looping = no next_state = "working_looping"
		event = { time = 0	id = "beam_start" }
		event = { time = 7.73  sound = { soundeffect = kaiju_adult_pre_chomp } }
	}
	# Opened state, going after "kill_planet".
	state = { name = "working_looping" animation = "open" looping = yes
		event = { time = 1000 id = "beam_start" } #will never fire, but lets the game know that an event with this ID exists
		event = { time = 1.5  sound = { soundeffect = kaiju_adult_pre_chomp stop_on_state_change = yes } }
		event = { time = 2.5  sound = { soundeffect = kaiju_adult_chomp stop_on_state_change = yes } }
		event = { time = 2.8  sound = { soundeffect = kaiju_adult_pre_chomp stop_on_state_change = yes } }
		event = { time = 3.5  sound = { soundeffect = kaiju_adult_chomp stop_on_state_change = yes } }
		event = { time = 3.8  sound = { soundeffect = kaiju_adult_pre_chomp stop_on_state_change = yes } }
		event = { time = 4.5  sound = { soundeffect = kaiju_adult_chomp stop_on_state_change = yes } }
		event = { time = 6.8  sound = { soundeffect = kaiju_adult_pre_chomp stop_on_state_change = yes } }
		event = { time = 7.7  sound = { soundeffect = kaiju_adult_chomp stop_on_state_change = yes } }
		event = { time = 8.3  sound = { soundeffect = kaiju_adult_pre_chomp stop_on_state_change = yes } }
	}
	# Closed death state.
	state = { name = "death" animation = "closed_death" looping = no animation_speed = 0.5
		event = { time = 2.0 trigger_once = yes sound = { soundeffect = kaiju_adult_death stop_on_state_change = yes } }
		chance = {
			if_current_state = {
				"idle" = 100
				"moving" = 100
				"death" = 0
				"working" = 0
				"working_looping" = 0
			}
		}
	}
	# Opened death state.
	state = { name = "death" animation = "opened_death" looping = no animation_blend_time = 2 animation_speed = 0.5
		chance = {
			if_current_state = {
				"idle" = 0
				"moving" = 0
				"death" = 0
				"working" = 100
				"working_looping" = 100
			}
		}
		event = { time = 2.0 trigger_once = yes sound = { soundeffect = ship_destroyed stop_on_state_change = yes } }
	}

	game_data = {
		emissive_recolor_crunch = 2.0
	}
}

animation = {
	name = "kaiju_01_adult_idle_animation"
	file = "kaiju_01_adult_idle.anim"
}
animation = {
	name = "kaiju_01_adult_frame_idle_animation"
	file = "kaiju_01_adult_frame_idle.anim"
}
animation = {
	name = "kaiju_01_adult_moving_animation"
	file = "kaiju_01_adult_moving.anim"
}
animation = {
	name = "kaiju_01_adult_combat_moving_animation"
	file = "kaiju_01_adult_combat_moving.anim"
}
animation = {
	name = "kaiju_01_adult_opening_animation"
	file = "kaiju_01_adult_opening.anim"
}
animation = {
	name = "kaiju_01_adult_open_animation"
	file = "kaiju_01_adult_open.anim"
}
animation = {
	name = "kaiju_01_adult_closing_animation"
	file = "kaiju_01_adult_closing.anim"
}
animation = {
	name = "kaiju_01_adult_rage_animation"
	file = "kaiju_01_adult_rage.anim"
}
animation = {
	name = "kaiju_01_adult_superweapon_animation"
	file = "kaiju_01_adult_superweapon.anim"
}
animation = {
	name = "kaiju_01_adult_death_animation"
	file = "kaiju_01_adult_death.anim"
}
animation = {
	name = "kaiju_01_adult_frame_death_animation"
	file = "kaiju_01_adult_frame_death.anim"
}

###### KAIJU JUVENILE ######

entity = {
	name = "kaiju_01_juvenile_entity"
	pdxmesh = "kaiju_01_juvenile_frame_mesh"

	#locator = { name = "turret_01" }
	#locator = { name = "frame_ship" 		position = { 0  0  0 } }

	default_state = "idle"
	state = { name = "idle" animation = "idle" }
	#state = {name = "rage" animation = "rage"}
	#state = { name = "idle" animation = "idle" }
	#state = { name = "moving" animation = "idle" }
	state = { name = "death" animation = "death" looping = no 
				event = { time = 6.7 node = "spine4" particle = "biogenesis_01_16_ship_explosion_effect"  keep_particle = yes}
				event = { time = 6.7 node = "neck1" particle = "biogenesis_01_16_ship_explosion_effect" keep_particle = yes }
				event = { time = 6.7 node = "body" particle = "biogenesis_01_16_ship_explosion_effect" keep_particle = yes  }
}

	game_data = {
		#	size = @colossus_scale
		uv_animation_speed = @flowmap_speed
	}
}

entity = {
	name = "kaiju_01_juvenile_ship_entity"
	pdxmesh = "kaiju_01_juvenile_mesh"

	default_state = "idle"
	state = { name = "idle"	 animation = "idle" animation_blend_time = 1
				event = { time = 1.6 sound = { soundeffect = kaiju_juvenile_tail_swish_long } }
				event = { time = 2.87 sound = { soundeffect = kaiju_juvenile_tail_swish_long } }
				event = { time = 4.3 sound = { soundeffect = kaiju_juvenile_tail_swish_long } }
				event = { time = 6.137 sound = { soundeffect = kaiju_juvenile_tail_swish_long } }
			}
	state = { name = "moving"	animation = "idle" animation_blend_time = 1
				event = { time = 0.33 sound = { soundeffect = kaiju_juvenile_tail_swish_long } }
				event = { time = 2.07 sound = { soundeffect = kaiju_juvenile_tail_swish_long } }
				event = { time = 3.73 sound = { soundeffect = kaiju_juvenile_tail_swish_long } }
				event = { time = 5.6 sound = { soundeffect = kaiju_juvenile_tail_swish_long } }
			}
	state = { name = "combat_moving" animation = "combat_moving" animation_blend_time = 0.5 }
	
	state = { name = "rage"	animation = "rage" animation_blend_time = 1
				event = { time = 1.67 sound = { soundeffect = kaiju_juvenile_rage_roar } }
			}
	state = { name = "death" animation = "death" looping = no
				event = { time = 1.67 trigger_once = yes sound = { soundeffect = kaiju_juvenile_death } }
			}
	game_data = {
		emissive_recolor_crunch = 2.0
	}
}

animation = {
	name = "kaiju_01_juvenile_idle_animation"
	file = "kaiju_01_juvenile_idle.anim"
}
animation = {
	name = "kaiju_01_juvenile_frame_idle_animation"
	file = "kaiju_01_juvenile_frame_idle.anim"
}
animation = {
	name = "kaiju_01_juvenile_moving_animation"
	file = "kaiju_01_juvenile_idle.anim"
}
animation = {
	name = "kaiju_01_juvenile_combat_moving_animation"
	file = "kaiju_01_juvenile_combat_moving.anim"
}
animation = {
	name = "kaiju_01_juvenile_rage_animation"
	file = "kaiju_01_juvenile_rage.anim"
}
animation = {
	name = "kaiju_01_juvenile_death_animation"
	file = "kaiju_01_juvenile_death.anim"
}
animation = {
	name = "kaiju_01_juvenile_frame_death_animation"
	file = "kaiju_01_juvenile_frame_death.anim"
}

###### KAIJU HATCHLING ######

entity = {
	name = "kaiju_01_hatchling_entity"
	pdxmesh = "kaiju_01_hatchling_frame_mesh"
	scale = 0.5

	default_state = "idle"
	state = { name = "idle" animation = "idle" }
	#state = {name = "rage" animation = "rage"}
	#state = { name = "moving" animation = "idle" }
	state = { name = "death" animation = "death" looping = no
				event = { time = 6.7 node = "spine4" particle = "biogenesis_01_12_ship_explosion_effect"  keep_particle = yes}
				event = { time = 6.7 node = "neck1" particle = "biogenesis_01_12_ship_explosion_effect" keep_particle = yes }
				event = { time = 6.7 node = "body" particle = "biogenesis_01_12_ship_explosion_effect" keep_particle = yes  }
	}
}

entity = {
	name = "kaiju_01_hatchling_ship_entity"
	pdxmesh = "kaiju_01_hatchling_mesh"
	scale = 0.5

	default_state = "idle"
	state = { name = "idle"	 animation = "idle" animation_blend_time = 1
				event = { time = 1.1 sound = { soundeffect = kaiju_hatchling_tail_swish_high } }
				event = { time = 2.37 sound = { soundeffect = kaiju_hatchling_tail_swish_high } }
				event = { time = 3.8 sound = { soundeffect = kaiju_hatchling_tail_swish_high } }
				event = { time = 5.637 sound = { soundeffect = kaiju_hatchling_tail_swish_high } }
			}
	state = { name = "moving"	animation = "idle" animation_blend_time = 1
				event = { time = 0.33 sound = { soundeffect = kaiju_hatchling_tail_swish_high } }
				event = { time = 2.07 sound = { soundeffect = kaiju_hatchling_tail_swish_high } }
				event = { time = 3.73 sound = { soundeffect = kaiju_hatchling_tail_swish_high } }
				event = { time = 5.6 sound = { soundeffect = kaiju_hatchling_tail_swish_high } }
			}
	state = { name = "combat_moving" animation = "combat_moving" animation_blend_time = 0.5 }

	state = { name = "rage"	animation = "rage" animation_blend_time = 1
				event = { time = 1.67 sound = { soundeffect = kaiju_hatchling_rage_roar } }
			}
	state = { name = "death" animation = "death"  looping = no
				event = { time = 1.67 trigger_once = yes sound = { soundeffect = kaiju_hatchling_death } }
			}

	game_data = {
		emissive_recolor_crunch = 2.0
	}
}

animation = {
	name = "kaiju_01_hatchling_idle_animation"
	file = "kaiju_01_hatchling_idle.anim"
}
animation = {
	name = "kaiju_01_hatchling_frame_idle_animation"
	file = "kaiju_01_hatchling_frame_idle.anim"
}
animation = {
	name = "kaiju_01_hatchling_combat_moving_animation"
	file = "kaiju_01_hatchling_combat_moving.anim"
}
animation = {
	name = "kaiju_01_hatchling_moving_animation"
	file = "kaiju_01_hatchling_idle.anim"
}
animation = {
	name = "kaiju_01_hatchling_rage_animation"
	file = "kaiju_01_hatchling_rage.anim"
}
animation = {
	name = "kaiju_01_hatchling_death_animation"
	file = "kaiju_01_hatchling_death.anim"
}
animation = {
	name = "kaiju_01_hatchling_frame_death_animation"
	file = "kaiju_01_hatchling_frame_death.anim"
}

###### KAIJU EGG ######

entity = {
    name = "kaiju_01_egg_entity"
    pdxmesh = "kaiju_01_egg_mesh"
    scale = 1.2

    default_state = "idle"
    state = { name = "idle"	 animation = "idle" animation_blend_time = 1
	start_event = { trigger_once = yes sound = { soundeffect = kaiju_egg_ambience_loop } }
}

    game_data = {
        emissive_recolor_crunch = 2.0
    }
}

###### KAIJU BIG EGG ######

entity = {
	name = "kaiju_01_big_egg_entity"
	scale = 4.5
	pdxmesh = "kaiju_01_egg_mesh"


	default_state = "idle"
	state = { name = "idle"	 animation = "idle" animation_blend_time = 1
    start_event = { trigger_once = yes sound = { soundeffect = kaiju_egg_ambience_loop } }
}
	game_data = {
		emissive_recolor_crunch = 2.0
	}
}

###### KAIJU EGG DESTROYED ######


entity = {
    name = "kaiju_01_egg_destroyed_entity"
    pdxmesh = "kaiju_01_egg_destroyed_mesh"
    scale = 1.2

    default_state = "idle"
    state = { name = "idle"	 animation = "idle" animation_blend_time = 1
    start_event = { trigger_once = yes sound = { soundeffect = kaiju_egg_destroyed_loop } }
    }
}


###### KAIJU BIG EGG DESTROYED ######

entity = {
	name = "kaiju_01_big_egg_destroyed_entity"
    pdxmesh = "kaiju_01_egg_destroyed_mesh"
    scale = 4.5

default_state = "idle"
    state = { name = "idle"	 animation = "idle" animation_blend_time = 1
    start_event = { trigger_once = yes sound = { soundeffect = kaiju_egg_destroyed_loop } }
    }
}


#EGG anim

animation = {
	name = "kaiju_01_egg_idle_animation"
	file = "kaiju_01_egg_idle.anim"
}

# Destroyed Egg
animation = {
	name = "kaiju_01_egg_destroyed_idle_animation"
	file = "kaiju_01_egg_destroyed_idle.anim"
}
