Commit d7c3ebdd authored by Nemo Ma's avatar Nemo Ma

241020 wd

parent 22ebb509
No preview for this file type
......@@ -20,16 +20,6 @@ function c130006130.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(c130006130.sdop)
c:RegisterEffect(e3)
--go back
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_MOVE)
e5:SetCondition(c130006130.drcon)
e5:SetTarget(c130006130.drtg)
e5:SetOperation(c130006130.drop)
c:RegisterEffect(e5)
--retrieval
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......@@ -124,23 +114,13 @@ function c130006130.retop(e,tp,eg,ep,ev,re,r,rp)
else
c:ResetFlagEffect(130006130)
Duel.ReturnToField(c)
e:Reset()
end
end
function c130006130.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_REMOVED) and not c:IsReason(REASON_SPSUMMON)
end
function c130006130.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c130006130.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
if Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 and Duel.SelectYesNo(tp,aux.Stringid(130006130,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(tc)
Duel.Destroy(tc,REASON_EFFECT)
e:Reset()
end
end
end
function c130006130.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -163,7 +143,7 @@ function c130006130.clearop(e,tp,eg,ep,ev,re,r,rp)
end
function c130006130.spfilter1(c,rp)
local rc=c:GetCode()
return c:IsAbleToHand() and not c:IsCode(130006130) and c130006130[rp][rc]
return c:IsAbleToHand() and c130006130[rp][rc]
end
function c130006130.regop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c130006130.spfilter1,tp,LOCATION_DECK,0,1,nil,tp) then
......@@ -172,4 +152,4 @@ function c130006130.regop(e,tp,eg,ep,ev,re,r,rp)
if tg:GetCount()<=0 then return end
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
--救赎的圣歌
function c21185800.initial_effect(c)
aux.EnablePendulumAttribute(c)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,21185800)
e2:SetCost(c21185800.secost)
e2:SetTarget(c21185800.setarget)
e2:SetOperation(c21185800.seoperation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_HAND)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCountLimit(1,21185801)
e3:SetCondition(c21185800.condition)
e3:SetTarget(c21185800.target)
e3:SetOperation(c21185800.operation)
c:RegisterEffect(e3)
end
function c21185800.discheck(c)
return c:IsCode(21185800) and c:IsDiscardable()
end
function c21185800.secost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c21185800.discheck,tp,LOCATION_HAND,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(21185800,1)) then
Duel.Hint(3,tp,HINTMSG_DISCARD)
Duel.DiscardHand(tp,c21185800.discheck,1,1,REASON_COST,nil)
e:SetLabel(100)
end
end
function c21185800.addcheck(c)
return c:IsCode(21185805) and c:IsAbleToHand() and (c:IsLocation(LOCATION_DECK) or c:IsFaceup())
end
function c21185800.setarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21185800.addcheck,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
if e:GetLabel()==100 then
e:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+0x200)
else
e:SetProperty(0)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c21185800.seoperation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(3,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c21185800.addcheck,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c21185800.codecheck(c)
return c:IsFacedown() or c:GetFlagEffect(21185805)<1
end
function c21185800.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c21185800.codecheck,tp,LOCATION_MZONE,0,nil)
return ep~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) and #g==0
end
function c21185800.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local activate_type=re:GetHandler():GetType()
--setable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MONSTER_SSET)
e1:SetValue(activate_type)
c:RegisterEffect(e1)
local res=not c:IsStatus(STATUS_CHAINING)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:IsSSetable()
e1:Reset()
return res
end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c21185800.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
local activate_type=re:GetHandler():GetType()
--setable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MONSTER_SSET)
e1:SetValue(activate_type)
c:RegisterEffect(e1)
local res=not c:IsStatus(STATUS_CHAINING)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:IsSSetable()
if Duel.Destroy(eg,REASON_EFFECT) and c:IsRelateToEffect(e) and res then
Duel.BreakEffect()
local activate_type=re:GetHandler():GetType()
if Duel.SSet(tp,c) then
e1:Reset()
c:SetCardData(CARDDATA_TYPE,activate_type)
c:CopyEffect(re:GetHandler():GetOriginalCodeRule(),RESET_EVENT+RESETS_REDIRECT,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_HAND)
c:RegisterEffect(e1)
local ge=Effect.CreateEffect(c)
ge:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ge:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ge:SetCode(EVENT_LEAVE_FIELD_P)
ge:SetOperation(c21185800.leaveop)
c:RegisterEffect(ge)
end
end
end
end
function c21185800.leaveop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:SetCardData(CARDDATA_TYPE,TYPE_PENDULUM+TYPE_MONSTER+TYPE_EFFECT+TYPE_TUNER)
e:Reset()
end
\ No newline at end of file
--恶魔的恩典
function c21185805.initial_effect(c)
aux.EnablePendulumAttribute(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,21185805)
e2:SetTarget(c21185805.sptarget)
e2:SetOperation(c21185805.spoperation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_HAND)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCountLimit(1,21185806)
e3:SetCondition(c21185805.condition)
e3:SetTarget(c21185805.target)
e3:SetOperation(c21185805.operation)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c21185805.recon)
e4:SetOperation(c21185805.reop)
c:RegisterEffect(e4)
end
function c21185805.sptarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,0,0)
end
function c21185805.spoperation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c21185805.spcon)
e1:SetOperation(c21185805.spop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c21185805.spfilter(c,e,tp,g)
return c:IsRace(RACE_DRAGON) and c:IsFacedown() and c:IsType(TYPE_SYNCHRO) and c:IsSynchroSummonable(nil,g,#g-1,#g-1) -- and c:IsCanBePlacedOnField(tp)
end
function c21185805.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,nil)
return Duel.GetTurnCount()==e:GetLabel() and aux.gffcheck(g,Card.IsCode,21185805,Card.IsCode,21185800) and Duel.IsExistingMatchingCard(c21185805.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and g:IsExists(Card.IsAbleToHand,1,nil)
end
function c21185805.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,21185805)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local sg=Duel.SelectMatchingCard(tp,c21185805.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,g)
if sg:GetCount()>0 then
local tc=sg:GetFirst()
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,false) then
tc:CompleteProcedure()
_copy=Card.RegisterEffect
function Card.RegisterEffect(card,effect,...)
local _copyeffect=effect:Clone()
if _copyeffect:GetRange()&LOCATION_MZONE>0 then
_copyeffect:SetRange(LOCATION_SZONE)
end
if _copyeffect:IsHasType(EFFECT_TYPE_IGNITION) then
_copyeffect:SetType(EFFECT_TYPE_QUICK_O)
_copyeffect:SetCode(EVENT_FREE_CHAIN)
end
local con=effect:GetCondition()
if con then
_copyeffect:SetCondition(function(...)
return con(...) and tc:IsType(TYPE_TRAP) and tc:IsType(TYPE_CONTINUOUS)
end)
else
_copyeffect:SetCondition(function(...)
return tc:IsType(TYPE_TRAP) and tc:IsType(TYPE_CONTINUOUS)
end)
end
_copyeffect:SetReset(RESET_EVENT+RESETS_STANDARD)
_copy(tc,_copyeffect,...)
_copy(card,effect,...)
end
local code=tc:GetOriginalCode()
Duel.CreateToken(tp,code)
Card.RegisterEffect=_copy
tc:RegisterFlagEffect(21185805,0,0,0)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
tc:SetStatus(STATUS_EFFECT_ENABLED,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_DECK)
e1:SetCondition(c21185805.resetcon)
e1:SetOperation(c21185805.resetop)
tc:RegisterEffect(e1)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_PZONE,0,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c21185805.resetcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPosition(POS_FACEDOWN)
end
function c21185805.resetop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():ResetFlagEffect(21185805)
e:Reset()
end
function c21185805.codecheck(c)
return c:IsFacedown() or c:GetFlagEffect(21185805)<1
end
function c21185805.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c21185805.codecheck,tp,LOCATION_MZONE,0,nil)
return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) and #g==0
end
function c21185805.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c21185805.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
if Duel.Destroy(eg,REASON_EFFECT) and c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.BreakEffect()
if Duel.SpecialSummonStep(c,0,tp,1-tp,false,false,POS_FACEUP) then
c:RegisterFlagEffect(21185805+1,RESET_EVENT+RESETS_STANDARD,0,1)
end
Duel.SpecialSummonComplete()
end
end
end
function c21185805.recon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION)
return ep==tp and re:GetHandler():IsType(TYPE_MONSTER) and loc==LOCATION_MZONE or loc==LOCATION_HAND and e:GetHandler():GetFlagEffect(21185805+1)>0
end
function c21185805.a(c,x)
return aux.IsCodeListed(c,x) and c:IsAbleToDeck() and c:IsFaceup()
end
function c21185805.b(c,x)
return aux.IsMaterialListCode(c,x) and c:IsAbleToDeck() and c:IsFaceup()
end
function c21185805.c(c,x)
return c:IsSetCard(c,x) and c:IsAbleToDeck() and c:IsFaceup()
end
function c21185805.reop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local code=rc:GetCode()
local setcard=Duel.ReadCard(rc,CARDDATA_SETCODE)
local g1=Duel.GetMatchingGroup(c21185805.a,tp,LOCATION_ONFIELD,0,nil,code)
local g2=Duel.GetMatchingGroup(c21185805.b,tp,LOCATION_ONFIELD,0,nil,code)
local g3=Duel.GetMatchingGroup(c21185805.c,tp,LOCATION_ONFIELD,0,nil,setcard)
local sg=Group.CreateGroup()
sg:Merge(g1)
sg:Merge(g2)
sg:Merge(g3)
if #sg>0 then
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -40,7 +40,7 @@ function c98920032.initial_effect(c)
end
c98920032.material_setcode=0x8
function c98920032.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c98920032.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
......
--水晶机巧-顶点黄玉
function c98920290.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--synchro summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920290,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,98920290)
e1:SetCondition(c98920290.sycon)
e1:SetTarget(c98920290.sytg)
e1:SetOperation(c98920290.syop)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,98930290)
e3:SetCondition(c98920290.spcon)
e3:SetTarget(c98920290.sptg)
e3:SetOperation(c98920290.spop)
c:RegisterEffect(e3)
end
function c98920290.sycon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c98920290.syfilter(c)
return c:IsSynchroSummonable(nil)
end
function c98920290.sytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920290.syfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98920290.syop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c98920290.syfilter,tp,LOCATION_EXTRA,0,nil,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local mg=aux.GetSynMaterials(tp,sg:GetFirst())
for tc in aux.Next(mg) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetTarget(c98920290.syntg)
e1:SetValue(1)
e1:SetOperation(c98920290.synop)
tc:RegisterEffect(e1)
end
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
function c98920290.adjustop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te and aux.GetValueType(te)=="Effect" then te:Reset() end
e:Reset()
end
function c98920290.syncheck(c,g,mg,tp,lv,syncard,minc,maxc)
g:AddCard(c)
local ct=g:GetCount()
local res=c98920290.syngoal(g,tp,lv,syncard,minc,ct) or (ct<maxc and mg:IsExists(c98920290.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc))
g:RemoveCard(c)
return res
end
function c98920290.syngoal(g,tp,lv,syncard,minc,ct)
return ct>=minc and g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard) and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0
end
function c98920290.syntg(e,syncard,f,min,max)
local minc=min+1
local maxc=max+1
local c=e:GetHandler()
local tp=syncard:GetControler()
local lv=syncard:GetLevel()
if lv<=c:GetLevel() then return false end
local g=Group.FromCards(c)
local mg=aux.GetSynMaterials(tp,syncard):Filter(f,nil,syncard)
return mg:IsExists(c98920290.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc)
end
function c98920290.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
local minc=min+1
local maxc=max+1
local c=e:GetHandler()
local lv=syncard:GetLevel()
local g=Group.FromCards(c)
local mg=aux.GetSynMaterials(tp,syncard):Filter(f,nil,syncard)
for i=1,maxc do
local cg=mg:Filter(c98920290.syncheck,g,g,mg,tp,lv,syncard,minc,maxc)
if #cg==0 then break end
local minct=1
if c98920290.syngoal(g,tp,lv,syncard,minc,i) then
minct=0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local sg=cg:Select(tp,minct,1,nil)
if #sg==0 then break end
g:Merge(sg)
end
Duel.SetSynchroMaterial(g)
if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then
local fid=c:GetFieldID()
local og=Duel.GetOperatedGroup()
for oc in aux.Next(og) do
oc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
end
end
end
function c98920290.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c98920290.spfilter(c,e,tp)
return c:IsSetCard(0xea) and not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c98920290.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98920290.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98920290.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98920290.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
fid=g:GetFirst():GetFieldID()
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c98920290.ftarget)
e2:SetLabel(fid)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c98920290.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
end
\ No newline at end of file
--暗黑海龙 泰达路斯
function c98940016.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98940016,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c98940016.spcon)
c:RegisterEffect(e2)
--spsummon2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98940016,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,98940016)
e2:SetCost(c98940016.spcost)
e2:SetTarget(c98940016.sptg)
e2:SetOperation(c98940016.spop)
c:RegisterEffect(e2)
end
function c98940016.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK)>=2
end
function c98940016.costfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
end
function c98940016.spfilter(c,e,tp,mc)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c98940016.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98940016.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98940016.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98940016.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98940016.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c98940016.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98940016.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,nil)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local fid=c:GetFieldID()
tc:RegisterFlagEffect(98940016,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetLabel(fid)
e3:SetLabelObject(tc)
e3:SetCondition(c98940016.tdcon)
e3:SetOperation(c98940016.tdop)
Duel.RegisterEffect(e3,tp)
end
Duel.SpecialSummonComplete()
end
function c98940016.tdcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(98940016)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end
function c98940016.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
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