Exemplo n.º 1
0
 internal static void exp_gain(Game_Actor actor, int gain)
 {
     if (actor != null)
     {
         while (gain != 0)
         {
             if (gain > 0)
             {
                 actor.exp++;
                 if (actor.can_level())
                 {
                     gain--;
                 }
                 else
                 {
                     gain = 0;
                 }
             }
             else if (gain > 0)
             {
                 actor.exp--;
                 gain++;
             }
         }
     }
 }