Commit 8d663c50 authored by tsubaki's avatar tsubaki

1.999zfb更新

parent 435a6f6c
No preview for this file type
......@@ -17,6 +17,7 @@
!counter 0x28d 命莲指示物
!counter 0x208 阳光指示物
!counter 0x254c 虚幻指示物
!counter 0x500d 结晶指示物
!counter 0x373 粲辉指示物
!counter 0x1700 灵力指示物
......@@ -123,6 +124,7 @@
!setname 0x240 青娥
!setname 0x242 宫古芳香
!setname 0x246 仙符
!setname 0x249 天理法则
!setname 0x250 原神
!setname 0x251 星莲
!setname 0x251a 一轮
......
No preview for this file type
......@@ -45,26 +45,14 @@ function cCardno.filter2(c,e,tp)
return c:IsAbleToHand() and c:IsSetCard(0x456) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end
function cCardno.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)<=0 then return end
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1)
Duel.ConfirmCards(tp,g)
--该 效 果 删 除
if false then
local g=Duel.GetDecktopGroup(1-tp,1)
local tc
if g:GetCount()>0 then
tc=g:GetFirst()
Duel.ConfirmDecktop(1-tp,1)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
g:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabelObject(g)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetOperation(cCardno.retop)
Duel.RegisterEffect(e1,tp)
end
Duel.BreakEffect()
local tc=g:GetFirst()
if tc:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(cCardno.filter,tp,LOCATION_DECK,0,1,nil,e,tp) then
local ssg=Duel.SelectMatchingCard(tp,cCardno.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SendtoHand(ssg,tp,REASON_EFFECT)
......
......@@ -61,12 +61,13 @@ function cCardno.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cCardno.filter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(cCardno.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.SelectTarget(tp,cCardno.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SelectTarget(tp,cCardno.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
end
function cCardno.drop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.ConfirmCards(1-tp,tc)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
......
......@@ -30,7 +30,15 @@ function cCardno.watop(e,tp,eg,ep,ev,re,r,rp)
if t==1 then t=1-tp else t=tp end
local g=Duel.GetDecktopGroup(t,5)
Duel.ConfirmCards(tp,g)
if Duel.SelectYesNo(tp,aux.Stringid(Cardno,4)) then Duel.ShuffleDeck(t) end
if Duel.SelectYesNo(tp,aux.Stringid(Cardno,4)) then
Duel.ShuffleDeck(t)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x456)
local tc=g:GetFirst()
if tc then
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end
end
--search
function cCardno.activate(e,tp,eg,ep,ev,re,r,rp)
......
--论外✿123!{V}[_]
require "expansions/script/nef/darksyn"
local Cardno=74561047
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--dark synchro summon
c:EnableReviveLimit()
DS.AddDarkSynchroProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x100),nil)
DS.DarkSynLimit(c)
DS.CantSp(c)
--<-中间->
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cCardno.zjcon)
e1:SetOperation(cCardno.zjop)
c:RegisterEffect(e1)
--直死
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cCardno.zscon)
e2:SetOperation(cCardno.zsop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(cCardno.efilter)
c:RegisterEffect(e3)
--n%
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CHANGE_CODE)
e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
e4:SetValue(Cardno)
c:RegisterEffect(e4)
end
--immune
function cCardno.efilter(e,te)
local tc=te:GetHandler()
local g=e:GetHandler():GetColumnGroup()
return not g:IsContains(tc)
end
--直死
function cCardno.zscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function cCardno.zsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if tc then
local atk=tc:GetAttack()
Duel.Release(tc,REASON_EFFECT)
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
--<-中间->
function cCardno.zjcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,2)
local l = Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,0x4)
if tc then return tc~=e:GetHandler() else return l==1 end
end
function cCardno.zjop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,2)
if tc~=c then
if tc then Duel.SendtoGrave(tc,REASON_RULE) end
Duel.MoveSequence(c,2)
Duel.Readjust()
end
end
\ No newline at end of file
......@@ -21,11 +21,11 @@ function cCardno.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(Cardno,1))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCost(cCardno.cost)
e3:SetTarget(cCardno.tdtg)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
--e3:SetCost(cCardno.cost)
--e3:SetTarget(cCardno.tdtg)
e3:SetOperation(cCardno.tdop)
c:RegisterEffect(e3)
end
......@@ -38,11 +38,13 @@ function cCardno.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_GRAVE)
end
function cCardno.tdop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cCardno.tdfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(Cardno,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cCardno.tdfilter,tp,LOCATION_GRAVE,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
end
--search
function cCardno.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -61,7 +61,7 @@ function cCardno.ckop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:ResetFlagEffect(Cardno)
local nowg=c:GetOverlayGroup()
c:RegisterFlagEffect(Cardno,0,0,0,nowg:GetCount())
c:RegisterFlagEffect(Cardno,0,0,0,nowg:FilterCount(Card.IsSetCard,nil,0x298))
end
--SpecialSummon
function cCardno.spfilter2(c,e,tp)
......@@ -113,6 +113,7 @@ function cCardno.sscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
function cCardno.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(21,0,aux.Stringid(Cardno,6))
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetFieldGroup(tp,0,LOCATION_SZONE),Duel.GetFieldGroupCount(tp,0,LOCATION_SZONE),1-tp,LOCATION_SZONE)
end
......
......@@ -49,7 +49,7 @@ function c74563007.filter(c)
end
function c74563007.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c74563007.filter,tp,LOCATION_DECK+LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingMatchingCard(c74563007.filter,tp,LOCATION_DECK+LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) and Duel.GetTurnPlayer()==tp end
end
function c74563007.damop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
......
......@@ -26,20 +26,37 @@ function c74563008.initial_effect(c)
c:RegisterEffect(e4)
end
function c74563008.filter0(c)
return c:IsCanBeFusionMaterial()
return c:IsCanBeFusionMaterial() and c:IsType(TYPE_MONSTER)
end
function c74563008.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
return c:IsCanBeFusionMaterial() and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e)
end
function c74563008.filter2(c,e,tp,m,f,chkf)
return (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c74563008.spfilter1(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c74563008.mfilter0(c,e)
return c:IsType(TYPE_SPELL+TYPE_MONSTER) and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c74563008.mfilter2(c,e)
return c:IsType(TYPE_SPELL+TYPE_MONSTER) and c:IsCanBeFusionMaterial()and not c:IsImmuneToEffect(e)
end
function c74563008.spfilter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x372) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c74563008.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c74563008.filter0,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil)
local res=Duel.IsExistingMatchingCard(c74563008.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res=Duel.IsExistingMatchingCard(c74563008.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if res then return true end
local mg2=Duel.GetMatchingGroup(c74563008.mfilter0,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil,e)
mg2:Merge(mg1)
res=Duel.IsExistingMatchingCard(c74563008.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
......@@ -57,31 +74,41 @@ function c74563008.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetMatchingGroup(c74563008.filter1,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil,e)
local sg1=Duel.GetMatchingGroup(c74563008.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=Duel.GetMatchingGroup(c74563008.mfilter2,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil,e)
mg2:Merge(mg1)
local sg2=Duel.GetMatchingGroup(c74563008.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,nil,chkf)
sg1:Merge(sg2)
local mg3=nil
local sg2=nil
local sg3=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c74563008.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
sg3=Duel.GetMatchingGroup(c74563008.spfilter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
if sg1:GetCount()>0 or (sg3~=nil and sg3:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
if sg3 then sg:Merge(sg3) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
if sg1:IsContains(tc) and (sg3==nil or not sg3:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if tc:IsSetCard(0x372) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat2)
Duel.SendtoGrave(mat2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local mat=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
fop(ce,e,tp,tc,mat)
end
tc:CompleteProcedure()
end
......
......@@ -8,12 +8,6 @@ function c74563022.initial_effect(c)
e1:SetTarget(c74563022.target)
e1:SetOperation(c74563022.activate)
c:RegisterEffect(e1)
local e12=e1:Clone()
e12:SetType(EFFECT_TYPE_IGNITION)
e12:SetRange(LOCATION_GRAVE)
e12:SetCondition(aux.exccon)
e12:SetCost(aux.bfgcost)
c:RegisterEffect(e12)
end
c74563022.DescSetName=0x258
function c74563022.filter1(c,e)
......
......@@ -22,6 +22,7 @@ function c74563024.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,74563024)
e3:SetCost(c74563024.limcost)
e3:SetTarget(c74563024.tktg)
e3:SetOperation(c74563024.tkop)
......@@ -143,7 +144,6 @@ function c74563024.SetMaterial(c,g)
g:Sub(rg1)
Duel.Remove(rg1,POS_FACEUP,REASON_FUSION+REASON_MATERIAL+REASON_EFFECT)
end
Duel.SendtoGrave(g,REASON_FUSION+REASON_MATERIAL+REASON_EFFECT)
end
function c74563024.rfilter(c,l)
return c:IsLocation(LOCATION_GRAVE) and c:IsCode(74563024)
......
--狂舞之刃·蒂欧涅
function c74563025.initial_effect(c)
--umb
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1c0+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCost(c74563025.cost)
e1:SetTarget(c74563025.target)
e1:SetOperation(c74563025.operation)
c:RegisterEffect(e1)
--extra attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EXTRA_ATTACK)
e4:SetValue(1)
c:RegisterEffect(e4)
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2)
end
function c74563025.filter(c)
return aux.TRUE
end
function c74563025.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function c74563025.rlfilter(c,tp)
local re=Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)
local val=nil
if re then
val=re:GetValue()
end
return c:IsReleasable() or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsLocation(LOCATION_HAND) and (val==nil or val(re,c)~=true))
end
function c74563025.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ph=Duel.GetCurrentPhase()
local dg=Duel.GetMatchingGroup(c74563025.filter,tp,0,LOCATION_ONFIELD,nil)
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
local ct=0
if ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE then
ct=1
else
ct=2
end
if chk==0 then
if (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) then
return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler()) and dg:GetCount()>0 and e:GetHandler():IsReleasable() and Duel.GetTurnPlayer()==tp
else
return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,e:GetHandler()) and dg:GetCount()>0 and e:GetHandler():IsReleasable() and Duel.GetTurnPlayer()==tp
end
end
Debug.Message(ct)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local cg=Duel.SelectMatchingCard(tp,c74563025.rlfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,ct,2,e:GetHandler(),tp)
cg:AddCard(e:GetHandler())
local tc=cg:GetFirst()
local ctype=0
while tc do
for i,type in ipairs({TYPE_MONSTER,TYPE_SPELL,TYPE_TRAP}) do
if tc:GetOriginalType()&type~=0 then
ctype=ctype|type
end
end
tc=cg:GetNext()
end
e:SetLabel(0,cg:GetCount())
Duel.Release(cg,REASON_COST)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c74563025.chlimit(ctype))
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0)
end
function c74563025.chlimit(ctype)
return function(e,ep,tp)
return tp==ep or e:GetHandler():GetOriginalType()&ctype==0
end
end
function c74563025.operation(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)
end
end
......@@ -22,32 +22,11 @@ function c74563031.initial_effect(c)
e12:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e12:SetValue(1)
c:RegisterEffect(e12)
--avoid damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CHANGE_DAMAGE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(1,0)
e4:SetValue(c74563031.damval)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_NO_EFFECT_DAMAGE)
c:RegisterEffect(e5)
--half atk
local e41=Effect.CreateEffect(c)
e41:SetType(EFFECT_TYPE_FIELD)
e41:SetCode(EFFECT_SET_ATTACK_FINAL)
e41:SetRange(LOCATION_MZONE)
e41:SetProperty(EFFECT_FLAG_DELAY)
e41:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e41:SetTarget(c74563031.atktg)
e41:SetValue(c74563031.atkval)
c:RegisterEffect(e41)
local e51=e4:Clone()
e51:SetCode(EFFECT_SET_DEFENSE_FINAL)
e51:SetValue(c74563031.defval)
c:RegisterEffect(e51)
--atklimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_ATTACK)
c:RegisterEffect(e2)
end
function c74563031.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
......@@ -56,12 +35,4 @@ function c74563031.damval(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then return 0 end
return val
end
function c74563031.atktg(e,c)
return c~=e:GetHandler()
end
function c74563031.atkval(e,c)
return math.ceil(c:GetAttack()/2)
end
function c74563031.defval(e,c)
return math.ceil(c:GetDefense()/2)
end
\ No newline at end of file
--峰顶的教会
function c74563034.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--synchro level
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_ALLOW_SYNCHRO_KOISHI)
e3:SetValue(c74563034.slevel)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetRange(LOCATION_FZONE)
e4:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetTarget(c74563034.attg)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
--syn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SYNCHRO_MATERIAL)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(c74563034.synfilter)
e2:SetValue(c74563034.mtval)
c:RegisterEffect(e2)
end
function c74563034.synfilter(e,c)
if c:IsType(TYPE_LINK) or c:IsType(TYPE_XYZ) then
return c:IsFaceup() and not c:IsHasEffect(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
else
return c:IsFaceup() and c:IsCanBeSynchroMaterial()
end
end
function c74563034.attg(e,c)
return c:IsType(TYPE_XYZ) or c:IsType(TYPE_LINK)
end
function c74563034.slevel(e,c)
local tc=e:GetHandler()
if tc:IsType(TYPE_XYZ) then
return tc:GetRank()
else
return tc:GetLink()
end
end
function c74563034.mtval(e,c)
if not c then return false end
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
\ No newline at end of file
--天曜战骑
function c74563035.initial_effect(c)
--Synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_FIELD)
e11:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e11:SetCode(EFFECT_CANNOT_ACTIVATE)
e11:SetRange(LOCATION_MZONE)
e11:SetTargetRange(0,1)
e11:SetCondition(c74563035.lvcon)
e11:SetValue(1)
c:RegisterEffect(e11)
end
function c74563035.lvcon(e)
local ph=Duel.GetCurrentPhase()
local tp=e:GetHandler():GetControler()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and Duel.GetTurnPlayer()==tp
end
\ No newline at end of file
--璀璨的炽天使·勒碧丝
function c74563036.initial_effect(c)
--Synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCost(c74563036.discost)
e1:SetCondition(c74563036.descon)
e1:SetTarget(c74563036.distg)
e1:SetOperation(c74563036.desop)
c:RegisterEffect(e1)
end
function c74563036.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c74563036.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c74563036.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(aux.FALSE)
end
function c74563036.filter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c74563036.filters(c)
return c:IsFaceup()
end
function c74563036.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NOT(Card.IsPublic),tp,0,LOCATION_DECK,nil)
if Duel.IsExistingMatchingCard(c74563036.filters,tp,0,LOCATION_MZONE,1,nil) then
local sg=Duel.GetMatchingGroup(c74563036.filters,tp,0,LOCATION_MZONE,nil)
Duel.SendtoGrave(sg,REASON_RULE)
elseif g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(74563036,0)) then
local c=e:GetHandler()
Duel.ConfirmCards(tp,g)
local cg=Duel.GetMatchingGroup(c74563036.filter,tp,0,LOCATION_DECK+LOCATION_GRAVE,nil)
if cg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,c74563036.filter,tp,0,LOCATION_DECK+LOCATION_GRAVE,1,2,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
end
\ No newline at end of file
--封印的炽天使
function c74563037.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74563037,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c74563037.spcon)
e2:SetOperation(c74563037.desop)
c:RegisterEffect(e2)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_DESTROYED)
e2:SetTarget(c74563037.drtg)
e2:SetOperation(c74563037.drop)
c:RegisterEffect(e2)
end
function c74563037.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c74563037.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c74563037.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c74563037.filter(c,e,tp)
return c:IsCode(74563036) and c:IsType(TYPE_SYNCHRO)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c74563037.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,74563037,0,0,1)
if (Duel.GetFlagEffect(tp,74563037))%3==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c74563037.filter,tp, LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
else
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if e:GetHandler():IsSSetable() and (e:GetHandler():IsForbidden() or Duel.SelectYesNo(tp,aux.Stringid(74563037,0))) then
Duel.SSet(tp,e:GetHandler())
else
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
end
\ No newline at end of file
......@@ -27,7 +27,7 @@ function l.initial_effect(c)
end
function l.conditionfilter(c,tp)
return c:GetSummonPlayer()==1-tp and c:IsPreviousLocation(LOCATION_HAND) and not (c:IsSetCard(0x815)or c:IsSetCard(0x814))
return c:GetSummonPlayer()==1-tp and c:IsPreviousLocation(LOCATION_HAND)
end
function l.target2filter(c)
......
--埴轮『空洞的无尽兵团』
function c86379650.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379650,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c86379650.spcon)
e1:SetTarget(c86379650.sptg)
e1:SetOperation(c86379650.spop)
c:RegisterEffect(e1)
--grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379650,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,86379650)
e3:SetCost(c86379650.gcost)
e3:SetTarget(c86379650.gtg)
e3:SetOperation(c86379650.gop)
c:RegisterEffect(e3)
end
--
function c86379650.cfilter(c,tp)
return c:IsSetCard(0x614) and c:GetPreviousControler()==tp and c:GetPreviousLocation()==LOCATION_MZONE and c:GetPreviousLevelOnField()>0
end
function c86379650.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c86379650.cfilter,1,nil,tp) and eg:GetCount()==1
end
function c86379650.filter(c,lv)
return c:IsSetCard(0x614) and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_MONSTER) and c:GetLevel()<lv
end
function c86379650.filter2(c,e,tp)
return c:IsSetCard(0x614) and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,true) and ((c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) or (c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0))
end
function c86379650.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ec=eg:GetFirst()
local lv=ec:GetPreviousLevelOnField()
local sg=Group.CreateGroup()
local g1=Duel.GetMatchingGroup(c86379650.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,nil,lv)
if g1:GetCount()>0 then
local g2=g1:GetMaxGroup(Card.GetLevel)
local g3=g2:Filter(c86379650.filter2,nil,e,tp)
if g3:GetCount()>0 then
sg:Merge(g3)
end
end
if sg:GetCount()>0 then
return true
else
return false
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
end
function c86379650.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ec=eg:GetFirst()
local lv=ec:GetPreviousLevelOnField()
local sg=Group.CreateGroup()
local g1=Duel.GetMatchingGroup(c86379650.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,nil,lv)
if g1:GetCount()>0 then
local g2=g1:GetMaxGroup(Card.GetLevel)
local g3=g2:Filter(c86379650.filter2,nil,e,tp)
if g3:GetCount()>0 then
sg:Merge(g3)
end
end
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=sg:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
--
function c86379650.gfilter(c)
return c:IsSetCard(0x614) and c:IsReleasable()
end
function c86379650.gcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c86379650.gtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379650.gfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
end
function c86379650.gfilter1(c,lv)
return c:IsSetCard(0x614) and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_MONSTER) and c:GetLevel()>lv
end
function c86379650.gfilter2(c,e,tp)
return c:IsSetCard(0x614) and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,true) and ((c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) or (c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0))
end
function c86379650.gop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c86379650.gfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
local lv=tc:GetLevel()
local sg=Group.CreateGroup()
if lv>0 then
local g1=Duel.GetMatchingGroup(c86379650.gfilter1,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,nil,lv)
if g1:GetCount()>0 then
local g2=g1:GetMinGroup(Card.GetLevel)
local g3=g2:Filter(c86379650.gfilter2,nil,e,tp)
if g3:GetCount()>0 then
sg:Merge(g3)
end
end
end
if Duel.Release(g,REASON_EFFECT)~=0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(86379650,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,true,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
This diff is collapsed.
......@@ -204,7 +204,7 @@ function c86379658.rmtop1(e,tp,eg,ep,ev,re,r,rp)
end
elseif rc:IsType(TYPE_PENDULUM) and rc:IsPreviousLocation(LOCATION_PZONE) then
local pos=rc:GetPreviousPosition()
if Duel.GetFieldCard(tp,LOCATION_PZONE,0) and Duel.GetFieldCard(tp,LOCATION_PZONE,1) then
if Duel.GetFieldCard(cp,LOCATION_PZONE,0) and Duel.GetFieldCard(cp,LOCATION_PZONE,1) then
Duel.SendtoGrave(rc,REASON_RULE)
else
Duel.MoveToField(rc,cp,cp,LOCATION_PZONE,pos,true)
......
--隙间妖怪✿八云紫
function c86379692.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_LINK),2)
c:EnableReviveLimit()
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379692,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetTarget(c86379692.tg1)
e1:SetOperation(c86379692.op1)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379692,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCountLimit(1,86379692)
e2:SetTarget(c86379692.sptg)
e2:SetOperation(c86379692.spop)
c:RegisterEffect(e2)
--self special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379692,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,86379693)
e3:SetCost(c86379692.spcost2)
e3:SetTarget(c86379692.sptg2)
e3:SetOperation(c86379692.spop2)
c:RegisterEffect(e3)
end
--
function c86379692.filter(c)
return c:IsAbleToRemove()
end
function c86379692.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c86379692.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c86379692.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c86379692.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c86379692.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local fid=c:GetFieldID()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
if not tc:IsType(TYPE_TOKEN) then
tc:RegisterFlagEffect(86379692,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(86379693,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c86379692.con1_2)
e1:SetOperation(c86379692.op1_2)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
if tc:GetPreviousControler()==tp then
local token=Duel.CreateToken(tp,86379704)
Duel.SendtoHand(token,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,token)
end
else
local token=Duel.CreateToken(tp,86379704)
Duel.SendtoHand(token,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,token)
end
end
end
function c86379692.con1_2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return tc:GetFlagEffect(86379692)<=0
end
function c86379692.op1_2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
local fid=e:GetLabel()
if tc:GetFlagEffect(86379693)>0 and tc:GetFlagEffectLabel(86379693)==fid then
Duel.ReturnToField(tc)
end
end
--
function c86379692.spfilter(c,e,tp,lc)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),REASON_LINK)~=0 and bit.band(c:GetReason(),REASON_MATERIAL)~=0 and c:GetReasonCard()==lc
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c86379692.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=c:GetMaterial()
local ct=mg:GetCount()
if chk==0 then return c:GetSummonType()==SUMMON_TYPE_LINK
and ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct
and mg:FilterCount(c86379692.spfilter,nil,e,tp,c)==ct end
Duel.SetTargetCard(mg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,mg,ct,0,0)
end
function c86379692.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local g=mg:Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()<mg:GetCount() then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<g:GetCount() then return end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
--
function c86379692.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c86379692.rcfilter(c)
return c:GetSequence()<5 and c:IsAbleToRemove()
end
function c86379692.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then
if ft>0 then return
Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
else return
Duel.IsExistingMatchingCard(c86379692.rcfilter,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
end
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c86379692.spop2(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local g=0
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=Duel.SelectMatchingCard(tp,c86379692.rcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local tc=g:GetFirst()
if not tc:IsType(TYPE_TOKEN) then
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1_1:SetCode(EVENT_PHASE+PHASE_END)
e1_1:SetReset(RESET_PHASE+PHASE_END)
e1_1:SetCountLimit(1)
e1_1:SetLabelObject(tc)
e1_1:SetOperation(c86379692.op1_1)
Duel.RegisterEffect(e1_1,tp)
end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
end
function c86379692.op1_1(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
--九尾妖兽✿八云蓝
function c86379694.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c86379694.spcon)
e1:SetOperation(c86379694.spop)
c:RegisterEffect(e1)
--nine
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c86379694.condition)
e2:SetOperation(c86379694.operation)
c:RegisterEffect(e2)
--tozone
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetOperation(c86379694.tzop)
c:RegisterEffect(e3)
--remove
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(86379694,0))
e5:SetCategory(CATEGORY_POSITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_REMOVE)
e5:SetTarget(c86379694.gtg)
e5:SetOperation(c86379694.gop)
c:RegisterEffect(e5)
--
if not c86379694.global_check then
c86379694.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(c86379694.checkop1)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
ge2:SetOperation(c86379694.checkop2)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
ge3:SetOperation(c86379694.checkop3)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_MSET)
ge4:SetOperation(c86379694.checkop1)
Duel.RegisterEffect(ge4,0)
local ge5=Effect.CreateEffect(c)
ge5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge5:SetCode(EVENT_SSET)
ge5:SetOperation(c86379694.checkop4)
Duel.RegisterEffect(ge5,0)
end
end
--
function c86379694.checkop1(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
tc:RegisterFlagEffect(186379654,RESET_EVENT+RESET_TOFIELD+RESET_TOHAND+RESET_TOGRAVE+RESET_PHASE+PHASE_END,0,1)
end
end
function c86379694.checkop2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
tc:RegisterFlagEffect(186379655,RESET_EVENT+RESET_TOFIELD+RESET_TOHAND+RESET_TOGRAVE+RESET_PHASE+PHASE_END,0,1)
end
end
function c86379694.checkop3(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
tc:RegisterFlagEffect(186379656,RESET_EVENT+RESET_TOFIELD+RESET_TOHAND+RESET_TOGRAVE+RESET_PHASE+PHASE_END,0,1)
end
end
function c86379694.checkop4(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
tc:RegisterFlagEffect(186379657,RESET_EVENT+RESET_TOFIELD+RESET_TOHAND+RESET_TOGRAVE+RESET_PHASE+PHASE_END,0,1)
end
end
--
function c86379694.filter(c)
return c:IsSetCard(0x225a) and c:IsAbleToRemoveAsCost() and c:IsRace(RACE_BEAST)
end
function c86379694.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c86379694.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c86379694.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c86379694.filter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_TEMPORARY)
if tc:IsLocation(LOCATION_REMOVED) then
local fid=c:GetFieldID()
tc:RegisterFlagEffect(86379694,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(86379695,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c86379694.con1_2)
e1:SetOperation(c86379694.op1_2)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
function c86379694.con1_2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return tc:GetFlagEffect(86379694)<=0
end
function c86379694.op1_2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
local fid=e:GetLabel()
if tc:GetFlagEffect(86379695)>0 and tc:GetFlagEffectLabel(86379695)==fid then
Duel.ReturnToField(tc)
end
end
--
function c86379694.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>9
end
function c86379694.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
while Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>9 and g:GetCount()>0 do
local sg=g:GetMaxGroup(Card.GetFieldID)
local tc=sg:GetFirst()
g:RemoveCard(tc)
if Duel.Remove(tc,POS_FACEUP,REASON_RULE+REASON_TEMPORARY)~=0 then
if tc:IsLocation(LOCATION_REMOVED) then
tc:CreateRelation(c,RESET_EVENT+RESETS_STANDARD)
c:SetCardTarget(tc)
end
end
end
end
--
function c86379694.tzfilter(c,rc)
return c:IsRelateToCard(rc)
end
function c86379694.tzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c86379694.tzfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil,c)
if g:GetCount()>0 then
for tc in aux.Next(g) do
Duel.ReturnToField(tc)
end
end
end
--
function c86379694.gtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then
if bit.band(c:GetReason(),REASON_TEMPORARY)~=0 then
return
chkc:IsLocation(LOCATION_MZONE)
else
return
chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanChangePosition()
end
end
if chk==0 then
if bit.band(c:GetReason(),REASON_TEMPORARY)~=0 then
return
Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
else
return
Duel.IsExistingTarget(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
end
if bit.band(c:GetReason(),REASON_TEMPORARY)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
end
function c86379694.gop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
local rc=e:GetHandler()
if rc:IsRelateToEffect(e) and bit.band(rc:GetReason(),REASON_TEMPORARY)~=0 and rc:IsPreviousLocation(LOCATION_ONFIELD) then
local pos=rc:GetPreviousPosition()
local cp=rc:GetPreviousControler()
if rc:IsType(TYPE_FIELD) and rc:IsPreviousLocation(LOCATION_FZONE) then
if Duel.GetFieldCard(cp,LOCATION_SZONE,5) then
Duel.SendtoGrave(rc,REASON_RULE)
else
Duel.MoveToField(rc,cp,cp,LOCATION_FZONE,pos,true)
if rc:IsFacedown() and rc:GetFlagEffect(186379657)>0 then
rc:SetStatus(STATUS_SET_TURN,true)
end
end
elseif rc:IsType(TYPE_PENDULUM) and rc:IsPreviousLocation(LOCATION_PZONE) then
if Duel.GetFieldCard(cp,LOCATION_PZONE,0) and Duel.GetFieldCard(cp,LOCATION_PZONE,1) then
Duel.SendtoGrave(rc,REASON_RULE)
else
Duel.MoveToField(rc,cp,cp,LOCATION_PZONE,pos,true)
end
elseif rc:IsType(TYPE_MONSTER) and rc:IsPreviousLocation(LOCATION_SZONE) then
local ty=rc:GetPreviousTypeOnField()
if Duel.GetLocationCount(cp,LOCATION_SZONE)>0 then
Duel.MoveToField(rc,cp,cp,LOCATION_SZONE,pos,true)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(ty)
rc:RegisterEffect(e1,true)
else
Duel.SendtoGrave(rc,REASON_RULE)
end
elseif rc:IsPreviousLocation(LOCATION_MZONE) then
if Duel.GetLocationCount(cp,LOCATION_MZONE)>0 and rc:IsType(TYPE_MONSTER) then
local a=0
if rc:GetFlagEffect(186379654)>0 then
a=1
end
if rc:GetFlagEffect(186379655)>0 then
a=2
end
if rc:GetFlagEffect(186379656)>0 then
a=3
end
Duel.MoveToField(rc,cp,cp,LOCATION_MZONE,pos,true)
if a==1 then
rc:SetStatus(STATUS_SUMMON_TURN,true)
end
if a==2 then
rc:SetStatus(STATUS_SPSUMMON_TURN,true)
end
if a==3 then
rc:SetStatus(STATUS_FLIP_SUMMON_TURN,true)
end
else
Duel.SendtoGrave(rc,REASON_RULE)
end
elseif rc:IsPreviousLocation(LOCATION_SZONE) then
if Duel.GetLocationCount(cp,LOCATION_SZONE)>0 then
local a=0
if rc:GetFlagEffect(186379657)>0 then
a=4
end
Duel.MoveToField(rc,cp,cp,LOCATION_SZONE,pos,true)
if rc:IsFacedown() and a==4 then
rc:SetStatus(STATUS_SET_TURN,true)
end
else
Duel.SendtoGrave(rc,REASON_RULE)
end
end
end
end
......@@ -36,7 +36,7 @@ function c86379867.spfilter(c,e,tp)
else
hasRoom=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
return c:IsSetCard(0x190) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and hasRoom and c:IsType(TYPE_MONSTER)
return c:IsSetCard(0x190) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and hasRoom and c:IsType(TYPE_MONSTER)
end
function c86379867.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c86379867.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
......@@ -54,7 +54,7 @@ function c86379867.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c86379867.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)>0 then
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
......
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