Tech
    name = "DEF_DEFENSE_NET_1"
    description = "DEF_DEFENSE_NET_1_DESC"
    short_description = "DEFENSE_SHORT_DESC"
    category = "DEFENSE_CATEGORY"
    researchcost = 16 * [[TECH_COST_MULTIPLIER]]
    researchturns = 3
    tags = [ "PEDIA_DEFENSE_CATEGORY" ]
    prerequisites = "DEF_ROOT_DEFENSE"
    effectsgroups = [
        [[EG_DEFENSE_NET(5,1)]]
    ]
    graphic = "icons/tech/defense.png"

Tech
    name = "DEF_DEFENSE_NET_2"
    description = "DEF_DEFENSE_NET_2_DESC"
    short_description = "DEFENSE_SHORT_DESC"
    category = "DEFENSE_CATEGORY"
    researchcost = 80 * [[TECH_COST_MULTIPLIER]]
    researchturns = 4
    tags = [ "PEDIA_DEFENSE_CATEGORY" ]
    prerequisites = "DEF_DEFENSE_NET_1"
    effectsgroups = [
        [[EG_DEFENSE_NET(15,2)]]
    ]
    graphic = "icons/tech/defense.png"

Tech
    name = "DEF_DEFENSE_NET_3"
    description = "DEF_DEFENSE_NET_3_DESC"
    short_description = "DEFENSE_SHORT_DESC"
    category = "DEFENSE_CATEGORY"
    researchcost = 160 * [[TECH_COST_MULTIPLIER]]
    researchturns = 6
    tags = [ "PEDIA_DEFENSE_CATEGORY" ]
    prerequisites = "DEF_DEFENSE_NET_2"
    effectsgroups = [
        [[EG_DEFENSE_NET(25,3)]]
    ]
    graphic = "icons/tech/defense.png"

Tech
    name = "DEF_DEFENSE_NET_REGEN_1"
    description = "DEF_DEFENSE_NET_REGEN_1_DESC"
    short_description = "DEFENSE_SHORT_DESC"
    category = "DEFENSE_CATEGORY"
    researchcost = 60 * [[TECH_COST_MULTIPLIER]]
    researchturns = 6
    tags = [ "PEDIA_DEFENSE_CATEGORY" ]
    prerequisites = "DEF_DEFENSE_NET_2"
    effectsgroups =
        EffectsGroup
            scope = And [
                Planet
                OwnedBy empire = Source.Owner
            ]
            effects = SetDefense value = Value + 0.1*Target.MaxDefense
    graphic = "icons/tech/defense_regeneration.png"

Tech
    name = "DEF_DEFENSE_NET_REGEN_2"
    description = "DEF_DEFENSE_NET_REGEN_2_DESC"
    short_description = "DEFENSE_SHORT_DESC"
    category = "DEFENSE_CATEGORY"
    researchcost = 160 * [[TECH_COST_MULTIPLIER]]
    researchturns = 8
    tags = [ "PEDIA_DEFENSE_CATEGORY" ]
    prerequisites = "DEF_DEFENSE_NET_REGEN_1"
    effectsgroups =
        EffectsGroup
            scope = And [
                Planet
                OwnedBy empire = Source.Owner
            ]
            effects = SetDefense value = Value + max(0.1*Target.MaxDefense, 0.25*Target.Construction)
    graphic = "icons/tech/defense_regeneration.png"

EG_DEFENSE_NET
'''EffectsGroup
    scope = And [
        Planet
        OwnedBy empire = Source.Owner
    ]
    stackinggroup = "DEFENSE_NET_STACK_@2@"
    priority = [[DEFAULT_PRIORITY]]
    effects = SetMaxDefense value = Value + ( @1@ * [[PLANET_DEFENSE_FACTOR]] ) accountinglabel = "DEF_DEFENSE_NET_@2@"
'''

#include "/scripting/common/base_prod.macros"

#include "/scripting/common/priorities.macros"

#include "/scripting/common/misc.macros"

