# Scope:
# this/root = planet that have been fired upon
# from = fleet that fired
#on_destroy_planet_with_PLANET_DESTRUCTION_COMPONENT = {
#	events = {
#		planet_destruction.1
#	}
#}

# Note: The _queued on_actions also fire when the command is made even if there is nothing else in the queue
# Similarly, the _unqueued on_actions fire even if you cancel the order while the weapon is on the wind-up to fire
# They use the same scopes as the standard events

on_destroy_planet_with_PLANET_KILLER_CRACKER = {
	events = {
		toxoids.8016 #Destroyed knight Keep
		crisis.5015 # Menace Objective - Destroy World/Empire
		planet_destruction.110
		origin.3245 # Glassing a Progenitors Nest
		planet_destruction.600 # frag holy world
		planet_destruction.100 # goes last because it can kill a country, making some trigger checks impossible
		awareness.150 # Planet cracker used OR planet terraformed, chance to gain 20 awareness.
		timeline.27         # Milestone First Destroyed Planet
	}
}

on_destroy_planet_with_PLANET_KILLER_CRACKER_queued = {
	events = {
		fircon.5035 #Solarpunk Planet queued
	}
}

on_destroy_planet_with_PLANET_KILLER_CRACKER_unqueued = {
}

on_destroy_planet_with_PLANET_KILLER_SHIELDER = {
	events = {
		crisis.5015 # Menace Objective - Destroy World/Empire
		toxoids.8016 #Destroyed knight Keep placed up here so events fire while it's a planet
		planet_destruction.200
		planet_destruction.600 # frag holy world
		origin.3245
		awareness.150 # Planet cracker used OR planet terraformed, chance to gain 20 awareness.
	}
}

on_destroy_planet_with_PLANET_KILLER_SHIELDER_queued = {
	events = {
		fircon.5035 #Solarpunk Planet queued
	}
}

on_destroy_planet_with_PLANET_KILLER_SHIELDER_unqueued = {
}

on_destroy_planet_with_PLANET_KILLER_NEUTRON = {
	events = {
		planet_destruction.300
		origin.3245
		awareness.150 # Planet cracker used OR planet terraformed, chance to gain 20 awareness.
	}
}

on_destroy_planet_with_PLANET_KILLER_NEUTRON_queued = {
	events = {
		fircon.5035 #Solarpunk Planet queued
	}
}

on_destroy_planet_with_PLANET_KILLER_NEUTRON_unqueued = {
}

on_destroy_planet_with_PLANET_KILLER_GODRAY = {
	events = {
		planet_destruction.400
		origin.3245
		awareness.150 # Planet cracker used OR planet terraformed, chance to gain 20 awareness.
	}
}

on_destroy_planet_with_PLANET_KILLER_GODRAY_queued = {
	events = {
		fircon.5035 #Solarpunk Planet queued
	}
}

on_destroy_planet_with_PLANET_KILLER_GODRAY_unqueued = {
}

on_destroy_planet_with_PLANET_KILLER_NANOBOTS = {
	events = {
		crisis.5015 # Menace Objective - Destroy World/Empire
		planet_destruction.500
		origin.3245
		awareness.150 # Planet cracker used OR planet terraformed, chance to gain 20 awareness.
	}
}

on_destroy_planet_with_PLANET_KILLER_NANOBOTS_queued = {
	events = {
		fircon.5035 #Solarpunk Planet queued
	}
}

on_destroy_planet_with_PLANET_KILLER_NANOBOTS_unqueued = {
}

on_destroy_planet_with_PLANET_KILLER_STAR_CRACKER = {
	events = {
		crisis.4550
		awareness.150 # Planet cracker used OR planet terraformed, chance to gain 20 awareness.
	}
}

on_destroy_planet_with_PLANET_KILLER_STAR_CRACKER_queued = {
	events = {
		fircon.5035 #Solarpunk Planet queued
	}
}

on_destroy_planet_with_PLANET_KILLER_STAR_CRACKER_unqueued = {
}

on_destroy_planet_with_PLANET_KILLER_DELUGE = {
	events = {
		planet_destruction.607 # frag holy world
		planet_destruction.700
		origin.3245
		awareness.150 # Planet cracker used OR planet terraformed, chance to gain 20 awareness.
	}
}

on_destroy_planet_with_PLANET_KILLER_DELUGE_queued = {
	events = {
		fircon.5035 #Solarpunk Planet queued
#		planet_destruction.705
	}
}

on_destroy_planet_with_PLANET_KILLER_DELUGE_unqueued = {
	events = {
#		planet_destruction.710
	}
}

on_destroy_planet_with_PLANET_KILLER_TOXIFIER = {
	events = {
		crisis.5015 # Menace Objective - Destroy World/Empire
		planet_destruction.600 # frag holy world, do not put after planet_destruction.800 in this list
		planet_destruction.800
		origin.3245
		awareness.150 # Planet cracker used OR planet terraformed, chance to gain 20 awareness.
	}
}

on_destroy_planet_with_PLANET_KILLER_TOXIFIER_queued = {
	events = {
		fircon.5035 #Solarpunk Planet queued
	}
}

on_destroy_planet_with_PLANET_KILLER_TOXIFIER_unqueued = {
}

on_destroy_planet_with_PLANET_KILLER_DEVOLUTION = {
	events = {
		planet_destruction.900
		origin.3245
		awareness.150 # Planet cracker used OR planet terraformed, chance to gain 20 awareness.
	}
}

on_destroy_planet_with_PLANET_KILLER_DEVOLUTION_queued = {
}

on_destroy_planet_with_PLANET_KILLER_DEVOLUTION_unqueued = {
}

on_destroy_planet_with_PLANET_KILLER_MAW = {
	events = {	
		biocrisis.200
		planet_destruction.1005
		origin.3245
		awareness.150 # Planet cracker used OR planet terraformed, chance to gain 20 awareness.
	}
}

on_destroy_planet_with_PLANET_KILLER_MAW_queued = {
}

on_destroy_planet_with_PLANET_KILLER_MAW_unqueued = {
}

on_destroy_planet_with_PLANET_KILLER_SMELTER = {
	events = {
		planet_destruction.110 # Burning Sol
		origin.3245 # Glassing a Progenitors Nest
		planet_destruction.600 # frag holy world
		infernals.36 # goes last because it can kill a country, making some trigger checks impossible
		awareness.150 # Planet cracker used OR planet terraformed, chance to gain 20 awareness.
	}
}

on_destroy_planet_with_PLANET_KILLER_SMELTER_queued = {
	events = {
		fircon.5035 #Solarpunk Planet queued
	}
}

on_destroy_planet_with_PLANET_KILLER_SMELTER_unqueued = {
}
