Commit 3bf52289 authored by Nemo Ma's avatar Nemo Ma

fix

parent ab1bb3b0
......@@ -4259,8 +4259,11 @@
25000105 0
25000403 0
14824018 0
###WILDEST
90700071 0
90700072 0
90700059 0
90700030 0
!THE WILDEST LIST
#forbidden
......
......@@ -146,7 +146,7 @@ function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local lg=eg
local lg=eg:Clone()
if g==nil or #g==0 then
lg:KeepAlive()
e:SetLabelObject(lg)
......
......@@ -8,13 +8,19 @@ rscf.DefineSet(rsdc,"DragonCaller")
function rsdc.SynchroFun(c,code,att,cate,cost,tg,op,limit)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,rsdc.IsSet,aux.FilterBoolFunction(Card.IsAttribute,att),1)
local e1=rsef.QO(c,nil,{m,2},nil,"sp",nil,LOCATION_EXTRA,nil,rscost.cost({cm.resfilter,cm.resgcheck},"res",LOCATION_HAND+LOCATION_MZONE,0,2,2),rsop.target3(cm.checkfun,rscf.spfilter(),"sp"),cm.synop)
local e1=rsef.QO(c,nil,{m,2},nil,"sp",nil,LOCATION_EXTRA,nil,rscost.cost({cm.resfilter,cm.resgcheck},"res",LOCATION_HAND+LOCATION_MZONE,0,2,2),rsop.target3(cm.checkfun,cm.spfilter,"sp"),cm.synop)
e1:SetLabel(att)
local e2=rsef.QO(c,nil,{m,2},{1,code},"sp",nil,LOCATION_GRAVE,nil,rscost.cost(cm.resfilter2,"res",LOCATION_HAND+LOCATION_MZONE),rsop.target(rscf.spfilter2(),"sp"),cm.synop)
local e2=rsef.QO(c,nil,{m,2},{1,code},"sp",nil,LOCATION_GRAVE,nil,rscost.cost(cm.resfilter2,"res",LOCATION_HAND+LOCATION_MZONE),rsop.target(cm.spfilter2,"sp"),cm.synop2)
e2:SetLabel(att)
local e3=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{code,0},{1,code+100},cate,"de",nil,cost,cm.synsptg(tg,limit),op)
return e1,e2,e3
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
end
function cm.spfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.checkfun(e,tp)
return not e:GetHandler():IsStatus(STATUS_CHAINING)
end
......@@ -25,6 +31,10 @@ function cm.resgcheck(g,e,tp)
return Duel.GetLocationCountFromEx(tp,tp,g,e:GetHandler())>0
end
function cm.synop(e,tp)
local c=rscf.GetSelf(e)
if c then rssf.SpecialSummon(c,SUMMON_TYPE_SYNCHRO) c:CompleteProcedure() end
end
function cm.synop2(e,tp)
local c=rscf.GetSelf(e)
if c then rssf.SpecialSummon(c) end
end
......
--古悉兰真神 光之九月
local s,id=GetID()
function s.initial_effect(c)
--Synchro Summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),aux.NonTuner(s.tfilter),1)
c:EnableReviveLimit()
--must first be synchro summoned
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.synlimit)
c:RegisterEffect(e0)
--spsummon
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e10)
--summon success
local e44=Effect.CreateEffect(c)
e44:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e44:SetCode(EVENT_SPSUMMON_SUCCESS)
e44:SetCondition(s.effcon)
e44:SetOperation(s.spsumsuc)
c:RegisterEffect(e44)
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCode(EFFECT_DISABLE)
e1:SetTarget(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(e1)
--copy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(s.operation)
c:RegisterEffect(e2)
--copy
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_BE_PRE_MATERIAL)
e7:SetRange(LOCATION_MZONE)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e7:SetOperation(s.reset)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_LEAVE_FIELD)
e8:SetRange(LOCATION_MZONE)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e8:SetOperation(s.reset)
c:RegisterEffect(e8)
end
function s.tfilter(c)
return c:IsSetCard(0x20ab) and c:IsType(TYPE_SYNCHRO)
end
function s.effcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
function s.spsumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(s.chlimit)
end
function s.chlimit(e,ep,tp)
return tp==ep
end
function s.copfilter(c)
return c:IsFaceup() and c:IsStatus(STATUS_DISABLED) and c:GetFlagEffect(id)==0
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local wg=Duel.GetMatchingGroup(s.copfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c)
for wbc in aux.Next(wg) do
if c:IsFaceup() then
local cid=c:CopyEffect(wbc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,1)
wbc:RegisterFlagEffect(id,0,0,0,cid)
end
end
end
function s.rfilter(c)
return c:GetFlagEffect(id)>0
end
function s.reset(e,tp,eg,ep,ev,re,r,rp)
local wg=eg:Filter(s.rfilter,nil)
for wbc in aux.Next(wg) do
e:GetHandler():ResetEffect(wbc:GetFlagEffectLabel(id),RESET_COPY)
wbc:ResetFlagEffect(id)
end
end
\ No newline at end of file
......@@ -4,7 +4,6 @@ function c67200705.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200705,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
......
......@@ -338,7 +338,7 @@ end
function cm.spcostfliter(c)
return c:IsSetCard(0x8d) and c:IsAbleToGraveAsCost()
end
function cm.spfliter(c)
function cm.spfilter(c)
return c:IsSetCard(0x8d) and c:IsDiscardable() and c:IsType(TYPE_MONSTER) and Duel.GetMatchingGroupCount(cm.spcostfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil)>=c:GetLevel()
end
function cm.spcon(e,c)
......@@ -352,8 +352,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local tc=g:GetFirst()
local lv=tc:GetLevel()
Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST)
local g2=Duel.SelectMatchingCard(tp,cm.spcostfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,lv,lv,nil)
Duel.SendtoGrave(g2,REASON_COST)
e:GetHandler():RegisterFlagEffect(m+100,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1,lv)
end
function cm.serstfilter(c)
return c:IsSetCard(0x8d) and c:IsType(TYPE_SPELL+TYPE_TRAP)
......@@ -362,19 +361,16 @@ function cm.serstfilter2(c)
return c:IsSetCard(0x8d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsPosition(POS_FACEUP)
end
function cm.serstcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA and Duel.GetMatchingGroupCount(cm.serstfilter2,tp,LOCATION_ONFIELD,0,nil)==0
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA and e:GetHandler():GetFlagEffect(m+100)>0
end
function cm.sersttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.serstfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return true end
end
function cm.serstop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(90700010,1))
local g=Duel.SelectMatchingCard(tp,cm.serstfilter,tp,LOCATION_DECK,0,1,2,nil)
local tc=g:GetFirst()
while tc do
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
tc=g:GetNext()
end
local lv=e:GetHandler():GetFlagEffectLabel(m+100)
local g2=Duel.SelectMatchingCard(tp,cm.spcostfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,lv,lv,nil)
Duel.Overlay(e:GetHandler(),g2)
end
function cm.sermfilter1(c)
return c:IsPosition(POS_FACEUP) and c:IsSetCard(0x8d) and c:IsAbleToGraveAsCost()
......
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