var enemy_frames = [];

enemy_frames[FOOD_TYPE_ENUM.FRUIT] = new Image();
enemy_frames[FOOD_TYPE_ENUM.FRUIT].src = "img/ui/enemy_fruit.png";

enemy_frames[FOOD_TYPE_ENUM.MEAT] = new Image();
enemy_frames[FOOD_TYPE_ENUM.MEAT].src = "img/ui/enemy_meat.png";

enemy_frames[FOOD_TYPE_ENUM.VEGGIES] = new Image();
enemy_frames[FOOD_TYPE_ENUM.VEGGIES].src = "img/ui/enemy_veggies.png";

enemy_frames[FOOD_TYPE_ENUM.SWEET] = new Image();
enemy_frames[FOOD_TYPE_ENUM.SWEET].src = "img/ui/enemy_sweet.png";

enemy_frames[FOOD_TYPE_ENUM.DAIRY] = new Image();
enemy_frames[FOOD_TYPE_ENUM.DAIRY].src = "img/ui/enemy_dairy.png";

var typeless_frame;
typeless_frame = new Image();
typeless_frame.src = "img/ui/enemy_typeless.png";

var red_flash;
red_flash = new Image();
red_flash.src = "img/enemy/red.png";

ENEMY = function(_name, image_filepath, defense_str, attack_speed, attack_list, food_type)
{
  var self = {};

  self.display_x = random_float(1.25, 2.0) * CANVAS_WIDTH;
  self.display_y = random_float(.1, .9) * CANVAS_HEIGHT;
  self.death_fade_timer = 1.0;

  self.damage_animation = 0.0;
  self.attack_animation = 0.0;
  self.heal_animation = 0.0;

  self.preview_burst = false;
  
  self.name = _name;

  self.image = new Image();
  //self.image.loading = "lazy";
  self.image.src = image_filepath;

  self.timer = self.max_timer = attack_speed;
  self.attacks = attack_list;
  self.current_attack = 0;

  self.food_type_display_index = 0;
  self.food_type_display_timer = 0.0;
  self.food_type = food_type;

  self.defenses = defense_str;
  self.max_defenses = defense_str.slice();

  self.green_up_arrow = new Image();
  self.green_up_arrow.src = "img/icons/green_up.png";
  self.green_down_arrow = new Image();
  self.green_down_arrow.src = "img/icons/green_down.png";
  self.red_up_arrow = new Image();
  self.red_up_arrow.src = "img/icons/red_up.png";
  self.red_down_arrow = new Image();
  self.red_down_arrow.src = "img/icons/red_down.png";

  self.defenses_display = defense_str.slice();

  self.fade_bars = 0.0;

  self.draw_stats = function(x, y, w, h)
  {
    var icon_size = w / 4.5;
    
    for(var i in self.food_type)
    {
        draw_center(food_images[self.food_type[i]], x - .5 * w + .25 * icon_size, y + .5 * h - i * icon_size, icon_size, icon_size, self.death_fade_timer);
    }


    //attack timer
    if(self.attacks.length > 0 || attack_speed < 999)
    {
      //draw_center(stat_images[STAT_TYPE_ENUM.ATTACK_TIMER], x + .5 * w - .6 * icon_size, y - .5 * h + .6 * icon_size, icon_size, icon_size);
      if(self.timer > 0.0 && self.death_fade_timer > .9)
      {

        draw_text(self.timer.toFixed(0), 
        x + .5 * w - 1.0 * icon_size, 
        y - .5 * h + 1.0 * icon_size, icon_size);
      }
    }

    var lowest_index = -1;
    var lowest_value = 1.0;
    for(var i in self.defenses)
    {
      if(self.defenses[i] > 0 && self.defenses[i] < 999)
      {
        var percent = self.defenses[i] / self.max_defenses[i];// 0 - red, 1 - white
        //var gb = 55.0 * (1.0 - percent) + 255.0 * percent;
        if(percent < lowest_value)
        {
          lowest_index = i;
          lowest_value = percent;
        }
      }

    } 

    var m_over = false;
    if(point_rect_collision(INPUT.mouse_screen.x, INPUT.mouse_screen.y, x, y, w, h) )
      m_over = true;

    var counter = 0;
    for(var i in self.defenses)
    {
      if(self.defenses[i] > 0 && self.defenses[i] < 999)
      {
        draw_center(stat_images[i], 
          x - .5 * w + (counter + 1.5) * icon_size, 
          y + .5 * h, 
          icon_size, icon_size, self.death_fade_timer);
        

        //var color = 'white';
        //if(self.defenses[i] < self.max_defenses[i])
          color =   TEXT_COLOR_ENUM.WHITE;//"rgb(255," + gb + "," + gb + ")";
          if(lowest_index == i)
          color = TEXT_COLOR_ENUM.RED;
//console.log(color);
          if (self.death_fade_timer > .9) {
              draw_text(self.defenses[i].toFixed(0),
                x - .5 * w
                + (counter + 1.5 - .25 * .6 * self.defenses[i].toFixed(0).toString().length) * icon_size,

                y + .5 * h + .25 * .6 * icon_size,
               .6 * icon_size, color);
          }

        //if(self.defenses_display[i] != self.defenses[i])
        //debugger;

          self.defenses_display[i] += (self.defenses[i] - self.defenses_display[i] ) * 20.0 * get_frame_time();
         
          if(Math.abs((self.defenses[i] - self.defenses_display[i] )) < 20.0 * get_frame_time())
            self.defenses_display[i] = self.defenses[i];

          if(self.defenses_display[i] != self.defenses[i])
          {
            //debugger;
            m_over = true;//console.log(self.defenses_display[i]);
          }
        //if(m_over)
        {
        var percent = self.defenses_display[i] / self.max_defenses[i];

        draw_bar_vert(
          x - .5 * w + (counter + 1.5) * icon_size, 
          y, 
          (h - 1.5 * icon_size) * (64.0 / 813.0), 
          (h - 1.5 * icon_size), 
          percent, self.fade_bars);// )
        }

        counter += 1;
      }
    }

    //debugger;
    if(m_over && self.fade_bars < 1.0)
    {
      //debugger;
      self.fade_bars += 8.0 * get_frame_time();
    }
    else if(!m_over && self.fade_bars > 0.0)
    {
      //debugger;
      self.fade_bars -= 4.0 * get_frame_time();
    }


    counter = 0;
    for(var i in self.attacks)
    {
      var alpha = 1;
      if(i != self.current_attack % self.attacks.length)
        alpha = .5;

      //console.log("Here");
      draw_center(stat_images[self.attacks[i].type], x + .525 * w, y - .5 * h + (counter + 0.6) * icon_size, icon_size, icon_size, self.death_fade_timer * alpha);
      
      //var color = TEXT_COLOR_ENUM.RED;
      //if(self.attacks[i].strength < 0)
     //   color = TEXT_COLOR_ENUM.GREEN;

      //draw_text(Math.abs(self.attacks[i].strength.toFixed(0)), x + .5 * w - 1.0 * icon_size, y - .5 * h + (counter + 2.0) * icon_size, .75 * icon_size, color);
/*      
      if(self.attacks[i].enemy && self.attacks[i].greatest)
         draw_center(self.red_up_arrow, x + .5 * w - .25 * icon_size, y - .5 * h + (counter + 1.35) * icon_size, .5 * icon_size, .5 * icon_size, alpha);
      if(!self.attacks[i].enemy && self.attacks[i].greatest)
         draw_center(self.green_up_arrow, x + .5 * w - .25 * icon_size, y - .5 * h + (counter + 1.35) * icon_size, .5 * icon_size, .5 * icon_size, alpha);
      if(self.attacks[i].enemy && !self.attacks[i].greatest)
         draw_center(self.red_down_arrow, x + .5 * w - .25 * icon_size, y - .5 * h + (counter + 1.35) * icon_size, .5 * icon_size, .5 * icon_size, alpha);
      if(!self.attacks[i].enemy && !self.attacks[i].greatest)
         draw_center(self.green_down_arrow, x + .5 * w - .25 * icon_size, y - .5 * h + (counter + 1.35) * icon_size, .5 * icon_size, .5 * icon_size, alpha);
*/

      //if(self.attacks[i].timer < 999)
     // {
     //   draw_text("/" + self.attacks[i].timer.toFixed(0), x + .5 * w - 1.0 * icon_size + 8, y - .5 * h + (counter + 2.0) * icon_size, .75 * icon_size);
      //}

      counter += 1;
    }
  }
  self.draw = function(x, y, w, h, fade)
  {
    if(self.food_type.length)
    {
      self.food_type_display_timer += get_frame_time();
      if(self.food_type_display_timer > 1.0)
      {
        self.food_type_display_index += 1;
        self.food_type_display_timer -= 1.0;
      }

      draw_center(enemy_frames[self.food_type[self.food_type_display_index % self.food_type.length]],
         x, y, (340.0 / 300.0) * w, (330.0 / 300.0) * h, self.death_fade_timer);
    }
    else
        draw_center(typeless_frame, x, y, (319.0 / 300.0) * w, (315.0 / 300.0) * h, self.death_fade_timer);

    draw_center(self.image, x, y, w, h, self.death_fade_timer);

    if(fade)
    {
      draw_center(fade_texture, x,y, w, h);
      draw_center(fade_texture, x,y, w, h);
    }

    if (self.damage_animation > 0.0)
        draw_center(red_flash, x, y, w, h, self.damage_animation);


    self.draw_stats(x, y, w,h );

    //draw_text(self.name, x,y);
  }

  return self;
}

