var mobhp1=new Array(293,293,451,451,632,474,3658,3658,3658,836,627,627,836,4733,4733,1063,1063,6568,6568,985,985,1313,1588,1588,7943,7943,1888,2048,2048,2214,2565,12829,12829,2751,2751,2751,2944,3350,17817,17817,3563,3563,4011,4246,8492,4737,4737,4737,4994,4994,5258,5258,5258,5258,5530,5810,9146,6097,9146,6392,6392,7006,7006,6695,7652,7987,8331,8331,8331,8683,8683,9044,9412,18825,348280,9790,15265,10571,11388,364423,11809,12680,13129,13588,407651,13588,14056,14056,14533,14533,15517,16023,32046,39603,448656,48070,16539,17065,18147,46759,18703,56111,467592,19270,20433,21031,64918,64918,21639,22258,503530,22887,23528,74524,25514,26894,27601,92039,92039,84959,77879,141599,481438,29049,493845,35749,29791,29791,30544,31309,31309,38503,32874,32874,336751,33675,34487,34487,529693,105938,36150,36150,37958,36150,36150,36150,36150,1807509,628996,37861,643652,43586,40523,42550,44576,46602,40523,40523,40523,48628,45580,42362,47631,45218124,49739,54261,45218,47479,49740,52001,45218,45218,55435,47188,48193,60293,50244,52757,55269,57781,5024423,50244,50244,52350,65414,55613,58394,69517,21133183,55613,55613,68075,72325,70805,75205,65652,31227518,82848,71442,81184,86034,74171,84286,89299,90961,124712,44338874,129321,137870,112345,49211);

var mobexp1=new Array(10,10,30,30,51,51,124,62,62,73,73,73,73,168,168,96,96,120,120,120,120,120,145,145,290,290,171,184,197,197,223,223,223,236,236,236,249,275,288,288,288,288,314,327,327,353,353,353,366,366,379,379,379,379,392,405,418,418,418,431,431,457,457,470,484,499,515,515,515,532,532,550,744,569,569,589,610,632,1086,744,810,946,1014,1458,1086,1086,1158,1158,1232,1232,1382,1866,2916,2916,1458,3839,1536,1616,1782,3732,2316,4423,1866,1954,2134,2780,5693,4632,2316,3010,2500,3125,3240,6808,3600,3857,3986,9879,9879,7397,9879,13172,3293,4249,3399,5260,5260,5260,4520,5590,5590,5758,5929,5929,24414,3000,6277,6277,34432,8608,4423,4423,4423,4423,6634,4423,4423,53076,10000,6996,12000,7369,5039,5039,5039,5039,5039,5039,5039,7558,7750,7945,8140,30000,8539,8539,5693,5693,5693,5693,7117,7117,8740,8944,9148,9567,6378,6378,6378,6378,15000,6378,6378,9994,10431,7100,7100,10650,30000,7100,7100,10872,11095,11320,11548,12010,40000,12244,12481,12481,12721,12960,12960,13200,13443,15968,50000,16548,17137,13825,14002);

var exp1=new Array(0,50,100,210,450,880,1500,2340,3430,4800,6480,8500,10890,13680,16900,20580,24750,29440,34680,40500,46930,54000,61740,70180,79350,89280,100000,111540,123930,137200,151380,166500,182590,199680,217800,236980,257250,278640,301180,324900,349830,376000,403440,432180,462250,543048,658125,785036,924467,1077120,1243718,1425000,1621724,1834664,2064615,2312388,2578813,2864736,3171024,3498560,3848246,4221000,4617761,5039484,5487143,5961728,6464250,6995736,7557232,8149800,8774523,9432500,10124849,10852704,11617220,13306680,14990625,16779280,18676350,20685600,22810855,25056000,27424980,29921800,32550525,35315280,38220250,41269680,44467875,47819200,51328080,54999000,58836505,62845200,67029750,71394880,75945375,80686080,85621900,90757800,96098805,101650000,107416530,113403600,119616475,126060480,132741000,139663480,146833425,154256400,161938030,169884000,178100055,186592000,195365700,204427080,213782125,223436880,233397450,243670000,254260755,265176000,276422080,288005400,299932425,312209680,324843750,337841280,351208975,364953600,379081980,393601000,408517605,423838800,439571650,455723280,472300875,489311680,506763000,524662200,543016705,561834000,581121630,600887200,621138375,641882880,663128500,684883080,707154525,729950800,753279930,777150000,801569155,826545600,852087600,878203480,904901625,932190480,960078550,988574400,1017686655,1047424000,1077795180,1108809000,1140474325,1172800080,1205795250,1239468880,1273830075,1308888000,1344651880,1381131000,1418334705,1456272400,1494953550,1534387680,1574584375,1615553280,1657304100,1699846600,1743190605,1787346000,1832322730,1878130800,1924780275,1972281280,2020644000,2069878680,2119995625,2171005200,2222917830,2275744000,2329494255,2384179200,2439809500,2496395880,2553949125,2612480080,2671999650,2732518800,2794048555,2856600000,2920184280,2984812600,3050496225,3117246480,3185074750,3253992480,3324011175,3395142400,3467397780,3540789000,3615327805,3691026000,3767895450,3845948080,3925195875,4005650880,4005650980,4005651080,4005651180,4005651280,4005651380,4005651480,4005651580,4005651680,4005651780,4005651880,4005651980,4005652080,4005652180,4005652280,4005652380,4005652480,4005652580,4005652680,4005652780,4005652880,4005652980,4005653080,4005653180,4005653280,4005653380,4005653480,4005653580,4005653680,4005653780,4005653880,4005653980,4005654080,4005654180,4005654280,4005654380,4005654480,4005654580);

