
var mobility_texture = new Image();
mobility_texture.src = "img/icons/mobility.png";

var level_texture = new Image();
level_texture.src = "img/icons/level.png";


var shield_texture = new Image();
shield_texture.src = "img/icons/shield.png";

var ko_tex = new Image();
ko_tex.src = "img/icons/KO.png";

var fade_texture = new Image();
fade_texture.src = "img/ui/fade.png";

var aoe_images = [];

aoe_images[AOE_TYPE_ENUM.AOE_SINGLE] = new Image();
aoe_images[AOE_TYPE_ENUM.AOE_SINGLE].src = "img/icons/aoe_single.png";

aoe_images[AOE_TYPE_ENUM.AOE_AREA] = new Image();
aoe_images[AOE_TYPE_ENUM.AOE_AREA].src = "img/icons/aoe_area.png";

aoe_images[AOE_TYPE_ENUM.AOE_PIERCE] = new Image();
aoe_images[AOE_TYPE_ENUM.AOE_PIERCE].src = "img/icons/aoe_pierce.png";

aoe_images[AOE_TYPE_ENUM.AOE_ALL] = new Image();
aoe_images[AOE_TYPE_ENUM.AOE_ALL].src = "img/icons/aoe_all.png";

aoe_images[AOE_TYPE_ENUM.AOE_ROW] = new Image();
aoe_images[AOE_TYPE_ENUM.AOE_ROW].src = "img/icons/aoe_row.png";

aoe_images[AOE_TYPE_ENUM.AOE_COLUMN] = new Image();
aoe_images[AOE_TYPE_ENUM.AOE_COLUMN].src = "img/icons/aoe_column.png";

var adventurer_frames = [];

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

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

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

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

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

const NUM_STUFF_LEVEL = 5;

