Tech
    name = "LRN_PSY_DOM"
    description = "LRN_PSY_DOM_DESC"
    short_description = "MIND_CONTROL_SHORT_DESC"
    category = "LEARNING_CATEGORY"
    researchcost = 750 * [[TECH_COST_MULTIPLIER]]
    researchturns = 7
    tags = [ "PEDIA_LEARNING_CATEGORY" ]
    prerequisites = [
        "LRN_UNIF_CONC"
        "LRN_TIME_MECH"
    ]
    effectsgroups =
        EffectsGroup
            scope = And [
                Ship
                Not OwnedBy empire = Source.Owner
                VisibleToEmpire empire = Source.Owner
                Random probability = 0.1
                Not Monster
                /// @content_tag{TELEPATHIC} For ships with this tag, prevents chance of ownership loss to suitable planet
                Not HasTag name = "TELEPATHIC"
                Not OwnerHasTech name = "LRN_PSY_DOM"
                ContainedBy And [
                    System
                    Contains And [
                        Planet
                        OwnedBy empire = Source.Owner
                        /// @content_tag{TELEPATHIC} On owned planet with focus FOCUS_DOMINATION and this tag, chance of taking ownership of suitable ships
                        HasTag name = "TELEPATHIC"
                        Focus type = "FOCUS_DOMINATION"
                    ]
                ]
            ]
            effects = [
                GenerateSitRepMessage
                    message = "EFFECT_PSY_DOM"
                    label = "EFFECT_PSY_DOM_LABEL"
                    icon = "icons/sitrep/ship_produced.png"
                    parameters = [
                        tag = "empire" data = Target.Owner
                        tag = "ship" data = Target.ID
                    ]
                    empire = Target.Owner
                GenerateSitRepMessage
                    message = "EFFECT_PSY_DOM"
                    label = "EFFECT_PSY_DOM_LABEL"
                    icon = "icons/sitrep/ship_produced.png"
                    parameters = [
                        tag = "empire" data = Target.Owner
                        tag = "ship" data = Target.ID
                    ]
                    empire = Source.Owner
                SetOwner empire = Source.Owner
            ]
    graphic = "icons/tech/psychogenic_domination.png"

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