var moblv1=new Array(2,2,4,4,6,6,7,7,7,8,8,8,8,9,9,10,10,12,12,12,12,12,14,14,14,14,16,17,18,18,20,20,20,21,21,21,22,24,25,25,25,25,27,28,28,30,30,30,31,31,32,32,32,32,33,34,35,35,35,36,36,38,38,39,40,41,42,42,42,43,43,44,45,45,45,46,47,48,50,50,51,53,54,55,55,55,56,56,57,57,59,60,60,60,60,60,61,62,64,65,65,65,65,66,68,69,70,70,70,71,72,72,73,75,76,78,79,80,80,80,80,80,80,81,81,82,82,82,83,84,84,85,86,86,87,87,88,88,89,89,90,90,90,90,90,90,90,90,91,92,92,94,95,95,95,95,95,95,95,95,96,97,98,100,100,100,100,100,100,100,100,100,101,102,103,105,105,105,105,105,105,105,105,107,109,110,110,110,110,110,110,111,112,113,114,116,117,117,118,118,119,120,120,121,122,123,125,125,127,149,150);
var a=0;
var b=0;
var rate=1;
var mobexp2=0;
var rate2=0;
var ptrate=new Array(1,1.3,1.6,1.9,2.2,2.5);

function res(){
document.getElementById("mobhp").innerHTML=mobhp1[document.sts.mob.value];
document.getElementById("mobexp").innerHTML=mobexp1[document.sts.mob.value];
if (document.sts.exptype.value==0){
	a=exp1[document.sts.lv.value]-(exp1[document.sts.lv.value]*(eval(document.sts.exp.value)/100));
}
if (document.sts.exptype.value==1){
	a=exp1[document.sts.lv.value]-eval(document.sts.exp.value);
}
b=moblv1[document.sts.mob.value]-eval(document.sts.lv.value);
if (b>=24){rate=0.5;}
if (b>=21 && b<24){rate=0.6;}
if (b>=18 && b<21){rate=0.7;}
if (b>=15 && b<18){rate=0.8;}
if (b>=12 && b<15){rate=0.85;}
if (b>=9 && b<12){rate=0.9;}
if (b>=6 && b<9){rate=0.95;}
if (b>=3 && b<6){rate=1;}
if (b>=0 && b<3){rate=1;}
if (b>=-6 && b<0){rate=1;}
if (b>=-8 && b<-6){rate=1;}
if (b>=-10 && b<-8){rate=0.85;}
if (b>=-12 && b<-10){rate=0.7;}
if (b>=-15 && b<-12){rate=0.6;}
if (b>=-18 && b<-15){rate=0.5;}
if (b>=-21 && b<-18){rate=0.4;}
if (b>=-24 && b<-21){rate=0.3;}
if (b<-24){rate=0.2;}
rate2=eval(document.sts.up.value)/10+1;
mobexp2=mobexp1[document.sts.mob.value]/(eval(document.sts.pt.value)+1)*rate*rate2*ptrate[eval(document.sts.pt.value)];
document.getElementById("mobexpb").innerHTML=Math.floor(mobexp2);
document.getElementById("mobzan").innerHTML=Math.floor(a/mobexp2);
document.getElementById("mobzan2").innerHTML=Math.floor(exp1[document.sts.lv.value]/100/mobexp2);
document.getElementById("lvexp").innerHTML=exp1[document.sts.lv.value];
}
