﻿DI_agot_dragons_add_size_effect = {
    scope = character

    saved_scopes = {
        target # The character that the effect is being applied to
    }

    effect = {
        random_owned_story = {
            limit = {
                story_type = DI_misc_variables_story
            }
            save_scope_as = DI_story
        }

        save_scope_value_as = {
            name = DI_temp_value
            value = {
                value = scope:DI_story.var:DI_increment_value
                divide = 100
            }
        }

        scope:target = {
            change_dragon_size = {
                VALUE = scope:DI_temp_value
            }
        }
    }
}

DI_agot_dragons_remove_size_effect = {
    scope = character

    saved_scopes = {
        target # The character that the effect is being applied to
    }

    effect = {
        random_owned_story = {
            limit = {
                story_type = DI_misc_variables_story
            }
            save_scope_as = DI_story
        }

        scope:target = {
            save_scope_value_as = {
                name = DI_temp_value
                value = {
                    value = scope:DI_story.var:DI_increment_value
                    divide = 100
                    multiply = -1
                }
            }
            change_dragon_size = {
                VALUE = scope:DI_temp_value
            }
        }
    }
}

DI_agot_dragons_add_draconic_dread_effect = {
    scope = character

    effect = {
        random_owned_story = {
            limit = {
                story_type = DI_misc_variables_story
            }
            save_scope_as = DI_story
        }

        scope:target = {
            save_scope_value_as = {
                name = DI_temp_value
                value = {
                    value = scope:DI_story.var:DI_increment_value
                    divide = 100
                }
            }
            change_draconic_dread = {
                VALUE = scope:DI_temp_value
            }
        }
    }
}

DI_agot_dragons_remove_draconic_dread_effect = {
    scope = character

    effect = {
		random_owned_story = {
            limit = {
                story_type = DI_misc_variables_story
            }
            save_scope_as = DI_story
        }

        scope:target = {
            save_scope_value_as = {
                name = DI_temp_value
                value = {
                    value = scope:DI_story.var:DI_increment_value
                    divide = 100
                    multiply = -1
                }
            }
            change_draconic_dread = {
                VALUE = scope:DI_temp_value
            }
        }
    }
}

DI_agot_dragons_add_temperament_effect = {
    scope = character

    effect = {
		random_owned_story = {
            limit = {
                story_type = DI_misc_variables_story
            }
            save_scope_as = DI_story
        }

        scope:target = {
            save_scope_value_as = {
                name = DI_temp_value
                value = {
                    value = scope:DI_story.var:DI_increment_value
                    divide = 100
                }
            }
            change_temperament = {
                VALUE = scope:DI_temp_value
            }
        }
    }
}

DI_agot_dragons_remove_temperament_effect = {
    scope = character

    effect = {
		random_owned_story = {
            limit = {
                story_type = DI_misc_variables_story
            }
            save_scope_as = DI_story
        }

        scope:target = {
            save_scope_value_as = {
                name = DI_temp_value
                value = {
                    value = scope:DI_story.var:DI_increment_value
                    divide = 100
                    multiply = -1
                }
            }
            change_temperament = {
                VALUE = scope:DI_temp_value
            }
        }
    }
}