/*
Copyright (C) 2005 David Green <green@couchpotato.net>
All Rights Reserved.

This file is part of Aelfengard.

Aelfengard is proprietary software. You may not redistribute it without
prior written permission from the copyright holder.
*/

package common;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public enum FaceModel {
    ELF_M1("elf_m1", new FacePart[] {
            new FacePart("../bgblue.png"),
            new FacePart("head.png"),
            new FacePart("Eyes", 12),
            new FacePart("Ears", 12),
            new FacePart("Nose", 12),
            new FacePart("Mouth", 12),
            new FacePart("Hair", 12),
            new FacePart("../border.png"),
    }),
    ELF_F1("elf_f1", new FacePart[] {
            new FacePart("../bgblue.png"),
            new FacePart("head.png"),
            new FacePart("Eyes", 12),
            new FacePart("Ears", 12),
            new FacePart("Nose", 12),
            new FacePart("Mouth", 12),
            new FacePart("Hair", 12),
            new FacePart("../border.png"),
    }),
    KITHIAN_M1("kithian_m1", new FacePart[] {
            new FacePart("../bgblue.png"),
            new FacePart("head.png"),
            new FacePart("Chin", 12),
            new FacePart("Eyes", 11),
            new FacePart("Nose", 12),
            new FacePart("Mouth", 12),
            new FacePart("../border.png"),
    }),
    KITHIAN_F1("kithian_f1", new FacePart[] {
            new FacePart("../bgblue.png"),
            new FacePart("head.png"),
            new FacePart("Chin", 12),
            new FacePart("Eyes", 10),
            new FacePart("Nose", 10),
            new FacePart("Mouth", 10),
            new FacePart("../border.png"),
    }),
    MERKREEL_F1("merkreel_f1", new FacePart[] {
            new FacePart("../bgyellow.png"),
            new FacePart("head.png"),
            new FacePart("Eyes", 8),
            new FacePart("Nose", 10),
            new FacePart("Mouth", 10),
            new FacePart("Hair", 8),
            new FacePart("../border.png"),
    }),
    MERKREEL_M1("merkreel_m1", new FacePart[] {
            new FacePart("../bgyellow.png"),
            new FacePart("head.png"),
            new FacePart("Eyes", 8),
            new FacePart("Nose", 12),
            new FacePart("Mouth", 12),
            new FacePart("Hair", 14),
            new FacePart("../border.png"),
    }),
    MINOTAUR_F1("minotaur_f1", new FacePart[] {
            new FacePart("../bgblue.png"),
            new FacePart("head.png"),
            new FacePart("Ears", 5),
            new FacePart("Eyes", 6),
            new FacePart("Nose", 8),
            new FacePart("Horns", 6),
            new FacePart("../border.png"),
    }),
    MINOTAUR_M1("minotaur_m1", new FacePart[] {
            new FacePart("../bgblue.png"),
            new FacePart("head.png"),
            new FacePart("Horns", 14),
            new FacePart("Eyes", 8),
            new FacePart("Nose", 5),
            new FacePart("../border.png"),
    }),
    PIXIE_M1("pixie_m1", new FacePart[] {
            new FacePart("../bgblue.png"),
            new FacePart("Wings", 18),
            new FacePart("body.png"),
            new FacePart("Lower", 8),
            new FacePart("Upper", 12),
            new FacePart("Hair", 10),
            new FacePart("../border.png"),
    }),
    PIXIE_F1("pixie_f1", new FacePart[] {
            new FacePart("../bgblue.png"),
            new FacePart("Wings", 18),
            new FacePart("body.png"),
            new FacePart("Lower", 9),
            new FacePart("Upper", 12),
            new FacePart("Hair", 10),
            new FacePart("../border.png"),
    }),
    GNOLL_M1("gnoll_m1", new FacePart[] {
            new FacePart("../bgblue.png"),
            new FacePart("Body", 3),
            new FacePart("Ears", 10),
            new FacePart("Eyes", 14),
            new FacePart("Nose", 4),
            new FacePart("Mouth", 12),
            new FacePart("../border.png"),
    }),
    GNOLL_F1("gnoll_f1", new FacePart[] {
            new FacePart("../bgblue.png"),
            new FacePart("body.png"),
            new FacePart("Ears", 16),
            new FacePart("Eyes", 16),
            new FacePart("Nose", 4),
            new FacePart("Mouth", 12),
            new FacePart("../border.png"),
    }),
    GOBLIN_F1("goblin_f1", new FacePart[] {
            new FacePart("../bgblue.png"),
            new FacePart("body.png"),
            new FacePart("Ears", 5),
            new FacePart("Eyes", 12),
            new FacePart("Nose", 5),
            new FacePart("Mouth", 12),
            new FacePart("../border.png"),
    }),
    GOBLIN_F2("goblin_f2", new FacePart[] {
            new FacePart("../bgblue.png"),
            new FacePart("body.png"),
            new FacePart("Eyes", 10),
            new FacePart("Nose", 5),
            new FacePart("Mouth", 12),
            new FacePart("Ears", 6),
            new FacePart("../border.png"),
    }),
    GOBLIN_M1("goblin_m1", new FacePart[] {
            new FacePart("../bgblue.png"),
            new FacePart("Body", 3),
            new FacePart("Ears", 3),
            new FacePart("Eyes", 10),
            new FacePart("Nose", 5),
            new FacePart("Mouth", 12),
            new FacePart("../border.png"),
    }),
    GOBLIN_M2("goblin_m2", new FacePart[] {
            new FacePart("../bgblue.png"),
            new FacePart("body.png"),
            new FacePart("Eyes", 10),
            new FacePart("Nose", 5),
            new FacePart("Mouth", 12),
            new FacePart("Ears", 7),
            new FacePart("../border.png"),
    });

    private final String dir;
    private final List<FacePart> faceParts;
    
    private FaceModel(String dir, FacePart[] faceParts) {
        this.dir = dir;
        this.faceParts = Collections.unmodifiableList(Arrays.asList(faceParts));
    }
    
    public String getDirectory() {
        return dir;
    }
    
    public List<FacePart> getFaceParts() {
        return faceParts;
    }
    
    public static class FacePart {
        
        private final boolean isStatic;
        private final String name;
        private final int count;
        private final String image;
        
        public FacePart(String image) {
            this.isStatic = true;
            this.name = null;
            this.count = -1;
            this.image = image;
        }
        
        public FacePart(String name, int count) {
            this.isStatic = false;
            this.name = name;
            this.count = count;
            this.image = null;
        }

        public int getCount() {
            return count;
        }

        public String getImage() {
            return image;
        }

        public boolean isStatic() {
            return isStatic;
        }

        public String getName() {
            return name;
        }

    }
    
}