FANDOM


local p = {}
 
function p.realu(frame)
	local bs=frame.args["BASE"]
	local iv=frame.args["IVs"]
	local ev=frame.args["EVs"]
	local na=frame.args["NATURE"]
	local lv=frame.args["LEVEL"]
	local para={}
	local ee={}
	local pName={"H","A","B","C","D","S"}
	local result,i,j,HH,BB,DD
	local sttr
 
	para["Hb"]=string.match(bs,"(%d+)")
	para["Ab"]=string.match(bs,"%d+/(%d+)")
	para["Bb"]=string.match(bs,"%d+/%d+/(%d+)")
	para["Cb"]=string.match(bs,"%d+/%d+/%d+/(%d+)")
	para["Db"]=string.match(bs,"%d+/%d+/%d+/%d+/(%d+)")
	para["Sb"]=string.match(bs,"%d+/%d+/%d+/%d+/%d+/(%d+)")
 
	para["Hi"]=string.sub(iv,1,1)
	para["Ai"]=string.sub(iv,2,2)
	para["Bi"]=string.sub(iv,3,3)
	para["Ci"]=string.sub(iv,4,4)
	para["Di"]=string.sub(iv,5,5)
	para["Si"]=string.sub(iv,6,6)
 
	para["He"]=0
	para["Ae"]=0
	para["Be"]=0
	para["Ce"]=0
	para["De"]=0
	para["Se"]=0
 
	sttr="<table style='border: 0px solid #000;'><tr><td>분류</td><td>체력</td><td>공격</td><td>방어</td><td>특공</td><td>특방</td><td>스핏</td></tr>"
	sttr=sttr.."<tr><td>종족값</td><td>"..para["Hb"].."</td><td>"..para["Ab"].."</td><td>"..para["Bb"].."</td><td>"..para["Cb"].."</td><td>"..para["Db"].."</td><td>"..para["Sb"].."</td></tr>"
	sttr=sttr.."<tr><td>개체값</td>"
	for i=1,6 do
	    sttr=sttr.."<td>"
		if para[pName[i].."i"]=="v" or para[pName[i].."i"]=="V" then
			para[pName[i].."i"]=31
		elseif	para[pName[i].."i"]=="u" or para[pName[i].."i"]=="U" then
			para[pName[i].."i"]=30
		elseif	para[pName[i].."i"]=="0" or para[pName[i].."i"]=="Z"or para[pName[i].."i"]=="z" then 
			para[pName[i].."i"]=0
		else
			para[pName[i].."i"]=31
		end
		sttr=sttr..para[pName[i].."i"].."</td>"
	end
	sttr=sttr.."</tr>"
 
 
	i=0
	while string.match(ev,"(%a+%d+)%s")~=nil do 
		i=i+1
		ee[i]=string.match(ev,"(%a+%d+)%s")
		ev=string.gsub(ev,string.match(ev,"(%a+%d+)%s"),"")
	end
	i=i+1
    ee[i]=ev
	ee[i]=string.gsub(ee[i],"%s","")
 
	for j=1,i do
		para[string.sub(ee[j],1,1) .. "e"]=string.gsub(ee[j],string.sub(ee[j],1,1),"")
	end
 
	sttr=sttr.."<tr><td>노력치</td><td>"..para["He"].."</td><td>"..para["Ae"].."</td><td>"..para["Be"].."</td><td>"..para["Ce"].."</td><td>"..para["De"].."</td><td>"..para["Se"].."</td></tr>"
	sttr=sttr.."<tr><td>실수치</td>"
	for i=1,6 do
	    sttr=sttr.."<td>"
		if i==1 then
			j=math.floor((para[pName[i] .. "b"]*2+para[pName[i].."i"]+math.floor(para[pName[i].."e"]/4))*lv/100)+10+lv
			result=j
			sttr=sttr..j.."</td>"
			HH=j
		else
			j=math.floor((para[pName[i] .. "b"]*2+para[pName[i].."i"]+math.floor(para[pName[i].."e"]/4))*lv/100)+5
			if pName[i]==string.sub(na,1,1) then
				j=math.floor(j*1.1)
			elseif pName[i]==string.sub(na,2,2) then
				j=math.floor(j*0.9)
			else
				j=j*1
			end
			sttr=sttr..j.."</td>"
			result=result .. "-" .. j
			if i==3 then
			    BB=j
			end
			if i==5 then
			    DD=j
			end
		end
 
	end
	sttr=sttr.."</tr><tr><td></td><td colspan='3'>물리내구</td><td colspan='3'>특수내구</td></tr>".."<tr><td></td><td colspan='3'>"..math.floor(HH*BB/(0.822/(100/lv))).."</td><td colspan='3'>"..math.floor(HH*DD/(0.822/(100/lv))).."</td></tr></table>"
	return sttr
end
 
return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.