#textdomain wesnoth

#macros with complex behaviours, mainly build by assembling the basics from internal-generics

##########################################
############ GENERIC #####################
##########################################

# take one of the images IMAGESTEM#
# the chances are the same for all available images, even if the last ones are missing
#define GENERIC_SINGLE_RANDOM_LFB TERRAIN LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_SINGLE_PLFB ({TERRAIN}) 100  {LAYER} {FLAG} {BUILDER} {IMAGESTEM}@V}
#enddef

#define GENERIC_RESTRICTED_RANDOM_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM ROTATION
    {GENERIC_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100  {LAYER} {FLAG} {BUILDER} {IMAGESTEM}@V {ROTATION}}
#enddef

#define GENERIC_RESTRICTED2_RANDOM_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM ROTATION
    {GENERIC_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100  {LAYER} {FLAG} {BUILDER} {IMAGESTEM}@V {ROTATION}}
#enddef

#define GENERIC_RESTRICTED3_RANDOM_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM ROTATION
    {GENERIC_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100  {LAYER} {FLAG} {BUILDER} {IMAGESTEM}@V {ROTATION}}
#enddef

#define GENERIC_COMPLETE_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {GENERIC_RESTRICTED3_RANDOM_LFB  ({TERRAIN})  ({ADJACENT}) {LAYER} {FLAG} {BUILDER} {IMAGESTEM}-small (-@R0-@R1-@R2)}
    {GENERIC_RESTRICTED3_RANDOM_LFB   ({TERRAIN}) ({ADJACENT}) {LAYER} {FLAG} {BUILDER} {IMAGESTEM}-small ()}
    {GENERIC_RESTRICTED2_RANDOM_LFB  ({TERRAIN})  ({ADJACENT}) {LAYER} {FLAG} {BUILDER} {IMAGESTEM}-small (-@R0-@R1)}
    {GENERIC_RESTRICTED2_RANDOM_LFB   ({TERRAIN}) ({ADJACENT}) {LAYER} {FLAG} {BUILDER} {IMAGESTEM}-small ()}
    {GENERIC_RESTRICTED_RANDOM_LFB   ({TERRAIN})  ({ADJACENT}) {LAYER} {FLAG} {BUILDER} {IMAGESTEM}-small (-@R0)}
    {GENERIC_RESTRICTED_RANDOM_LFB   ({TERRAIN})  ({ADJACENT}) {LAYER} {FLAG} {BUILDER} {IMAGESTEM}-small ()}
    {GENERIC_SINGLE_RANDOM_LFB       ({TERRAIN})               {LAYER} {FLAG} {BUILDER} {IMAGESTEM}}
#enddef

##########################################
############ BORDER ######################
##########################################

# take one of the images IMAGESTEM#
# the chances are the same for all available images, even if the last ones are missing

#define BORDER_RESTRICTED_RANDOM_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {BORDER_RESTRICTED_PLFB ({TERRAIN}) ({ADJACENT}) 100  {LAYER} {FLAG} {BUILDER} {IMAGESTEM}@V}
#enddef

#define BORDER_RESTRICTED2_RANDOM_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {BORDER_RESTRICTED2_PLFB ({TERRAIN}) ({ADJACENT}) 100 {LAYER} {FLAG} {BUILDER} {IMAGESTEM}@V}
#enddef

#define BORDER_RESTRICTED3_RANDOM_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {BORDER_RESTRICTED3_PLFB ({TERRAIN}) ({ADJACENT}) 100 {LAYER} {FLAG} {BUILDER} {IMAGESTEM}@V}
#enddef

#define BORDER_RESTRICTED4_RANDOM_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {BORDER_RESTRICTED4_PLFB ({TERRAIN}) ({ADJACENT}) 100 {LAYER} {FLAG} {BUILDER} {IMAGESTEM}@V}
#enddef

#define BORDER_RESTRICTED5_RANDOM_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {BORDER_RESTRICTED5_PLFB ({TERRAIN}) ({ADJACENT}) 100 {LAYER} {FLAG} {BUILDER} {IMAGESTEM}@V}
#enddef

#define BORDER_RESTRICTED6_RANDOM_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {BORDER_RESTRICTED6_PLFB ({TERRAIN}) ({ADJACENT}) 100 {LAYER} {FLAG} {BUILDER} {IMAGESTEM}@V}
#enddef

#define BORDER_COMPLETE_LFB TERRAIN ADJACENT LAYER FLAG BUILDER IMAGESTEM
    {BORDER_RESTRICTED6_RANDOM_LFB  ({TERRAIN})  ({ADJACENT}) {LAYER} {FLAG} {BUILDER} {IMAGESTEM}}
    {BORDER_RESTRICTED5_RANDOM_LFB  ({TERRAIN})  ({ADJACENT}) {LAYER} {FLAG} {BUILDER} {IMAGESTEM}}
    {BORDER_RESTRICTED4_RANDOM_LFB  ({TERRAIN})  ({ADJACENT}) {LAYER} {FLAG} {BUILDER} {IMAGESTEM}}
    {BORDER_RESTRICTED3_RANDOM_LFB  ({TERRAIN})  ({ADJACENT}) {LAYER} {FLAG} {BUILDER} {IMAGESTEM}}
    {BORDER_RESTRICTED2_RANDOM_LFB  ({TERRAIN})  ({ADJACENT}) {LAYER} {FLAG} {BUILDER} {IMAGESTEM}}
    {BORDER_RESTRICTED_RANDOM_LFB   ({TERRAIN})  ({ADJACENT}) {LAYER} {FLAG} {BUILDER} {IMAGESTEM}}
    {BORDER_RESTRICTED_RANDOM_LFB   ({TERRAIN})  ({ADJACENT}) {LAYER} {FLAG} {BUILDER} {IMAGESTEM}}
#enddef
