Commit 79a501e3 authored by TanakaKotoha's avatar TanakaKotoha

naobaijin

parent f1dd7bba
Pipeline #694 passed with stages
in 40 minutes and 28 seconds
No preview for this file type
......@@ -78,7 +78,6 @@ end
function cm.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_MZONE,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,0,0)
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -64,7 +64,6 @@ end
function cm.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_MZONE,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,0,0)
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
--灭绝机 霍拉格
if not pcall(function() require("expansions/script/c30099990") end) then require("script/c30099990") end
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m,cm=rscf.DefineCard(30000231)
function cm.initial_effect(c)
rscf.SetSummonCondition(c,false,aux.FALSE)
......@@ -34,11 +34,9 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp)
end
end
Duel.RegisterFlagEffect(1-rp,m,rsreset.pend,0,1,flag)
end
end
for i=0,1 do
if Duel.GetFlagEffect(i,m)>=2 then
Duel.RaiseEvent(eg,m,re,r,rp,ep,ev)
if Duel.GetFlagEffect(1-rp,m)>=2 then
Duel.RaiseEvent(eg,m,re,r,rp,1-rp,ev)
end
end
end
end
......@@ -58,7 +56,7 @@ function cm.regop2(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp
return ep==tp
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m+100)==0 end
......@@ -69,21 +67,31 @@ function cm.spfilter(c,e,tp)
end
function cm.spop(e,tp,eg)
local c=rscf.GetSelf(e)
if not c or rssf.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)<=0 then return end
if not c then return end
local res=false
if c:IsLocation(LOCATION_GRAVE) then
res=rssf.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP,nil,{"leave",LOCATION_REMOVED })>0
else
res=rssf.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)>0
end
if not res then return end
c:CompleteProcedure()
cm.gainop(c,tp,true)
end
function cm.gainop(c,tp,ignore,extra)
local flaglist={Duel.GetFlagEffectLabel(tp,m)}
local flag=0
for _,v in pairs(flaglist) do
flag=flag|v
end
if flag & TYPE_MONSTER ~=0 then
local e1=rsef.QO({c,nil,true},nil,{m,0},1,"dr","ptg",LOCATION_MZONE,nil,nil,rsop.target(1,"dr"),cm.drop,nil,rsreset.est)
if flag & TYPE_MONSTER ~=0 or extra then
local e1=rsef.QO({c,nil,ignore},nil,{m,0},1,"dr","ptg",LOCATION_MZONE,nil,nil,rsop.target(1,"dr"),cm.drop,nil,rsreset.est)
end
if flag & TYPE_SPELL ~=0 then
local e2=rsef.QO({c,nil,true},nil,{m,2},1,"tg",nil,LOCATION_MZONE,nil,nil,rsop.target(Card.IsAbleToGrave,"tg",LOCATION_ONFIELD,LOCATION_ONFIELD),cm.tgop,nil,rsreset.est)
if flag & TYPE_SPELL ~=0 or extra then
local e2=rsef.QO({c,nil,ignore},nil,{m,2},1,"tg",nil,LOCATION_MZONE,nil,nil,rsop.target(Card.IsAbleToGrave,"tg",LOCATION_ONFIELD,LOCATION_ONFIELD),cm.tgop,nil,rsreset.est)
end
if flag & TYPE_TRAP ~=0 then
local e3=rsef.QO({c,nil,true},nil,{m,3},1,"tg",nil,LOCATION_MZONE,nil,nil,rsop.target(Card.IsAbleToHand,"th",LOCATION_GRAVE,LOCATION_GRAVE),cm.thop,nil,rsreset.est)
if flag & TYPE_TRAP ~=0 or extra then
local e3=rsef.QO({c,nil,ignore},nil,{m,3},1,"tg",nil,LOCATION_MZONE,nil,nil,rsop.target(Card.IsAbleToHand,"th",LOCATION_GRAVE,LOCATION_GRAVE),cm.thop,nil,rsreset.est)
end
end
function cm.tgop(e,tp)
......
......@@ -109,7 +109,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp,chk)
d=a
a=t
end
local cg=a:GetColumnGroup():Filter(cm.ckfilter2,nil,1-tp)
local cg=a:GetColumnGroup():Filter(cm.ckfilter2,nil,1-tp)
if cg:GetCount()>0 then
local tc=cg:GetFirst()
while tc do
......@@ -162,6 +162,7 @@ function cm.ntdop(e,tp,eg,ep,ev,re,r,rp,chk)
local tcode=c.dfc_back_side
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0)
end
end
......
......@@ -69,15 +69,18 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_ATTACK_ANNOUNCE)
e5:SetLabelObject(tc)
e5:SetOperation(cm.ckop)
e5:SetOperation(cm.ckop)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e5,true)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e6:SetRange(LOCATION_MZONE)
e6:SetLabelObject(tc)
e6:SetOperation(cm.ckop)
e6:SetOperation(cm.ckop)
e6:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e6,true)
tc:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
......@@ -96,10 +99,14 @@ end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(m)~=0 then
return false
else
return true
if tc:GetFlagEffect(m+1)==0 then
e:Reset()
return false
end
if tc:GetFlagEffect(m)~=0 then
return false
else
return true
end
end
function cm.desop(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