Commit b7cbcfc7 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 1ac7ee95
...@@ -2496,21 +2496,6 @@ function rsop.negsumop(waystring) ...@@ -2496,21 +2496,6 @@ function rsop.negsumop(waystring)
end end
end end
--Operation: Select Card --Operation: Select Card
function rsop.SelectCheck_Filter(filter,...)
local filterpar={...}
local filterpar2={}
if type(filter)=="table" then
for index,par in pairs(filter) do
if index>=2 then
--table.insert(filterpar2,par)
filterpar2[index-1]=par
end
end
filter=filter[1]
filterpar=rsof.Table_Mix(filterpar2,filterpar)
end
return filter or aux.TRUE,filterpar
end
function rsop.SelectCheck_Solve(solvefun) function rsop.SelectCheck_Solve(solvefun)
local solveparlist={} local solveparlist={}
local len=0 local len=0
...@@ -2526,21 +2511,38 @@ function rsop.SelectCheck_Solve(solvefun) ...@@ -2526,21 +2511,38 @@ function rsop.SelectCheck_Solve(solvefun)
end end
return solvefun,solveparlist,len return solvefun,solveparlist,len
end end
--Function:outer case function for SelectSolve
function rsop.SelectOC(checkhint,isbreak,selecthint)
rsop.SelectOC_checkhint=checkhint
rsop.SelectOC_isbreak=isbreak
rsop.SelectOC_selecthint=selecthint
return true
end
--Function:Select card by filter and do operation on it --Function:Select card by filter and do operation on it
function rsop.SelectSolve(selecthint,sp,filter,tp,loc1,loc2,minct,maxct,exceptg,solvefun,...) function rsop.SelectSolve(selecthint,sp,filter,tp,loc1,loc2,minct,maxct,exceptg,solvefun,...)
minct=minct or 1 minct=minct or 1
maxct=maxct or minct maxct=maxct or minct
local filter2,filterpar=rsop.SelectCheck_Filter(filter,...) local checkhint,isbreak,selecthint2=rsop.SelectOC_checkhint,rsop.SelectOC_isbreak,rsop.SelectOC_selecthint
rsop.SelectOC(nil,nil,nil)
local solvefun2,solvefunpar,len=rsop.SelectCheck_Solve(solvefun) local solvefun2,solvefunpar,len=rsop.SelectCheck_Solve(solvefun)
if rsof.Check_Boolean(minct) then if rsof.Check_Boolean(minct) then
local g=Duel.GetMatchingGroup(sp,filter2,tp,loc1,loc2,exceptg,...) local g=Duel.GetMatchingGroup(sp,filter,tp,loc1,loc2,exceptg,...)
return rsgf.SelectSolve(g,selecthint,sp,filter2,minct,maxct,exceptg,solvefun,table.unpack(filterpar)) return rsgf.SelectSolve(g,hintpar,sp,filter,minct,maxct,exceptg,solvefun,...)
else else
rshint.Select(sp,selecthint) if not Duel.IsExistingMatchingCard(filter,tp,loc1,loc2,minct,exceptg,...) then
local g=Duel.SelectMatchingCard(sp,filter2,tp,loc1,loc2,minct,maxct,exceptg,table.unpack(filterpar)) return 0,Group.CreateGroup(),nil
end
if checkhint and not rsop.SelectYesNo(p,checkhint) then
return 0,Group.CreateGroup(),nil
end
rshint.Select(sp,selecthint2 or selecthint)
local g=Duel.SelectMatchingCard(sp,filter,tp,loc1,loc2,minct,maxct,exceptg,...)
if g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED) and not rsop.nohint then if g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED) and not rsop.nohint then
Duel.HintSelection(g) Duel.HintSelection(g)
end end
if isbreak then
Duel.BreakEffect()
end
--under bitch function because of lua table's last element cannot be "nil" ,but last solve parameter will often be "nil" --under bitch function because of lua table's last element cannot be "nil" ,but last solve parameter will often be "nil"
local solveparlist={} local solveparlist={}
local len2=0 local len2=0
...@@ -2554,9 +2556,10 @@ function rsop.SelectSolve(selecthint,sp,filter,tp,loc1,loc2,minct,maxct,exceptg, ...@@ -2554,9 +2556,10 @@ function rsop.SelectSolve(selecthint,sp,filter,tp,loc1,loc2,minct,maxct,exceptg,
solveparlist[len2]=nil solveparlist[len2]=nil
end end
end end
for index,solvepar in pairs({...}) do local solveparlen=select("#",...)
for index=1,solveparlen do
len2=len2+1 len2=len2+1
solveparlist[len2]=solvepar solveparlist[len2]=({...})[index]
end end
local res=not solvefun and {g,g:GetFirst()} or {solvefun2(g,table.unpack(solveparlist))} local res=not solvefun and {g,g:GetFirst()} or {solvefun2(g,table.unpack(solveparlist))}
rsop.solveprlen=nil rsop.solveprlen=nil
...@@ -2609,8 +2612,12 @@ end ...@@ -2609,8 +2612,12 @@ end
function rsop.SelectSpecialSummon(sp,filter,tp,loc1,loc2,minct,maxct,exceptg,solvepar,...) function rsop.SelectSpecialSummon(sp,filter,tp,loc1,loc2,minct,maxct,exceptg,solvepar,...)
solvepar=type(solvepar)=="table" and solvepar or {solvepar} solvepar=type(solvepar)=="table" and solvepar or {solvepar}
local e=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT) local e=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT)
local ex_par=not ... and {e,sp} or {...} local parlen=select("#",...)
return rsop.SelectSolve("sp",sp,filter,tp,loc1,loc2,minct,maxct,exceptg,rsop.SelectSpecialSummon_Operation(solvepar),table.unpack(ex_par) ) if parlen==0 then
return rsop.SelectSolve("sp",sp,filter,tp,loc1,loc2,minct,maxct,exceptg,rsop.SelectSpecialSummon_Operation(solvepar),e,sp)
else
return rsop.SelectSolve("sp",sp,filter,tp,loc1,loc2,minct,maxct,exceptg,rsop.SelectSpecialSummon_Operation(solvepar),...)
end
end end
function rsop.SelectSpecialSummon_Operation(sumfunvarlist) function rsop.SelectSpecialSummon_Operation(sumfunvarlist)
return function(tg) return function(tg)
...@@ -2618,6 +2625,42 @@ function rsop.SelectSpecialSummon_Operation(sumfunvarlist) ...@@ -2618,6 +2625,42 @@ function rsop.SelectSpecialSummon_Operation(sumfunvarlist)
return rssf.SpecialSummon(tg,table.unpack(sumfunvarlist)) return rssf.SpecialSummon(tg,table.unpack(sumfunvarlist))
end end
end end
--Function:Select card and move to field
function rsop.SelectMoveToField(sp,filter,tp,loc1,loc2,minct,maxct,exceptg,solvepar,...)
solvepar=rsop.GetFollowingSolvepar(solvepar,8)
solvepar[1]=solvepar[1] or sp
rsop.nohint=true
return rsop.SelectSolve(HINTMSG_TOFIELD,sp,filter,tp,loc1,loc2,minct,maxct,exceptg,{rsop.MoveToField,table.unpack(solvepar)},...)
end
--Function:Select card and move to field and activate
function rsop.SelectMoveToField_Activate(sp,filter,tp,loc1,loc2,minct,maxct,exceptg,solvepar,...)
solvepar=rsop.GetFollowingSolvepar(solvepar,7)
solvepar[1]=solvepar[1] or sp
maxct=1
rsop.nohint=true
return rsop.SelectSolve(rshint.act2,sp,filter,tp,loc1,loc2,minct,maxct,exceptg,{rsop.MoveToField_Activate,table.unpack(solvepar)},...)
end
--Function:Select card and SSet
function rsop.SelectSSet(sp,filter,tp,loc1,loc2,minct,maxct,exceptg,solvepar,...)
rsop.nohint=true
return rsop.SelectSolve(HINTMSG_SET,sp,filter,tp,loc1,loc2,minct,maxct,exceptg,rsop.SelectSSet_Operation(sp,solvepar),...)
end
function rsop.SelectSSet_Operation(sp,solvepar)
return function(tg,...)
local setp,targetp,confirm,hint=table.unpack(solvepar)
setp=setp or sp
targetp=targetp or setp
confirm=confirm or true
--hint=hint or true
if #tg<=0 then return 0,tg end
--rsop.CheckOperationHint(tg,hint)
--because Duel.SSet use confirm as parameter, so, i have no choice but directly make it hint.(in other solvefun, the order is first hint and second confirm)
rsop.CheckOperationHint(tg)
local ct=Duel.SSet(setp,tg,targetp,confirm)
local og=Duel.GetOperatedGroup()
return ct,og,og:GetFirst()
end
end
--Operation: Equip --Operation: Equip
function rsop.eqop(e,eqc,eqtc,pos,opside) function rsop.eqop(e,eqc,eqtc,pos,opside)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -2754,6 +2797,93 @@ function rsop.Remove(corg,pos,reason,hint) ...@@ -2754,6 +2797,93 @@ function rsop.Remove(corg,pos,reason,hint)
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
return ct,og,og:GetFirst() return ct,og,og:GetFirst()
end end
--Operation function:MoveToField and hint
--if you don't neet hint, best use normal Duel.MoveToField
function rsop.MoveToField(corg,movep,targetp,loc,pos,enable,zone,hint,confirm)
local g=rsgf.Mix2(corg)
targetp=targetp or movep
pos= pos or POS_FACEUP
if #g<=0 then return false end
local correctg=Group.CreateGroup()
rsop.CheckOperationHint(g,hint)
for tc in aux.Next(g) do
if tc:IsType(TYPE_PENDULUM) then
ploc=loc or LOCATION_PZONE
else
ploc=loc or rsef.GetRegisterRange(tc)
end
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc and ploc==LOCATION_FZONE then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
local bool=false
if zone then
bool=Duel.MoveToField(tc,movep,targetp,ploc,pos,enable,zone)
else
bool=Duel.MoveToField(tc,movep,targetp,ploc,pos,enable)
end
if bool then
correctg:AddCard(tc)
end
end
local facedowng=correctg:Filter(Card.IsFacedown,nil)
if confirm then
Duel.ConfirmCards(1-movep,facedowng)
end
return #correctg,correctg,correctg:GetFirst()
end
--Operation function:MoveToField and treat activate and hint
--if you don't neet hint, best use normal Duel.MoveToField
function rsop.MoveToField_Activate(tc,movep,targetp,loc,pos,enable,zone,hint)
if aux.GetValueType(tc)~="Card" then
Debug.Message("rsop.Activate can only activate 1 card, don't use group as the first parameter!")
return false
end
targetp=targetp or movep
pos=POS_FACEUP
rsop.CheckOperationHint(g,hint)
if tc:IsType(TYPE_PENDULUM) then
ploc=loc or LOCATION_PZONE
else
ploc=loc or rsef.GetRegisterRange(tc)
end
if ploc==LOCATION_MZONE then
Debug.Message("rsop.Activate can only activate Spell/Trap!")
return false
end
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc and ploc==LOCATION_FZONE then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
local bool=false
if zone then
bool=Duel.MoveToField(tc,movep,targetp,ploc,pos,enable,zone)
else
bool=Duel.MoveToField(tc,movep,targetp,ploc,pos,enable)
end
if bool then
local te=tc:GetActivateEffect()
if te then
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
end
if ploc==LOCATION_FZONE then
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
return true,tc
end
return false
end
--Function: Select Yes or No
function rsop.SelectYesNo(p,par,bool)
bool=type(bool)=="nil" and true or bool
local string=type(par)=="table" and aux.Stringid(par[1],par[2]) or par
return bool and Duel.SelectYesNo(p,string)
end
--Function: N effects select 1 --Function: N effects select 1
function rsop.SelectOption(p,...) function rsop.SelectOption(p,...)
local functionlist={...} local functionlist={...}
...@@ -3104,18 +3234,26 @@ end ...@@ -3104,18 +3234,26 @@ end
function rsgf.SelectSolve(g,selecthint,sp,filter,minct,maxct,exceptg,solvefun,...) function rsgf.SelectSolve(g,selecthint,sp,filter,minct,maxct,exceptg,solvefun,...)
minct=minct or 1 minct=minct or 1
maxct=maxct or minct maxct=maxct or minct
local filter2,filterpar=rsop.SelectCheck_Filter(filter,...) local checkhint,isbreak,selecthint2=rsop.SelectOC_checkhint,rsop.SelectOC_isbreak,rsop.SelectOC_selecthint
rsop.SelectOC(nil,nil,nil)
local solvefun2,solvefunpar,len=rsop.SelectCheck_Solve(solvefun) local solvefun2,solvefunpar,len=rsop.SelectCheck_Solve(solvefun)
local tg=Group.CreateGroup() local tg=g:Filter(filter,exceptg,...)
if rsof.Check_Boolean(minct) then if #tg<=0 or (type(minct)=="number" and #tg<minct) then
tg=g return 0,Group.CreateGroup(),nil
else end
rshint.Select(sp,selecthint) if checkhint and not Duel.SelectYesNo(sp,checkhint) then
tg=g:FilterSelect(sp,filter2,minct,maxct,exceptg,table.unpack(filterpar)) return 0,Group.CreateGroup(),nil
end
if not rsof.Check_Boolean(minct) then
rshint.Select(sp,selecthint2 or selecthint)
tg=tg:Select(sp,minct,maxct,exceptg,...)
if tg:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED) and not rsop.nohint then if tg:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED) and not rsop.nohint then
Duel.HintSelection(tg) Duel.HintSelection(tg)
end end
end end
if isbreak then
Duel.BreakEffect()
end
--under bitch function because of lua table's last element cannot be "nil" ,but last solve parameter will often be "nil" --under bitch function because of lua table's last element cannot be "nil" ,but last solve parameter will often be "nil"
local solveparlist={} local solveparlist={}
local len2=0 local len2=0
...@@ -3129,9 +3267,10 @@ function rsgf.SelectSolve(g,selecthint,sp,filter,minct,maxct,exceptg,solvefun,.. ...@@ -3129,9 +3267,10 @@ function rsgf.SelectSolve(g,selecthint,sp,filter,minct,maxct,exceptg,solvefun,..
solveparlist[len2]=nil solveparlist[len2]=nil
end end
end end
for index,solvepar in pairs({...}) do local solveparlen=select("#",...)
for index=1,solveparlen do
len2=len2+1 len2=len2+1
solveparlist[len2]=solvepar solveparlist[len2]=({...})[index]
end end
local res=not solvefun and {tg,tg:GetFirst()} or {solvefun2(tg,table.unpack(solveparlist))} local res=not solvefun and {tg,tg:GetFirst()} or {solvefun2(tg,table.unpack(solveparlist))}
rsop.solveprlen=nil rsop.solveprlen=nil
...@@ -3164,7 +3303,7 @@ Group.SelectRelease=rsgf.SelectRelease ...@@ -3164,7 +3303,7 @@ Group.SelectRelease=rsgf.SelectRelease
function rsgf.SelectToDeck(g,sp,filter,minct,maxct,exceptg,solvepar,...) function rsgf.SelectToDeck(g,sp,filter,minct,maxct,exceptg,solvepar,...)
solvepar=rsop.GetFollowingSolvepar(solvepar,4) solvepar=rsop.GetFollowingSolvepar(solvepar,4)
rsop.nohint=true rsop.nohint=true
return rsgf.SelectSolve(g,"td",sp,filter,minct,maxc,t,exceptg,{rsop.SendtoDeck,table.unpack(solvepar)},...) return rsgf.SelectSolve(g,"td",sp,filter,minct,maxct,exceptg,{rsop.SendtoDeck,table.unpack(solvepar)},...)
end end
Group.SelectToDeck=rsgf.SelectToDeck Group.SelectToDeck=rsgf.SelectToDeck
--Group:Select card from group and destroy --Group:Select card from group and destroy
...@@ -3186,11 +3325,37 @@ function rsgf.SelectSpecialSummon(g,sp,filter,minct,maxct,exceptg,solvepar,...) ...@@ -3186,11 +3325,37 @@ function rsgf.SelectSpecialSummon(g,sp,filter,minct,maxct,exceptg,solvepar,...)
--solvepar=rsop.GetFollowingSolvepar(solvepar,8) --solvepar=rsop.GetFollowingSolvepar(solvepar,8)
solvepar = type(solvepar)=="table" and solvepar or {solvepar} solvepar = type(solvepar)=="table" and solvepar or {solvepar}
local e=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT) local e=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT)
local ex_par=not ... and {e,sp} or {...} local parlen=select("#",...)
return rsgf.SelectSolve(g,"sp",sp,filter,minct,maxct,exceptg,rsop.SelectSpecialSummon_Operation(solvepar),table.unpack(ex_par)) if parlen==0 then
return rsgf.SelectSolve(g,"sp",sp,filter,minct,maxct,exceptg,rsop.SelectSpecialSummon_Operation(solvepar),e,sp)
else
return rsgf.SelectSolve(g,"sp",sp,filter,minct,maxct,exceptg,rsop.SelectSpecialSummon_Operation(solvepar),...)
end
end end
Group.SelectSpecialSummon=rsgf.SelectSpecialSummon Group.SelectSpecialSummon=rsgf.SelectSpecialSummon
--Group:Select card and move to field
function rsgf.SelectMoveToField(g,sp,filter,minct,maxct,exceptg,solvepar,...)
solvepar=rsop.GetFollowingSolvepar(solvepar,8)
solvepar[1]=solvepar[1] or sp
rsop.nohint=true
return rsgf.SelectSolve(g,HINTMSG_TOFIELD,sp,filter,minct,maxct,exceptg,{rsop.MoveToField,table.unpack(solvepar)},...)
end
Group.SelectMoveToField=rsgf.SelectMoveToField
--Function:Select card and move to field and activate
function rsgf.SelectMoveToField_Activate(g,sp,filter,minct,maxct,exceptg,solvepar,...)
solvepar=rsop.GetFollowingSolvepar(solvepar,7)
solvepar[1]=solvepar[1] or sp
maxct=1
rsop.nohint=true
return rsgf.SelectSolve(g,rshint.act2,sp,filter,minct,maxct,exceptg,{rsop.MoveToField_Activate,table.unpack(solvepar)},...)
end
Group.SelectMoveToField_Activate=rsgf.SelectMoveToField_Activate
--Function:Select card and SSet
function rsgf.SelectSSet(g,sp,filter,minct,maxct,exceptg,solvepar,...)
rsop.nohint=true
return rsgf.SelectSolve(g,HINTMSG_SET,sp,filter,minct,maxct,exceptg,rsop.SelectSSet_Operation(sp,solvepar),...)
end
Group.SelectSSet=rsgf.SelectSSet
-------------------"Part_Card_Function"--------------------- -------------------"Part_Card_Function"---------------------
...@@ -3247,8 +3412,8 @@ function rscf.QuickBuff(reglist,...) ...@@ -3247,8 +3412,8 @@ function rscf.QuickBuff(reglist,...)
local uplist={"atk+","def+","lv+","rk+"} local uplist={"atk+","def+","lv+","rk+"}
local changelist={"lv","rk","code","set","att","race"} local changelist={"lv","rk","code","set","att","race"}
local addlist={"code+","set+","att+","race+"} local addlist={"code+","set+","att+","race+"}
local limitlist={"dis","dise","tri","atk","atkan","datk","ress","resns","td","th","cp","cost"} local limitlist={"dis","dise","tri~","atk~","atkan~","datk~","ress~","resns~","td~","th~","cp~","cost~"}
local matlimitlist={"fus","syn","xyz","link"} local matlimitlist={"fus~","syn~","xyz~","link~"}
local leavelist={"leave"} local leavelist={"leave"}
local splist={"mat","pc"} local splist={"mat","pc"}
--local phaselist={"ep","sp"} --local phaselist={"ep","sp"}
...@@ -3277,11 +3442,15 @@ function rscf.QuickBuff(reglist,...) ...@@ -3277,11 +3442,15 @@ function rscf.QuickBuff(reglist,...)
if rsof.Table_List(funlistatt,codestring) then if rsof.Table_List(funlistatt,codestring) then
e1=rsef.SV_ATTRIBUTE(reglist,codestring,effectvaluelist[k],nil,reset2) e1=rsef.SV_ATTRIBUTE(reglist,codestring,effectvaluelist[k],nil,reset2)
end end
if rsof.Table_List(limitlist,codestring) then local mainstring,splitstring=rsof.String_NoSymbol(codestring)
e1=rsef.SV_LIMIT(reglist,codestring,effectvaluelist[k],nil,reset,"cd") if rsof.Table_List(limitlist,mainstring) then
local differentlist={"atk"}
if not rsof.Table_List(differentlist,mainstring) or (splitstring and splitstring=="~") then
e1=rsef.SV_LIMIT(reglist,mainstring,effectvaluelist[k],nil,reset,"cd")
end
end end
if rsof.Table_List(matlimitlist,codestring) then if rsof.Table_List(matlimitlist,mainstring) then
e1=rsef.SV_CANNOT_BE_MATERIAL(reglist,codestring,effectvaluelist[k],nil,reset,"cd") e1=rsef.SV_CANNOT_BE_MATERIAL(reglist,mainstring,effectvaluelist[k],nil,reset,"cd")
end end
if rsof.Table_List(leavelist,codestring) then if rsof.Table_List(leavelist,codestring) then
e1=rsef.SV_REDIRECT(reglist,codestring,effectvaluelist[k],nil,rsreset.ered,"cd") e1=rsef.SV_REDIRECT(reglist,codestring,effectvaluelist[k],nil,rsreset.ered,"cd")
...@@ -4526,13 +4695,16 @@ function rsof.Table_Clone(table) ...@@ -4526,13 +4695,16 @@ function rsof.Table_Clone(table)
return t2 return t2
end end
--other function: Mix Table --other function: Mix Table
--error at "nil" value !!!!!!!!!
--error at no number key !!!!!!!!!
function rsof.Table_Mix(table1,...) function rsof.Table_Mix(table1,...)
local resultlist={} local resultlist={}
local list={table1,...} local list={table1,...}
local len=0 local len=0
for _,tab in pairs(list) do for _,tab in pairs(list) do
for _,value in pairs(tab) do for _,value in pairs(tab) do
--table.insert(resultlist,value) --table.insert(resultlist,value)
len=len+1 len=len+1
resultlist[len]=value resultlist[len]=value
end end
......
...@@ -32,18 +32,7 @@ function c16100001.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,18 +32,7 @@ function c16100001.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c16100001.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c16100001.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
local c=e:GetHandler() local c=e:GetHandler()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
......
...@@ -47,8 +47,7 @@ function c33401310.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,8 +47,7 @@ function c33401310.thcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsLocation(LOCATION_GRAVE) and rc:IsSetCard(0x341) or rc:IsSetCard(0xa342) and r&REASON_FUSION+REASON_LINK~=0 return c:IsLocation(LOCATION_GRAVE) and rc:IsSetCard(0x341) or rc:IsSetCard(0xa342) and r&REASON_FUSION+REASON_LINK~=0
end end
function c33401310.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c33401310.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsExistingMatchingCard(c33401310.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c33401310.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_GRAVE)
end end
function c33401310.thfilter(c) function c33401310.thfilter(c)
......
...@@ -45,6 +45,14 @@ function cm.initial_effect(c) ...@@ -45,6 +45,14 @@ function cm.initial_effect(c)
e3:SetTarget(cm.target) e3:SetTarget(cm.target)
e3:SetOperation(cm.operation) e3:SetOperation(cm.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_FZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(1)
c:RegisterEffect(e4)
end end
--e0 --e0
function cm.mtcon(e,tp,eg,ep,ev,re,r,rp) function cm.mtcon(e,tp,eg,ep,ev,re,r,rp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment