﻿oath_warriors_building_01 = {
    construction_time = standard_construction_time
    
	can_construct_potential = {
        scope:holder = {
            has_variable = provide_for_the_warriors_oath
        }
	}  

	cost = {
    	gold = cheap_building_tier_1_cost
    	prestige = 125
    }
	
	character_modifier = {
		knight_limit = 1
        knight_effectiveness_mult = 0.1
	}
	province_modifier = {
		stationed_maa_damage_mult = 0.1
        stationed_maa_toughness_mult = 0.05
	}
	
	next_building = oath_warriors_building_02

	type_icon = "oath_warriors_building.dds"
	
	ai_value = {
		base = 1000
        modifier = {
            factor = 0
            scope:holder = {
                any_directly_owned_province = {
                    count >= 3
                    has_building_or_higher = oath_warriors_building_01
                }
            }
        }
	}
}

oath_warriors_building_02 = {

    cost = {
    	gold = cheap_building_tier_2_cost
    	prestige = 250
    }
    construction_time = standard_construction_time
	
    character_modifier = {
		knight_limit = 1
        knight_effectiveness_mult = 0.1
        men_at_arms_maintenance = -0.01
	}

	province_modifier = {
		stationed_maa_damage_mult = 0.15
        stationed_maa_toughness_mult = 0.07
	}

    next_building = oath_warriors_building_03
	type_icon = "oath_warriors_building.dds"
	
	ai_value = {
		base = 1000
	}
}

oath_warriors_building_03 = {

	cost = {
    	gold = cheap_building_tier_3_cost
    	prestige = 375
    }
    construction_time = standard_construction_time
	
	character_modifier = {
		knight_limit = 1
        knight_effectiveness_mult = 0.1
        men_at_arms_maintenance = -0.03
	}

	province_modifier = {
		stationed_maa_damage_mult = 0.2
        stationed_maa_toughness_mult = 0.1
        stationed_maa_siege_value_add = 0.1
	}

	type_icon = "oath_warriors_building.dds"
    next_building = oath_warriors_building_04
	
	ai_value = {
		base = 100
	}
}

oath_warriors_building_04 = {

    can_construct_showing_failures_only = {
        custom_tooltip = {
            text = oath_warriors_building_04_tooltip
            has_province_modifier = oath_provide_for_the_warriors_province
        }
    }

	cost = {
    	gold = cheap_building_tier_4_cost
    	prestige = 500
    }
    construction_time = standard_construction_time
	
	province_modifier = {
		stationed_maa_damage_mult = 0.3
        stationed_maa_toughness_mult = 0.2
        stationed_maa_siege_value_add = 0.2
	}

    character_modifier = {
        men_at_arms_maintenance = -0.05
        knight_limit = 1
        knight_effectiveness_mult = 0.15
    }

	type_icon = "oath_warriors_building.dds"
	
	ai_value = {
		base = 100
	}
}

oath_faithful_building_01 = {

    can_construct_potential = {
        scope:holder = {
            has_variable = provide_for_the_faithful_oath
        }
    }

    is_enabled = {
        faith = scope:holder.faith
    }

    can_construct_showing_failures_only = {
        faith = scope:holder.faith
    }   

    cost = {
    	gold = cheap_building_tier_1_cost
    	piety = 100
    }
    construction_time = standard_construction_time
    
    character_modifier = {
        monthly_piety_gain_mult = 0.025
    }

    province_modifier ={
        monthly_income = poor_building_tax_tier_1
    }
    
    next_building = oath_faithful_building_02

    type_icon = "oath_faithful_building.dds"
    
    ai_value = {
		base = 1000
        modifier = {
            factor = 0
            scope:holder = {
                any_directly_owned_province = {
                    count >= 3
                    has_building_or_higher = oath_faithful_building_01
                }
            }  
        }
	}
}