ADVENTURER = function(name, image_filepath, stats_list, fav_food, range, aoe_type, id, num_fat, start_unlocked)
{
  var self = {};

  self.unlocked = start_unlocked;

  self.NUM_FAT_LEVEL = num_fat;

  self.id = id;
  self.name = name;

  self.current_stats  = stats_list;
  self.damage_animation = 0.0;

  self.range = range;
  self.aoe_type = aoe_type;

  self.shield = 0;
  self.buff_value = 0;

  self.actual_stats = self.current_stats.slice();

  self.favorite_food = fav_food;
  self.temporary_favorite_food = FOOD_TYPE_ENUM.NUM_FOOD_TYPE;

  //self.current_stats[STAT_TYPE_ENUM.WEIGHT]  = 200;
  self.level_start_weight = 0;
  self.level_end_weight = 0;

  self.debuff_timers = [];
  self.max_debuff_timers = [];
  self.debuff_values = [];
  for(var i in self.current_stats)
  {
    self.debuff_values[i] = 0;
    self.debuff_timers[i] = 0;
    self.max_debuff_timers[i] = 0;
  }
  self.image = [];//new Image();
  var i = 0;
  var j = 0;
  
  //debugger;
 
  self.unlock_image  = new Image();
  self.unlock_image.src = image_filepath + "unlock.png";

    //*
    while(i < self.NUM_FAT_LEVEL)
  {
    while(j < NUM_STUFF_LEVEL)
    {

      var filename = ("00000" + (NUM_STUFF_LEVEL * i + j)).slice(-5)

      self.image[i * NUM_STUFF_LEVEL + j] = new Image();
      //self.image[i * NUM_STUFF_LEVEL + j].loading = "lazy";
      self.image[i * NUM_STUFF_LEVEL + j].src = image_filepath + filename + ".png";
      ++j;

      //console.log(filename);
    }
    j = 0;
    ++i;
  }//*/

  //debugger;

  self.display_full = 0.0;
  self.display_stuff = 1;

  self.display_fat = 1;
  self.display_fat_timer = 0.0;

  self.display_weight = 0.0;

  self.ko = false;

  self.stomach_level = 1;
  self.level = 1;
  self.mobility = 1;
  self.metabolism = 1;

  self.get_actual_stat = function(index)
  {
    if(self.actual_stats[index] > 0 && index < NUM_ATTACKS_ABILITIES)
      return self.actual_stats[index] + self.level - 1; //start at level 1
   
      if(index == STAT_TYPE_ENUM.MAX_ATTACK_TIMER)
      {
        var fat = 0;
        var threshold = 50;
        var count = self.current_stats[STAT_TYPE_ENUM.WEIGHT];
        while(count > 0)
        {
          count -= threshold;
          if(count >= 0)
           fat += 1;
          threshold += 10;
        }

        return self.actual_stats[index] * (1 + Math.max(.05, Math.pow(.99, (self.mobility - 1))) * (1+fat));
      }

      if(index == STAT_TYPE_ENUM.MAX_FULLNESS)
      return self.actual_stats[index] + 10.0 * ( self.stomach_level - 1);

      if(index == STAT_TYPE_ENUM.DIGESTION_RATE)
      return 1.0 + .5 * (self.metabolism - 1);

      return self.actual_stats[index];
  }

  self.draw_stats = function(x, y, w,h, damage_preview, full_bar ) //dim of whole picture
  {
      var icon_size = w / 4.5;


      //dbg
      //draw_text(self.shield, x, y, icon_size);


      if(self.display_full < self.current_stats[STAT_TYPE_ENUM.FULLNESS])
        self.display_full += (self.current_stats[STAT_TYPE_ENUM.FULLNESS] - self.display_full) * .1;
      else
        self.display_full = self.current_stats[STAT_TYPE_ENUM.FULLNESS];


        var percent = self.display_full  / self.current_stats[STAT_TYPE_ENUM.MAX_FULLNESS];
        
        var bw = w - .675 * icon_size;
        var bh = (64.0 /  813.0) * bw;

        draw_bar(
          x + .5 * (w - bw), 
          y + .5 * h - .5 * bh, 
          bw, 
          bh, percent,
          damage_preview / self.current_stats[STAT_TYPE_ENUM.MAX_FULLNESS]
        );

   

      //console.log("func");
      //fullness
      //draw_center(stat_images[STAT_TYPE_ENUM.FULLNESS], x - .5 * w + .6 * icon_size, y + .5 * h - .6 * icon_size, icon_size, icon_size);
      
      if(full_bar)
      {
        var text = Math.ceil(self.current_stats[STAT_TYPE_ENUM.FULLNESS]) + "/" + self.current_stats[STAT_TYPE_ENUM.MAX_FULLNESS];      
        draw_text(text, 
          x  - .125 * icon_size * text.length, 
          y + .5 * h - 0.0 * icon_size, .5 * icon_size);
      }
      
              
      if (self.ko)
          draw_center(ko_tex, x, y, 2 * icon_size, 2 * icon_size);
      
      //debugger;

      //favortie
      var f = self.favorite_food;
      if(self.temporary_favorite_food != FOOD_TYPE_ENUM.NUM_FOOD_TYPE)
        f = self.temporary_favorite_food;

      draw_center(food_images[f], x - .5 * w + .3125 * icon_size, y + .5 * h - .325 * icon_size, icon_size, icon_size);
      

      //attack timer
      //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.current_stats[STAT_TYPE_ENUM.ATTACK_TIMER] > 0.0)
      {
        var count = 0;
        if(self.current_stats[STAT_TYPE_ENUM.ATTACK_TIMER] < 1.0)
        count = 1;

        draw_text(self.current_stats[STAT_TYPE_ENUM.ATTACK_TIMER].toFixed(count), x - .5 * w + .6 * icon_size, y - .5 * h + 1.0 * icon_size, .5 * icon_size);
      }*/

      //range and aoe
      //draw_center(aoe_images[self.aoe_type], x + .5 * w - .6 * icon_size, y - .5 * h + .6 * icon_size, icon_size, icon_size);
      //draw_text(self.range, x + .5 * w - .6 * icon_size, y - .5 * h + 1.0 * icon_size, .5 * icon_size);
   

    //weight    
    //draw_center(stat_images[STAT_TYPE_ENUM.WEIGHT], x + .5 * w - .6 * icon_size, y + .5 * h - .6 * icon_size, icon_size, icon_size);
    draw_text(self.current_stats[STAT_TYPE_ENUM.WEIGHT].toFixed(0), 
    x + .5 * w - .1 * icon_size - (.5 * .6 * icon_size) * self.current_stats[STAT_TYPE_ENUM.WEIGHT].toFixed(0).toString().length, 
    y + .5 * h - .4 * icon_size, 
    .6 * icon_size);
    
    //shield
    if(self.shield > 0)
    {    
      draw_center(shield_texture, 
        x + .5 * w - .0 * icon_size , 
        y + .5375 * h - (1.6) * icon_size, 
        icon_size, icon_size);
      draw_text(self.shield, 
        x + .5 * w - .0 * icon_size+ (-.25 * .6 * self.shield.toString().length)  * icon_size, 
        y + .5375 * h - (1.6 - .25) * icon_size, 
        .6 * icon_size);
    }

    var counter = 0;
    for(var i in self.actual_stats)
    {
      if(i == NUM_ATTACKS_ABILITIES)
        break;
      
        
      var alpha = 1;
      if(self.current_stats[i] <= 0)
        alpha = .5;

      if(self.get_actual_stat(i) > 0)
      { 
        draw_center(stat_images[i], 
          x - .5 * w + .0 * icon_size, 
          y - .5 * h + (counter + .6) * icon_size, 
          icon_size, icon_size);

        var color = TEXT_COLOR_ENUM.WHITE;
        
        if(self.debuff_timers[i] > 0)
        {
          var count = 0;
          if(self.debuff_timers[i] < 1.0)
          count = 1;

          //color = TEXT_COLOR_ENUM.RED;

          draw_circular_bar( 
            x - .5 * w + .0 * icon_size, 
            y - .5 * h + (counter + .6) * icon_size, 
            icon_size,
            self.debuff_timers[i] / self.max_debuff_timers[i]
          );
          //draw_text(self.debuff_timers[i].toFixed(count), x - .5 * w + .25 * icon_size, y - .5 * h + (counter +.5) * icon_size, .5 * icon_size);
        }
        var size_mult = 1.0;
        if(Math.abs(self.buff_value) > Math.abs(self.debuff_values[i]) && i != STAT_TYPE_ENUM.BUFF)
        {
          size_mult = 1.5;
          color = TEXT_COLOR_ENUM.GREEN;
        }

          context.globalAlpha = alpha;
        draw_text(self.current_stats[i].toFixed(0), 
        x - .5 * w + (-.25 * size_mult *.6 * self.current_stats[i].toFixed(0).toString().length)  * icon_size, 
        y - .5 * h + (counter + .6 + size_mult *.25*.6) * icon_size, 
        size_mult * .6 * icon_size, color);
        context.globalAlpha = 1.0;
    
              //console.log(self.attacks[i]);
        //draw_text(i + ": " + self.attacks[i], x - .25 * w, y - .2 * h - .1 * counter * h);
        ++counter;
      }
    }

    }


    self.draw_stats_small = function(x, y, w, h, damage_preview ) //dim of whole picture
  {
      var icon_size = w / 4.0;

      //console.log("func");
      //fullness
      //draw_center(stat_images[STAT_TYPE_ENUM.FULLNESS], x - .5 * w + .6 * icon_size, y + .5 * h - .6 * icon_size, icon_size, icon_size);
      //draw_text(self.get_actual_stat(STAT_TYPE_ENUM.MAX_FULLNESS).toFixed(1), x - .5 * w + .6 * icon_size, y + .5 * h - .75 * icon_size, .5 * icon_size);
      //draw_text("-" + self.get_actual_stat(STAT_TYPE_ENUM.DIGESTION_RATE).toFixed(2) + "/s", x - .5 * w + .6 * icon_size, y + .5 * h - .25 * icon_size, .5 * icon_size);

      
      //range and aoe
      draw_center(aoe_images[self.aoe_type], x + .5 * w - .6 * icon_size, y - .5 * h + .6 * icon_size, icon_size, icon_size);
      draw_text(self.range, x + .5 * w - .4 * icon_size, y - .5 * h + 1.0 * icon_size, .5 * icon_size);
   

      /*
      //mobility
      draw_center(mobility_texture, x - .5 * w + 2 * icon_size, y + .5 * h - .6 * icon_size, icon_size, icon_size);
      draw_text(self.mobility, x - .5 * w + 2 * icon_size, y + .5 * h + 0 * icon_size, .5 * icon_size);


      //level
      draw_center(level_texture, x - .5 * w + 3.4 * icon_size, y + .5 * h - .6 * icon_size, icon_size, icon_size);
      draw_text(self.level, x - .5 * w + 3.4 * icon_size, y + .5 * h + 0 * icon_size, .5 * icon_size);
*/

      //favortie
      draw_center(food_images[self.favorite_food], x - .5 * w + .3125 * icon_size, y + .5 * h - .325 * icon_size, icon_size, icon_size);

      //attack timer
      //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.current_stats[STAT_TYPE_ENUM.ATTACK_TIMER] > 0.0)
      //draw_text("-" + Math.min(95, (100 - 100 * Math.pow(.99, (self.mobility - 1)))).toFixed(1) + "%", x - .5 * w + .6 * icon_size, y - .5 * h + 0.3 * icon_size, .5 * icon_size);
      //draw_text(self.get_actual_stat(STAT_TYPE_ENUM.MAX_ATTACK_TIMER).toFixed(1), x - .5 * w + .6 * icon_size, y - .5 * h + 1.0 * icon_size, .5 * icon_size);
    
      //weight    
      
    if(Math.abs(self.display_weight - self.current_stats[STAT_TYPE_ENUM.WEIGHT]) <= 1)
      self.display_weight = self.current_stats[STAT_TYPE_ENUM.WEIGHT];
    else(self.display_weight < self.current_stats[STAT_TYPE_ENUM.WEIGHT])
      self.display_weight += 2.0 * get_frame_time() * (self.current_stats[STAT_TYPE_ENUM.WEIGHT] - self.display_weight);


      //draw_center(stat_images[STAT_TYPE_ENUM.WEIGHT], x + .5 * w - .6 * icon_size, y + .5 * h - .6 * icon_size, icon_size, icon_size);
      draw_text(self.current_stats[STAT_TYPE_ENUM.WEIGHT].toFixed(0),
      x + .5 * w - .1 * icon_size - (.5 * .6 * icon_size) * self.current_stats[STAT_TYPE_ENUM.WEIGHT].toFixed(0).toString().length,
      y + .5 * h - .2 * icon_size,
      .6 * icon_size);
      
      var counter = 0;
      for(var i in self.actual_stats)
      {
        if(i == NUM_ATTACKS_ABILITIES)
          break;
        
          
        var alpha = 1;
        if(self.current_stats[i] <= 0)
          alpha = .25;

        if(self.get_actual_stat(i) > 0)
        { 
            draw_center(stat_images[i], x - .5 * w + .0 * icon_size,
            y - .5 * h + (counter + .6) * icon_size,
            icon_size, icon_size);
          
            draw_text(self.get_actual_stat(i).toFixed(0),
                x - .5 * w + (-.25  * .6 * self.get_actual_stat(i).toFixed(0).toString().length) * icon_size,
          y - .5 * h + (counter + .6 + .25 * .6) * icon_size,
          .6 * icon_size);
      
                //console.log(self.attacks[i]);
          //draw_text(i + ": " + self.attacks[i], x - .25 * w, y - .2 * h - .1 * counter * h);
          ++counter;
        }
      }

    }
  
   self.draw_small = function(x, y, s, alpha)
  {    
    var fat = 0;
    var threshold = 50;
    var count = self.display_weight;
    while(count > 0 && fat < self.NUM_FAT_LEVEL - 1)
    {
      count -= threshold;
      if(count >= 0)
       fat += 1;
      threshold += 10;
    }

    var stuff = Math.ceil(self.current_stats[STAT_TYPE_ENUM.FULLNESS] / 5.0);
    if(stuff >= NUM_STUFF_LEVEL)
      stuff = NUM_STUFF_LEVEL -1;
      if(fat >= self.NUM_FAT_LEVEL)
      fat = self.NUM_FAT_LEVEL -1;

      draw_center(adventurer_frames[self.favorite_food],
     x, y, (610.0 / 540.0) * s, (670.0 / 600.0) * (300.0 / 270.0) * s, alpha);

    draw_center(self.image[fat * NUM_STUFF_LEVEL + stuff], x, y, s,(300.0 / 270.0) *  s, alpha);

    self.draw_stats_small(x, y, s, (300.0 / 270.0) *s);
  }

   self.draw_npc = function (x, y, s, alpha) {
       var fat = 0;
       var threshold = 50;
       var count = self.display_weight;
       while (count > 0 && fat < self.NUM_FAT_LEVEL - 1) {
           count -= threshold;
           if (count >= 0)
               fat += 1;
           threshold += 10;
       }

       var stuff = Math.ceil(self.current_stats[STAT_TYPE_ENUM.FULLNESS] / 5.0);
       if (stuff >= NUM_STUFF_LEVEL)
           stuff = NUM_STUFF_LEVEL - 1;
       if (fat >= self.NUM_FAT_LEVEL)
           fat = self.NUM_FAT_LEVEL - 1;

       draw_center(adventurer_frames[self.favorite_food],
      x, y, (610.0 / 540.0) * s, (670.0 / 600.0) * (300.0 / 270.0) * s, 1.0);

       draw_center(self.image[fat * NUM_STUFF_LEVEL + stuff], x, y, s, (300.0 / 270.0) * s, alpha);

   }

  self.draw = function(x, y, w, h, alp, damage_preview, full_bar )
  {
    alp = alp || 1.0;
    var fat = 0;
    var threshold = 50;
    var count = self.current_stats[STAT_TYPE_ENUM.WEIGHT];
    while(count > 0 && fat < self.NUM_FAT_LEVEL - 1)
    {
      count -= threshold;
      if(count >= 0)
       fat += 1;
      threshold += 10;
    }

    var stuff = 0;
    threshold = 5;
    count = self.current_stats[STAT_TYPE_ENUM.FULLNESS];
    while(count > 0 && stuff < NUM_STUFF_LEVEL - 1)
    {
      count -= threshold;
      if(count >= 0)
      stuff += 1;
      threshold += 10;
    }


    if(stuff >= NUM_STUFF_LEVEL)
      stuff = NUM_STUFF_LEVEL -1;
      if(fat >= self.NUM_FAT_LEVEL)
      fat = self.NUM_FAT_LEVEL -1;
       
      if(self.display_stuff < stuff)
      {
        self.display_stuff += 1;
      }
      else if(self.display_stuff > stuff)
        self.display_stuff -= 1;

      

      if(stuff >= NUM_STUFF_LEVEL)
        stuff = NUM_STUFF_LEVEL -1;
      if(fat >= self.NUM_FAT_LEVEL)
        fat = self.NUM_FAT_LEVEL -1;


      //console.log(fat * NUM_STUFF_LEVEL + stuff);
      //console.log(self.image);

      if(self.display_stuff >= NUM_STUFF_LEVEL )
        self.display_stuff = NUM_STUFF_LEVEL - 1;

    draw_center(adventurer_frames[self.favorite_food],  
      x, y, (610.0 / 540.0) * w, (670.0 / 600.0) * h);
    draw_center(self.image[self.display_fat * NUM_STUFF_LEVEL + self.display_stuff], 
      x, y, w, h, (1.0 - self.display_fat_timer));

    if(self.display_fat != fat)
    {
      draw_center(
        self.image[fat * NUM_STUFF_LEVEL + self.display_stuff], 
        x, y, w, h, (self.display_fat_timer));
      
      self.display_fat_timer += get_frame_time();

      if(self.display_fat_timer >= 1.0)
      {
        self.display_fat_timer = 0.0;
        self.display_fat = fat;
      }

    }
    else
    {
      self.display_fat_timer = 0.0;
      self.display_fat = fat;
    }    


    if (self.damage_animation > 0.0)
        draw_center(red_flash, x, y, w, h, self.damage_animation);
    
    //var alpha = 1 * alp;
    if(self.current_stats[STAT_TYPE_ENUM.ATTACK_TIMER] > 0 || self.ko)
      draw_center(fade_texture, 
        x, y, w, h);
      if (self.current_stats[STAT_TYPE_ENUM.ATTACK_TIMER] > 0) {

          var bh = (64.0 / 813.0) * (w - .675 * w / 4.5); //this is based off the calculation for the height of the fullness bar in draw_stats()

          draw_center(fade_texture,
              x, y - .5 * bh
          + (1.0 - self.current_stats[STAT_TYPE_ENUM.ATTACK_TIMER] /
                  self.get_actual_stat(STAT_TYPE_ENUM.MAX_ATTACK_TIMER)) * .5 * (h -  bh)
              , w,
              self.current_stats[STAT_TYPE_ENUM.ATTACK_TIMER] /
              self.get_actual_stat(STAT_TYPE_ENUM.MAX_ATTACK_TIMER) *
              (h -  bh));
      }

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

	//draw_text("FUL:" + Math.floor(self.fullness) + "/" + Math.floor(self.max_fullness),x- .25 * w,y);
    //draw_text("WGT:" + Math.floor(self.weight) / 10, x - .25 * w, y - 20);
    
    //if(self.timer > 0)
    //draw_text("TMR:" + Math.floor(self.timer), x- .25 * w, y - .4 * h);
    
    /*var counter = 0;
    for(var i in self.attacks)
    {
      if(self.attacks[i] > 0)
      {        //console.log(self.attacks[i]);
        draw_text(i + ": " + self.attacks[i], x - .25 * w, y - .2 * h - .1 * counter * h);
        ++counter;
      }
    }*/


  }

  return self;
}

