Commit 466aafb8 authored by Grajade's avatar Grajade

Update c86379881.lua

parent 06a4eef1
--变性 --变性
require "expansions/script/nef/msc"
function c86379881.initial_effect(c) function c86379881.initial_effect(c)
-- --
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -23,45 +24,59 @@ function c86379881.initial_effect(c) ...@@ -23,45 +24,59 @@ function c86379881.initial_effect(c)
end end
-- --
function c86379881.filter(c) function c86379881.filter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c:IsCode(22131,22132,22133,22134,22135,22191,888136,888137,888138,888139,888140) return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c86379881.MqAdd_Check_SpellCard(c)
end
function c86379881.MqAdd_Check_SpellCard(c)
local List_Num=1
local Add_Group={}
if c:IsOriginalCodeRule(22200) then return false end
for i=1,#FusMqCardList do
if FusMqCardList[i]==c:GetCode() then List_Num=#FusMqSetCode[i] end
end
for i=1,#FusMqSetCode do
local check=true
while true do
if #FusMqSetCode[i]~=List_Num+1 then check=false break end
for j=1,#FusMqSetCode[i] do
if not FusMqSetCode[i][j](c) then check=false end
if FusMqSetCode[i][1]~=FusMqSetCode[i][j] then check=false end
end
break
end
if check then table.insert(Add_Group,FusMqCardList[i]) end
end
return #Add_Group>0,Add_Group
end end
function c86379881.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c86379881.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c86379881.filter(chkc) end if chkc then return chkc:IsControler(tp) and c86379881.filter(c) end
if chk==0 then return Duel.IsExistingTarget(c86379881.filter,tp,LOCATION_SZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c86379881.filter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c86379881.filter,tp,LOCATION_SZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c86379881.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
end end
function c86379881.op(e,tp,eg,ep,ev,re,r,rp) function c86379881.op(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetFirstTarget() local c=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
local code=c:GetOriginalCode() local check,Add_Group=c86379881.MqAdd_Check_SpellCard(c)
local mag=0 if (not check) then return end
if code==22131 then local token_code=0
mag=888136 if #Add_Group<1 then return end
elseif code==22132 then if #Add_Group<2 then code=Add_Group[1] end
mag=888137 if #Add_Group>1 then
elseif code==22133 then local off=1
mag=888138 local ops={}
elseif code==22134 then local opval={}
mag=888139 for i=1,#Add_Group do
elseif code==22135 then ops[off]=aux.Stringid(Add_Group[i],0)
mag=888140 opval[off-1]=i
elseif code==22191 then off=off+1
mag=888136 end
elseif code==888136 then local op=Duel.SelectOption(tp,table.unpack(ops))
mag=888151 local sel=opval[op]
elseif code==888137 then code=Add_Group[sel]
mag=888152 end
elseif code==888138 then c:SetEntityCode(code,true)
mag=888153 c:ReplaceEffect(code,0,0)
elseif code==888139 then Duel.SetMetatable(c,_G["c"..code])
mag=888154
elseif code==888140 then
mag=888155
end
c:SetEntityCode(mag,true)
c:ReplaceEffect(mag,0,0)
Duel.SetMetatable(c,_G["c"..mag])
end end
end end
-- --
...@@ -70,10 +85,10 @@ function c86379881.gcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -70,10 +85,10 @@ function c86379881.gcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c86379881.gfilter(c) function c86379881.gfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x177) and not c:IsCode(22200) return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x177) and not c:iscode(22200)
end end
function c86379881.gtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c86379881.gtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c86379881.ctfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c86379881.gfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c86379881.gfilter,tp,LOCATION_SZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c86379881.gfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c86379881.gfilter,tp,LOCATION_SZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c86379881.gfilter,tp,LOCATION_SZONE,0,1,1,nil)
......
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