// Jason Brillante "Damdoshi"
// Hanged Bunny Studio 2014-2015
//
// KoBang!

#include		<math.h>
#include		"kobang.hpp"

void			kobang::leveling(void)
{
  /// always
  changediscotype();
  if (serie_cnt % 3 == 0)
    changecolor();
  if (serie_cnt % 10 == 0)
    {
      if ((global_speed += 0.025) > 0.3)
	global_speed = 0.3;
      if ((bomb_delay -= 1) < 1)
	bomb_delay = 1;
      msg = "1up !";
      msg_timer = 20;
      herolife += 1;
    }

  /// after 10 series
  if (serie_cnt == 10)
    {
      startdeforming();
      backtransparency = 128;
    }

  if (serie_cnt == 20)
    backtransparency = 64;

  if (serie_cnt > 20)
    {
      if (serie_cnt < 100)
	turn_speed((serie_cnt / 10.0) - 1);
    }

  if (serie_cnt == 30)
    backtransparency = 60;

  if (serie_cnt == 40)
    backtransparency = 50;

  /// every 20 serie, the difficulty increase
  if (serie_cnt % 5 == 0)
    {
      if (width < 40)
	width += 1;
      if (deepness < 20)
	deepness += 1;
    }
}