//speed = .1 * (NUM_TARGETS * RANGE * NUM_ATTACK+3*NUM_SUPPORT)

var __adventurer_list = {};
                                                                                     //wp mg fh sk he bf am    sp
	__adventurer_list[0] = ADVENTURER("The Warrior", "img/adventurer/warrior/",        [3, 0, 0, 0, 0, 0, 3, 0, 0.4, 0, 10, 0, 1], FOOD_TYPE_ENUM.MEAT, 1, AOE_TYPE_ENUM.AOE_SINGLE, 0, 15, true);
	__adventurer_list[1] = ADVENTURER("The Thief", "img/adventurer/thief/",            [2, 0, 0, 2, 0, 0, 0, 0, 0.2, 0, 10, 0, 1], FOOD_TYPE_ENUM.FRUIT, 1, AOE_TYPE_ENUM.AOE_SINGLE, 1, 15, true);
	__adventurer_list[2] = ADVENTURER("The Priestess", "img/adventurer/priestess/",    [0, 0, 4, 0, 4, 0, 0, 0, 0.6, 0, 10, 0, 1], FOOD_TYPE_ENUM.DAIRY, 3, AOE_TYPE_ENUM.AOE_SINGLE, 2, 15, true);
  __adventurer_list[3] = ADVENTURER("The Witch", "img/adventurer/witch/",              [0, 5, 0, 0, 0, 0, 0, 0, 1.5, 0, 10, 0, 1], FOOD_TYPE_ENUM.SWEET, 3, AOE_TYPE_ENUM.AOE_AREA, 3, 15, true);	
  __adventurer_list[4] = ADVENTURER("The Bard", "img/adventurer/bard/",                [0, 0, 0, 0, 3, 3, 0, 0, 0.6, 0, 10, 0, 1], FOOD_TYPE_ENUM.SWEET, 1, AOE_TYPE_ENUM.AOE_SINGLE, 4, 15, false);  
  __adventurer_list[5] = ADVENTURER("The Spellblade", "img/adventurer/spellblade/",    [2, 2, 0, 0, 0, 0, 0, 0, 0.2, 0, 10, 0, 1], FOOD_TYPE_ENUM.VEGGIES, 1, AOE_TYPE_ENUM.AOE_SINGLE, 5, 15, false);
  __adventurer_list[6] = ADVENTURER("The Knight", "img/adventurer/knight/",            [0, 0, 3, 0, 0, 0, 3, 0, 0.5, 0, 10, 0, 1], FOOD_TYPE_ENUM.SWEET, 1, AOE_TYPE_ENUM.AOE_PIERCE, 6, 15, false);
  __adventurer_list[7] = ADVENTURER("The Illusionist", "img/adventurer/illusionist/",  [0, 1, 0, 1, 0, 0, 0, 0, 3.6, 0, 10, 0, 1], FOOD_TYPE_ENUM.MEAT, 3, AOE_TYPE_ENUM.AOE_ALL, 7, 15, false);
  __adventurer_list[8] = ADVENTURER("The Engineer", "img/adventurer/engineer/",        [0, 0, 0, 0, 0, 2, 2, 0, 1.8, 0, 10, 0, 1], FOOD_TYPE_ENUM.SWEET, 3, AOE_TYPE_ENUM.AOE_AREA, 8, 15, false);
  __adventurer_list[9] = ADVENTURER("The Ranger", "img/adventurer/ranger/",            [2, 0, 0, 0, 0, 0, 0, 0, 0.3, 0, 10, 0, 1], FOOD_TYPE_ENUM.DAIRY, 3, AOE_TYPE_ENUM.AOE_SINGLE, 9, 15, false);
  __adventurer_list[10] = ADVENTURER("The Psychic", "img/adventurer/psychic/",         [0, 0, 2, 0, 0, 0, 0, 0, 1.5, 0, 10, 0, 1], FOOD_TYPE_ENUM.VEGGIES, 3, AOE_TYPE_ENUM.AOE_AREA, 10, 15, false);
  __adventurer_list[11] = ADVENTURER("The Monk", "img/adventurer/monk/",               [0, 0, 1, 1, 0, 0, 0, 0, 0.2, 0, 10, 0, 1], FOOD_TYPE_ENUM.FRUIT, 1, AOE_TYPE_ENUM.AOE_SINGLE, 11, 15, false);
  __adventurer_list[12] = ADVENTURER("The Dancer", "img/adventurer/dancer/",           [0, 0, 0, 0, 0, 1, 0, 0, 0.3, 0, 10, 0, 1], FOOD_TYPE_ENUM.FRUIT, 3, AOE_TYPE_ENUM.AOE_SINGLE, 12, 15, false);
  __adventurer_list[13] = ADVENTURER("The Necromancer", "img/adventurer/necromancer/", [1, 0, 1, 0, 0, 0, 0, 0, 3.6, 0, 10, 0, 1], FOOD_TYPE_ENUM.SWEET, 3, AOE_TYPE_ENUM.AOE_ALL, 13, 15, false);