/*
var __enemy_list = {};



__enemy_list[ENEMY_ENUM.BACON_DOOR]    = ENEMY("img/enemy/door.png",          [ 20,  20, 999, 999, 999], 5, [], [FOOD_TYPE_ENUM.MEAT, FOOD_TYPE_ENUM.SALT]);//5
__enemy_list[ENEMY_ENUM.BOULDER]       = ENEMY("img/enemy/boulder.png",       [999, 999, 999, 999,  16], 10, [{type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:4, timer:30},{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:4, timer:30},{type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:4, timer:30},{type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:4, timer:30}], [FOOD_TYPE_ENUM.FRUIT, FOOD_TYPE_ENUM.SWEET]);//4);
__enemy_list[ENEMY_ENUM.CAKE_GOLEM]    = ENEMY("img/enemy/golem.png",         [999,  16,  16,  16, 999], 15, [{type:STAT_TYPE_ENUM.WEAPON,greatest:true,enemy:true, strength:1, timer:10},{type:STAT_TYPE_ENUM.MAGIC,greatest:true,enemy:true, strength:2, timer:10} ], [FOOD_TYPE_ENUM.SWEET]);//4);
__enemy_list[ENEMY_ENUM.CHEESE_WIZARD] = ENEMY("img/enemy/cheese_wizard.png", [ 12,  12, 999,  12, 999], 10, [{type:STAT_TYPE_ENUM.HEAL ,greatest:false,enemy:false, strength:4, timer:999},{type:STAT_TYPE_ENUM.BUFF ,greatest:true,enemy:false, strength:4, timer:20},{type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:4, timer:15}], [FOOD_TYPE_ENUM.DAIRY]);//3);
__enemy_list[ENEMY_ENUM.FRUIT_JELLY]   = ENEMY("img/enemy/jelly.png",         [999,  12, 999,  12, 999], 5, [{type:STAT_TYPE_ENUM.FULLNESS ,greatest:true,enemy:true, strength:-5, timer:999}], [FOOD_TYPE_ENUM.SWEET, FOOD_TYPE_ENUM.FRUIT]);//3);
__enemy_list[ENEMY_ENUM.PLANT]         = ENEMY("img/enemy/plant.png",         [ 16,  16,  16, 999, 999], 10, [{type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:2, timer:5},{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:4, timer:5}]);//4);
*/

