sponge_decisions = {


debug_activate_disaster_se = {
    visible = { is_debug  = yes }
    fire_only_once = no
    is_good = yes
    complete_effect = { set_country_flag = disaster_se_active }
}

debug_activate_fff_all_se = {
    visible = { is_debug  = yes }
    fire_only_once = no
    is_good = yes
    complete_effect = { set_country_flag = fff_all_se_active }
}

debug_activate_fff_bob_se = {
    visible = { is_debug  = yes }
    fire_only_once = no
    is_good = yes
    complete_effect = { set_country_flag = fff_bob_se_active }
}

debug_activate_fff_kra_se = {
    visible = { is_debug  = yes }
    fire_only_once = no
    is_good = yes
    complete_effect = { set_country_flag = fff_kra_se_active }
}

debug_activate_fff_krabob_se = {
    visible = { is_debug  = yes }
    fire_only_once = no
    is_good = yes
    complete_effect = { set_country_flag = fff_krabob_se_active }
}

debug_activate_fff_se = {
    visible = { is_debug  = yes }
    fire_only_once = no
    is_good = yes
    complete_effect = { set_country_flag = fff_se_active }
}

debug_activate_fff_squ_se = {
    visible = { is_debug  = yes }
    fire_only_once = no
    is_good = yes
    complete_effect = { set_country_flag = fff_squ_se_active }
}

debug_activate_fff_squbob_se = {
    visible = { is_debug  = yes }
    fire_only_once = no
    is_good = yes
    complete_effect = { set_country_flag = fff_squbob_se_active }
}

debug_activate_firstwar_se = {
    visible = { is_debug  = yes }
    fire_only_once = no
    is_good = yes
    complete_effect = { set_country_flag = firstwar_se_active }
}

debug_activate_goodend_se = {
    visible = { is_debug  = yes }
    fire_only_once = no
    is_good = yes
    complete_effect = { set_country_flag = goodend_se_active }
}

debug_activate_pat_1_se = {
    visible = { is_debug  = yes }
    fire_only_once = no
    is_good = yes
    complete_effect = { set_country_flag = pat_1_se_active }
}

debug_activate_pat_2_se = {
    visible = { is_debug  = yes }
    fire_only_once = no
    is_good = yes
    complete_effect = { set_country_flag = pat_2_se_active }
}

debug_activate_pat_3_se = {
    visible = { is_debug  = yes }
    fire_only_once = no
    is_good = yes
    complete_effect = { set_country_flag = pat_3_se_active }
}


phase2_move = {
    activation = {
        AND = {
            has_war = yes
            has_focus_tree = plankton_phase2
            NOT = { has_completed_focus = patrick_bus }
        }
    }
    available = {
        has_completed_focus = patrick_bus
    }
    fire_only_once = no
    is_good = no
    days_mission_timeout = 50
    timeout_effect = {
        PAT = { load_oob = "PHASE2_1936" }

        if = {
            limit = {
                check_variable = {
                    var = attack
                    value = 0
                    compare = equals
                }
            }
            country_event = { id = sponge.830 }
        }
        if = {
            limit = {
                check_variable = {
                    var = attack
                    value = 1
                    compare = equals
                }
            }
            country_event = { id = sponge.831 }
        }
        if = {
            limit = {
                check_variable = {
                    var = attack
                    value = 2
                    compare = equals
                }
            }
            country_event = { id = sponge.832 }
        }
        if = {
            limit = {
                check_variable = {
                    var = attack
                    value = 3
                    compare = equals
                }
            }
            country_event = { id = sponge.833 }
        }
        if = {
            limit = {
                check_variable = {
                    var = attack
                    value = 4
                    compare = equals
                }
            }
            country_event = { id = sponge.834 }
        }
        if = {
            limit = {
                check_variable = {
                    var = attack
                    value = 5
                    compare = equals
                }
            }
            country_event = { id = sponge.835 }
        }
        if = {
            limit = {
                check_variable = {
                    var = attack
                    value = 6
                    compare = equals
                }
            }
            country_event = { id = sponge.836 }
        }
        if = {
            limit = {
                check_variable = {
                    var = attack
                    value = 7
                    compare = equals
                }
            }
            country_event = { id = sponge.837 }
        }
        if = {
            limit = {
                check_variable = {
                    var = attack
                    value = 8
                    compare = equals
                }
            }
            country_event = { id = sponge.838 }
        }
        if = {
            limit = {
                check_variable = {
                    var = attack
                    value = 9
                    compare = equals
                }
            }
            country_event = { id = sponge.839 }
        }
        if = {
            limit = {
                check_variable = {
                    var = attack
                    value = 10
                    compare = equals
                }
            }
            country_event = { id = sponge.840 }
        }
    }
    complete_effect = {
 
    }
    cancel_trigger = {
 
    }
}





    krab_move = {
        activation = {
            AND = {
                has_global_flag = fff
                tag = RIR
				NOT = { has_country_flag = failwar_krabs_dead }
 				check_variable = { var = kra_fff_progress value = 100 compare = less_than }
				country_exists = KRA
            }
        }
        available  = {
                  OR = {
                    check_variable = { var = kra_fff_progress value = 100 compare = more_than_or_equals }
                    has_country_flag = failwar_krabs_dead
                    has_country_flag = failwar_krabs_enslaved
                }
 
        }
        fire_only_once = no
        is_good = no
        days_mission_timeout = 65
        cancel_effect = {
 
 }
        timeout_effect   = {
			set_country_flag = {
				flag = white_effect_loop_active
				days = 2
				value = 1
			}
			sound_effect = kra_attack
			clr_country_flag = kra_action_active
			add_to_variable = { var = kra_fff_progress value = 10 }
			KRA = {
				division_template = {
					name = "KRABS" 	
					division_names_group = RIR_INF_01

					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 1 y = 0 }
						infantry = { x = 1 y = 1 }
						infantry = { x = 1 y = 2 }
						infantry = { x = 2 y = 0 }
						infantry = { x = 2 y = 1 }
						infantry = { x = 2 y = 2 }
						infantry = { x = 3 y = 0 }
						infantry = { x = 3 y = 1 }
						infantry = { x = 3 y = 2 }
						infantry = { x = 0 y = 3 }
						infantry = { x = 1 y = 3 }
						infantry = { x = 2 y = 3 }
						infantry = { x = 3 y = 3 }
					}
					support = {
						recon = { x = 0 y = 0 }      		
						artillery = { x = 0 y = 1 }
						engineer = { x = 0 y = 2 }
					}
				}
				every_state = {
				
			 limit = { state_population_k > 333 
			 }

     create_unit = {
        division = "name = \"KRABS\" division_template = \"KRABS\""
        owner = KRA
        count = 25
        allow_spawning_on_enemy_provs = yes
    }
    }
}   	

        }
        cancel_trigger = {
           OR = {
                check_variable = { var = kra_fff_progress value = 100 compare = more_than_or_equals }
                    has_country_flag = failwar_krabs_dead
                    has_country_flag = failwar_krabs_enslaved
            }        }
 

    }
    spongebob_move = {
        activation = {
            AND = {
			country_exists = SPO
                has_global_flag = fff
                tag = RIR
                NOT = { has_country_flag = failwar_sponge_dead }
                 check_variable = { var = spo_fff_progress value = 100 compare = less_than }
            }
        }
        available  = {
                  OR = {
                    check_variable = { var = spo_fff_progress value = 100 compare = more_than_or_equals }
                    has_country_flag = failwar_sponge_dead
                    has_country_flag = failwar_sponge_enslaved
                }
         }
        fire_only_once = no
        is_good = no
        days_mission_timeout = 50
        cancel_effect = {
         }
        timeout_effect  = {
            set_country_flag = {
                flag = yellow_effect_active
                days = 2
				value = 1

            }
			            sound_effect = spo_attack

            add_to_variable = { var = spo_fff_progress value = 15 }
           every_owned_state = {
               limit = {
                    any_neighbor_state = {
					 OR = {
                  is_controlled_by  = SPO
					is_controlled_by  = SQU
                  is_controlled_by  = KRA
                  is_controlled_by  = PAT

                   }                   }

               }
                teleport_armies = {
                }
           }
   
 
        }
        cancel_trigger = {
            OR = {
                check_variable = { var = spo_fff_progress value = 100 compare = more_than_or_equals }
                has_country_flag = failwar_sponge_dead
                has_country_flag = failwar_sponge_enslaved
            }
        }
    }

    squidward_move = {
        activation = {
            AND = {
			country_exists = SQU
                has_global_flag = fff
                tag = RIR
                NOT = { has_country_flag = failwar_squidy_dead }
                 check_variable = { var = squ_fff_progress value = 100 compare = less_than }
            }
        }
        available  = {
                  OR = {
                    check_variable = { var = squ_fff_progress value = 100 compare = more_than_or_equals }
                    has_country_flag = failwar_squidy_dead
                    has_country_flag = failwar_squidy_enslaved
                }
         }
        fire_only_once = no
        is_good = no
        days_mission_timeout = 100
        cancel_effect = {
            
        }
        timeout_effect   = {
            clr_country_flag = squ_action_active
            set_country_flag = {
                flag = red_effect_active
                days = 2
				value = 1
            }
			sound_effect = squid_attack
            add_to_variable = { var = squ_fff_progress value = 20 }
            every_country_division = {
                limit = {
                    unit_organization < 1
                }
                destroy_unit = THIS
            }
        }
        cancel_trigger = {
            OR = {
                check_variable = { var = squ_fff_progress value = 100 compare = more_than_or_equals }
                has_country_flag = failwar_squidy_dead
                has_country_flag = failwar_squidy_enslaved
            }
        }
    }

    patrick_move = {
        activation = {
            AND = {
			country_exists = PAT
                has_global_flag = fff
                tag = RIR
                NOT = { has_country_flag = failwar_patrick_dead }
                 check_variable = { var = pat_fff_progress value = 100 compare = less_than }
            }
        }
        available  = {
                  OR = {
                    check_variable = { var = pat_fff_progress value = 100 compare = more_than_or_equals }
                    has_country_flag = failwar_patrick_dead
                    has_country_flag = failwar_patrick_enslaved
                }
         }
        fire_only_once = no
        is_good = no
        days_mission_timeout = 150
        cancel_effect = {
         }
        timeout_effect   = {
		SPO = {
			load_oob = "SPO_1936"
			load_oob = "SPO_1936"
 
		}
		SQU = {
			load_oob = "SQU_1936"
			load_oob = "SQU_1936"
 
		}
		PAT = {
			load_oob = "PAT_1936"
			load_oob = "PAT_1936"
 
		}
		KRA = {
			load_oob = "KRA_1936"
			load_oob = "KRA_1936"
 
		}
            clr_country_flag = pat_action_active
            set_country_flag = {
                flag = spritesheet_active
                days = 2
				value = 1            
			}
			sound_effect = pat_attack
            add_to_variable = { var = pat_fff_progress value = 50 }
            damage_units = {
               state = 57
                limit = { original_tag = RIR }
                damage = 0.5
                 str_damage = 0.5
                ratio = yes
                 army = yes
                navy = yes
            }
            damage_units = {
               state = 9
                limit = { original_tag = RIR }
                damage = 0.5
                 str_damage = 0.5
                ratio = yes
                 army = yes
                navy = yes
            }
 
        }
        cancel_trigger = {
            OR = {
                check_variable = { var = pat_fff_progress value = 100 compare = more_than_or_equals }
                has_country_flag = failwar_patrick_dead
                has_country_flag = failwar_patrick_enslaved
            }
        }
    }
    unrest_mission = {
        activation = {
            AND = {
                has_country_flag = unrest_bottom
                tag = RIR
            }
        }
        available  = {
					custom_trigger_tooltip = {
				tooltip = unrest_mission_tt
				                AND = {
                    check_variable = { var = unrest_1 value = 0 compare = less_than_or_equals }
                    check_variable = { var = unrest_2 value = 0 compare = less_than_or_equals }
                    check_variable = { var = unrest_3 value = 0 compare = less_than_or_equals }
                    check_variable = { var = unrest_4 value = 0 compare = less_than_or_equals }
                    check_variable = { var = unrest_5 value = 0 compare = less_than_or_equals }
                    check_variable = { var = unrest_6 value = 0 compare = less_than_or_equals }
                    check_variable = { var = unrest_7 value = 0 compare = less_than_or_equals }
                }
 			}

        }
        fire_only_once = yes
        is_good = no
        days_mission_timeout = 100
        timeout_effect = {
 country_event = { id = sponge.666 }
 }
complete_effect = {
    if = {
        limit = {
            has_country_flag = failwar_squidy_dead
            has_country_flag = failwar_krabs_dead   
            has_country_flag = failwar_sponge_dead
               }
clr_global_flag = typepad
clr_global_flag = peacetime
clr_country_flag = unrest_bottom
clr_country_flag = menu_bottom
         country_event = { id = sponge.66661 }
    }
    else = {
         country_event = { id = sponge.16 }
clr_global_flag = typepad
clr_global_flag = peacetime
clr_country_flag = unrest_bottom
clr_country_flag = menu_bottom

    }
}
        cancel_trigger = {
 
        }
    }



    peacetime_mission = {
        activation = {
            AND = {
                has_global_flag = peacetime
                tag = RIR
            }
        }
        available  = {
								has_completed_focus = statue3


        }
        fire_only_once = yes
        is_good = no
        days_mission_timeout = 1500

        timeout_effect = {
 country_event = { id = sponge.6661 }
 }
        complete_effect  = {
         }
        cancel_trigger = {
 
        }
    }
    fff_all = {
    visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { load_focus_tree = fff_all
 } }

    fff_squ = {
    visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { load_focus_tree = fff_squ
 } }
    fff_squbob = {
    visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { load_focus_tree = fff_squbob
 } }
    pat_ded = {
    visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = battle
		 add_to_variable = { attack = 10 }
 } }

    fff_bob = {
    visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { load_focus_tree = fff_bob
 } }

    fff_squkra = {
    visible = { is_debug  = yes }        fire_only_once = no
        is_good = yes
        complete_effect = { load_focus_tree = fff_squkra
 } }
 
    debug_fff_kra = {
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { load_focus_tree = fff_kra
 } }


    debug_pat1 = {
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { load_focus_tree = plankton_phase1
 }
    }
    debug_pat2 = {
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { load_focus_tree = plankton_phase2
 }
    }

    debug_pat3 = {
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { load_focus_tree = plankton_phase3
 }
    }
    # Original Debug Decisions
    debug_activate_green_shit = {
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = green_shit_active }
    }
    debug_activate_grey_shit = {
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = grey_shit_active }
    }
    debug_activate_yellow_effect = {
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = yellow_effect_active }
    }
    debug_activate_red_effect = {
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = red_effect_active }
    }
    debug_activate_spritesheet = {
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = spritesheet_active }
    }
    debug_activate_white_effect_loop = {
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = white_effect_loop_active }
    }
   debug_kill_squidy = {
        name = "Debug: Kill Squidward"
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = {
             set_country_flag = failwar_squidy_dead
             
            set_variable = { failwar_page_number = 1 }
			sound_effect = "disaster_se" 
        }
    }

    debug_kill_krab = {
        name = "Debug: Kill Mr. Krabs"
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = {
             set_country_flag = failwar_krabs_dead
             
            set_variable = { failwar_page_number = 2 }
        }
    }

    debug_kill_patrick = {
        name = "Debug: Kill Patrick"
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = {
             set_country_flag = failwar_patrick_dead
             
            set_variable = { failwar_page_number = 1 }
        }
    }

    debug_kill_sponge = {
        name = "Debug: Kill SpongeBob"
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = {
            # Sets the "dead" flag for SpongeBob.
            set_country_flag = failwar_sponge_dead
            # Resets the GUI to the first page.
            set_variable = { failwar_page_number = 1 }
        }
    }

    debug_revive_all_characters = {
        name = "Debug: Revive All Characters"
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = {
             clr_country_flag = failwar_squidy_dead
            clr_country_flag = failwar_krabs_dead
            clr_country_flag = failwar_patrick_dead
            clr_country_flag = failwar_sponge_dead
         }
    }
    # War Decision
    firstwar_attack = {
        activation = {
            AND = {
                has_global_flag = first_war
                tag = RIR
            }
        }
        available  = {
            controls_state = 36
            has_war = no
        }
        fire_only_once = yes
        is_good = no
        days_mission_timeout = 100
        cancel_effect = {
            add_stability = -0.25
            add_war_support = -0.25
            declare_war_on = { target = PAT type = annex_everything }
            declare_war_on = { target = SPO type = annex_everything }
            declare_war_on = { target = SQU type = annex_everything }
        }
        complete_effect  = {
            add_stability = 0.25
            add_war_support = 0.25
            declare_war_on = { target = PAT type = annex_everything }
            declare_war_on = { target = SPO type = annex_everything }
            declare_war_on = { target = SQU type = annex_everything }

        }
        cancel_trigger = {
            OR = {
                check_variable = { SPO.spo_combat_raw > 99 }
                check_variable = { SPO.spo_health_raw > 99 }
                check_variable = { SPO.spo_industry_raw > 99 }
                check_variable = { SQU.squ_combat_raw > 99 }
                check_variable = { SQU.squ_health_raw > 99 }
                check_variable = { SQU.squ_industry_raw > 99 }
                check_variable = { PAT.pat_combat_raw > 99 }
                check_variable = { PAT.pat_health_raw > 99 }
                check_variable = { PAT.pat_industry_raw > 99 }
                custom_trigger_tooltip = { tooltip = first_war_decisionspo always = no }
                custom_trigger_tooltip = { tooltip = first_war_decisionspat always = no }
                custom_trigger_tooltip = { tooltip = first_war_decisionsqu always = no }
            }
        }
    }
    firstwar_unlock_kra = {
        available = { 
            AND = { 
                controls_state = 21
                original_tag = RIR
            }
        }
    visible = {
            36 = {
                has_dynamic_modifier = { modifier = plot_armor }
            }    }
        fire_only_once = no
        is_good = yes
        complete_effect = {
            36 = {
                remove_dynamic_modifier = { modifier = plot_armor }
            }
        }
    }

    firstwar_unlock_pat = {
        available = {
            AND = {
                controls_state = 26
                original_tag = RIR
            }
        }
    visible = {
            44 = {
                has_dynamic_modifier = { modifier = plot_armor }
            }    }
        fire_only_once = no
        is_good = yes
        complete_effect = {
            44 = {
                remove_dynamic_modifier = { modifier = plot_armor }
            }
        }
    }

    firstwar_unlock_squ = {
        available = {
            AND = {
                controls_state = 25
                original_tag = RIR
            }
        }
    visible = {
            15 = {
                has_dynamic_modifier = { modifier = plot_armor }
            }    }
        fire_only_once = no
        is_good = yes
        complete_effect = {
            15 = {
                remove_dynamic_modifier = { modifier = plot_armor }
            }
        }
    }

    firstwar_unlock_spo = {
        available = {
            AND = {
                controls_state = 39
                original_tag = RIR
            }
        }
    visible = {
            23 = {
                has_dynamic_modifier = { modifier = plot_armor }
            }    }
        fire_only_once = no
        is_good = yes
        complete_effect = {
            23 = {
                remove_dynamic_modifier = { modifier = plot_armor }
            }
        }
    }
	
	
	
	
	
	
 
    debug_activate_pat_dialogue = {
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = pat_dialogue }
    }

    debug_activate_ending_pat = {
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = ending_pat }
    }
    debug_activate_ending_victory = {
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = ending_victory }
    }
    debug_activate_ending_unrest = {
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = ending_unrest }
    }

    debug_activate_ending_all = {
            visible = { is_debug  = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = ending_all }
    }

    debug_activate_ending_bob = {
        visible = { is_debug = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = ending_bob }
    }

    debug_activate_ending_kra = {
        visible = { is_debug = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = ending_kra }
    }

    debug_activate_ending_krabob = {
        visible = { is_debug = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = ending_krabob }
    }

    debug_activate_ending_squ = {
        visible = { is_debug = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = ending_squ }
    }

    debug_activate_ending_squbob = {
        visible = { is_debug = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = ending_squbob }
    }

    debug_activate_ending_squkra = {
        visible = { is_debug = yes }
        fire_only_once = no
        is_good = yes
        complete_effect = { set_country_flag = ending_squkra }
    }
}