FANDOM


local p = {}
 
function p.hello(frame)
 local str=frame.args[1]
	local result=""
	if string.find(str,"로테이션")~=nil then
		result=result .. "[[분류:로테이션배틀용샘플]]"
	end
	if string.find(str,"트리플")~=nil then
		result=result .. "[[분류:트리플배틀용샘플]]"
	end
	if string.find(str,"더블")~=nil or string.find(str,"64")~=nil or string.find(str,"6%-4")~=nil or string.find(str,"6/4")~=nil then
		result=result .. "[[분류:더블배틀용샘플]]"
	end
	if string.find(str,"6")~=nil and string.find(str,"3")~=nil then
		result=result .. "[[분류:63배틀용샘플]]"
	end
	if string.find(str,"66")~=nil or string.find(str,"6%-6")~=nil or string.find(str,"6/6")~=nil then 
		result=result .. "[[분류:66배틀용샘플]]"
	end
	return result
end
 
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
 
	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
 
	for i=1,6 do
		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
	end
 
	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
 
	for i=1,6 do
		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
		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
		        result=result .. "-" .. j
		end
 
	end
 
	return result
end
 
 
function p.tttest(frame)
 local str=frame.args[1]
 local str2=frame.args[2]
 
 if string.find(str,str2)==nil then
  return "그런건없는데요"
 end
 return "있어요"
end 
return p