#textdomain wesnoth-did
# Reflects (melee) damage
[unit]
    id=Mirror
    name=""
    race=mechanical
    image="scenery/slab1.png"
    [defend]
        [frame]
            begin=-150
            end=150
            image="scenery/slab1.png"
        [/frame]
    [/defend]
    hitpoints=100
    movement_type=none
    movement=1
    [defense]
        deep_water=1
        shallow_water=1
        swamp_water=1
        grassland=1
        sand=1
        forest=1
        hills=1
        mountains=1
        village=1
        castle=1
        cave=1
        tundra=1
        canyon=1
        cavewall=1
        fungus=1
    [/defense]
    [resistance]
        blade=100
        pierce=100
        impact=100
        fire=100
        cold=100
        arcane=80
    [/resistance]
    experience=150
    level=0
    alignment=chaotic
    advanceto=null
    {AMLA_DEFAULT}
    cost=1
    usage=fighter
    hide_help=true
    unit_description=_ "A slab of rock. It vaguely resembles an altar."
    # NEED HIGH RESISTANCES AND NO MOVEMENT
    [attack]
        name=reflect
        description=_ "reflect"
        type=blade
        range=melee
        damage=1
        number=0
        icon=attacks/blank-attack.png
        [specials]
            [chance_to_hit]
                id=reflect_cth
                name=""
                description=""
                value=100
                cumulative=yes
                apply_to=both
            [/chance_to_hit]
        [/specials]
    [/attack]

    [event]
        name=start

        [store_unit]
            [filter]
                description=Malin Keshar
            [/filter]

            kill=no
            variable=stored_Malin
        [/store_unit]

        [store_unit]
            [filter]
                type=Mirror
            [/filter]

            kill=no
            variable=stored_mirror
        [/store_unit]

        {VARIABLE stored_mirror.attack.damage $stored_Malin.attack[0].damage}
        {VARIABLE stored_mirror.attack.number $stored_Malin.attack[0].number}
        {VARIABLE stored_mirror.attack.type $stored_Malin.attack[0].type}
        {VARIABLE stored_mirror.attack.icon $stored_Malin.attack[0].icon}

        [unstore_unit]
            variable=stored_mirror
            find_vacant=no
        [/unstore_unit]

        {CLEAR_VARIABLE stored_Malin}
        {CLEAR_VARIABLE stored_mirror}
    [/event]
[/unit]
