Policy
    name = "PLC_ENVIRONMENTALISM"
    description = "PLC_ENVIRONMENTALISM_DESC"
    short_description = "PLC_ENVIRONMENTALISM_SHORT_DESC"
    category = "ECONOMIC_CATEGORY"
    adoptioncost = floor(2.0 * [[POPULATION_OWNED_BY_EMPIRE]]^0.5)
    exclusions = [ "PLC_INDUSTRIALISM" "PLC_TERRAFORMING" ]
    effectsgroups = [
        [[SPECIES_LIKES_OR_DISLIKES_POLICY_STABILITY_EFFECTS]]

        EffectsGroup
            scope = And [
                Planet
                OwnedBy empire = Source.Owner
                Species
            ]
            priority = [[TARGET_AFTER_SCALING_PRIORITY]]
            effects = [
                SetTargetIndustry value = Value
                    + (NamedReal name = "PLC_ENVIRONMENTALISM_TARGET_INDUSTRY_FLAT" value = -5)
                SetTargetConstruction value = Value
                    + (NamedReal name = "PLC_ENVIRONMENTALISM_TARGET_CONSTRUCTION_FLAT" value = -10)
            ]

        EffectsGroup
            scope = And [
                Planet
                OwnedBy empire = Source.Owner
                Not Planet type = LocalCandidate.OriginalType
                Species
            ]
            priority = [[TARGET_AFTER_SCALING_PRIORITY]]
            effects = [
                SetTargetConstruction value = Value
                    + (NamedReal name = "PLC_ENVIRONMENTALISM_TARGET_CONSTRUCTION_TERRAFORMED_FLAT" 
                                 value = -20)
                SetTargetHappiness value = Value
                    + (NamedReal name = "PLC_ENVIRONMENTALISM_TARGET_HAPPINESS_FLAT" value = -10)
                SetTargetInfluence value = Value
                    + (NamedReal name = "PLC_ENVIRONMENTALISM_TARGET_INFLUENCE_FLAT" value = -5)
            ]

        EffectsGroup
            scope = And [
                Planet
                OwnedBy empire = Source.Owner
                Planet type = LocalCandidate.OriginalType
                Not Contains Building
                Not Focus type = "FOCUS_INDUSTRY"
                Population low = 0.001
            ]
            priority = [[TARGET_AFTER_SCALING_PRIORITY]]
            effects = [
                SetTargetHappiness value = Value
                    + (NamedReal name = "PLC_ENVIRONMENTALISM_TARGET_HAPPINESS_ORIGINAL_FLAT"
                                 value = 5)
                SetTargetInfluence value = Value
                    + (NamedReal name = "PLC_ENVIRONMENTALISM_TARGET_INFLUENCE_ORIGINAL_FLAT"
                                 value = 1)
                SetTargetResearch value = Value
                    + (NamedReal name = "PLC_ENVIRONMENTALISM_TARGET_RESEARCH_ORIGINAL_FLAT"
                                 value = 3)
                SetStealth value = Value
                    + (NamedReal name = "PLC_ENVIRONMENTALISM_STEALTH_ORIGINAL_FLAT" value = 10)
            ]            
    ]
    graphic = "icons/policies/economic_environmentalism.png"

#include "/scripting/macros/base_prod.macros"
#include "/scripting/macros/priorities.macros"
#include "/scripting/policies/policies.macros"
