Hull
    name = "SH_KRAKEN_2_BODY"
    description = "SH_KRAKEN_2_BODY_DESC"
    speed = 45
    fuel = 4
    stealth = 5
    structure = 100
    slots = [
        Slot type = External position = (0.15, 0.60)
        Slot type = External position = (0.35, 0.80)
        Slot type = External position = (0.70, 0.20)
        Slot type = Internal position = (0.55, 0.45)
    ]
    buildCost = 1
    buildTime = 1
    Unproducible
    tags = [ "PEDIA_HULL_MONSTER_KRAKEN" ]
    location = All
    effectsgroups = [
        [[MONSTER_MOVE_ALWAYS]]
        [[INFINITE_FUEL]]

        EffectsGroup
            scope = And [
                Source
                ContainedBy And [
                    System 
                    Contains Planet type = GasGiant
                ]
            ]
            activation = And [
                Turn low = max(60, Source.LastTurnActiveInBattle + 1)
                //triple the chance of maturing when in a system with Krill
                Random probability = (Source.Age*0.01 - 0.1) * 3^(Statistic If condition = ContainedBy Contains OR [
                    Design name = "SM_KRILL_1"
                    Design name = "SM_KRILL_2" 
                    Design name = "SM_KRILL_3"  
                    Design name = "SM_KRILL_4"
                ])
            ]
            effects = [
                CreateShip designname = "SM_KRAKEN_3" empire = Source.Owner
                Destroy
                GenerateSitRepMessage
                    message = "EFFECT_TAME_MONSTER_MATURED"
                    label = "EFFECT_TAME_MONSTER_MATURED_LABEL"
                    icon = "icons/monsters/kraken-3.png"
                    parameters = [
                        tag = "system" data = Source.SystemID
                        tag = "predefinedshipdesign" data = "SM_KRAKEN_3"
                    ]
                    empire = Source.Owner
            ]
        
         EffectsGroup
            scope = Source
            activation = Source
            effects = [
                SetMaxCapacity partname = "SR_TENTACLE" value = Value + min(Source.Age*0.15, 4)
                SetCapacity partname = "SR_TENTACLE" value = Value + min(Source.Age*0.15, 4)
            ]
        
        [[GOOD_VISION]]
    ]
    icon = ""
    graphic = "icons/monsters/kraken-2.png"

#include "monster.macros"

#include "../ship_hulls.macros"
