Hull
    name = "SH_SNOWFLAKE_1_BODY"
    description = "SH_SNOWFLAKE_1_BODY_DESC"
    speed = 55
    fuel = 5
    NoDefaultFuelEffect
    stealth = 15
    structure = 25
    slots = [
        Slot type = External position = (0.20, 0.15)
        Slot type = External position = (0.40, 0.15)
        Slot type = External position = (0.60, 0.15)
        Slot type = Internal position = (0.50, 0.65)
    ]
    buildCost = 1
    buildTime = 1
    Unproducible
    tags = [ "PEDIA_HULL_MONSTER_SNOWFLAKE" ]
    location = All
    effectsgroups = [
        EffectsGroup    // remove self and recreate on first turn, so that it starts with age 0
            scope = Source
            activation = Turn high = 1
            effects = [
                CreateShip designname = "SM_SNOWFLAKE_1"
                Destroy
            ]

        EffectsGroup
            scope = NumberOf number = 2 condition = And [
                Planet
                Planet size = Small
                Not WithinStarlaneJumps jumps = 2 condition = And [
                    System
                    Contains And [
                        Planet
                        OwnedBy affiliation = AnyEmpire
                    ]
                ]
            ]
            activation = Not Turn low = 1
            stackinggroup = "GAME_START_MOD_STACK"
            accountinglabel = "ADD_NEST_SPECIAL_EFFECT_1"
            effects = AddSpecial name = "SNOWFLAKE_NEST_SPECIAL"

        [[MONSTER_MOVE_ALWAYS]]
        [[INFINITE_FUEL]]
        [[ADD_HULL_FUEL_TO_MAX_FUEL_METER]]
        [[MONSTER_SHIELD_REGENERATION]]

        EffectsGroup
            scope = And [
                Source
                ContainedBy And [
                    System 
                    Contains Planet size = Small
                ]
            ]
            activation = And [
                Turn low = max(30, LocalCandidate.LastTurnActiveInBattle + 1)
                Random probability = Source.Age*0.01 - 0.1
            ]
            accountinglabel = "SNOWFLAKE_GROWTH_LABEL"
            effects = [
                CreateShip designname = "SM_SNOWFLAKE_2" empire = Source.Owner
                Destroy
                GenerateSitRepMessage
                    message = "EFFECT_TAME_MONSTER_MATURED"
                    label = "EFFECT_TAME_MONSTER_MATURED_LABEL"
                    icon = "icons/monsters/snowflake-2.png"
                    parameters = [
                        tag = "system" data = Source.SystemID
                        tag = "predefinedshipdesign" data = "SM_SNOWFLAKE_2"
                    ]
                    empire = Source.Owner
            ]
        [[EXCELLENT_VISION]]
    ]
    icon = ""
    graphic = "icons/monsters/snowflake-1.png"

#include "monster.macros"

#include "../ship_hulls.macros"