__adventurer_list[14] = ADVENTURER("The Merchant", "img/adventurer/merchant/",         [0, 0, 0, 0, 1, 0, 1, 0, 0.6, 0, 10, 0, 1], FOOD_TYPE_ENUM.FRUIT, 3, AOE_TYPE_ENUM.AOE_SINGLE, 14, 15, false);
__adventurer_list[15] = ADVENTURER("The Trickster", "img/adventurer/trickster/",       [0, 0, 0, 1, 0, 1, 0, 0, 0.4, 0, 10, 0, 1], FOOD_TYPE_ENUM.VEGGIES, 1, AOE_TYPE_ENUM.AOE_SINGLE, 15, 15, false);

__adventurer_list[16] = ADVENTURER("The Barbarian", "img/adventurer/barbarian/",       [1, 0, 0, 0, 0, 0, 0, 0, 0.3, 0, 10, 0, 1], FOOD_TYPE_ENUM.VEGGIES, 1, AOE_TYPE_ENUM.AOE_COLUMN, 16, 15, false);
__adventurer_list[17] = ADVENTURER("The Inquisitor", "img/adventurer/inquisitor/",     [1, 0, 1, 0, 0, 0, 0, 0, 0.4, 0, 10, 0, 1], FOOD_TYPE_ENUM.MEAT, 1, AOE_TYPE_ENUM.AOE_SINGLE, 17, 15, false); 
__adventurer_list[18] = ADVENTURER("The Druid", "img/adventurer/druid/",               [0, 1, 1, 0, 0, 0, 0, 0, 0.8, 0, 10, 0, 1], FOOD_TYPE_ENUM.DAIRY, 1, AOE_TYPE_ENUM.AOE_AREA, 18, 15, false);
__adventurer_list[19] = ADVENTURER("The Alchemist", "img/adventurer/alchemist/",       [0, 1, 0, 0, 0, 1, 0, 0, 0.6, 0, 10, 0, 1], FOOD_TYPE_ENUM.FRUIT, 3, AOE_TYPE_ENUM.AOE_SINGLE, 19, 15, false);
__adventurer_list[20] = ADVENTURER("The Magus", "img/adventurer/magus/",               [0, 1, 0, 0, 0, 1, 0, 0, 0.7, 0, 10, 0, 1], FOOD_TYPE_ENUM.VEGGIES, 1, AOE_TYPE_ENUM.AOE_AREA, 20, 15, false);