oath_faithful_building_02 = {

    is_enabled = {
        faith = scope:holder.faith
    }

    can_construct_showing_failures_only = {
        faith = scope:holder.faith
    }

    cost = {
    	gold = cheap_building_tier_2_cost
    	piety = 200
    }
    construction_time = standard_construction_time
    
    character_modifier = {
        monthly_piety_gain_mult = 0.05
    }

    province_modifier ={
        monthly_income = poor_building_tax_tier_2
        epidemic_resistance = 4
    }

    next_building = oath_faithful_building_03

    type_icon = "oath_faithful_building.dds"
    
    ai_value = {
        base = 100
    }
}

oath_faithful_building_03 = {

    is_enabled = {
        faith = scope:holder.faith
    }

    next_building = oath_faithful_building_04

    can_construct_showing_failures_only = {
        faith = scope:holder.faith
    }

    cost = {
    	gold = cheap_building_tier_3_cost
    	piety = 300
    }
    construction_time = standard_construction_time
    
    character_modifier = {
        monthly_piety_gain_mult = 0.075
    }

    province_modifier = {
        monthly_income = poor_building_tax_tier_3
        epidemic_resistance = 8
    }

    type_icon = "oath_faithful_building.dds"
    
    ai_value = {
        base = 100
    }
}

oath_faithful_building_04 = {

    is_enabled = {
        faith = scope:holder.faith
    }

    can_construct_showing_failures_only = {
        faith = scope:holder.faith
        custom_tooltip = {
            text = oath_faithful_building_04_tooltip
            has_province_modifier = oath_provide_for_the_faithful_province
        }
    }

    cost = {
    	gold = cheap_building_tier_4_cost
    	piety = 400
    }
    construction_time = standard_construction_time
    
    character_modifier = {
        monthly_piety_gain_mult = 0.1
        monthly_piety = 0.1
        clergy_opinion = 4
    }

    province_modifier = {
        monthly_income = poor_building_tax_tier_4
        epidemic_resistance = 12
    }

    type_icon = "oath_faithful_building.dds"
    
    ai_value = {
        base = 100
    }
}

oath_poor_building_01 = {

    can_construct_potential = {
        scope:holder = {
            has_variable = provide_for_the_poor_oath
        }
    }   

    cost = {
    	gold = cheap_building_tier_1_cost
    	prestige = 125
    }
    construction_time = standard_construction_time

    county_modifier = {
        tax_mult = -0.05
        development_growth = 0.05
        county_opinion_add = 10
    }
    
    next_building = oath_poor_building_02

    type_icon = "oath_poor_building.dds"
    
    ai_value = {
        base = 1000
    }
}

oath_poor_building_02 = {

    cost = {
    	gold = cheap_building_tier_2_cost
    	prestige = 250
    }
    construction_time = standard_construction_time
    
    county_modifier = {
        tax_mult = -0.1
        development_growth_factor = 0.05
        development_growth = 0.1
        county_opinion_add = 15
    }

    next_building = oath_poor_building_03

    type_icon = "oath_poor_building.dds"
    
    ai_value = {
        base = 100
    }
}

oath_poor_building_03 = {

    cost = {
    	gold = cheap_building_tier_3_cost
    	prestige = 375
    }
    construction_time = standard_construction_time
    
    county_modifier = {
        tax_mult = -0.2
        development_growth_factor = 0.15
        development_growth = 0.2
        county_opinion_add = 20
    }

    next_building = oath_poor_building_04

    type_icon = "oath_poor_building.dds"
    
    ai_value = {
        base = 100
    }
}

oath_poor_building_04 = {

    can_construct_showing_failures_only = {
        custom_tooltip = {
            text = oath_poor_building_04_tooltip
            has_province_modifier = oath_provide_for_the_poor_province
        }    
    }

    cost = {
    	gold = cheap_building_tier_4_cost
    	prestige = 500
    }
    construction_time = standard_construction_time
    
    county_modifier = {
        tax_mult = -0.3
        development_growth_factor = 0.2
        development_growth = 0.3
        county_opinion_add = 30
    }

    type_icon = "oath_poor_building.dds"
    
    ai_value = {
        base = 100
    }
}
