Commit 7b1ae4f5 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 41e43ddd
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
--混沌的轮回 循环
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
if not pcall(function() require("expansions/script/c30099990") end) then require("script/c30099990") end
local m,cm=rscf.DefineCard(30000220)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,nil,"td,dr",nil,nil,nil,cm.tg,cm.act)
......
--version 20.06.22
if not pcall(function() require("expansions/script/c30099991") end) then require("script/c30099991") end
local m=30099990
local vm=30099991
local Version_Number=20200714
--version 20.07.28
if not pcall(function() require("expansions/script/c10199991") end) then require("script/c10199991") end
local m=10199990
local vm=10199991
local Version_Number=20200728
-----------------------"Part_Effect_Base"-----------------------
--Creat "EVENT_SET"
function rsef.CreatEvent_Set()
......@@ -26,7 +26,6 @@ function rscon.CreatEvent_Set(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsFacedown,1,nil)
end
--Effect: Get default hint string for Duel.Hint ,use in effect target
function rsef.GetDefaultHintString(cate_list,loc1,loc2,hint_list)
if hint_list then
......@@ -870,11 +869,11 @@ function rsef.QO(reg_list,code,desc_list,lim_list,cate,flag,range,con,cost,tg,op
return rsef.Register(reg_list,EFFECT_TYPE_QUICK_O,code,desc_list,lim_list,cate,flag,range,con,cost,tg,op,nil,nil,timing_list,reset_list)
end
--Quick Effect: negate effect/activation/summon/spsummon
function rsef.QO_NEGATE(reg_list,negtype,lim_list,waystring,range,con,cost,desc_list,cate,flag,reset_list)
function rsef.QO_NEGATE(reg_list,negtype,lim_list,way_str,range,con,cost,desc_list,cate,flag,reset_list)
local waylist={"des","rm","th","td","tg","set","nil"}
local catelist={CATEGORY_DESTROY,CATEGORY_REMOVE,CATEGORY_TOHAND,CATEGORY_TODECK,CATEGORY_TOGRAVE,0,0}
local cate2=rsef.GetRegisterCategory(cate)
local _,_,cate3=rsof.Table_Suit(waystring,waylist,catelist)
local _,_,cate3=rsof.Table_Suit(way_str,waylist,catelist)
if cate3 and cate3>0 then
cate2=cate2|cate3
end
......@@ -885,25 +884,25 @@ function rsef.QO_NEGATE(reg_list,negtype,lim_list,waystring,range,con,cost,desc_
local flag2=rsef.GetRegisterProperty(flag)|EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DAMAGE_STEP
cate2=cate2|CATEGORY_DISABLE
if not con then con=rscon.negcon(0) end
return rsef.QO(reg_list,EVENT_CHAINING,desc_list,lim_list,cate2,flag2,range,con,cost,rstg.distg(waystring),rsop.disop(waystring),nil,reset_list)
return rsef.QO(reg_list,EVENT_CHAINING,desc_list,lim_list,cate2,flag2,range,con,cost,rstg.distg(way_str),rsop.disop(way_str),nil,reset_list)
elseif negtype=="neg" or nettype=="act" then
if not desc_list then desc_list=rshint.negeffect end
local flag2=rsef.GetRegisterProperty(flag)|EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DAMAGE_STEP
cate2=cate2|CATEGORY_NEGATE
if not con then con=rscon.discon(0) end
return rsef.QO(reg_list,EVENT_CHAINING,desc_list,lim_list,cate2,flag2,range,con,cost,rstg.negtg(waystring),rsop.negop(waystring),nil,reset_list)
return rsef.QO(reg_list,EVENT_CHAINING,desc_list,lim_list,cate2,flag2,range,con,cost,rstg.negtg(way_str),rsop.negop(way_str),nil,reset_list)
elseif negtype=="sum" then
if not desc_list then desc_list=rshint.negsum end
cate2=cate2|CATEGORY_DISABLE_SUMMON
return rsef.QO(reg_list,EVENT_SUMMON,desc_list,lim_list,cate2,flag2,range,con,cost,rstg.negsumtg(waystring),rsop.negsumop(waystring),nil,reset_list)
return rsef.QO(reg_list,EVENT_SUMMON,desc_list,lim_list,cate2,flag2,range,con,cost,rstg.negsumtg(way_str),rsop.negsumop(way_str),nil,reset_list)
elseif negtype=="sp" then
if not desc_list then desc_list=rshint.negsp end
cate2=cate2|CATEGORY_DISABLE_SUMMON
return rsef.QO(reg_list,EVENT_SPSUMMON,desc_list,lim_list,cate2,flag2,range,con,cost,rstg.negsumtg(waystring),rsop.negsumop(waystring),nil,reset_list)
return rsef.QO(reg_list,EVENT_SPSUMMON,desc_list,lim_list,cate2,flag2,range,con,cost,rstg.negsumtg(way_str),rsop.negsumop(way_str),nil,reset_list)
elseif negtype=="sum,sp" then
if not desc_list then desc_list=rshint.negsum end
cate2=cate2|CATEGORY_DISABLE_SUMMON
local e1=rsef.QO(reg_list,EVENT_SUMMON,desc_list,lim_list,cate2,flag2,range,con,cost,rstg.negsumtg(waystring),rsop.negsumop(waystring),nil,reset_list)
local e1=rsef.QO(reg_list,EVENT_SUMMON,desc_list,lim_list,cate2,flag2,range,con,cost,rstg.negsumtg(way_str),rsop.negsumop(way_str),nil,reset_list)
local e2=rsef.RegisterClone(reg_list,e1,"code",EVENT_SPSUMMON)
return e1,e2
end
......@@ -1383,7 +1382,7 @@ function rstg.neftg(e,c)
return not te or not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not g or not g:IsContains(c)
end
--Effect Target: Negative Effect/Activate
function rstg.disnegtg(disorneg,waystring)
function rstg.disnegtg(disorneg,way_str)
local dncate=0
if disorneg=="dis" then dncate=CATEGORY_DISABLE
elseif disorneg=="neg" then dncate=CATEGORY_NEGATE
......@@ -1396,16 +1395,16 @@ function rstg.disnegtg(disorneg,waystring)
local waylist2={aux.TRUE,Card.IsAbleToRemove,Card.IsAbleToHand,Card.IsAbleToDeck,Card.IsAbleToGrave,setfun,aux.TRUE }
local waylist3={Card.IsDestructable,Card.IsAbleToRemove,Card.IsAbleToHand,Card.IsAbleToDeck,Card.IsAbleToGrave,setfun,aux.TRUE }
local catelist={CATEGORY_DESTROY,CATEGORY_REMOVE,CATEGORY_TOHAND,CATEGORY_TODECK,CATEGORY_TOGRAVE,0,0}
if type(waystring)==nil then waystring="des" end
if not waystring then waystring="nil" end
local _,_,filterfun=rsof.Table_Suit(waystring,waylist,waylist2)
local _,_,filterfun2,cate=rsof.Table_Suit(waystring,waylist,waylist3,catelist)
if type(way_str)==nil then way_str="des" end
if not way_str then way_str="nil" end
local _,_,filterfun=rsof.Table_Suit(way_str,waylist,waylist2)
local _,_,filterfun2,cate=rsof.Table_Suit(way_str,waylist,waylist3,catelist)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rc=re:GetHandler()
if chk==0 then return
--filterfun(rc)
waystring~="rm" or aux.nbcon(tp,re)
way_str~="rm" or aux.nbcon(tp,re)
end
Duel.SetOperationInfo(0,dncate,eg,1,0,0)
if cate and cate~=0 then
......@@ -1420,19 +1419,19 @@ function rstg.disnegtg(disorneg,waystring)
end
end
end
function rstg.distg(waystring)
function rstg.distg(way_str)
return function(...)
return rstg.disnegtg("dis",waystring)(...)
return rstg.disnegtg("dis",way_str)(...)
end
end
function rstg.negtg(waystring)
function rstg.negtg(way_str)
return function(...)
return rstg.disnegtg("neg",waystring)(...)
return rstg.disnegtg("neg",way_str)(...)
end
end
function rstg.negsumtg(waystring)
function rstg.negsumtg(way_str)
return function(...)
return rstg.disnegtg("sum",waystring)(...)
return rstg.disnegtg("sum",way_str)(...)
end
end
--Effect target: Target Cards Main Set
......@@ -2442,7 +2441,7 @@ end
-----------------"Part_Operation_Function"-------------------
--Operation: Negative Effect/Activate/Summon/SpSummon
function rsop.disnegop(disorneg,waystring)
function rsop.disnegop(disorneg,way_str)
local fun=nil
if disorneg=="dis" then fun=Duel.NegateEffect
elseif disorneg=="neg" then fun=Duel.NegateActivation
......@@ -2451,8 +2450,8 @@ function rsop.disnegop(disorneg,waystring)
local setfun=function(setc,setignore)
return setc:IsSSetable(true)
end
if type(waystring)==nil then waystring="des" end
if not waystring then waystring="nil" end
if type(way_str)==nil then way_str="des" end
if not way_str then way_str="nil" end
return function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local relate=rsef.relationinfo[Duel.GetCurrentChain()]
......@@ -2461,28 +2460,28 @@ function rsop.disnegop(disorneg,waystring)
local rc=re:GetHandler()
if disorneg=="sum" then
fun(eg)
_,ct=rsop.operationcard(eg,waystring,REASON_EFFECT,e,tp,eg,ep,ev,re,r,rp)
_,ct=rsop.operationcard(eg,way_str,REASON_EFFECT,e,tp,eg,ep,ev,re,r,rp)
else
if fun(ev) and re:GetHandler():IsRelateToEffect(re) and waystring~="nil" then
_,ct=rsop.operationcard(eg,waystring,REASON_EFFECT,e,tp,eg,ep,ev,re,r,rp)
if fun(ev) and re:GetHandler():IsRelateToEffect(re) and way_str~="nil" then
_,ct=rsop.operationcard(eg,way_str,REASON_EFFECT,e,tp,eg,ep,ev,re,r,rp)
end
end
return ct
end
end
function rsop.disop(waystring)
function rsop.disop(way_str)
return function(...)
return rsop.disnegop("dis",waystring)(...)
return rsop.disnegop("dis",way_str)(...)
end
end
function rsop.negop(waystring)
function rsop.negop(way_str)
return function(...)
return rsop.disnegop("neg",waystring)(...)
return rsop.disnegop("neg",way_str)(...)
end
end
function rsop.negsumop(waystring)
function rsop.negsumop(way_str)
return function(...)
return rsop.disnegop("sum",waystring)(...)
return rsop.disnegop("sum",way_str)(...)
end
end
--Operation: Select Card
......@@ -3214,7 +3213,7 @@ function rsgf.SelectSolve(g,selecthint,sp,filter,minct,maxct,exceptg,solvefun,..
if #tg<=0 or (type(minct)=="number" and #tg<minct) then
return 0,Group.CreateGroup(),nil
end
if checkhint and not Duel.SelectYesNo(sp,checkhint) then
if checkhint and not rsop.SelectYesNo(sp,checkhint) then
return 0,Group.CreateGroup(),nil
end
if not rsof.Check_Boolean(minct) then
......@@ -3388,7 +3387,7 @@ function rscf.QuickBuff(reglist,...)
local lim_list={"dis","dise","tri~","atk~","atkan~","datk~","ress~","resns~","td~","th~","cp~","cost~"}
local matlim_list={"fus~","syn~","xyz~","link~"}
local leavelist={"leave"}
local splist={"mat","pc"}
local splist={"mat","cp"}
--local phaselist={"ep","sp"}
local funlist=rsof.Table_Mix(setlist,uplist,changelist,addlist,lim_list,matlim_list,leavelist,splist)
local funlistatt=rsof.Table_Mix(setlist,uplist,changelist,addlist)
......@@ -4367,9 +4366,9 @@ end
function rscf.DarkTuner(f,...)
local ext_paramms={...}
return function(target)
local typelist={target:IsHasEffect(EFFECT_ADD_TYPE)}
local type_list={target:IsHasEffect(EFFECT_ADD_TYPE)}
local bool=false
for _,e in pairs(typelist) do
for _,e in pairs(type_list) do
if rsval.valinfo[e]=="TYPE_DARKTUNER" then
bool=true
break
......@@ -4401,25 +4400,25 @@ function rscf.spfilter2(f,...)
end
end
--Card function: Get same type base set
function rscf.GetSameType_Base(c,waystring,type1,...)
local gettypefun=Card.GetType
if waystring=="previous"
then gettypefun=Card.GetPreviousTypeOnField
elseif waystring=="original"
then gettypefun=Card.GetOriginalType
end
local typelist= type1 and {type1,...} or { TYPE_MONSTER,TYPE_SPELL,TYPE_TRAP }
local typetotal=0
local typetotallist={}
for _,ctype in pairs(typelist) do
if gettypefun(c)&ctype==ctype then
typetotal=typetotal|ctype
if not rsof.Table_List(typetotallist,ctype) then
table.insert(typetotallist,ctype)
function rscf.GetSameType_Base(c,way_str,type1,...)
local type_fun=Card.GetType
if way_str=="previous"
then type_fun=Card.GetPreviousTypeOnField
elseif way_str=="original"
then type_fun=Card.GetOriginalType
end
local type_list= type1 and {type1,...} or { TYPE_MONSTER,TYPE_SPELL,TYPE_TRAP }
local total_type=0
local total_type_list={}
for _,ctype in pairs(type_list) do
if type_fun(c)&ctype==ctype then
total_type=total_type|ctype
if not rsof.Table_List(total_type_list,ctype) then
table.insert(total_type_list,ctype)
end
end
end
return typetotal,typetotallist
return total_type,total_type_list
end
--Card function: Get same type
function rscf.GetSameType(c,...)
......@@ -4434,28 +4433,28 @@ function rscf.GetOriginalSameType(c,...)
return rscf.GetSameType_Base(c,"original",...)
end
--Card Funcion: Check complex card type base set
function rscf.IsComplexType_Base(c,waysting,type1,type2,...)
local gettypefun=Card.GetType
if waystring=="previous"
then gettypefun=Card.GetPreviousTypeOnField
elseif waystring=="original"
then gettypefun=Card.GetOriginalType
end
local typelist={type1,type2,...}
local publictype=0
function rscf.IsComplexType_Base(c,way_str,type1,type2,...)
local type_fun=Card.GetType
if way_str=="previous"
then type_fun=Card.GetPreviousTypeOnField
elseif way_str=="original"
then type_fun=Card.GetOriginalType
end
local type_list={type1,type2,...}
local type_public=0
if rsof.Check_Boolean(type2) then
publictype=type1
typelist={...}
type_public=type1
type_list={...}
end
for _,ctype in pairs(typelist) do
for _,ctype in pairs(type_list) do
if type(ctype)=="string" then
if ctype=="TYPE_SPELL" then
if gettypefun(c)==TYPE_SPELL then return true end
if type_fun(c)==TYPE_SPELL then return true end
elseif ctype=="TYPE_TRAP" then
if gettypefun(c)==TYPE_TRAP then return true end
if type_fun(c)==TYPE_TRAP then return true end
end
else
if gettypefun(c)&(ctype|publictype)==(ctype|publictype) then return true end
if type_fun(c)&(ctype|type_public)==(ctype|type_public) then return true end
end
end
return false
......@@ -4494,11 +4493,11 @@ Card.IsComplexReason=rscf.IsComplexReason
--Hint function: HINT_SELECTMSG
function rshint.Select(p,cate)
local hintstring=nil
if type(cate)~="string" then hintstring=cate end
local _,category_list=rsef.GetRegisterCategory(cate)
local hintmsg=rsef.GetDefaultHintString(category_list,nil,nil,hintstring)
Duel.Hint(HINT_SELECTMSG,p,hintmsg)
local hint_str=nil
if type(cate)~="string" then hint_str=cate end
local _,cate_list=rsef.GetRegisterCategory(cate)
local hint_msg=rsef.GetDefaultHintString(cate_list,nil,nil,hint_str)
Duel.Hint(HINT_SELECTMSG,p,hint_msg)
end
--Hint function: HINT_CARD
function rshint.Card(code)
......@@ -4625,7 +4624,7 @@ function rsof.Table_List_Base(check_type,base_table,check_val1,...)
table.insert(result_list,exist_res)
elseif check_type=="or" then
result_list[1]=result_list[1] or exist_res
elseif check_type=="all" then
elseif check_type=="and" then
result_list[1]=result_list[1] and exist_res
end
table.insert(result_list,exist_idx)
......
......@@ -59,7 +59,7 @@ rsreset.ered = RESET_EVENT+RESETS_REDIRECT
--Code Variable
rscode.Extra_Effect_Activate = m+100 --"Attach Effect"
rscode.Extra_Effect_BSolve = m+300
rscode.Extra_Effect_BSolve = m+101
rscode.Extra_Effect_ASolve = m+102
rscode.Phase_Leave_Flag = m+200 --"Summon Flag for SummonBuff"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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