#textdomain wesnoth
#define TERRAIN_ADJACENT_CORNER_LAYER TERRAIN1 TERRAIN2 TERRAIN3 LAYER BASE_POSITION IMAGESTEM
    [terrain_graphics]
        map="
3
,  2
1"
        [tile]
            pos=1
            type={TERRAIN1}
        [/tile]
        [tile]
            pos=2
            type={TERRAIN2}
        [/tile]
        [tile]
            pos=3
            type={TERRAIN3}
        [/tile]

        [image]
            base={BASE_POSITION}
            layer={LAYER}
            name={IMAGESTEM}-@R0
        [/image]
        rotations=ne,e,se,sw,w,nw
    [/terrain_graphics]
#enddef

#define TERRAIN_ADJACENT_CORNER TERRAIN1 TERRAIN2 TERRAIN3 BASE_POSITION IMAGESTEM
    [terrain_graphics]
        map="
3
,  2
1"
        [tile]
            pos=1
            type={TERRAIN1}
        [/tile]
        [tile]
            pos=2
            type={TERRAIN2}
        [/tile]
        [tile]
            pos=3
            type={TERRAIN3}
        [/tile]

        [image]
            base={BASE_POSITION}
            name={IMAGESTEM}-@R0
        [/image]
        rotations=ne,e,se,sw,w,nw
    [/terrain_graphics]
#enddef

#define TERRAIN_ADJACENT_CORNER_FLAG1 TERRAIN1 TERRAIN2 TERRAIN3 BASE_POSITION FLAG IMAGESTEM
    [terrain_graphics]
        map="
3
, 2
1"
        [tile]
            pos=1
            type={TERRAIN1}
            has_flag={FLAG}
        [/tile]
        [tile]
            pos=2
            type={TERRAIN2}
        [/tile]
        [tile]
            pos=3
            type={TERRAIN3}
        [/tile]

        [image]
            base={BASE_POSITION}
            name={IMAGESTEM}-@R0
        [/image]
        rotations=ne,e,se,sw,w,nw
    [/terrain_graphics]
#enddef

#define TERRAIN_ADJACENT_CORNER_PROB TERRAIN1 TERRAIN2 TERRAIN3 BASE_POSITION IMAGESTEM PROB
    [terrain_graphics]
        map="
3
,  2
1"
        [tile]
            pos=1
            type={TERRAIN1}
            set_flag=fence-@R0
            no_flag=fence-@R0
        [/tile]
        [tile]
            pos=2
            type={TERRAIN2}
        [/tile]
        [tile]
            pos=3
            type={TERRAIN3}
        [/tile]

        [image]
            base={BASE_POSITION}
            name={IMAGESTEM}-@R0
        [/image]
        probability={PROB}
        rotations=ne,e,se,sw,w,nw
    [/terrain_graphics]
#enddef