function create_enemy(index)
{                           
  if(index == ENEMY_ENUM.empty)
  return null;

                                                                        //wep mag fth snk
  if(index == ENEMY_ENUM.BACON_DOOR) //def:big, weak to warrior
    return ENEMY("Bacon Door", "img/enemy/bacon_door.png",          [ 12,  20,  999, 999], 999, [], [FOOD_TYPE_ENUM.MEAT/*, FOOD_TYPE_ENUM.SALT*/]);//5
  if(index == ENEMY_ENUM.BOULDER) //atk:normal, def: med, speed:normal, 
    return ENEMY("Melon Boulder", "img/enemy/melon_boulder.png",       [999, 999,  999,  8], 5, 
    [{type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:4, timer:10},
      /*{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:4, timer:11},*/
      {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:4, timer:10},
      {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:4, timer:10}], 
      [FOOD_TYPE_ENUM.FRUIT/*, FOOD_TYPE_ENUM.SWEET*/]);//4);

      /*if(index == ENEMY_ENUM.CAKE_GOLEM)//atk:normal, def: big, speed:slow
    return  ENEMY("Cake Golem", "img/enemy/plant.png",         [999,  20,  16, 999], 8, 
    [{type:STAT_TYPE_ENUM.WEAPON,greatest:true,enemy:true, strength:4, timer:17},
      {type:STAT_TYPE_ENUM.MAGIC,greatest:true,enemy:true, strength:4, timer:17},
      {type:STAT_TYPE_ENUM.FAITH,greatest:true,enemy:true, strength:4, timer:17},
      {type:STAT_TYPE_ENUM.SNEAK,greatest:true,enemy:true, strength:4, timer:17},
     ], [FOOD_TYPE_ENUM.SWEET]);//4);*/
 
      if(index == ENEMY_ENUM.CHEESE_WIZARD) //atk: normal, def: big, speed: normal weak to priestess
    return ENEMY("Cheese Wizard", "img/enemy/cheese_wizard.png", [ 10,  10, 8, 999], 5, 
    [{type:STAT_TYPE_ENUM.HEAL ,greatest:false,enemy:false, strength:4, timer:999},
      //{type:STAT_TYPE_ENUM.BUFF ,greatest:true,enemy:false, strength:4, timer:20},
      {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:4, timer:4}], [FOOD_TYPE_ENUM.DAIRY]);//3);
  
      //if(index == ENEMY_ENUM.FRUIT_JELLY)
    //return ENEMY("Fruit Jelly", "img/enemy/jelly.png",         [999,  12,  12, 999], 3, 
    //[{type:STAT_TYPE_ENUM.FULLNESS ,greatest:true,enemy:true, strength:-5, timer:999}], [FOOD_TYPE_ENUM.SWEET, FOOD_TYPE_ENUM.FRUIT]);//3)  
  
    if(index == ENEMY_ENUM.PLANT) //atk: weak, def: normal, speed: fast
    return ENEMY("Plant", "img/enemy/plant.png",         [ 10,  10,  999, 999], 3, 
    [{type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:2, timer:4},
      {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:4, timer:4}], [/*FOOD_TYPE_ENUM.VEGGIES*/]);//4);


    if(index == ENEMY_ENUM.PEON_NEUTRAL)  //stats determined by tutorial needs
    return ENEMY("Peon Neutral", "img/enemy/cracker_door.png",         [ 2,  2, 2, 2], 999, [], []);//4);

    if(index == ENEMY_ENUM.PEON_WEAPON)//stats determined by tutorial needs
    return ENEMY("Peon Weapon", "img/enemy/cracker_door.png",         [ 2,  999, 999, 999], 999, [], []);//4);
    if(index == ENEMY_ENUM.PEON_SNEAK)//stats determined by tutorial needs
      return ENEMY("Peon Sneak", "img/enemy/cracker_door.png",         [ 999,  999,  999, 2], 999, [], []);//4);
    if(index == ENEMY_ENUM.PEON_FAITH)//stats determined by tutorial needs
    return ENEMY("Peon Faith", "img/enemy/cracker_door.png",         [ 999,  999, 2, 999], 999, [], []);//4);
    if(index == ENEMY_ENUM.PEON_MAGIC)//stats determined by tutorial needs
    return ENEMY("Peon Magic", "img/enemy/cracker_door.png",         [ 999,  2,  999, 999], 999, [], []);//4);

    
    if(index == ENEMY_ENUM.PEON_MEAT)//stats determined by tutorial needs
      return ENEMY("Peon Meat", "img/enemy/bacon_door.png",       [ 6,  999,  999, 999], 999, [], [FOOD_TYPE_ENUM.MEAT]);//4);


    if(index == ENEMY_ENUM.PEON_FRUIT)//stats determined by tutorial needs
    return ENEMY("Peon Fruit", "img/enemy/discord_apple.png",         [ 4,  999,   999, 999], 999, [], [FOOD_TYPE_ENUM.FRUIT]);//4);
    if(index == ENEMY_ENUM.PEON_DAIRY)//stats determined by tutorial needs
    return ENEMY("Peon Dairy", "img/enemy/cheese_wizard.png",         [ 999,  999,  8, 999], 999, [], [FOOD_TYPE_ENUM.DAIRY]);//4);
    if(index == ENEMY_ENUM.PEON_SWEET)//stats determined by tutorial needs
    return ENEMY("Peon Sweet", "img/enemy/soda_barrier.png",         [ 999,  10,  999, 999], 999, [], [FOOD_TYPE_ENUM.SWEET]);//4);


    if(index == ENEMY_ENUM.PEON_MULTIPLE)//stats determined by tutorial needs
    return ENEMY("Peon Multiple", "img/enemy/sea_elemental.png",         [ 5,  10,  8, 6], 999, [], []);//4);
    if(index == ENEMY_ENUM.PEON_BIG_MAGIC)//stats determined by tutorial needs
    return ENEMY("Peon Big Magic", "img/enemy/soda_barrier.png",         [ 999,  20,  999, 999], 999, [], [FOOD_TYPE_ENUM.SWEET]);//4);
    if(index == ENEMY_ENUM.SINGLE_ATTACKER)//stats determined by tutorial needs
    return ENEMY("Single Attacker", "img/enemy/plant.png",         [ 10,  999,  8, 999], 3, 
    [{type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:4, timer:2}], [FOOD_TYPE_ENUM.VEGGIES]);//4);
    
    if(index == ENEMY_ENUM.WEAPON_ATTACKER_HIGH)//stats determined by tutorial needs
    return ENEMY("Weapon Attacker High", "img/enemy/cheese_wizard.png",         [ 10,  999,  12, 999], 3, 
    [{type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:1, timer:1}], [FOOD_TYPE_ENUM.DAIRY]);//4);
    if(index == ENEMY_ENUM.WEAPON_ATTACKER_LOW)//stats determined by tutorial needs
    return ENEMY("Weapon Attacker Low", "img/enemy/sea_elemental.png",         [ 10,  999,  12, 999], 2, 
    [{type:STAT_TYPE_ENUM.WEAPON ,greatest:false,enemy:true, strength:2, timer:1}], []);//4);

    if(index == ENEMY_ENUM.DEVASTATING_ATTACKER)//stats determined by tutorial needs
    return ENEMY("Devastating Attacker", "img/enemy/peanut_knight.png",         [ 999,  10,  999, 999], 1, [
      {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:30},

      {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:30},
      {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:30},
      {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:30},
      /*{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:10, timer:30},*/
      
      /*{type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:30},
      {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:30},
      {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:30},
      {type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:10, timer:30},
      
      {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:30},
      {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:30},
      {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:30},
      {type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:10, timer:30},*/
    ], [/*FOOD_TYPE_ENUM.SWEET*/]);//4);

    if(index == ENEMY_ENUM.GARDEN_MAZE)//def:big, weak to thief
      return ENEMY("Orchard Maze", "img/enemy/orchard_maze.png",         [ 20,  20,  999, 8], 999, [], [FOOD_TYPE_ENUM.FRUIT/*, FOOD_TYPE_ENUM.VEGGIES*/]);//4);

      if(index == ENEMY_ENUM.CRACKER_DOOR)//def:big
      return ENEMY("Cracker Door", "img/enemy/cracker_door.png",         [ 12,  20,  999, 8], 999, [], [/*FOOD_TYPE_ENUM.SALT, FOOD_TYPE_ENUM.GRAIN*/]);//4);
    
      if(index == ENEMY_ENUM.FALLING_CORN)//atk:normal, def: normal, spd:fast, resist thief
      return ENEMY("Falling Corn", "img/enemy/falling_corn.png",         [ 6,  10, 999, 12], 3, 
      [{type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:4, timer:4}], 
      [FOOD_TYPE_ENUM.VEGGIES]);//4);
    
      if(index == ENEMY_ENUM.PEANUT_KNIGHT)//atk:weak, def:big, spd:normal, weak to priestess, resist weapon, resist magic
      return ENEMY("Peanut Knight", "img/enemy/peanut_knight.png",         [ 24,  40,  8, 8], 5, [
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:2, timer:6},
        {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:2, timer:6},
        //{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:2, timer:8},
      ], [/*FOOD_TYPE_ENUM.SALT*/]);//4);
    
      
      if(index == ENEMY_ENUM.DISCORD_APPLE)//atk:high, def:high, sped:fast, weak to thief, resist faith
      return ENEMY("Apple of Discord", "img/enemy/discord_apple.png",         [ 999,  30,  32, 8], 3, [
        {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:6, timer:2},
        //{type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:6, timer:4},
      ], [FOOD_TYPE_ENUM.FRUIT]);//4);

      if(index == ENEMY_ENUM.SALTWATER_ELEMENTAL)//atk:normal, def: big, speed:normal, weak to priestess , resist thief
      return ENEMY("Sea Elemental", "img/enemy/sea_elemental.png",         [ 999,  20,  8, 16], 5, [
        //{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:3, timer:4},
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:3, timer:3},
      ], [/*FOOD_TYPE_ENUM.SALT*/]);//4);

      if(index == ENEMY_ENUM.CARBONATED_FORCE_BARRIER)//def:big, resist witch, weak to priestess
      return ENEMY("Soda Barrier", "img/enemy/soda_barrier.png",    [ 999,  80,  8, 999], 999, [
        //{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:3, timer:4},
        //{type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:3, timer:4},
      ], [FOOD_TYPE_ENUM.SWEET]);//4);

      if(index == ENEMY_ENUM.SHAMBLING_FRUIT_SALAD)//atk:big, def:big, speed:med, resist witch, resist priestess, weak to weapon
      return ENEMY("Shambling Fruit Salad", "img/enemy/shambling_fruit.png",    [ 10,  40, 32, 999], 5, [
        {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:6, timer:6},
        {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:6, timer:6},
      ], [FOOD_TYPE_ENUM.FRUIT, FOOD_TYPE_ENUM.VEGGIES]);//4);

      if(index == ENEMY_ENUM.NULL_SUGAR_CRYSTAL)//atk:big, def:normal, speed:fast, resist witch, weak to weapon
      return ENEMY("Null Sugar Crystal", "img/enemy/null_sugar_crystal.png",    [ 6,  30,  999, 6], 3, [
        {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:6, timer:2},
        //{type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:4, timer:6},
      ], [FOOD_TYPE_ENUM.SWEET]);//4);

      
      if(index == ENEMY_ENUM.GRAPE_DRAGON)//atk:BOSS, def:BOSS, speed:slow, weak to thief 
      return ENEMY("Grape Dragon", "img/enemy/grape_dragon.png",    [ 40,  999,  999, 999], 8, [
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:2, timer:20},
        {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:2, timer:20},
        //{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:2, timer:20},
        {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:2, timer:20},
        {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:2, timer:20},
      ], [FOOD_TYPE_ENUM.FRUIT]);//4);

      
      if(index == ENEMY_ENUM.FAST_FRIES)//def:normal, speed:normal
      return ENEMY("Fast Fries", "img/enemy/fast_fries.png",    [ 5,  999,  999, 999], 20, 
      [      ], [FOOD_TYPE_ENUM.VEGGIES]);//4);

      if(index == ENEMY_ENUM.CHEESE_GHOST)//def:normal speed:fast
      return ENEMY("Cheese Ghost", "img/enemy/cheese_ghost.png",    [ 999,  8,  8, 999], 10, 
      [      ], [FOOD_TYPE_ENUM.DAIRY]);//4);

      if(index == ENEMY_ENUM.CANDY_DOOR) //def: normal, weak to witch
      return ENEMY("Candy Door", "img/enemy/gingerbread_door.png",          [ 999,  3,  999, 999], 999, 
      [], [FOOD_TYPE_ENUM.SWEET/*, FOOD_TYPE_ENUM.SALT*/]);//5
  
      if(index == ENEMY_ENUM.ICE_CREAM_GHOST)//atk: big, def: big, speed:fast, weak to priestess 
      return ENEMY("Ice Cream Ghost", "img/enemy/ice_cream_ghost.png",    [999,  40,  16, 999], 3, [   
        {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:6, timer:2},
      ], [FOOD_TYPE_ENUM.SWEET, FOOD_TYPE_ENUM.DAIRY]);//4);

      if(index == ENEMY_ENUM.DEVIL_FOOD_GOLEM)//atk: normal, def: big, speed:slow, weak to witch, resist weapon, resist priestess
      return ENEMY("Devil Food Golem", "img/enemy/devil_food_golem.png",    [24,  20,  32, 999], 5, [   
        {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:4, timer:3},
      ], [FOOD_TYPE_ENUM.SWEET]);//4);

      if(index == ENEMY_ENUM.CANDY_DRAGON)//atk:BOSS, def:BOSS, speed:slow, weak to thief 
      return ENEMY("Candy Dragon", "img/enemy/candy_dragon.png",    [999,  60,  999, 999], 12, [
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:4, timer:30},
        {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:4, timer:30},
        //{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:4, timer:20},
        {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:4, timer:30},
        {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:4, timer:30},
      ], [FOOD_TYPE_ENUM.SWEET]);//4);

      if(index == ENEMY_ENUM.CANDY_AUTOMATON)//def:weak speed:slow
      return ENEMY("Candy Automatons", "img/enemy/candy_corn_bat.png",    [ 999,  5,  999, 999], 20, 
      [      ], [FOOD_TYPE_ENUM.SWEET]);//4);


      if(index == ENEMY_ENUM.CARROT_DOOR) //def: normal, weak to spellblade
      return ENEMY("Carrot Door", "img/enemy/carrot_door.png",          [ 4,  999,  999, 999], 999, 
      [], [FOOD_TYPE_ENUM.VEGGIES/*, FOOD_TYPE_ENUM.SALT*/]);//5

      if(index == ENEMY_ENUM.ONION_KNIGHT)//atk: normal, def: big, speed:fast, weak to spellblade, resist thief
      return ENEMY("Onion Knight", "img/enemy/onion_knight.png",    [16,  16,  999, 32], 3, [   
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:4, timer:2},
        
      ], [FOOD_TYPE_ENUM.VEGGIES]);//4);

      
      if(index == ENEMY_ENUM.BREAD_SAMURAI)//atk: big, def: big, speed:fast
      return ENEMY("Bread Samurai", "img/enemy/bread_samurai.png",    [48,  999,  999, 999], 3, [   
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:6, timer:3},
      ], [/*FOOD_TYPE_ENUM.VEGGIES*/]);//4);
      
      if(index == ENEMY_ENUM.MEAT_DRAGON)//atk:BOSS, def:BOSS, speed:slow, weak to warrior 
      return ENEMY("Beefcake Dragon", "img/enemy/beefcake_dragon.png",    [60,  999,  999, 999], 8, [
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:4, timer:30},
        {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:4, timer:30},
        //{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:4, timer:20},
        {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:4, timer:30},
        {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:4, timer:30},
      ], [FOOD_TYPE_ENUM.MEAT]);//4);

      
      if(index == ENEMY_ENUM.CREEPY_PASTA)//atk: big, def: big, speed:medium
      return ENEMY("Creepy Pasta", "img/enemy/creepy_pasta.png",    [999,  96,  48, 999], 5, [   
        {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:6, timer:10},
        {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:6, timer:10},
      ], [/*FOOD_TYPE_ENUM.VEGGIES*/]);//4);

      if(index == ENEMY_ENUM.MILK_DRAGON)//atk:BOSS, def:BOSS, speed:slow, weak to warrior 
      return ENEMY("Milk Dragon", "img/enemy/milk_dragon.png",    [999,  999,  200, 999], 8, [
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:4, timer:30},
        {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:4, timer:30},
        //{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:4, timer:20},
        {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:4, timer:30},
        {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:4, timer:30},
      ], [FOOD_TYPE_ENUM.DAIRY]);//4);

      
      if(index == ENEMY_ENUM.CANDY_ZOMBIE)//def:high speed:medium
      return ENEMY("Candy Zombie", "img/enemy/candy_zombie.png",    [ 30,  40,  10, 999], 15, 
      [      ], [FOOD_TYPE_ENUM.SWEET]);//4);

      if(index == ENEMY_ENUM.SHY_CREEPY_PASTA)//def:high speed:medium
      return ENEMY("Creepy Pasta", "img/enemy/creepy_pasta.png",    [999,  96,  48, 999], .5, 
      [      ], [/*FOOD_TYPE_ENUM.SWEET*/]);//4);

      if(index == ENEMY_ENUM.CHEESE_ZOMBIE)//atk: big, def: big, speed:fast, resist weapon
      return ENEMY("Cheese Zombie", "img/enemy/cheese_zombie.png",    [24,  20,  12, 999], 3, [   
        {type:STAT_TYPE_ENUM.WEIGHT ,greatest:true,enemy:true, strength:6, timer:10}
      ], [FOOD_TYPE_ENUM.DAIRY]);//4);

      if(index == ENEMY_ENUM.CROISSANT_PRIEST)//atk: big, def: normal, speed:fast, resist weapon
      return ENEMY("Croissant Priest", "img/enemy/croissant_priest.png",    [9,  999,  999, 4], .5, [   
        {type:STAT_TYPE_ENUM.HEAL ,greatest:false,enemy:false, strength:6, timer:10}
      ], [/*FOOD_TYPE_ENUM.DAIRY*/]);//4);

      if(index == ENEMY_ENUM.CROISSANT_KNIGHT)//atk:  normal, def: huge, speed:normal, resist weapon
      return ENEMY("Croissant Knight", "img/enemy/croissant_knight.png",    [48,  40,  999, 32], 5, [   
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:4, timer:4}
      ], [/*FOOD_TYPE_ENUM.DAIRY*/]);//4);

      if(index == ENEMY_ENUM.PINK_SLIME)//atk:  normal, def: big, speed:slow, weak illusionist, resist weapon, resist magic
      return ENEMY("Pink Slime", "img/enemy/pink_slime.png",    [24,  40,  999, 8], 20, [   
      ], [FOOD_TYPE_ENUM.MEAT]);//4);

      if(index == ENEMY_ENUM.LETTUCE_DRAGON)//atk:BOSS, def:BOSS, speed:slow, weak to spellblade 
      return ENEMY("Lettuce Dragon", "img/enemy/lettuce_dragon.png",    [200,  200,  999, 999], 8, [
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:4, timer:30},
        {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:4, timer:30},
        //{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:4, timer:20},
        {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:4, timer:30},
        {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:4, timer:30},
      ], [FOOD_TYPE_ENUM.VEGGIES]);//4);


      if (index == ENEMY_ENUM.BACON_GOLEM)//atk:BIG, def:BIG, speed:slow, one-shot by illusionist, strong to all others 
          return ENEMY("Bacon Golem", "img/enemy/bacon_golem.png", [48, 40, 999, 4], 8, [
            { type: STAT_TYPE_ENUM.WEAPON, greatest: true, enemy: true, strength: 6, timer: 6 },
            { type: STAT_TYPE_ENUM.MAGIC, greatest: true, enemy: true, strength: 6, timer: 6 },
            //{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:4, timer:20},
          ], [FOOD_TYPE_ENUM.MEAT]);//4);

      if (index == ENEMY_ENUM.CREAMED_CORN_SLIME)//atk:BIG, def:BIG, speed:fast, weak to spellblade, strong to illusionist 
          return ENEMY("Creamed Corn Slime", "img/enemy/creamed_corn_slime.png", [24, 5, 999, 16], 3, [
            { type: STAT_TYPE_ENUM.SNEAK, greatest: true, enemy: true, strength: 6, timer: 4 },
            { type: STAT_TYPE_ENUM.FAITH, greatest: true, enemy: true, strength: 6, timer: 4 },
            //{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:4, timer:20},
          ], [FOOD_TYPE_ENUM.VEGGIES]);//4);

          if (index == ENEMY_ENUM.BUFFET_TREBUCHET)//atk:BIG, def:NA, speed:very slow
              return ENEMY("Buffet Trebuchet", "img/enemy/buffet_trebuchet.png", [999, 999, 999, 999], 30, [
                { type: STAT_TYPE_ENUM.FULLNESS, greatest: true, enemy: true, strength: 300, timer: 4 },
                //{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:4, timer:20},
              ], []);//4);

          if (index == ENEMY_ENUM.LOLLIPOP_NECROMANCER_RED)//atk:BIG, def:BOSS, speed:fast, weak to knight, strong to all others 
              return ENEMY("Lollipop Necromancer", "img/enemy/lollipop_necromancer_red.png", [48, 80, 32, 32], .5, [
        { type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 1, timer: 10 }
                //{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:4, timer:20},
              ], [FOOD_TYPE_ENUM.SWEET]);//4);

              if (index == ENEMY_ENUM.LOLLIPOP_NECROMANCER_GREEN)//atk:BIG, def:BOSS, speed:fast, weak to knight, strong to all others 
                  return ENEMY("Lollipop Necromancer", "img/enemy/lollipop_necromancer_green.png", [48, 80, 32, 32], .5, [
            { type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 1, timer: 10 }
                    //{type:STAT_TYPE_ENUM.ARMOR ,greatest:true,enemy:true, strength:4, timer:20},
                  ], [FOOD_TYPE_ENUM.SWEET]);//4);


              if (index == ENEMY_ENUM.CELERITY_CELERY)//atk:  normal, def: normal, speed:fast, weak to spellblade
                  return ENEMY("Celerity Celery", "img/enemy/celerity_celery.png", [6, 10, 999, 999], 10, [
                  ], [FOOD_TYPE_ENUM.VEGGIES]);//4);
    //debugger;

              if (index == ENEMY_ENUM.CREAM_CHEESE_HARPY)//atk:high, def:med, speed:fast, weak to ranger,cumulative 
                  return ENEMY("Cream Cheese Harpy", "img/enemy/cream_cheese_harpy.png", [12, 999, 999, 999], 3, [
                    { type: STAT_TYPE_ENUM.MAGIC, greatest: true, enemy: true, strength: 4, timer: 15 },
                    { type: STAT_TYPE_ENUM.SNEAK, greatest: true, enemy: true, strength: 4, timer: 15 },
                  ], [FOOD_TYPE_ENUM.DAIRY]);//4);


              if (index == ENEMY_ENUM.BUTTER_BURGLAR)//atk:NA, def:miniboss, speed:very fast, weak to ranger
                  return ENEMY("Golden Butter Burglar", "img/enemy/butter_burglar.png", [150, 200, 999, 999], 7, [
                    //{ type: STAT_TYPE_ENUM.MAGIC, greatest: true, enemy: true, strength: 4, timer: 15 },
                    //{ type: STAT_TYPE_ENUM.SNEAK, greatest: true, enemy: true, strength: 4, timer: 15 },
                  ], [FOOD_TYPE_ENUM.DAIRY]);//4);


              if (index == ENEMY_ENUM.BLUE_CHEESE_CYCLOPS)//atk:BOSS, def:BOSS, speed:fast, weak to ranger,cumulative 
                  return ENEMY("Blue Cheese Cyclops", "img/enemy/blue_cheese_cyclops.png", [200, 400, 999, 400], 3, [
                    { type: STAT_TYPE_ENUM.MAGIC, greatest: true, enemy: true, strength: 4, timer: 15 },
                    { type: STAT_TYPE_ENUM.FAITH, greatest: true, enemy: true, strength: 4, timer: 15 },
                    { type: STAT_TYPE_ENUM.SNEAK, greatest: true, enemy: true, strength: 4, timer: 15 },
                  ], [FOOD_TYPE_ENUM.DAIRY]);//4);

                  if (index == ENEMY_ENUM.BROCOLLI_DEMON_DOOR)//atk:na, def:small, speed:na, weak to psychic strong to magic strong to weapon
                      return ENEMY("Brocolli_Demon_Door", "img/enemy/brocolli_demon_door.png", [24, 40, 8, 999], 999, [
                      ], [FOOD_TYPE_ENUM.VEGGIES]);//4);


                  if (index == ENEMY_ENUM.CILANTRO_RUNE)//atk:miniboss, def:miniboss, speed:slow, weak to psychic,cumulative 
                      return ENEMY("Cilantro Rune", "img/enemy/cilantro_rune.png", [999, 200, 100, 999], 8, [
                        { type: STAT_TYPE_ENUM.MAGIC, greatest: true, enemy: true, strength: 8, timer: 20 },
                      ], [FOOD_TYPE_ENUM.VEGGIES]);//4);

                  if (index == ENEMY_ENUM.SKELETON_WARRIOR)//atk:med, def:med, speed:med, weak to psychic strong to magic strong to weapon
                      return ENEMY("Skeleton Warrior", "img/enemy/skeleton_warrior.png", [36, 60, 16, 999], 5, [
                        { type: STAT_TYPE_ENUM.WEAPON, greatest: true, enemy: true, strength: 6, timer: 5 },
                      ], [FOOD_TYPE_ENUM.VEGGIES]);//4);

                  if (index == ENEMY_ENUM.GHOST_PRINCE)//atk:BOSS, def:BOSS, speed:med, 
                      return ENEMY("Ghost Prince", "img/enemy/ghost_prince.png", [999, 999, 100, 999], 5, [
                        { type: STAT_TYPE_ENUM.FAITH, greatest: true, enemy: true, strength: 8, timer: 30 },
                      ], []);//4);

                      if (index == ENEMY_ENUM.TOMATO_SKULL)//atk:na, def:med, speed:fast, weak to psychic
                          return ENEMY("Tomato Skull", "img/enemy/tomato_skull.png", [999, 60, 16, 999], 10, [
                          ], [FOOD_TYPE_ENUM.VEGGIES]);//4);


                      if (index == ENEMY_ENUM.ORANGE_ARCANE_TURRET)//atk:BIG, def:med, speed:fast, weak to sneak, strong to everything else, stacks
                          return ENEMY("Orange Arcane Turret", "img/enemy/orange_arcane_turret.png", [999, 30, 24, 4], 3, [
                            { type: STAT_TYPE_ENUM.MAGIC, greatest: true, enemy: true, strength: 6, timer: 4 },
                          ], [FOOD_TYPE_ENUM.FRUIT]);//4);

                      if (index == ENEMY_ENUM.WATERMEON_KNIGHT)//atk:med, def:BIG, speed:slow, weak to monk
                          return ENEMY("Watermelon Knight", "img/enemy/watermelon_knight.png", [48, 80, 999, 8], 3, [
                            { type: STAT_TYPE_ENUM.WEAPON, greatest: true, enemy: true, strength: 4, timer: 2 },
                          ], [FOOD_TYPE_ENUM.FRUIT]);//4);

                      if (index == ENEMY_ENUM.FRUITCAKE_GOLEM)//atk:miniboss, def:miniboss, speed:slow, strong to everything except monk, stacks
                          return ENEMY("Fruitcake Golem", "img/enemy/fruitcake_golem.png", [48, 160, 128, 32], 8, [
                            { type: STAT_TYPE_ENUM.WEAPON, greatest: true, enemy: true, strength: 8, timer: 20 },
                                { type: STAT_TYPE_ENUM.MAGIC, greatest: true, enemy: true, strength: 8, timer: 20 },
                          ], [FOOD_TYPE_ENUM.FRUIT, FOOD_TYPE_ENUM.SWEET]);//4);

                      if (index == ENEMY_ENUM.ORANGE_PRINCE)//atk:BOSS, def:BOSS, speed:fast, strong to everything except monk
                          return ENEMY("Orange Sun Prince", "img/enemy/orange_sun_prince.png", [999, 400, 200, 999], 3, [
                            { type: STAT_TYPE_ENUM.SNEAK, greatest: true, enemy: true, strength: 8, timer: 9 },
                                { type: STAT_TYPE_ENUM.MAGIC, greatest: true, enemy: true, strength: 8, timer: 9 },
                          ], [FOOD_TYPE_ENUM.FRUIT]);//4);

                          if (index == ENEMY_ENUM.BANANA_KNIGHT)//atk:BOSS, def:BOSS, speed:medium, strong to everything except monk
                              return ENEMY("Banana Moon Knight", "img/enemy/banana_moon_knight.png", [400, 999, 999, 200], 5, [
                                { type: STAT_TYPE_ENUM.FAITH, greatest: true, enemy: true, strength: 10, timer: 15 },
                                    { type: STAT_TYPE_ENUM.WEAPON, greatest: true, enemy: true, strength: 10, timer: 15 },
                              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

                          if (index == ENEMY_ENUM.SNEAKY_STRAWBERRY)//atk:NA, def:small, speed:fast , weak to monk
                              return ENEMY("Sneaky Strawberry", "img/enemy/sneaky_strawberry.png", [999, 999, 999, 2], 10, [
                              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

                                        //******************
                          if (index == ENEMY_ENUM.PEPPERMINT_PIXIE)//atk:big, def:small, speed:fast , strong to spellblade,  stacker
                              return ENEMY("Peppermint Pixie", "img/enemy/peppermint_pixie.png", [20, 160, 999, 999], 3, [
                                   { type: STAT_TYPE_ENUM.MAGIC, greatest: true, enemy: true, strength: 10, timer: 6 }
                              ], [FOOD_TYPE_ENUM.SWEET]);//4);

                          if (index == ENEMY_ENUM.GARLIC_GATE)//atk:NA, def:medium, speed:NA , weak to spellblade
                              return ENEMY("Garlic Gate", "img/enemy/garlic_gate.png", [999, 20, 999, 999], 999, [
                              ], [FOOD_TYPE_ENUM.VEGGIES]);//4);

                          if (index == ENEMY_ENUM.SPRING_ONION_SPRITE)//atk:big, def:small, speed:fast , weak to spellblade
                              return ENEMY("Spring Onion Sprite", "img/enemy/leek_fairy.png", [40, 20, 999, 999], 3, [
                                { type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 10 }
                              ], [FOOD_TYPE_ENUM.VEGGIES]);//4);

    if (index == ENEMY_ENUM.FAIRY_QUEEN)//atk:NA, def:BOSS/BIG, speed:fast 
        return ENEMY("Fairy Queen", "img/enemy/fairy_queen.png", [100, 999, 999, 999], 10, [
        ], [FOOD_TYPE_ENUM.SWEET]);//4);

    if (index == ENEMY_ENUM.FROZEN_YOGURT_FAIRY)//atk:NA, def:small, speed:fast , weak to ranger
        return ENEMY("Frozen Yogurt Fairy", "img/enemy/cream_fairy.png", [20, 40, 999, 999], 10, [
        ], [FOOD_TYPE_ENUM.DAIRY]);//4);

    if (index == ENEMY_ENUM.BANANA_INQUISITOR)//atk:miniboss, def:miniboss, speed:medium, stacks, weak to monk
        return ENEMY("Banana Inquisitor", "img/enemy/banana_inquisitor.png", [999, 999, 64, 999], 5, [
            { type: STAT_TYPE_ENUM.FAITH, greatest: true, enemy: true, strength: 10, timer: 10 },
            { type: STAT_TYPE_ENUM.SNEAK, greatest: true, enemy: true, strength: 8, timer: 10 }
        ], [FOOD_TYPE_ENUM.FRUIT]);//4);

    if (index == ENEMY_ENUM.BANANA_HIGH_PRIEST)//atk:BOSS, def:BOSS/BIG, speed:fast , stacks, weak to monk
        return ENEMY("Banana High Priest", "img/enemy/banana_pontiff.png", [999, 999, 256, 999], 5, [
            { type: STAT_TYPE_ENUM.FAITH, greatest: true, enemy: true, strength: 10, timer: 15 },
            { type: STAT_TYPE_ENUM.SNEAK, greatest: true, enemy: true, strength: 8, timer: 15 }
        ], [FOOD_TYPE_ENUM.FRUIT]);//4);


if(index == ENEMY_ENUM.SUCCUBUS_TRAINER)//atk: big, def: big, speed:fast, weak to trickster
      return ENEMY("Succubus Trainer", "img/enemy/succubus_trainer.png",    [48,  999,  999, 32], 3, [   
        {type:STAT_TYPE_ENUM.WEIGHT ,greatest:true,enemy:true, strength:12, timer:10}
      ], [FOOD_TYPE_ENUM.VEGGIES]);//4);

if(index == ENEMY_ENUM.INCUBUS_TRAINER)//atk: BOSS, def: BOSS, speed:fast, weak to trickster
      return ENEMY("Succubus Trainer", "img/enemy/incubus_trainer.png",    [999,  999,  999, 320], 3, [   
        {type:STAT_TYPE_ENUM.WEIGHT ,greatest:true,enemy:true, strength:20, timer:10}
      ], [FOOD_TYPE_ENUM.VEGGIES]);//4);

if(index == ENEMY_ENUM.MUSHROOM_ARMOR)//atk: BIG, def: big, speed:slow, weak to barbarian
      return ENEMY("Mushroom Armor", "img/enemy/mushroom_armor.png",    [48,  999,  999, 32], 8, [   

 {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:12, timer:5}

      ], [FOOD_TYPE_ENUM.VEGGIES]);//4);

if(index == ENEMY_ENUM.MUSHROOM_GHOST)//atk: NA, def: medium, speed:fast, weak to monk
      return ENEMY("Mushroom Ghost", "img/enemy/mushroom_ghost.png",    [999,  999,  32, 999], 10, [   
      ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if(index == ENEMY_ENUM.MUSHROOM_COOKIE)//atk: na, def: big, speed:slow, weak to necro
      return ENEMY("Mushroom Cookie", "img/enemy/mushroom_cookie.png",    [24,  999,  999, 999], 20, [   
      ], [FOOD_TYPE_ENUM.SWEET]);//4);

if(index == ENEMY_ENUM.FUNGAL_THRALL)//atk: MEDIUM, def: MED, speed:slow, weak to inquisitor
      return ENEMY("Fungal Thrall", "img/enemy/fungal_thrall.png",    [48,  999,  64, 999], 8, [   

 {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:8, timer:10},

 {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:8, timer:10}

      ], [FOOD_TYPE_ENUM.MEAT]);//4);

if(index == ENEMY_ENUM.FUNGAL_QUEEN)//atk: NA, def: BOSS, speed:BOSS, weak to barbarian
      return ENEMY("Fungal Queen", "img/enemy/fungal_queen.png",    [200,  999,  999, 999], 20, [   
      ], [FOOD_TYPE_ENUM.VEGGIES]);//4);



if (index == ENEMY_ENUM.MANDRAKE)//atk:BIG, def:medium, speed:fast, stacker
    return ENEMY("Icon of Spring", "img/enemy/mandrake.png", [999, 32, 999, 999], 3, [
                { type: STAT_TYPE_ENUM.MAGIC, greatest: true, enemy: true, strength: 6, timer: 30 }
              ], []);//4);

    if (index == ENEMY_ENUM.FIRE_IMP)//atk:BIG, def:medium, speed:fast, stacker
        return ENEMY("Icon of Summer", "img/enemy/fire_imp.png", [32, 999, 999, 999], 3, [
                { type: STAT_TYPE_ENUM.WEAPON, greatest: true, enemy: true, strength: 6, timer: 30 }
              ], []);//4);

    if (index == ENEMY_ENUM.SCARECROW)//atk:BIG, def:medium, speed:fast, stacker
        return ENEMY("Icon of Autumn", "img/enemy/scarecrow.png", [999, 999, 32, 999], 3, [
                { type: STAT_TYPE_ENUM.FAITH, greatest: true, enemy: true, strength: 6, timer: 30 }
              ], []);//4);

    if (index == ENEMY_ENUM.WINTER_WOLF)//atk:BIG, def:medium, speed:fast, stacker
        return ENEMY("Icon of Winter", "img/enemy/winter_wolf.png", [999, 999, 999, 32], 3, [
                { type: STAT_TYPE_ENUM.SNEAK, greatest: true, enemy: true, strength: 6, timer: 30 }
              ], []);//4);



if (index == ENEMY_ENUM.TIME_WITCH)//atk:big, def:boss, speed:fast
    return ENEMY("Time Witch", "img/enemy/time_witch.png", [200, 200, 200, 200], 3, [
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:30},
        {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:30},
        {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:30},
        {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:30},
              ], [FOOD_TYPE_ENUM.DAIRY]);//4);

if (index == ENEMY_ENUM.SHADOW_WARRIOR)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Warrior", "img/enemy/shadow_warrior.png", [250, 999, 999, 999], 5, [
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_THIEF)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Thief", "img/enemy/shadow_thief.png", [250, 999, 999, 250], 5, [
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_WITCH)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Witch", "img/enemy/shadow_witch.png", [999, 250, 999, 999], 5, [
       // {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_ERROR)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Error", "img/enemy/shadow_error.png", [999, 999, 250, 999], 5, [
     //   {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        {type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_BARD)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Bard", "img/enemy/shadow_bard.png", [999, 999, 250, 999], 5, [
      //  {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        {type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_SPELLBLADE)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Spellblade", "img/enemy/shadow_spellblade.png", [250, 250, 999, 999], 5, [
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_KNIGHT)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Knight", "img/enemy/shadow_knight.png", [999, 999, 250, 999], 5, [
        //{type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_ILLUSIONIST)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Illusionist", "img/enemy/shadow_illusionist.png", [999, 250, 999, 250], 5, [
      //  {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_ENGINEER)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Engineer", "img/enemy/shadow_engineer.png", [250, 999, 999, 999], 999, [
       // {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_RANGER)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Ranger", "img/enemy/shadow_ranger.png", [250, 999, 999, 999], 5, [
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_PSYCHIC)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Psychic", "img/enemy/shadow_psychic.png", [999, 999, 250, 999], 5, [
       // {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_MONK)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Monk", "img/enemy/shadow_monk.png", [999, 999, 250, 250], 5, [
       // {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_DANCER)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Dancer", "img/enemy/shadow_dancer.png", [999, 999, 250, 999], 999, [
       // {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_NECROMANCER)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Necromancer", "img/enemy/shadow_necromancer.png", [250, 999, 250, 999], 5, [
        {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_MERCHANT)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Merchant", "img/enemy/shadow_merchant.png", [999, 999, 999, 250], 999, [
      //  {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_TRICKSTER)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Trickster", "img/enemy/shadow_trickster.png", [999, 999, 999, 250], 5, [
      //  {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);


if (index == ENEMY_ENUM.SHADOW_BARBARIAN)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Barbarian", "img/enemy/shadow_barbarian.png", [250, 999, 999, 999], 5, [
       {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
    //   {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_INQUISITOR)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Inquisitor", "img/enemy/shadow_inquisitor.png", [250, 999, 250, 999], 5, [
       {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
     //  {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_DRUID)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Druid", "img/enemy/shadow_druid.png", [999, 250, 250, 999], 5, [
      //  {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
  //     {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_ALCHEMIST)//atk:big, def:miniboss, speed:med
    return ENEMY("Shadow Alchemist", "img/enemy/wip_fruit.png", [999, 250, 999, 999], 5, [
      //  {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
     //  {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_BEASTKIN)//atk:big, def:miniboss, speed:med
    return ENEMY("Shadow Beastkin", "img/enemy/wip_fruit.png", [250, 999, 999, 999], 5, [
       {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
     //  {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);


if (index == ENEMY_ENUM.SHADOW_RAIDER)//atk:big, def:miniboss, speed:med
    return ENEMY("Shadow Raider", "img/enemy/wip_fruit.png", [999, 999, 999, 250], 5, [
      // {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
      {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_MAGUS)//atk:big, def:miniboss, speed:med
    return ENEMY("Shadow Magus", "img/enemy/wip_fruit.png", [999, 250, 999, 999], 5, [
     //  {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
     //  {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);

if (index == ENEMY_ENUM.SHADOW_SPY)//atk:big, def:miniboss, speed:med
              return ENEMY("Shadow Spy", "img/enemy/wip_fruit.png", [999, 999, 999, 250], 5, [
     //  {type:STAT_TYPE_ENUM.WEAPON ,greatest:true,enemy:true, strength:10, timer:25},
       // {type:STAT_TYPE_ENUM.MAGIC ,greatest:true,enemy:true, strength:10, timer:25},
      //  {type:STAT_TYPE_ENUM.FAITH ,greatest:true,enemy:true, strength:10, timer:25},
      {type:STAT_TYPE_ENUM.SNEAK ,greatest:true,enemy:true, strength:10, timer:25},
        //{type: STAT_TYPE_ENUM.HEAL, greatest: false, enemy: false, strength: 10, timer: 25 }

              ], [FOOD_TYPE_ENUM.FRUIT]);//4);




}


    //preload enemy assets
    for(var i = 0; i < ENEMY_ENUM.NUM_ENEMY; ++i)
        create_enemy(i);