// Path: core/src/com/v5ent/game/entities/Monster.java
// public class Monster extends Role {
//     private static final String TAG = Monster.class.getSimpleName();
// 
//     public Monster(String entityId,int x,int y) {
//         super(entityId);
//         this.setCurrentDir(Direction.RIGHT);
//         this.idleRightAnimation =loadAnimation(x,y);
//         currentFrame =idleRightAnimation.getKeyFrame(0);
//         // Define sprite size to be 1m x 1m in game world
//         this.setSize(currentFrame.getRegionWidth(), currentFrame.getRegionHeight());
//         // Set origin to sprite's center
//         this.setOrigin(this.getWidth() / 2.0f, 0);
//         //inventory
//     }
//     //Specific to two frame animations where each frame is stored in a separate texture
//     protected Animation loadAnimation(int x,int y){
// 
//         TextureRegion[][] texture1Frames = TextureRegion.split(Assets.instance.MONSTERS0, 16, 16);
//         TextureRegion[][] texture2Frames = TextureRegion.split(Assets.instance.MONSTERS1, 16, 16);
// 
//         Array<TextureRegion> animationKeyFrames = new Array<TextureRegion>(2);
//         TextureRegion t1 = texture1Frames[x][y];
//         t1.flip(true,false);
//         TextureRegion t2 = texture2Frames[x][y];
//         t2.flip(true,false);
//         animationKeyFrames.add(t1);
//         animationKeyFrames.add(t2);
// 
//         return new Animation(0.5f, animationKeyFrames, Animation.PlayMode.LOOP);
//     }
// 
//     private int xpReward = 100;
//     private int gpReward = 100;
// 
//     public int getXpReward() {
//         return xpReward;
//     }
// 
//     public void setXpReward(int xpReward) {
//         this.xpReward = xpReward;
//     }
// 
//     public int getGpReward() {
//         return gpReward;
//     }
// 
//     public void setGpReward(int gpReward) {
//         this.gpReward = gpReward;
//     }
// 
// }


import java.util.Hashtable;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.Json;
import com.v5ent.game.entities.Monster;
        MONSTER021,MONSTER022,MONSTER023,MONSTER024,MONSTER025,
        MONSTER026,MONSTER027,MONSTER028,MONSTER029,MONSTER030,
        MONSTER031,MONSTER032,MONSTER033,MONSTER034,MONSTER035,
        MONSTER036,MONSTER037,MONSTER038,MONSTER039,MONSTER040,
        MONSTER041, MONSTER042,
        NONE
    }

    private static MonsterFactory instance = null;
    private Hashtable<String, Monster> entities;
    private Hashtable<String, Array<MonsterType>> monsterZones;

    private MonsterFactory(){
        entities = Monsters.initDatas();//json.fromJson(Hashtable.class, Gdx.files.internal("scripts/monsters.json"));
        monsterZones = MonsterZone.getMonsterZones("data/monster_zones.json");
    }

    public static MonsterFactory getInstance() {
        if (instance == null) {
            instance = new MonsterFactory();
        }
        return instance;
    }

    public Monster getMonster(MonsterType monsterMonsterType){
       return Monsters.initData(entities.get(monsterMonsterType.toString()));
    }

    public Monster getRandomMonster(int monsterZoneID){
        Array<MonsterType> monsters = monsterZones.get(String.valueOf(monsterZoneID));
// Path: core/src/com/v5ent/game/entities/Monster.java
// public class Monster extends Role {
//     private static final String TAG = Monster.class.getSimpleName();
// 
//     public Monster(String entityId,int x,int y) {
//         super(entityId);
//         this.setCurrentDir(Direction.RIGHT);
//         this.idleRightAnimation =loadAnimation(x,y);
//         currentFrame =idleRightAnimation.getKeyFrame(0);
//         // Define sprite size to be 1m x 1m in game world
//         this.setSize(currentFrame.getRegionWidth(), currentFrame.getRegionHeight());
//         // Set origin to sprite's center
//         this.setOrigin(this.getWidth() / 2.0f, 0);
//         //inventory
//     }
//     //Specific to two frame animations where each frame is stored in a separate texture
//     protected Animation loadAnimation(int x,int y){
// 
//         TextureRegion[][] texture1Frames = TextureRegion.split(Assets.instance.MONSTERS0, 16, 16);
//         TextureRegion[][] texture2Frames = TextureRegion.split(Assets.instance.MONSTERS1, 16, 16);
// 
//         Array<TextureRegion> animationKeyFrames = new Array<TextureRegion>(2);
//         TextureRegion t1 = texture1Frames[x][y];
//         t1.flip(true,false);
//         TextureRegion t2 = texture2Frames[x][y];
//         t2.flip(true,false);
//         animationKeyFrames.add(t1);
//         animationKeyFrames.add(t2);
// 
//         return new Animation(0.5f, animationKeyFrames, Animation.PlayMode.LOOP);
//     }
// 
//     private int xpReward = 100;
//     private int gpReward = 100;
// 
//     public int getXpReward() {
//         return xpReward;
//     }
// 
//     public void setXpReward(int xpReward) {
//         this.xpReward = xpReward;
//     }
// 
//     public int getGpReward() {
//         return gpReward;
//     }
// 
//     public void setGpReward(int gpReward) {
//         this.gpReward = gpReward;
//     }
// 
// }


// Path: core/src/com/v5ent/game/battle/MonsterFactory.java
import java.util.Hashtable;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.Json;
import com.v5ent.game.entities.Monster;

        MONSTER021,MONSTER022,MONSTER023,MONSTER024,MONSTER025,
        MONSTER026,MONSTER027,MONSTER028,MONSTER029,MONSTER030,
        MONSTER031,MONSTER032,MONSTER033,MONSTER034,MONSTER035,
        MONSTER036,MONSTER037,MONSTER038,MONSTER039,MONSTER040,
        MONSTER041, MONSTER042,
        NONE
    }

    private static MonsterFactory instance = null;
    private Hashtable<String, Monster> entities;
    private Hashtable<String, Array<MonsterType>> monsterZones;

    private MonsterFactory(){
        entities = Monsters.initDatas();//json.fromJson(Hashtable.class, Gdx.files.internal("scripts/monsters.json"));
        monsterZones = MonsterZone.getMonsterZones("data/monster_zones.json");
    }

    public static MonsterFactory getInstance() {
        if (instance == null) {
            instance = new MonsterFactory();
        }
        return instance;
    }

    public Monster getMonster(MonsterType monsterMonsterType){
       return Monsters.initData(entities.get(monsterMonsterType.toString()));
    }

    public Monster getRandomMonster(int monsterZoneID){
        Array<MonsterType> monsters = monsterZones.get(String.valueOf(monsterZoneID));
        int size = monsters.size;