Commit 466aafb8 authored by Grajade's avatar Grajade

Update c86379881.lua

parent 06a4eef1
Pipeline #11979 passed with stage
in 35 seconds
--变性
require "expansions/script/nef/msc"
function c86379881.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
......@@ -23,45 +24,59 @@ function c86379881.initial_effect(c)
end
--
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
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 chk==0 then return Duel.IsExistingTarget(c86379881.filter,tp,LOCATION_SZONE,0,1,nil) end
if chkc then return chkc:IsControler(tp) and c86379881.filter(c) end
if chk==0 then return Duel.IsExistingTarget(c86379881.filter,tp,LOCATION_ONFIELD,0,1,nil) end
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
function c86379881.op(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local code=c:GetOriginalCode()
local mag=0
if code==22131 then
mag=888136
elseif code==22132 then
mag=888137
elseif code==22133 then
mag=888138
elseif code==22134 then
mag=888139
elseif code==22135 then
mag=888140
elseif code==22191 then
mag=888136
elseif code==888136 then
mag=888151
elseif code==888137 then
mag=888152
elseif code==888138 then
mag=888153
elseif code==888139 then
mag=888154
elseif code==888140 then
mag=888155
end
c:SetEntityCode(mag,true)
c:ReplaceEffect(mag,0,0)
Duel.SetMetatable(c,_G["c"..mag])
local check,Add_Group=c86379881.MqAdd_Check_SpellCard(c)
if (not check) then return end
local token_code=0
if #Add_Group<1 then return end
if #Add_Group<2 then code=Add_Group[1] end
if #Add_Group>1 then
local off=1
local ops={}
local opval={}
for i=1,#Add_Group do
ops[off]=aux.Stringid(Add_Group[i],0)
opval[off-1]=i
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
code=Add_Group[sel]
end
c:SetEntityCode(code,true)
c:ReplaceEffect(code,0,0)
Duel.SetMetatable(c,_G["c"..code])
end
end
--
......@@ -70,10 +85,10 @@ function c86379881.gcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
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
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
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