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

Update 210704

Updated 500+ files
parent bbb7fe76
No preview for this file type
expansions/pics/33400502.jpg

30.7 KB | W: | H:

expansions/pics/33400502.jpg

280 KB | W: | H:

expansions/pics/33400502.jpg
expansions/pics/33400502.jpg
expansions/pics/33400502.jpg
expansions/pics/33400502.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33400524.jpg

29.9 KB | W: | H:

expansions/pics/33400524.jpg

276 KB | W: | H:

expansions/pics/33400524.jpg
expansions/pics/33400524.jpg
expansions/pics/33400524.jpg
expansions/pics/33400524.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910105.jpg

47 KB | W: | H:

expansions/pics/9910105.jpg

51.6 KB | W: | H:

expansions/pics/9910105.jpg
expansions/pics/9910105.jpg
expansions/pics/9910105.jpg
expansions/pics/9910105.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910109.jpg

49.5 KB | W: | H:

expansions/pics/9910109.jpg

49.7 KB | W: | H:

expansions/pics/9910109.jpg
expansions/pics/9910109.jpg
expansions/pics/9910109.jpg
expansions/pics/9910109.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910114.jpg

49.5 KB | W: | H:

expansions/pics/9910114.jpg

50.2 KB | W: | H:

expansions/pics/9910114.jpg
expansions/pics/9910114.jpg
expansions/pics/9910114.jpg
expansions/pics/9910114.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910129.jpg

42.7 KB | W: | H:

expansions/pics/9910129.jpg

45.1 KB | W: | H:

expansions/pics/9910129.jpg
expansions/pics/9910129.jpg
expansions/pics/9910129.jpg
expansions/pics/9910129.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910134.jpg

41 KB | W: | H:

expansions/pics/9910134.jpg

47 KB | W: | H:

expansions/pics/9910134.jpg
expansions/pics/9910134.jpg
expansions/pics/9910134.jpg
expansions/pics/9910134.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910141.jpg

48.3 KB | W: | H:

expansions/pics/9910141.jpg

48.4 KB | W: | H:

expansions/pics/9910141.jpg
expansions/pics/9910141.jpg
expansions/pics/9910141.jpg
expansions/pics/9910141.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910202.jpg

50.5 KB | W: | H:

expansions/pics/9910202.jpg

50.4 KB | W: | H:

expansions/pics/9910202.jpg
expansions/pics/9910202.jpg
expansions/pics/9910202.jpg
expansions/pics/9910202.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910212.jpg

44 KB | W: | H:

expansions/pics/9910212.jpg

44.5 KB | W: | H:

expansions/pics/9910212.jpg
expansions/pics/9910212.jpg
expansions/pics/9910212.jpg
expansions/pics/9910212.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910213.jpg

49.5 KB | W: | H:

expansions/pics/9910213.jpg

49.3 KB | W: | H:

expansions/pics/9910213.jpg
expansions/pics/9910213.jpg
expansions/pics/9910213.jpg
expansions/pics/9910213.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910216.jpg

45.6 KB | W: | H:

expansions/pics/9910216.jpg

49.3 KB | W: | H:

expansions/pics/9910216.jpg
expansions/pics/9910216.jpg
expansions/pics/9910216.jpg
expansions/pics/9910216.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910223.jpg

43 KB | W: | H:

expansions/pics/9910223.jpg

41.9 KB | W: | H:

expansions/pics/9910223.jpg
expansions/pics/9910223.jpg
expansions/pics/9910223.jpg
expansions/pics/9910223.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910436.jpg

47.7 KB | W: | H:

expansions/pics/9910436.jpg

47.7 KB | W: | H:

expansions/pics/9910436.jpg
expansions/pics/9910436.jpg
expansions/pics/9910436.jpg
expansions/pics/9910436.jpg
  • 2-up
  • Swipe
  • Onion skin
--魔皇剑 觉醒之魔剑
function c25000160.initial_effect(c)
c:EnableCounterPermit(0xaf1)
c:SetCounterLimit(0xaf1,3)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetCountLimit(1,25000160+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c25000160.target)
e1:SetOperation(c25000160.operation)
c:RegisterEffect(e1)
--COUNTER
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(c25000160.ctcost)
e2:SetTarget(c25000160.cttg)
e2:SetOperation(c25000160.ctop)
c:RegisterEffect(e2)
--Equip limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(c25000160.eqlimit)
c:RegisterEffect(e4)
end
function c25000160.eqlimit(e,c)
return c:IsRace(RACE_ZOMBIE)
end
function c25000160.filter(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE)
end
function c25000160.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c25000160.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c25000160.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c25000160.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c25000160.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c25000160.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,Duel.GetLP(tp)/2) end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2)
end
function c25000160.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=c:GetFlagEffect(25000160)==0
local b2=c:GetFlagEffect(05000160)==0
local b3=c:GetFlagEffect(15000160)==0
if chk==0 then return e:GetHandler():GetEquipTarget()~=nil and e:GetHandler():IsCanAddCounter(0xaf1,1) and (b1 or b2 or b3) end
end
function c25000160.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0xaf1,1)
local op=0
local b1=c:GetFlagEffect(25000160)==0
local b2=c:GetFlagEffect(05000160)==0
local b3=c:GetFlagEffect(15000160)==0
if b1 and b2 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(25000160,0),aux.Stringid(25000160,1),aux.Stringid(25000160,2))
elseif b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(25000160,0),aux.Stringid(25000160,1))
elseif b2 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(25000160,1),aux.Stringid(25000160,2))+1
elseif b1 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(25000160,0),aux.Stringid(25000160,2))
if op==1 then op=op+1 end
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(25000160,0))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(25000160,1))+1
elseif b3 then
op=Duel.SelectOption(tp,aux.Stringid(25000160,2))+2
end
if op==0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e1:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(25000160,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(25000160,0))
elseif op==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_ATTACK_ALL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(05000160,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(25000160,1))
elseif op==2 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetRange(LOCATION_SZONE)
e1:SetValue(c25000160.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(15000160,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(25000160,2))
end
end
end
function c25000160.efilter(e,ct)
local p=e:GetHandlerPlayer()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te:GetHandler()==e:GetHandler():GetEquipTarget()
end
--升阶魔法 魔皇力融合
function c25000161.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(25000161,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,25000161+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c25000161.target)
e1:SetOperation(c25000161.activate)
c:RegisterEffect(e1)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(25000161,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,25000161+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c25000161.target1)
e1:SetOperation(c25000161.activate1)
c:RegisterEffect(e1)
end
function c25000161.filter1(c,e,tp)
local rk=c:GetRank()
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRace(RACE_ZOMBIE)
and Duel.IsExistingMatchingCard(c25000161.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function c25000161.filter2(c,e,tp,mc,rk)
return c:IsRank(rk) and c:IsAttribute(ATTRIBUTE_DARK) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c25000161.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c25000161.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c25000161.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c25000161.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c25000161.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c25000161.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
--immune
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(25000161,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(c25000161.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
sc:CompleteProcedure()
end
end
function c25000161.fefilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:GetActivateLocation()==LOCATION_MZONE and te:IsActivated()
end
function c25000161.ffilter(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsAttribute(ATTRIBUTE_DARK)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c25000161.ffilter2(c,e)
return not c:IsImmuneToEffect(e)
end
function c25000161.ffcheck(tp,sg,fc)
return sg:IsExists(Card.IsRace,nil,1,RACE_ZOMBIE)
end
function c25000161.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
aux.FCheckAdditional=c25000161.ffcheck
local res=Duel.IsExistingMatchingCard(c25000161.ffilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c25000161.ffilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
aux.FCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c25000161.activate1(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c25000161.ffilter2,nil,e)
aux.FCheckAdditional=c25000161.ffcheck
local sg1=Duel.GetMatchingGroup(c25000161.ffilter,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=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(c25000161.ffilter,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) 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)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
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 fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
--immune
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(25000161,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(c25000161.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc:CompleteProcedure()
end
aux.FCheckAdditional=nil
end
...@@ -39,13 +39,10 @@ function c30000625.lvtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -39,13 +39,10 @@ function c30000625.lvtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c30000625.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) Duel.SelectTarget(tp,c30000625.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
end end
function c30000625.filter1(c,att)
return c:IsAttribute(att) and c:IsFaceup()
end
function c30000625.lvop1(e,tp,eg,ep,ev,re,r,rp) function c30000625.lvop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c30000625.filter1,tp,LOCATION_MZONE,0,nil,tc:GetAttribute()) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if g:GetCount()<1 then return end if g:GetCount()<1 then return end
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
for ac in aux.Next(g) do for ac in aux.Next(g) do
......
...@@ -23,13 +23,10 @@ c:EnableReviveLimit() ...@@ -23,13 +23,10 @@ c:EnableReviveLimit()
c:RegisterEffect(e1) c:RegisterEffect(e1)
--activate --activate
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_GRAVE) e3:SetOperation(cm.regop)
e3:SetCost(cm.thcost)
e3:SetTarget(cm.acttg)
e3:SetOperation(cm.actop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.matfilter(c) function cm.matfilter(c)
...@@ -46,7 +43,7 @@ end ...@@ -46,7 +43,7 @@ end
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp) if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_GRAVE,0,3,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_GRAVE,0,3,nil,e,tp) end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_GRAVE,0,3,3,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_GRAVE,0,3,3,nil,e,tp)
g:KeepAlive() g:KeepAlive()
...@@ -62,7 +59,22 @@ function cm.desrepop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +59,22 @@ function cm.desrepop(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetLabelObject() local tg=e:GetLabelObject()
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT+REASON_REPLACE) Duel.SendtoDeck(tg,nil,2,REASON_EFFECT+REASON_REPLACE)
end end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_ONFIELD) then
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.acttg)
e1:SetOperation(cm.actop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
...@@ -81,4 +93,6 @@ function cm.actop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,4 +93,6 @@ function cm.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
--懵懂的暗芽
local m=30005030
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_RITUAL_LEVEL)
e1:SetValue(cm.rlevel)
c:RegisterEffect(e1)
--yishijiefang
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_RITUAL_MATERIAL)
e2:SetValue(cm.mtval)
c:RegisterEffect(e2)
--yishimudchuwai
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e3:SetValue(1)
c:RegisterEffect(e3)
--not link
end
function cm.rlevel(e,c)
local lv=e:GetHandler():GetLevel()
if c:IsAttribute(ATTRIBUTE_DARK) then
local clv=c:GetLevel()
return lv*65536+clv
else return lv end
end
function cm.mtval(e,c)
return c:IsAttribute(ATTRIBUTE_DARK)
end
\ No newline at end of file
...@@ -76,47 +76,49 @@ end ...@@ -76,47 +76,49 @@ end
function c33400033.fusfilter5(c) function c33400033.fusfilter5(c)
return c:IsSetCard(0x3341) return c:IsSetCard(0x3341)
end end
function c33400033.spfilter1(c,fc,tp) function c33400033.spfilter1(c)
return c:IsSetCard(0x3341) and c:IsFusionType(TYPE_FUSION) and c:IsCanBeFusionMaterial(fc) and c:IsAbleToRemoveAsCost() return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x3341) and c:IsFusionType(TYPE_FUSION) and c:IsAbleToRemoveAsCost()
end end
function c33400033.spfilter2(c,fc,tp) function c33400033.spfilter2(c)
return c:IsSetCard(0x3341) and c:IsFusionType(TYPE_SYNCHRO) and c:IsCanBeFusionMaterial(fc) and c:IsAbleToRemoveAsCost() return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x3341) and c:IsFusionType(TYPE_SYNCHRO) and c:IsAbleToRemoveAsCost()
end end
function c33400033.spfilter3(c,fc,tp) function c33400033.spfilter3(c)
return c:IsSetCard(0x3341) and c:IsFusionType(TYPE_XYZ) and c:IsCanBeFusionMaterial(fc) and c:IsAbleToRemoveAsCost() return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x3341) and c:IsFusionType(TYPE_XYZ) and c:IsAbleToRemoveAsCost()
end end
function c33400033.spfilter4(c,fc,tp) function c33400033.spfilter4(c)
return c:IsSetCard(0x3341) and c:IsFusionType(TYPE_LINK) and c:IsCanBeFusionMaterial(fc) and c:IsAbleToRemoveAsCost() return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x3341) and c:IsFusionType(TYPE_LINK) and c:IsAbleToRemoveAsCost()
end end
function c33400033.spfilter5(c,fc,tp) function c33400033.spfilter5(c)
return c:IsSetCard(0x3341) and c:IsLevelBelow(4) and c:IsType(TYPE_EFFECT) and c:IsCanBeFusionMaterial(fc) and c:IsAbleToRemoveAsCost() return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x3341) and c:IsLevelBelow(4) and c:IsType(TYPE_EFFECT) and c:IsAbleToRemoveAsCost()
end
function c33400033.spcostfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x3341)
and c:IsAbleToRemoveAsCost() and (c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) or c:IsLevelBelow(4))
end end
function c33400033.spcon(e,c) function c33400033.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return (Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or Duel.IsExistingMatchingCard(c33400033.spcostfilter,tp,LOCATION_MZONE,0,1,nil,c))
and Duel.IsExistingMatchingCard(c33400033.spfilter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil,c,fc,tp) and Duel.IsExistingMatchingCard(c33400033.spfilter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c33400033.spfilter2,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil,c,fc,tp) and Duel.IsExistingMatchingCard(c33400033.spfilter2,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c33400033.spfilter3,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil,c,fc,tp) and Duel.IsExistingMatchingCard(c33400033.spfilter3,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c33400033.spfilter4,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil,c,fc,tp) and Duel.IsExistingMatchingCard(c33400033.spfilter4,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c33400033.spfilter5,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil,c,fc,tp) and Duel.IsExistingMatchingCard(c33400033.spfilter5,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil)
end
function c33400033.check(g)
return g:IsExists(c33400033.spfilter1,1,nil)
and g:IsExists(c33400033.spfilter2,1,nil)
and g:IsExists(c33400033.spfilter3,1,nil)
and g:IsExists(c33400033.spfilter4,1,nil)
and g:IsExists(c33400033.spfilter5,1,nil)
and Duel.GetLocationCountFromEx(tp,tp,g,c)>0
end end
function c33400033.spop(e,tp,eg,ep,ev,re,r,rp,c) function c33400033.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33400033,1)) local g=Duel.GetMatchingGroup(c33400033.spcostfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil)
local g1=Duel.SelectMatchingCard(tp,c33400033.spfilter1,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil,c,tp) if g:GetCount()<5 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33400033,2)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c33400033.spfilter2,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil,c,tp) local g1=g:SelectSubGroup(tp,c33400033.check,false,5,5)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33400033,3)) c:SetMaterial(nil)
local g3=Duel.SelectMatchingCard(tp,c33400033.spfilter3,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil,c,tp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33400033,4))
local g4=Duel.SelectMatchingCard(tp,c33400033.spfilter4,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil,c,tp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33400033,5))
local g5=Duel.SelectMatchingCard(tp,c33400033.spfilter5,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil,c,tp)
g1:Merge(g2)
g1:Merge(g3)
g1:Merge(g4)
g1:Merge(g5)
c:SetMaterial(g1)
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT) Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
end end
function c33400033.afilter(c) function c33400033.afilter(c)
......
This diff is collapsed.
...@@ -18,7 +18,8 @@ function cm.initial_effect(c) ...@@ -18,7 +18,8 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost) e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
...@@ -54,11 +55,11 @@ function cm.ckfilter(c) ...@@ -54,11 +55,11 @@ function cm.ckfilter(c)
return c:IsSetCard(0x3344) and c:IsFaceup() return c:IsSetCard(0x3344) and c:IsFaceup()
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x1015,3,REASON_COST) and (Duel.CheckLPCost(tp,1000) or Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil)) end if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x1015,4,REASON_COST) and (Duel.CheckLPCost(tp,1000) or Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil)) end
if not Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil)then Duel.PayLPCost(tp,1000) if not Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil)then Duel.PayLPCost(tp,1000)
end end
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,1)) Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,1))
Duel.RemoveCounter(tp,1,1,0x1015,3,REASON_COST) Duel.RemoveCounter(tp,1,1,0x1015,4,REASON_COST)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -32,28 +32,25 @@ function cm.initial_effect(c) ...@@ -32,28 +32,25 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,m+10000)
e2:SetCost(cm.cost) e2:SetCost(cm.cost)
e2:SetTarget(cm.tgtg) e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop) e2:SetOperation(cm.tgop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.desfilter(c)
return c:GetCounter(0x1015)~=0
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
local g=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function cm.desop(e,tp,eg,ep,ev,re,r,rp) function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1015,1) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()==0 then return end local gc=g:GetFirst()
for i=1,2 do while gc do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) gc:AddCounter(0x1015,1)
local tc=g:Select(tp,1,1,nil):GetFirst() gc=g:GetNext()
tc:AddCounter(0x1015,1) end
end
local tc1=Duel.GetFirstTarget() local tc1=Duel.GetFirstTarget()
local g1=Group.CreateGroup() local g1=Group.CreateGroup()
g1:AddCard(tc1) g1:AddCard(tc1)
...@@ -94,13 +91,12 @@ function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -94,13 +91,12 @@ function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
end end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp) function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1015,1) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()==0 then return end local gc=g:GetFirst()
for i=1,2 do while gc do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) gc:AddCounter(0x1015,1)
local tc=g:Select(tp,1,1,nil):GetFirst() gc=g:GetNext()
tc:AddCounter(0x1015,1) end
end
if Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_EXTRA,0,1,nil) then if Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_EXTRA,0,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(m,2)) then if Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
...@@ -17,32 +17,17 @@ function cm.initial_effect(c) ...@@ -17,32 +17,17 @@ function cm.initial_effect(c)
e0:SetTarget(cm.destg) e0:SetTarget(cm.destg)
e0:SetOperation(cm.desop) e0:SetOperation(cm.desop)
c:RegisterEffect(e0) c:RegisterEffect(e0)
-- --to extra
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetCategory(CATEGORY_TOEXTRA)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCountLimit(1,m+10000)
e1:SetRange(LOCATION_MZONE) e1:SetTarget(cm.tetg)
e1:SetCost(cm.cost) e1:SetOperation(cm.teop)
e1:SetCondition(cm.ctcon)
e1:SetOperation(cm.ctop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_COUNTER+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,m+10000)
e3:SetCost(cm.cost)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
end end
function cm.lcheck(g) function cm.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x6341,0x3344) return g:IsExists(Card.IsLinkSetCard,1,nil,0x6341,0x3344)
...@@ -90,35 +75,17 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,35 +75,17 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.cfilter(c) function cm.tefilter(c)
return c:IsFaceup() and c:IsControler(tp) and c:IsCanAddCounter(0x1015,1) return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x341)
end end
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp) function cm.tetg(e,tp,eg,ep,ev,re,r,rp,chk)
return eg:IsExists(cm.cfilter,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(cm.tefilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp) function cm.teop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,3))
local g=eg:Filter(cm.cfilter,nil) local g=Duel.SelectMatchingCard(tp,cm.tefilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst() if g:GetCount()>0 then
while tc do Duel.SendtoExtraP(g,tp,REASON_EFFECT)
tc:AddCounter(0x1015,1)
tc=g:GetNext()
end end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,0x1015,1) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(cm.ctfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if ct==0 then return end
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1015,1)
if g:GetCount()==0 then return end
for i=1,4 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=g:Select(tp,1,1,nil):GetFirst()
tc:AddCounter(0x1015,1)
end
Duel.Draw(tp,1,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -73,7 +73,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +73,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and (c:IsSetCard(0x341)or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_MONSTER) and (c:IsSetCard(0x341)or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.spfilter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.spfilter(chkc,e,tp) end
......
...@@ -19,28 +19,26 @@ function cm.initial_effect(c) ...@@ -19,28 +19,26 @@ function cm.initial_effect(c)
--counter --counter
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_COUNTER) e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
e1:SetCondition(cm.ctcon)
e1:SetTarget(cm.cttg)
e1:SetOperation(cm.ctop) e1:SetOperation(cm.ctop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1)) e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,m)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCost(cm.cost) e2:SetCost(cm.cost2)
e2:SetCountLimit(1) e2:SetCondition(cm.discon)
e2:SetTarget(cm.target) e2:SetTarget(cm.distg)
e2:SetOperation(cm.operation) e2:SetOperation(cm.disop)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--pendulum --pendulum
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
...@@ -82,44 +80,37 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -82,44 +80,37 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if not Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil)then Duel.PayLPCost(tp,1000) if not Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil)then Duel.PayLPCost(tp,1000)
end end
end end
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,0x1015,1) end
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp) function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1015,1) local d=Duel.GetCounter(tp,LOCATION_ONFIELD,LOCATION_ONFIELD,0x1015)
if ct==0 then return end Duel.Recover(tp,d*400,REASON_EFFECT)
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1015,1)
if g:GetCount()==0 then return end
for i=1,4 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=g:Select(tp,1,1,nil):GetFirst()
tc:AddCounter(0x1015,1)
end
end end
function cm.filter(c) function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return c:GetCounter(0x1015)~=0 return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD) and cm.filter(chkc) end local ct=e:GetLabel()
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x1015,3,REASON_COST) and Duel.CheckLPCost(tp,1000) or Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil) end
and Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_ONFIELD,1,nil) end if not Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil)then Duel.PayLPCost(tp,1000)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:GetAttack()<tc:GetBaseAttack() and Duel.Destroy(tc,REASON_EFFECT)~=0 then
if Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,1,0x1015,3,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and Duel.IsExistingMatchingCard(cm.ckfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=Duel.SelectMatchingCard(tp,cm.ckfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(tg,REASON_EFFECT)
end
end end
function cm.ckfilter1(c)
return c:GetCounter(0x1015)~=0
end
function cm.pencon(e,tp,eg,ep,ev,re,r,rp) function cm.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -100,18 +100,29 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,18 +100,29 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,LOCATION_GRAVE) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTarget(cm.disable) e2:SetTargetRange(0,1)
e2:SetTarget(cm.sumlimit)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetLabel(c:GetFieldID())
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_REMOVE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1)
e3:SetTarget(cm.relimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end end
function cm.aclimit(e,re,tp) function cm.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE return re:GetActivateLocation()==LOCATION_GRAVE
end end
function cm.disable(e,c) function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetFieldID()~=e:GetLabel() and (not c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT)) return c:IsLocation(LOCATION_GRAVE)
end
function cm.relimit(e,c)
return c:IsLocation(LOCATION_GRAVE)
end end
function cm.target(e,c) function cm.target(e,c)
......
...@@ -23,6 +23,7 @@ function cm.initial_effect(c) ...@@ -23,6 +23,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
e1:SetCondition(cm.ctcon) e1:SetCondition(cm.ctcon)
e1:SetTarget(cm.cttg) e1:SetTarget(cm.cttg)
...@@ -75,48 +76,37 @@ end ...@@ -75,48 +76,37 @@ end
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp) function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end end
function cm.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x341) and c:IsAbleToHand() and c:IsType(TYPE_RITUAL) and c:IsLevelBelow(8)
end
function cm.tgfil(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x341) and c:IsAbleToHand() and c:IsType(TYPE_RITUAL)
end
function cm.thfilter3(c)
return ((c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and c:IsLevelBelow(8)) or (c:IsType(TYPE_SPELL) and c:IsType(TYPE_RITUAL)) )and c:IsSetCard(0x341) and c:IsAbleToHand()
end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) or Duel.IsExistingMatchingCard(cm.tgfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,0x1015,1) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp) function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1015,1) local g1=Duel.GetMatchingGroup(cm.thfilter3,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if ct==0 then return end if g1:GetCount()==0 then return end
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1015,1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if g:GetCount()==0 then return end local g=g1:SelectSubGroup(tp,cm.check,false,1,2)
for i=1,3 do if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) Duel.SendtoHand(g,nil,REASON_EFFECT)
local tc=g:Select(tp,1,1,nil):GetFirst() Duel.ConfirmCards(1-tp,g)
tc:AddCounter(0x1015,1) end
end end
if Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) then function cm.check(g,c)
if Duel.SelectYesNo(tp,aux.Stringid(m,2)) then if #g==1 then return true end
local g3=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil) local res=0
local tc=g3:GetFirst() if #g==2 then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) if g:IsExists(cm.tgfilter,1,nil,c) then res=res+1 end
local e1=Effect.CreateEffect(e:GetHandler()) if g:IsExists(cm.tgfil,1,nil,c) then res=res+4 end
e1:SetType(EFFECT_TYPE_SINGLE) return res==5
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) end
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
end end
function cm.pencon(e,tp,eg,ep,ev,re,r,rp) function cm.pencon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,7 +19,7 @@ function cm.initial_effect(c) ...@@ -19,7 +19,7 @@ function cm.initial_effect(c)
--Negate --Negate
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0)) e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
...@@ -37,6 +37,7 @@ function cm.initial_effect(c) ...@@ -37,6 +37,7 @@ function cm.initial_effect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DESTROYED) e4:SetCode(EVENT_DESTROYED)
e4:SetCountLimit(1,m)
e4:SetCost(cm.cost) e4:SetCost(cm.cost)
e4:SetTarget(cm.sptg) e4:SetTarget(cm.sptg)
e4:SetOperation(cm.spop) e4:SetOperation(cm.spop)
...@@ -57,7 +58,7 @@ function cm.ckfilter(c) ...@@ -57,7 +58,7 @@ function cm.ckfilter(c)
return c:IsSetCard(0x3344) and c:IsFaceup() return c:IsSetCard(0x3344) and c:IsFaceup()
end end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp) function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp and Duel.IsChainNegatable(ev) and re:GetHandler():GetCounter(0x1015)~=0 return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.ckfilter1,tp,LOCATION_ONFIELD,0,1,nil) and (Duel.CheckLPCost(tp,1000) or Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil)) end if chk==0 then return Duel.IsExistingMatchingCard(cm.ckfilter1,tp,LOCATION_ONFIELD,0,1,nil) and (Duel.CheckLPCost(tp,1000) or Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil)) end
...@@ -73,17 +74,17 @@ function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -73,17 +74,17 @@ function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end end
end end
function cm.thfilter(c)
return c:IsAbleToHand() and c:GetCounter(0x1015)~=0
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp) function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re)then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re)then
local ct=Duel.GetMatchingGroupCount(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1015,1) local ct=Duel.GetMatchingGroupCount(cm.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
if ct~=0 then if ct~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1015,1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
for i=1,3 do local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER) Duel.SendtoHand(g,nil,REASON_EFFECT)
local tc=g:Select(tp,1,1,nil):GetFirst()
tc:AddCounter(0x1015,1)
end
end end
end end
end end
......
...@@ -55,11 +55,14 @@ function cm.cfilter5(c) ...@@ -55,11 +55,14 @@ function cm.cfilter5(c)
return c:IsType(TYPE_LINK)and c:IsType(TYPE_MONSTER) return c:IsType(TYPE_LINK)and c:IsType(TYPE_MONSTER)
end end
function cm.filter2(c,tp) function cm.filter2(c,tp)
return c:IsSetCard(0x3344) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) return c:IsSetCard(0x3344,0x6341) and c:IsAbleToHand()
end end
function cm.filter3(c,e,tp) function cm.filter3(c,e,tp)
return c:IsSetCard(0x341) and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA))and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_GRAVE) or Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) return c:IsSetCard(0x341) and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA))and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_GRAVE) or Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function cm.filter4(c)
return c:IsSetCard(0x3344) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function cm.pcfilter(c) function cm.pcfilter(c)
return c:IsSetCard(0x341) and c:IsLevelBelow(8) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() return c:IsSetCard(0x341) and c:IsLevelBelow(8) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end end
...@@ -81,15 +84,15 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,15 +84,15 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
op[i]=0 op[i]=0
i=i+1 i=i+1
end end
if eg:IsExists(cm.cfilter2,1,nil) and Duel.GetFlagEffect(tp,m+20000)==0 and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE,0,1,nil,tp) then if eg:IsExists(cm.cfilter2,1,nil) and Duel.GetFlagEffect(tp,m+20000)==0 and Duel.IsExistingMatchingCard(cm.filter3,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
op[i]=1 op[i]=1
i=i+1 i=i+1
end end
if eg:IsExists(cm.cfilter3,1,nil) and Duel.GetFlagEffect(tp,m+30000)==0 and Duel.IsExistingMatchingCard(cm.filter3,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if eg:IsExists(cm.cfilter3,1,nil) and Duel.GetFlagEffect(tp,m+30000)==0 and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE,0,1,nil,tp)then
op[i]=2 op[i]=2
i=i+1 i=i+1
end end
if eg:IsExists(cm.cfilter4,1,nil) and Duel.GetFlagEffect(tp,m+40000)==0 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,nil) then if eg:IsExists(cm.cfilter4,1,nil) and Duel.GetFlagEffect(tp,m+40000)==0 and Duel.IsExistingMatchingCard(cm.filter4,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) then
op[i]=3 op[i]=3
i=i+1 i=i+1
end end
...@@ -133,9 +136,11 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -133,9 +136,11 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
xz=1 xz=1
end end
if op[op1]==1 and xz==0 then if op[op1]==1 and xz==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc3=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_GRAVE,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,cm.filter3,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
Duel.SSet(tp,tc3) if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
Duel.RegisterFlagEffect(tp,m+20000,RESET_EVENT+RESET_PHASE+PHASE_END,0,0) Duel.RegisterFlagEffect(tp,m+20000,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
if op1~=i then if op1~=i then
for i2=op1,i-1 do for i2=op1,i-1 do
...@@ -145,12 +150,10 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -145,12 +150,10 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
i=i-1 i=i-1
xz=1 xz=1
end end
if op[op1]==2 and xz==0 then if op[op1]==2 and xz==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter3,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp) local tc3=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_GRAVE,0,1,1,nil,tp)
if g:GetCount()>0 then Duel.SendtoHand(tc3,nil,REASON_EFFECT)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
Duel.RegisterFlagEffect(tp,m+30000,RESET_EVENT+RESET_PHASE+PHASE_END,0,0) Duel.RegisterFlagEffect(tp,m+30000,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
if op1~=i then if op1~=i then
for i2=op1,i-1 do for i2=op1,i-1 do
...@@ -161,17 +164,23 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -161,17 +164,23 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
xz=1 xz=1
end end
if op[op1]==3 and xz==0 then if op[op1]==3 and xz==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
Duel.Destroy(g,REASON_EFFECT) local g=Duel.SelectMatchingCard(tp,cm.filter4,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if Duel.GetLocationCount(tp,LOCATION_PZONE)~=0 and Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil) then local tc=g:GetFirst()
if Duel.SelectYesNo(tp,aux.Stringid(m,7)) then if tc and Duel.SSet(tp,tc)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) local e1=Effect.CreateEffect(e:GetHandler())
local g=Duel.SelectMatchingCard(tp,cm.pcfilter,tp,LOCATION_EXTRA,0,1,1,nil) e1:SetType(EFFECT_TYPE_SINGLE)
if g:GetCount()>0 then e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
end e1:SetReset(RESET_EVENT+RESETS_STANDARD)
end tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end end
Duel.RegisterFlagEffect(tp,m+40000,RESET_EVENT+RESET_PHASE+PHASE_END,0,0) Duel.RegisterFlagEffect(tp,m+40000,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
if op1~=i then if op1~=i then
......
This diff is collapsed.
This diff is collapsed.
...@@ -8,75 +8,33 @@ function cm.initial_effect(c) ...@@ -8,75 +8,33 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
e1:SetCondition(cm.condition1)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCondition(cm.condition2)
c:RegisterEffect(e2)
--destroy --destroy
local e3=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0)) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_QUICK_O)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e2:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_DESTROYED) e2:SetCost(cm.cost2)
e3:SetRange(LOCATION_SZONE) e2:SetOperation(cm.op)
e3:SetCost(cm.cost2) c:RegisterEffect(e2)
e3:SetCondition(cm.descon)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
--remain field --remain field
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_REMAIN_FIELD) e4:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetCode(EFFECT_ACTIVATE_COST)
ge1:SetRange(LOCATION_ONFIELD+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_HAND)
ge1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_SET_AVAILABLE)
ge1:SetTargetRange(0,1)
ge1:SetTarget(cm.actarget)
ge1:SetCost(cm.costchk)
Duel.RegisterEffect(ge1,0)
end
end
function cm.costchk(e,re,tp)
if re:GetHandler():GetFlagEffect(m)==1 then return end
local ct=0
if Duel.GetFlagEffect(tp,m)~=0 then
ct=1
end
re:GetHandler():RegisterFlagEffect(m,RESET_PHASE+RESET_CHAIN,0,0)
return true
end
function cm.actarget(e,te,tp)
return te:GetHandler():IsLocation(LOCATION_ONFIELD) and te:GetHandler():GetCounter(0x1015)~=0
end
function cm.cfilter(c)
return c:IsLocation(LOCATION_ONFIELD) and c:GetCounter(0x1015)~=0
end end
function cm.ckfilter(c) function cm.ckfilter(c)
return c:IsSetCard(0x6341) and c:IsFaceup() return c:IsSetCard(0x6341) and c:IsFaceup()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) or Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x1015,4,REASON_COST) and (Duel.CheckLPCost(tp,1000) or Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil) )end
if not Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil)then Duel.PayLPCost(tp,1000) if not Duel.IsExistingMatchingCard(cm.ckfilter,tp,LOCATION_ONFIELD,0,1,nil)then Duel.PayLPCost(tp,1000)
end end
end Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,1))
function cm.condition1(e,tp,eg,ep,ev,re,r,rp) Duel.RemoveCounter(tp,1,1,0x1015,4,REASON_COST)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(cm.cfilter,1,nil) and Duel.IsChainNegatable(ev)
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():GetFlagEffect(m)==0 then return end
return Duel.IsChainNegatable(ev)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -102,22 +60,22 @@ function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -102,22 +60,22 @@ function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
end end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function cm.cfilter2(c,tp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
end if g:GetCount()>0 then
function cm.descon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetCounter(tp,LOCATION_ONFIELD,LOCATION_ONFIELD,0x1015)
return eg:IsExists(cm.cfilter2,1,nil,tp) local sc=g:GetFirst()
end while sc do
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local e1=Effect.CreateEffect(e:GetHandler())
if chkc then return chkc:IsOnField() end e1:SetType(EFFECT_TYPE_SINGLE)
if chk==0 then return Duel.IsExistingTarget(cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end e1:SetCode(EFFECT_UPDATE_ATTACK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local g=Duel.SelectTarget(tp,cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) e1:SetValue(d*100)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) sc:RegisterEffect(e1)
end local e2=e1:Clone()
function cm.desop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_UPDATE_DEFENSE)
local tc=Duel.GetFirstTarget() sc:RegisterEffect(e2)
if tc:IsRelateToEffect(e) then sc=g:GetNext()
Duel.Destroy(tc,REASON_EFFECT) end
end end
end end
--罗德岛·先锋干员-格拉尼 --罗德岛·先锋干员-格拉尼
function c79029024.initial_effect(c) function c79029024.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2) --link summon
aux.AddLinkProcedure(c,nil,2,99,c79029024.lcheck)
c:EnableReviveLimit() c:EnableReviveLimit()
--to hand --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -10,28 +11,41 @@ function c79029024.initial_effect(c) ...@@ -10,28 +11,41 @@ function c79029024.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,79029024) e1:SetCountLimit(1,79029024)
e1:SetCondition(c79029024.thcon)
e1:SetTarget(c79029024.thtg) e1:SetTarget(c79029024.thtg)
e1:SetOperation(c79029024.thop) e1:SetOperation(c79029024.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--indes --negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetDescription(aux.Stringid(79029024,0))
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetCountLimit(1,19029024)
e2:SetTarget(c79029024.indtg) e2:SetCondition(c79029024.negcon)
e2:SetValue(1) e2:SetCost(c79029024.negcost)
e2:SetTarget(c79029024.negtg)
e2:SetOperation(c79029024.negop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() --SpecialSummon
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,09029024)
e3:SetCost(c79029024.spcost)
e3:SetTarget(c79029024.sptg)
e3:SetOperation(c79029024.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--effect gain end
local e4=Effect.CreateEffect(c) function c79029024.lcheck(g)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) return g:IsExists(Card.IsLinkSetCard,1,nil,0xa900)
e4:SetCode(EVENT_BE_MATERIAL) end
e4:SetCondition(c79029024.efcon) function c79029024.thcon(e,tp,eg,ep,ev,re,r,rp)
e4:SetOperation(c79029024.efop) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
c:RegisterEffect(e4)
end end
function c79029024.thfilter(c) function c79029024.thfilter(c)
return c:IsSetCard(0x1901) and c:IsAbleToHand() return c:IsSetCard(0x1901) and c:IsAbleToHand()
...@@ -50,35 +64,81 @@ function c79029024.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,35 +64,81 @@ function c79029024.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029024,2)) Duel.Hint(HINT_SOUND,0,aux.Stringid(79029024,2))
end end
end end
function c79029024.indtg(e,c) function c79029024.negcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLinkedGroup():IsContains(c) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) and rp~=tp
end
function c79029024.cfilter(c,rtype)
return c:IsType(rtype) and c:IsAbleToGraveAsCost() and c:IsSetCard(0x1901)
end
function c79029024.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local rtype=bit.band(re:GetActiveType(),0x7)
if chk==0 then return Duel.IsExistingMatchingCard(c79029024.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,rtype) end
local g=Duel.SelectMatchingCard(tp,c79029024.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,rtype)
Duel.SendtoGrave(g,REASON_COST)
end
function c79029024.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c79029024.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
Debug.Message("只要交锋就会决出胜负!")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029024,4))
end
end end
function c79029024.efcon(e,tp,eg,ep,ev,re,r,rp) function c79029024.ctfil(c)
local ec=e:GetHandler():GetReasonCard() return c:IsAbleToRemoveAsCost() and c:IsRace(RACE_CYBERSE) and c:IsLinkAbove(3) and Duel.GetMZoneCount(tp,c)>0
return ec:IsSetCard(0xa900) and bit.band(r,REASON_FUSION+REASON_SYNCHRO+REASON_XYZ+REASON_LINK)~=0
end end
function c79029024.efop(e,tp,eg,ep,ev,re,r,rp) function c79029024.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_CARD,0,79029024) if chk==0 then return Duel.IsExistingMatchingCard(c79029024.ctfil,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c79029024.ctfil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c79029024.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c79029024.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=c:GetReasonCard() if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ATTACK_ALL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
rc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(rc)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e2:SetValue(c79029024.catktg)
rc:RegisterEffect(e2,true)
rc:RegisterFlagEffect(79029024,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(79029024,0))
Debug.Message("以我的枪尖开路!") Debug.Message("以我的枪尖开路!")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029024,3)) Duel.Hint(HINT_SOUND,0,aux.Stringid(79029024,3))
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) then
--cannot target
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79029024,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(aux.indoval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
end end
function c79029024.catktg(e,c)
return c:IsFaceup() and not c:GetMaterial():IsExists(Card.IsCode,1,nil,79029024)
end
\ No newline at end of file
...@@ -12,7 +12,7 @@ function c79029035.initial_effect(c) ...@@ -12,7 +12,7 @@ function c79029035.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand --to hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
...@@ -28,12 +28,12 @@ function c79029035.initial_effect(c) ...@@ -28,12 +28,12 @@ function c79029035.initial_effect(c)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0) e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xa905)) e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xa905))
e3:SetValue(1200) e3:SetValue(1500)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy --destroy
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(20366274,1)) e4:SetDescription(aux.Stringid(20366274,1))
e4:SetCategory(CATEGORY_DESTROY) e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_START) e4:SetCode(EVENT_BATTLE_START)
e4:SetCondition(c79029035.descon) e4:SetCondition(c79029035.descon)
...@@ -54,18 +54,19 @@ function c79029035.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,18 +54,19 @@ function c79029035.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c79029035.tgfilter(c) function c79029035.tgfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand() return c:IsAbleToHand() and (c:IsSetCard(0xb90d) or c:IsSetCard(0xc90e))
end end
function c79029035.target(e,tp,eg,ep,ev,re,r,rp,chk) function c79029035.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029035.tgfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c79029035.tgfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and e:GetHandler():GetMaterialCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function c79029035.operation(e,tp,eg,ep,ev,re,r,rp) function c79029035.operation(e,tp,eg,ep,ev,re,r,rp)
local x=e:GetHandler():GetMaterialCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c79029035.tgfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,2,nil) local g=Duel.SelectMatchingCard(tp,c79029035.tgfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,x,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT) Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Debug.Message("除了武器,您也别忘记准备防灾用具哦~") Debug.Message("除了武器,您也别忘记准备防灾用具哦~")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029035,0)) Duel.Hint(HINT_SOUND,0,aux.Stringid(79029035,0))
end end
...@@ -77,14 +78,14 @@ function c79029035.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,14 +78,14 @@ function c79029035.descon(e,tp,eg,ep,ev,re,r,rp)
end end
function c79029035.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c79029035.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler():GetBattleTarget(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler():GetBattleTarget(),1,0,0)
end end
function c79029035.desop(e,tp,eg,ep,ev,re,r,rp) function c79029035.desop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget() local bc=e:GetHandler():GetBattleTarget()
local x=bc:GetAttack() local x=bc:GetAttack()
if bc:IsRelateToBattle() then if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT) Duel.Remove(bc,POS_FACEDOWN,REASON_EFFECT)
Duel.Damage(1-tp,x,REASON_EFFECT) Duel.Damage(1-tp,x,REASON_EFFECT)
Debug.Message("可能有点热哦?") Debug.Message("可能有点热哦?")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029035,1)) Duel.Hint(HINT_SOUND,0,aux.Stringid(79029035,1))
end end
......
--喀兰贸易·近卫干员-银灰 --喀兰贸易·近卫干员-银灰
function c79029072.initial_effect(c) function c79029072.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3,99,c79029072.lcheck)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3,6) --SpecialSummon
--immune
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCountLimit(1,79029072)
e1:SetValue(c79029072.efilter) e1:SetCondition(c79029072.spcon)
e1:SetCondition(c79029072.imcon) e1:SetTarget(c79029072.sptg)
e1:SetOperation(c79029072.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--hand --immuse
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_HANDES) e2:SetDescription(aux.Stringid(79029072,1))
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCondition(c79029072.imcon)
e2:SetCost(c79029072.spcost) e2:SetCost(c79029072.imcost)
e2:SetTarget(c79029072.sptg) e2:SetTarget(c79029072.imtg)
e2:SetOperation(c79029072.spop) e2:SetOperation(c79029072.imop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--summon success --draw
local e4=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(7200041,0)) e3:SetCategory(CATEGORY_DRAW)
e4:SetCategory(CATEGORY_COUNTER) e3:SetType(EFFECT_TYPE_IGNITION)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCountLimit(1,19029072)
e4:SetTarget(c79029072.addct) e3:SetTarget(c79029072.drtg)
e4:SetCondition(c79029072.addcon) e3:SetOperation(c79029072.drop)
e4:SetOperation(c79029072.addc) c:RegisterEffect(e3)
c:RegisterEffect(e4)
--cannot release
local e5=e1:Clone()
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_UNRELEASABLE_SUM)
c:RegisterEffect(e5)
local e6=e1:Clone()
e6:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e6)
end end
function c79029072.addcon(e,tp,eg,ep,ev,re,r,rp) function c79029072.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x1906)
end
function c79029072.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function c79029072.addct(e,tp,eg,ep,ev,re,r,rp,chk) function c79029072.spfil(c,e,tp)
if chk==0 then return true end return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsLinkBelow(3) and c:IsSetCard(0x1906)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x1099)
end end
function c79029072.addc(e,tp,eg,ep,ev,re,r,rp) function c79029072.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if e:GetHandler():IsRelateToEffect(e) then if chk==0 then return Duel.IsExistingMatchingCard(c79029072.spfil,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
e:GetHandler():AddCounter(0x1099,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
end
end end
function c79029072.efilter(e,te) function c79029072.spop(e,tp,eg,ep,ev,re,r,rp)
return te:GetOwner()~=e:GetOwner() local g=Duel.GetMatchingGroup(c79029072.spfil,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,nil,e,tp)
if g:GetCount()<=0 then return end
Debug.Message("客随主便,按你的想法安排就好。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029072,0))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
function c79029072.imcon(e,tp,eg,ep,ev,re,r,rp) function c79029072.imcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
return c:GetCounter(0x1099)>0
end end
function c79029072.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c79029072.ctfil(c)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1099,1,REASON_COST) end return c:IsSetCard(0x1906) and c:IsAbleToGraveAsCost() and c:IsType(TYPE_MONSTER)
e:GetHandler():RemoveCounter(tp,0x1099,1,REASON_COST)
end end
function c79029072.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c79029072.imcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end if chk==0 then return Duel.IsExistingMatchingCard(c79029072.ctfil,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) local g=Duel.SelectMatchingCard(tp,c79029072.ctfil,tp,LOCATION_ONFIELD,0,1,1,nil)
e:SetLabel(Duel.AnnounceType(tp)) Duel.SendtoGrave(g,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_HANDES,e:GetHandler(),1,0,0) end
function c79029072.imtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end end
function c79029072.spop(e,tp,eg,ep,ev,re,r,rp) function c79029072.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then return end Debug.Message("战场之上,善良是无法拯救他人的。")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT) Duel.Hint(HINT_SOUND,0,aux.Stringid(79029072,1))
Duel.SelectTarget(tp,nil,tp,0,LOCATION_HAND,1,1,nil) local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
local tc=Duel.GetFirstTarget() local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc) while tc do
local opt=e:GetLabel() --
if (opt==0 and tc:IsType(TYPE_MONSTER)) or (opt==1 and tc:IsType(TYPE_SPELL)) or (opt==2 and tc:IsType(TYPE_TRAP)) then local e1=Effect.CreateEffect(e:GetHandler())
if not c:IsRelateToEffect(e) then return end e1:SetType(EFFECT_TYPE_SINGLE)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) e1:SetCode(EFFECT_IMMUNE_EFFECT)
c:AddCounter(0x1099,1) e1:SetValue(c79029072.efilter)
local e1=Effect.CreateEffect(c) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetOwnerPlayer(tp)
e1:SetCode(EFFECT_UPDATE_ATTACK) tc:RegisterEffect(e1)
e1:SetValue(1000) tc=g:GetNext()
c:RegisterEffect(e1) end
end
function c79029072.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end end
function c79029072.lxfil(c)
return c:IsSetCard(0xa900) and c:IsType(TYPE_LINK)
end end
function c79029072.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetHandler():GetLinkedGroup()
if chk==0 then return g:IsExists(c79029072.lxfil,1,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,g:GetCount())
end
function c79029072.drop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetLinkedGroup()
if g:GetCount()<=0 then return end
Debug.Message("有什么想法?")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029072,2))
p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Draw(p,g:GetCount(),REASON_EFFECT)
end
...@@ -11,7 +11,7 @@ function c79029158.initial_effect(c) ...@@ -11,7 +11,7 @@ function c79029158.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(2688979029158,0)) e2:SetDescription(aux.Stringid(79029158,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
......
...@@ -37,11 +37,23 @@ function c79029239.tiop(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,11 +37,23 @@ function c79029239.tiop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e0) c:RegisterEffect(e0)
Debug.Message("来了。") Debug.Message("来了。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029239,0)) Duel.Hint(HINT_SOUND,0,aux.Stringid(79029239,0))
--act limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c79029239.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c79029239.aclimit(e,re,tp)
return not re:GetHandler():IsSetCard(0xa900) and (re:GetHandler():IsType(TYPE_MONSTER))
end end
function c79029239.tiop2(e,tp,eg,ep,ev,re,r,rp) function c79029239.tiop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if re:GetHandler():GetControler()==tp then return end if re:GetHandler():GetControler()==tp then return end
if e:GetHandler():GetFlagEffect(79029239)==9 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if e:GetHandler():GetFlagEffect(79029239)==11 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -45,7 +45,7 @@ function c79029327.initial_effect(c) ...@@ -45,7 +45,7 @@ function c79029327.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c79029327.ovfilter(c) function c79029327.ovfilter(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_DUAL) return c:IsFaceup() and c:IsSetCard(0xa900) and c:IsType(TYPE_DUAL)
end end
function c79029327.matfilter(c) function c79029327.matfilter(c)
return c:IsRace(RACE_CYBERSE) return c:IsRace(RACE_CYBERSE)
...@@ -67,7 +67,7 @@ function c79029327.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -67,7 +67,7 @@ function c79029327.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function c79029327.spfil(c,e,tp) function c79029327.spfil(c,e,tp)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_DUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xa900) and c:IsType(TYPE_DUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c79029327.operation(e,tp,eg,ep,ev,re,r,rp) function c79029327.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -83,7 +83,7 @@ function c79029327.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,7 +83,7 @@ function c79029327.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c79029327.dixfil(c) function c79029327.dixfil(c)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_DUAL) return c:IsSetCard(0xa900) and c:IsType(TYPE_DUAL)
end end
function c79029327.discon(e,c) function c79029327.discon(e,c)
return e:GetHandler():GetOverlayGroup():IsExists(c79029327.dixfil,1,nil) return e:GetHandler():GetOverlayGroup():IsExists(c79029327.dixfil,1,nil)
......
...@@ -48,9 +48,14 @@ function c79029360.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,9 +48,14 @@ function c79029360.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end end
function c79029360.ctfil(c)
return c:IsSetCard(0xa900) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c79029360.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c79029360.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(c79029360.ctfil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.SendtoGrave(e:GetHandler(),REASON_COST) local g=Duel.SelectMatchingCard(tp,c79029360.ctfil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end end
function c79029360.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c79029360.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c79029360.filter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c79029360.filter(chkc) end
......
...@@ -86,7 +86,7 @@ function c79029429.chain_operation(e,te,tp,tc,mat,sumtype) ...@@ -86,7 +86,7 @@ function c79029429.chain_operation(e,te,tp,tc,mat,sumtype)
Duel.SpecialSummon(tc,sumtype,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,sumtype,tp,tp,false,false,POS_FACEUP)
end end
function c79029429.succon(e,tp,eg,ep,ev,re,r,rp) function c79029429.succon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetMaterial():FilterCount(Card.IsSetCard,nil,0xa900)==e:GetHandler():GetMaterialCount() return e:GetHandler():GetMaterial():FilterCount(Card.IsSetCard,nil,0xa900)==e:GetHandler():GetMaterialCount() and e:GetHandler():GetMaterialCount()>0
end end
function c79029429.sucop(e,tp,eg,ep,ev,re,r,rp) function c79029429.sucop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -41,7 +41,7 @@ function c79029430.initial_effect(c) ...@@ -41,7 +41,7 @@ function c79029430.initial_effect(c)
c:RegisterEffect(e8) c:RegisterEffect(e8)
end end
function c79029430.ovfilter(c) function c79029430.ovfilter(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_DUAL) return c:IsFaceup() and c:IsSetCard(0xa900) and c:IsType(TYPE_DUAL)
end end
function c79029430.cltg(e,tp,eg,ep,ev,re,r,rp,chk) function c79029430.cltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) end if chk==0 then return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) end
...@@ -62,7 +62,7 @@ function c79029430.dscost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -62,7 +62,7 @@ function c79029430.dscost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c79029430.dixfil(c) function c79029430.dixfil(c)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_DUAL) return c:IsSetCard(0xa900) and c:IsType(TYPE_DUAL)
end end
function c79029430.dscon(e,tp,eg,ep,ev,re,r,rp) function c79029430.dscon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0 and e:GetHandler():GetOverlayGroup():IsExists(c79029430.dixfil,1,nil) return tp~=ep and Duel.GetCurrentChain()==0 and e:GetHandler():GetOverlayGroup():IsExists(c79029430.dixfil,1,nil)
......
...@@ -47,10 +47,10 @@ function c79029449.aclimit(e,re,tp) ...@@ -47,10 +47,10 @@ function c79029449.aclimit(e,re,tp)
return not re:GetHandler():IsSetCard(0xc90e) and not re:GetHandler():IsSetCard(0xb90d) and not re:GetHandler():IsSetCard(0xa900) and not re:GetHandler():IsSetCard(0xa90f) return not re:GetHandler():IsSetCard(0xc90e) and not re:GetHandler():IsSetCard(0xb90d) and not re:GetHandler():IsSetCard(0xa900) and not re:GetHandler():IsSetCard(0xa90f)
end end
function c79029449.thfil(c) function c79029449.thfil(c)
return c:IsAbleToHand() and (c:IsSetCard(0xa900) or c:IsSetCard(0xc90e) or c:IsSetCard(0xb90d)) return c:IsAbleToHand() and (c:IsSetCard(0xa900) or c:IsSetCard(0xc90e) or c:IsSetCard(0xb90d) or c:IsSetCard(0xa90f))
end end
function c79029449.ckfil(c) function c79029449.ckfil(c)
return c:IsSetCard(0xa900) or c:IsSetCard(0xc90e) or c:IsSetCard(0xb90d) return (c:IsSetCard(0xa900) or c:IsSetCard(0xc90e) or c:IsSetCard(0xb90d) or c:IsSetCard(0xa90f))
end end
function c79029449.recon(e,tp,eg,ep,ev,re,r,rp) function c79029449.recon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,79029449)==0 return Duel.GetFlagEffect(tp,79029449)==0
......
...@@ -12,7 +12,7 @@ function c79029470.initial_effect(c) ...@@ -12,7 +12,7 @@ function c79029470.initial_effect(c)
--race --race
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetValue(ATTRIBUTE_WATER) e2:SetValue(ATTRIBUTE_WATER)
......
...@@ -29,7 +29,7 @@ function c79029476.thfil(c) ...@@ -29,7 +29,7 @@ function c79029476.thfil(c)
return c:IsAbleToHand() and c:IsRace(RACE_CYBERSE) and c:IsAttribute(ATTRIBUTE_WATER) return c:IsAbleToHand() and c:IsRace(RACE_CYBERSE) and c:IsAttribute(ATTRIBUTE_WATER)
end end
function c79029476.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c79029476.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029476.thfil,tp,LOCATION_DECK,0,1,nil) and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) end if chk==0 then return Duel.IsExistingMatchingCard(c79029476.thfil,tp,LOCATION_DECK,0,1,nil) and e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_DECK)
end end
function c79029476.thop(e,tp,eg,ep,ev,re,r,rp) function c79029476.thop(e,tp,eg,ep,ev,re,r,rp)
...@@ -44,6 +44,7 @@ function c79029476.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,6 +44,7 @@ function c79029476.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
if Duel.CheckLPCost(tp,2000) and Duel.SelectYesNo(tp,aux.Stringid(79029476,0)) then if Duel.CheckLPCost(tp,2000) and Duel.SelectYesNo(tp,aux.Stringid(79029476,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.PayLPCost(tp,2000)
Debug.Message("好的......我会维持这光亮,大家不要走散。") Debug.Message("好的......我会维持这光亮,大家不要走散。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029476,4)) Duel.Hint(HINT_SOUND,0,aux.Stringid(79029476,4))
--extra summon --extra summon
......
...@@ -68,7 +68,7 @@ function c79029478.sttg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -68,7 +68,7 @@ function c79029478.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029478.stfil,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil) and Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 end if chk==0 then return Duel.IsExistingMatchingCard(c79029478.stfil,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil) and Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 end
end end
function c79029478.stop(e,tp,eg,ep,ev,re,r,rp) function c79029478.stop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(1-tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c79029478.stfil,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c79029478.stfil,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
Debug.Message("这样就行了吧?明白了。") Debug.Message("这样就行了吧?明白了。")
......
...@@ -30,6 +30,7 @@ function c79029480.initial_effect(c) ...@@ -30,6 +30,7 @@ function c79029480.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE) e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,19029480) e3:SetCountLimit(1,19029480)
e3:SetCost(c79029480.spcost) e3:SetCost(c79029480.spcost)
...@@ -101,7 +102,7 @@ end ...@@ -101,7 +102,7 @@ end
function c79029480.spop(e,tp,eg,ep,ev,re,r,rp) function c79029480.spop(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(c79029480.spfil,nil,e,tp) local sg=eg:Filter(c79029480.spfil,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<sg:GetCount() or (sg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<sg:GetCount() or (sg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end
if Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)~=0 then
if sg:IsExists(Card.IsCode,1,nil,79029359) then if sg:IsExists(Card.IsCode,1,nil,79029359) then
Debug.Message("这里是阿米娅。") Debug.Message("这里是阿米娅。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029480,2)) Duel.Hint(HINT_SOUND,0,aux.Stringid(79029480,2))
......
--个人行动-镜中虚影
function c79029481.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xa904),aux.FilterBoolFunction(Card.IsFusionType,TYPE_TRAP),2,2,true)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_ONFIELD,0,Duel.Release,REASON_COST+REASON_MATERIAL)
--spsummon condition
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(c79029481.splimit)
c:RegisterEffect(e1)
--battle
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(79029481,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,79029481)
e3:SetCost(c79029481.stcost)
e3:SetTarget(c79029481.sttg)
e3:SetOperation(c79029481.stop)
c:RegisterEffect(e3)
--th or sp
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(79029481,1))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMING_END_PHASE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,19029481)
e4:SetCost(c79029481.tscost)
e4:SetTarget(c79029481.tstg)
e4:SetOperation(c79029481.tsop)
c:RegisterEffect(e4)
end
function c79029481.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c79029481.ctfil(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0xa900) and c:IsType(TYPE_MONSTER)
end
function c79029481.stcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029481.ctfil,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c79029481.ctfil,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c79029481.stfilter(c)
return (c:IsSetCard(0xc90e) or c:IsSetCard(0xb90d)) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c79029481.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029481.stfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function c79029481.stop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c79029481.stfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Debug.Message("给与引导,这我不陌生。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029481,2))
Duel.SSet(tp,g:GetFirst())
end
end
function c79029481.xxfil(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_TRAP)
end
function c79029481.tscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029481.xxfil,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c79029481.xxfil,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c79029481.tsfilter(c,e,tp,ft)
return c:IsSetCard(0xa904) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c79029481.tstg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.IsExistingMatchingCard(c79029481.tsfilter,tp,LOCATION_DECK,0,1,nil,e,tp,ft) end
end
function c79029481.tsop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c79029481.tsfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ft)
local tc=g:GetFirst()
if tc then
if ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
if tc:IsCode(79029203) then
Debug.Message("这片黑暗是庇护所,也是宝座,更是乐园。过去的亡灵从未离去,而我在他们的骸骨上诅咒这一切......看到我这副模样,你还想聆听我的歌声,你还敢...站在我身前吗?")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029481,6))
else
Debug.Message("演员是台词的傀儡。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029481,4))
end
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
if tc:IsCode(79029203) then
Debug.Message("这一步无法回头,无法后望。我将与你分享的东西,恐怕并不像你想象中那样美妙。......过来,来这里,这黑夜的幕布,就让我为你揭开。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029481,5))
else
Debug.Message("戏剧该揭开它的帷幕了。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029481,3))
end
end
end
end
--联合行动-双龙出鞘
function c79029482.initial_effect(c)
--add code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_ADD_CODE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(29065574)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,79029482)
e1:SetCondition(c79029482.condition)
e1:SetTarget(c79029482.target)
e1:SetOperation(c79029482.activate)
c:RegisterEffect(e1)
--xx
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,19029482)
e2:SetCondition(c79029482.xxcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c79029482.xxtg)
e2:SetOperation(c79029482.xxop)
c:RegisterEffect(e2)
end
function c79029482.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()<PHASE_MAIN2
end
function c79029482.filter(c)
return c:IsFaceup() and c:GetFlagEffect(79029482)==0 and c:IsLinkAbove(6) and c:IsSetCard(0xa900)
end
function c79029482.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c79029482.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c79029482.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c79029482.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c79029482.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:GetFlagEffect(79029482)==0 then
if tc:IsCode(79029359) then
Debug.Message("我背负着许多人的愤怒。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029482,3))
elseif tc:IsCode(79029025) then
Debug.Message("没问题。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029482,4))
end
tc:RegisterFlagEffect(79029482,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(79029482,0))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1)
e1:SetCondition(c79029482.actcon)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetCondition(c79029482.effcon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_ONFIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetCondition(c79029482.actcon)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e4:SetCondition(c79029482.damcon)
e4:SetOperation(c79029482.damop)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
end
end
end
function c79029482.actcon(e)
local c=e:GetHandler()
return (Duel.GetAttacker()==c or Duel.GetAttackTarget()==c) and e:GetOwnerPlayer()==e:GetHandlerPlayer()
end
function c79029482.effcon(e)
return e:GetOwnerPlayer()==e:GetHandlerPlayer()
end
function c79029482.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (Duel.GetAttacker()==c or Duel.GetAttackTarget()==c) and ep~=tp and e:GetOwnerPlayer()==e:GetHandlerPlayer()
end
function c79029482.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*4)
if e:GetHandler():IsCode(79029359) then
Debug.Message("“我该用什么回应你的不义?”")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029482,1))
elseif e:GetHandler():IsCode(79029025) then
Debug.Message("闪!")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029482,2))
end
end
function c79029482.xxcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c79029482.xxfil(c)
return c:GetBaseAttack()>0 and c:IsSetCard(0xa900) and c:IsLinkAbove(6)
end
function c79029482.xxtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c79029482.xxfil,1,nil) end
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,eg:Filter(c79029482.xxfil,nil):GetSum(Card.GetBaseAttack)/2)
end
function c79029482.xxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(c79029482.xxfil,nil)
local x=g:GetSum(Card.GetBaseAttack)/2
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Damage(p,x,REASON_EFFECT)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
if tc:IsCode(79029359) then
Debug.Message("要战斗到哪一天,蔓延在大地上的怒火才会平息呢......")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029482,5))
elseif tc:IsCode(79029025) then
Debug.Message("罪恶绝不能被容忍,不管用什么办法我都要阻止你们。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029482,6))
end
tc=g:GetNext()
end
end
--煌·音律联觉收藏-爆裂菲林
function c79029483.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xa900),6,2)
c:EnableReviveLimit()
--add code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_ADD_CODE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(79029125)
c:RegisterEffect(e0)
--cannot target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(aux.indoval)
c:RegisterEffect(e2)
--ov
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c79029483.xyztg)
e3:SetOperation(c79029483.xyzop)
c:RegisterEffect(e3)
--xyz
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,79029483)
e4:SetTarget(c79029483.sptg)
e4:SetOperation(c79029483.spop)
c:RegisterEffect(e4)
end
function c79029483.xyzfil(c)
return c:IsCanOverlay() and c:IsSetCard(0xa900) and c:IsType(TYPE_MONSTER)
end
function c79029483.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and Duel.IsExistingMatchingCard(c79029483.xyzfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
end
function c79029483.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_MZONE) then return end
local g=Duel.GetMatchingGroup(c79029483.xyzfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:Select(tp,1,1,nil)
Debug.Message("哈,有没有感觉周围的空气变得燥热了?没有?咦,我再加加温试试,还想着这样能炒热气氛来着......")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029483,0))
Duel.Overlay(c,sg)
end
function c79029483.filter2(c,e,tp,mc,rk,rc,code)
return c:IsRank(rk+1,rk-1) and c:IsSetCard(0xa900) and mc:IsCanBeXyzMaterial(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c79029483.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c79029483.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank(),c:GetRace(),c:GetCode()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c79029483.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c79029483.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c,c:GetRank(),c:GetRace(),c:GetCode())
local sc=g:GetFirst()
if sc then
Debug.Message("虽然有点暴力,但我可是很喜欢切裂钢铁和掩体的!")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029483,1))
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
--能天使·瑟谣浮收藏-机凯行者
function c79029485.initial_effect(c)
--add code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_ADD_CODE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(79029051)
c:RegisterEffect(e0)
--race
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_ADD_RACE)
e0:SetRange(0xff)
e0:SetValue(RACE_MACHINE)
c:RegisterEffect(e0)
--immuse
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c79029485.iccon)
e1:SetOperation(c79029485.icop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--to hand and SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,09029485)
e3:SetTarget(c79029485.tstg)
e3:SetOperation(c79029485.tsop)
c:RegisterEffect(e3)
end
function c79029485.ckfil(c,e,tp)
return c:GetSummonPlayer()==tp and c:IsSetCard(0xa900,0x6a19)
end
function c79029485.iccon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c79029485.ckfil,1,nil,e,tp) and e:GetHandler():IsAbleToGrave() and Duel.GetFlagEffect(tp,79029485)==0
end
function c79029485.icop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectEffectYesNo(tp,c) then
Duel.RegisterFlagEffect(tp,79029485,RESET_PHASE+PHASE_END,0,1)
Debug.Message("出发!让我们像风暴一样碾过去!")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029485,0))
Duel.SendtoGrave(c,REASON_EFFECT)
local g=eg:Filter(c79029485.ckfil,nil,e,tp)
g:KeepAlive()
--inactivatable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetValue(c79029485.efilter)
e1:SetLabelObject(g)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_DISABLE)
Duel.RegisterEffect(e2,tp)
end
end
function c79029485.efilter(e,ct)
local p=e:GetHandlerPlayer()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return p==tp and e:GetLabelObject():IsContains(te:GetHandler())
end
function c79029485.rhfil(c)
return c:IsSetCard(0xa900,0x6a19) and c:IsAbleToHand() and Duel.GetMZoneCount(tp,c)>0
end
function c79029485.tstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c79029485.rhfil,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
local g=Duel.SelectTarget(tp,c79029485.rhfil,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c79029485.tsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
Debug.Message("轮到我出场了吗?")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029485,1))
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c79029485.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c79029485.splimit(e,c)
return not c:IsRace(RACE_MACHINE) and not c:IsRace(RACE_CYBERSE)
end
--拉普兰德·瑟谣浮收藏-亡胧黯铠
function c79029486.initial_effect(c)
--add code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_ADD_CODE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(79029026)
c:RegisterEffect(e0)
--race
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_ADD_RACE)
e0:SetRange(0xff)
e0:SetValue(RACE_MACHINE)
c:RegisterEffect(e0)
--immuse
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c79029486.iccon)
e1:SetOperation(c79029486.icop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE+LOCATION_MZONE)
e3:SetCountLimit(1,79029486)
e3:SetCondition(c79029486.negcon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c79029486.negtg)
e3:SetOperation(c79029486.negop)
c:RegisterEffect(e3)
end
function c79029486.ckfil(c,e,tp)
return c:GetSummonPlayer()==tp and c:IsSetCard(0xa900,0x6a19)
end
function c79029486.iccon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c79029486.ckfil,1,nil,e,tp) and e:GetHandler():IsAbleToGrave() and Duel.GetFlagEffect(tp,79029486)==0
end
function c79029486.icop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectEffectYesNo(tp,c) then
Duel.RegisterFlagEffect(tp,79029486,RESET_PHASE+PHASE_END,0,1)
Debug.Message("哈哈,诸位,反正我记不住你们的脸......算了,出发吧?")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029486,0))
Duel.SendtoGrave(c,REASON_EFFECT)
local g=eg:Filter(c79029486.ckfil,nil,e,tp)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_DISABLE_SUMMON)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
Duel.SetChainLimitTillChainEnd(c79029486.chainlm)
end
end
function c79029486.chainlm(e,rp,tp)
return not e:IsHasCategory(CATEGORY_DISABLE_SUMMON)
end
function c79029486.tfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(0x88)
end
function c79029486.negcon(e,tp,eg,ep,ev,re,r,rp)
local te=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT)
return rp~=tp and te:GetHandler():IsSetCard(0xa900,0x6a19) and Duel.IsChainDisablable(ev)
end
function c79029486.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c79029486.negop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("再加把劲!")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029486,1))
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
--SNo.39 希望皇 霍普·桃源 --SNo.39 希望皇 霍普·桃源
function c79029530.initial_effect(c)
--SNo.39 希望皇 霍普·桃源
function c79029530.initial_effect(c) function c79029530.initial_effect(c)
aux.AddXyzProcedure(c,nil,7,4,nil,nil,99) aux.AddXyzProcedure(c,nil,7,4,nil,nil,99)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -86,14 +88,4 @@ function c79029530.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,14 +88,4 @@ function c79029530.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c:GetAttack()*2) e1:SetValue(c:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) then return end
if Duel.SelectYesNo(tp,aux.Stringid(79029530,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.CalculateDamage(c,g:GetFirst())
end
end end
...@@ -56,8 +56,7 @@ function c79029534.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,8 +56,7 @@ function c79029534.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(0,LOCATION_MZONE) e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetTarget(c79029534.distg) e1:SetTarget(c79029534.distg)
e1:SetLabel(flag) e1:SetLabel(flag)
e1:SetRange(LOCATION_MZONE) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
end end
......
--逆元构造 红莲
function c79029800.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(c79029800.spcon)
c:RegisterEffect(e1)
--t g
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,79029800)
e2:SetCondition(c79029800.tgcon)
e2:SetTarget(c79029800.settg)
e2:SetOperation(c79029800.setop)
c:RegisterEffect(e2)
--ww
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetCountLimit(1,19029800)
e3:SetTarget(c79029800.drtg)
e3:SetOperation(c79029800.drop)
c:RegisterEffect(e3)
end
function c79029800.xxfilter(c)
return not c:IsLevel(3) and not c:IsRank(3) and not c:IsLink(3)
end
function c79029800.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
not Duel.IsExistingMatchingCard(c79029800.xxfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) and not Duel.IsExistingMatchingCard(Card.IsFacedown,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)>0
end
function c79029800.filter(c)
return c:IsSetCard(0xa991) and c:IsSSetable() and not c:IsType(TYPE_FIELD)
end
function c79029800.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c79029800.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029800.filter,tp,LOCATION_DECK,0,1,nil,tp) end
end
function c79029800.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,c79029800.filter,tp,LOCATION_DECK,0,1,1,nil,tp)
if sg:GetCount()>0 then
local tc=sg:GetFirst()
Duel.SSet(tp,tc)
end
end
function c79029800.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,0,0)
end
function c79029800.drop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c79029800.splimit)
Duel.RegisterEffect(e1,tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
function c79029800.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xa991) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--逆元构造 蚀暗
function c79029801.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(c79029801.spcon)
c:RegisterEffect(e1)
--t g
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,79029801)
e2:SetCondition(c79029801.tgcon)
e2:SetTarget(c79029801.tdtg)
e2:SetOperation(c79029801.tdop)
c:RegisterEffect(e2)
--ww
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetCountLimit(1,19029801)
e3:SetTarget(c79029801.rctg)
e3:SetOperation(c79029801.rcop)
c:RegisterEffect(e3)
end
function c79029801.xxfilter(c)
return not c:IsLevel(3) and not c:IsRank(3) and not c:IsLink(3)
end
function c79029801.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
not Duel.IsExistingMatchingCard(c79029801.xxfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) and not Duel.IsExistingMatchingCard(Card.IsFacedown,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)>0
end
function c79029801.filter(c)
return c:IsAbleToDeck() and c:IsSetCard(0xa991) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c79029801.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c79029801.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029801.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,3,nil,tp) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,tp,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,0,0)
end
function c79029801.sfilter(c,tp)
return c:IsLocation(LOCATION_DECK) and c:IsControler(tp)
end
function c79029801.tdop(e,tp,eg,ep,ev,re,r,rp)
local a1=Duel.IsExistingMatchingCard(c79029801.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,3,nil,tp) and Duel.IsPlayerCanDraw(tp,1)
local a2=Duel.IsExistingMatchingCard(c79029801.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,6,nil,tp) and Duel.IsPlayerCanDraw(tp,2)
local op=2
if a1 and a2 then
op=Duel.SelectOption(tp,aux.Stringid(79029801,0),aux.Stringid(79029801,1))
elseif a1 then
op=Duel.SelectOption(tp,aux.Stringid(79029801,0))
elseif a2 then
op=Duel.SelectOption(tp,aux.Stringid(79029801,1))+1
else
return
end
local tg=Group.CreateGroup()
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
tg=Duel.SelectMatchingCard(tp,c79029801.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,3,3,nil)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
tg=Duel.SelectMatchingCard(tp,c79029801.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,6,6,nil)
end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(c79029801.sfilter,1,nil,tp) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>=3 then
Duel.BreakEffect()
local num=math.floor(ct/3)
Duel.Draw(tp,num,REASON_EFFECT)
end
end
function c79029801.rcfilter(c)
return c:IsFaceup() and (c:IsAttackAbove(0) or c:IsDefenseAbove(0))
end
function c79029801.rctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c:IsLocation(LOCATION_MZONE) and c79029801.rcfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c79029801.rcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
g=Duel.SelectTarget(tp,c79029801.rcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,math.max(tc:GetAttack(),tc:GetDefense()),tp,0,0)
end
function c79029801.rcop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Recover(tp,math.max(tc:GetAttack(),tc:GetDefense()),REASON_EFFECT)
end
end
\ No newline at end of file
--逆元构造 异火
function c79029802.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(c79029802.spcon)
c:RegisterEffect(e1)
--t g
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,79029802)
e2:SetCondition(c79029802.tgcon)
e2:SetTarget(c79029802.detg)
e2:SetOperation(c79029802.deop)
c:RegisterEffect(e2)
--ww
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c79029802.negcon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c79029802.negtg)
e3:SetOperation(c79029802.negop)
c:RegisterEffect(e3)
end
function c79029802.xxfilter(c)
return not c:IsLevel(3) and not c:IsRank(3) and not c:IsLink(3)
end
function c79029802.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
not Duel.IsExistingMatchingCard(c79029802.xxfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) and not Duel.IsExistingMatchingCard(Card.IsFacedown,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)>0
end
function c79029802.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c79029802.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
end
function c79029802.deop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp)
if sg:GetCount()>0 then
Duel.Destroy(sg,REASON_EFFECT)
end
end
function c79029802.filter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0xa991) and c:IsFaceup()
end
function c79029802.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c79029802.filter,1,nil,tp)
end
function c79029802.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c79029802.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--逆元构造 风暴
function c79029803.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(c79029803.spcon)
c:RegisterEffect(e1)
--t g
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,79029803)
e2:SetCondition(c79029803.tgcon)
e2:SetTarget(c79029803.detg)
e2:SetOperation(c79029803.deop)
c:RegisterEffect(e2)
--ww
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetCountLimit(1,19029803)
e3:SetTarget(c79029803.tdtg)
e3:SetOperation(c79029803.tdop)
c:RegisterEffect(e3)
end
function c79029803.xxfilter(c)
return not c:IsLevel(3) and not c:IsRank(3) and not c:IsLink(3)
end
function c79029803.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
not Duel.IsExistingMatchingCard(c79029803.xxfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) and not Duel.IsExistingMatchingCard(Card.IsFacedown,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)>0
end
function c79029803.defilter(c)
return c:IsLocation(LOCATION_SZONE) or (c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsFaceup())
end
function c79029803.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c79029803.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029803.defilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,0,0)
end
function c79029803.deop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,c79029803.defilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
end
function c79029803.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_REMOVED+LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
end
function c79029803.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_REMOVED+LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
end
end
\ No newline at end of file
--逆元构造 黎明
function c79029804.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,3,c79029804.lcheck)
c:EnableReviveLimit()
--Disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(79029804,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,79029804)
e2:SetCost(c79029804.descost)
e2:SetTarget(c79029804.destg)
e2:SetOperation(c79029804.desop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c79029804.atkcon)
e3:SetValue(1500)
c:RegisterEffect(e3)
--cannot target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetCondition(c79029804.atkcon)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
--indes
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c79029804.atkcon)
e5:SetValue(aux.indoval)
c:RegisterEffect(e5)
end
function c79029804.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xa991)
end
function c79029804.descost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c79029804.costfilter(c)
return c:IsAbleToGraveAsCost() and c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
function c79029804.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local dg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then
if e:GetLabel()~=100 then
e:SetLabel(0)
return false
end
return Duel.GetMatchingGroupCount(c79029804.costfilter,tp,LOCATION_MZONE,0,nil)>0 and dg:GetCount()>0
end
e:SetLabel(0)
local cg=Duel.SelectMatchingCard(tp,c79029804.costfilter,tp,LOCATION_MZONE,0,1,dg:GetCount(),nil)
local dct=Duel.SendtoGrave(cg,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,dct,tp,LOCATION_ONFIELD)
e:SetValue(dct)
end
function c79029804.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dct=e:GetValue()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local dg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,dct,dct,nil)
if #dg>0 then
Duel.HintSelection(dg)
local tc=dg:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=dg:GetNext()
end
end
end
function c79029804.cfilter(c)
return c:GetSequence()<5
end
function c79029804.atkcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c79029804.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
--逆元构造 流光
function c79029805.initial_effect(c)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_MACHINE),1)
c:EnableReviveLimit()
--add type & attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c79029805.tncon)
e1:SetOperation(c79029805.tnop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c79029805.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(79029805,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,79029805)
e3:SetCost(c79029805.cost)
e3:SetTarget(c79029805.sptg)
e3:SetOperation(c79029805.spop)
c:RegisterEffect(e3)
--destroy replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetRange(LOCATION_GRAVE+LOCATION_MZONE)
e4:SetTarget(c79029805.reptg)
e4:SetValue(c79029805.repval)
e4:SetOperation(c79029805.repop)
c:RegisterEffect(e4)
end
function c79029805.valcheck(e,c)
local flag=0
local g=c:GetMaterial()
if g:IsExists(Card.IsSetCard,1,nil,0xa991) then
flag=flag|1
end
e:GetLabelObject():SetLabel(flag)
end
function c79029805.mfilter(c)
return not c:IsType(TYPE_SYNCHRO)
end
function c79029805.tncon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()>0
end
function c79029805.tnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()&1==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CHANGE_LEVEL)
e2:SetValue(3)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
end
function c79029805.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c79029805.spfilter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLevelBelow(3) or c:IsRankBelow(3) or c:IsLinkBelow(3))
end
function c79029805.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c79029805.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1500,tp,0,0)
end
function c79029805.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g=Duel.GetMatchingGroup(c79029805.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Recover(tp,1500,REASON_EFFECT)
end
end
end
end
function c79029805.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xa991)
and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c79029805.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c79029805.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c79029805.repval(e,c)
return c79029805.repfilter(c,e:GetHandlerPlayer())
end
function c79029805.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
Duel.Recover(tp,1000,REASON_EFFECT)
end
\ No newline at end of file
--逆元构造 乱数
function c79029806.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),3,2,nil,nil,99)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79029806,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,79029806)
e1:SetCondition(c79029806.thcon)
e1:SetTarget(c79029806.thtg)
e1:SetOperation(c79029806.thop)
c:RegisterEffect(e1)
--xx
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c79029806.xyzcon)
e2:SetTarget(c79029806.xyztg)
e2:SetOperation(c79029806.xyzop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1,19029806)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c79029806.discon)
e3:SetCost(c79029806.discost)
e3:SetTarget(c79029806.distg)
e3:SetOperation(c79029806.disop)
c:RegisterEffect(e3)
end
function c79029806.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c79029806.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsLevel(3)
and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c79029806.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(c79029806.filter,tp,LOCATION_DECK,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end
function c79029806.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,c79029806.filter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
local bool_a=tc:IsAbleToGrave()
local bool_b=tc:IsAbleToHand()
local op=2
if bool_a and bool_b then
op=Duel.SelectOption(tp,aux.Stringid(79029806,2),aux.Stringid(79029806,3))
elseif bool_a then
op=Duel.SelectOption(tp,aux.Stringid(79029806,2))
elseif bool_b then
op=Duel.SelectOption(tp,aux.Stringid(79029806,3))+1
end
if op==0 then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
elseif op==1 then
Duel.SendtoGrave(tc,REASON_EFFECT)
else
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c79029806.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c79029806.aclimit1(e,re,tp)
local tc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and not (tc:IsLevelBelow(3) or tc:IsRankBelow(3) or tc:IsLinkBelow(3))
end
function c79029806.xyzcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if not c:IsRelateToBattle() or c:IsFacedown() then return false end
e:SetLabelObject(tc)
return tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE)
end
function c79029806.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end
local tc=e:GetLabelObject()
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0)
end
function c79029806.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Overlay(c,tc)
if not c:GetOverlayGroup():IsContains(tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
Duel.ChainAttack()
end
end
function c79029806.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and rp~=tp
end
function c79029806.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c79029806.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true 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 c79029806.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
\ No newline at end of file
--逆元构造 脉冲
function c79029807.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),3,2,nil,nil,99)
c:EnableReviveLimit()
--Draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79029807,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,79029807)
e1:SetCondition(c79029807.drcon)
e1:SetTarget(c79029807.drtg)
e1:SetOperation(c79029807.drop)
c:RegisterEffect(e1)
--add cost
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(79029807,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1,19029807)
e2:SetCost(c79029807.cost2)
e2:SetCondition(c79029807.condition2)
e2:SetTarget(c79029807.target2)
e2:SetOperation(c79029807.activate)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,29029807)
e3:SetCondition(c79029807.condition)
e3:SetOperation(c79029807.op)
c:RegisterEffect(e3)
end
function c79029807.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c79029807.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c79029807.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c79029807.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST)
end
c:RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c79029807.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c79029807.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c79029807.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.RegisterFlagEffect(1-tp,79029807,RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ACTIVATE_COST)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetCost(c79029807.costchk)
e1:SetOperation(c79029807.costop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c79029807.costchk(e,te_or_c,tp)
local ct=Duel.GetFlagEffect(tp,79029807)
return Duel.CheckLPCost(tp,ct*800)
end
function c79029807.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,800)
end
function c79029807.condfil(c,tp)
return c:GetPreviousControler()==tp and c:IsSetCard(0xa991)
end
function c79029807.condition(e,tp,eg,ep,ev,re,r,rp)
local chain=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT)
local chc=chain:GetHandler()
return Duel.GetCurrentChain()>1 and c79029807.condfil(chc,tp) and rp~=tp and e:GetHandler():IsAbleToRemove()
end
function c79029807.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(79029807,2)) then
if Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) then
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
--升格构造 阿尔法
function c79029808.initial_effect(c)
c:SetSPSummonOnce(79029808)
c:EnableReviveLimit()
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(79029808,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCondition(c79029808.spcon)
e2:SetOperation(c79029808.spop)
c:RegisterEffect(e2)
--cannot target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c79029808.ctcon)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c79029808.ctcon)
e4:SetValue(aux.indoval)
c:RegisterEffect(e4)
--damage
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(79029808,1))
e5:SetCategory(CATEGORY_DAMAGE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_BATTLE_CONFIRM)
e5:SetCondition(c79029808.damcon)
e5:SetTarget(c79029808.damtg)
e5:SetOperation(c79029808.damop)
c:RegisterEffect(e5)
end
function c79029808.spcfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsSetCard(0xa991) and c:IsAbleToGraveAsCost() and c:IsType(TYPE_MONSTER)
end
function c79029808.mzfilter(c,tp)
return c:GetSequence()<5
end
function c79029808.spzfilter(c,tp)
return Duel.GetMZoneCount(tp,c,tp)>0
end
function c79029808.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local sg=Duel.GetMatchingGroup(c79029808.spcfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return sg:GetCount()>0 and (ft>0 or sg:IsExists(c79029808.spzfilter,1,nil,tp))
end
function c79029808.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c79029808.spcfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,nil)
local num=5
if #g<num then num=#g end
local sg=g:SelectSubGroup(tp,c79029808.spzfilter,false,1,num,tp)
Duel.SendtoGrave(sg,REASON_COST)
local ct=#sg
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(-ct)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(ct*500)
e2:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
function c79029808.ctcon(e)
return e:GetHandler():IsLevel(3)
end
function c79029808.damcon(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
return bc and bc:IsControler(1-tp)
end
function c79029808.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetHandler():GetBattleTarget():GetAttack())
end
function c79029808.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc and tc:IsFaceup() and tc:IsControler(1-tp) and tc:IsRelateToBattle() then
local atk=tc:GetAttack()
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
\ No newline at end of file
--升格构造 深红之渊
function c79029809.initial_effect(c)
--fusion
aux.AddFusionProcFunFunRep(c,c79029809.ffilter,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),2,99,true)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetProperty(EFFECT_FLAG_REPEAT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c79029809.akval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e2)
--move
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(79029809,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,79029809)
e2:SetTarget(c79029809.seqtg)
e2:SetOperation(c79029809.seqop)
c:RegisterEffect(e2)
if not c79029809.global_check then
c79029809.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c79029809.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c79029809.checkop(e,tp,eg,ep,ev,re,r,rp)
local xp=re:GetHandlerPlayer()
local flag=Duel.GetFlagEffectLabel(xp,79029809)
if flag then
Duel.SetFlagEffectLabel(xp,79029809,flag+1)
else
Duel.RegisterFlagEffect(xp,79029809,0,0,1,1)
end
end
function c79029809.ffilter(c,fc,sub,mg,sg)
return c:IsCode(79029808) and c:IsLevelBelow(3)
end
function c79029809.akval(e)
local tp=e:GetHandlerPlayer()
local x=Duel.GetFlagEffectLabel(tp,79029809)
return e:GetHandler():GetMaterialCount()*100*x
end
function c79029809.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.SetChainLimit(c79029809.chlimit)
end
function c79029809.chlimit(e,ep,tp)
return tp==ep
end
function c79029809.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or not c:IsControler(tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
local seq=math.log(fd,2)
local pseq=c:GetSequence()
Duel.MoveSequence(c,seq)
if c:GetSequence()==seq then
local g=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(79029809,1)) then
Duel.BreakEffect()
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
if c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
--逆元构造 凛冽
function c79029810.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),aux.NonTuner(Card.IsRace,RACE_MACHINE),1)
c:EnableReviveLimit()
--tograve
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c79029810.sumsuc)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c79029810.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,79029810)
e3:SetCondition(c79029810.discon)
e3:SetCost(c79029810.discost)
e3:SetTarget(c79029810.distg)
e3:SetOperation(c79029810.disop)
c:RegisterEffect(e3)
--cannot be target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetTargetRange(LOCATION_ONFIELD+LOCATION_GRAVE,0)
e4:SetTarget(c79029810.tgtg)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
end
function c79029810.valcheck(e,c)
local flag=0
local g=c:GetMaterial()
if g:IsExists(Card.IsSetCard,1,nil,0xa991) then
flag=flag|1
end
e:GetLabelObject():SetLabel(flag)
end
function c79029810.sumsuc(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,79029810)>0 then return end
local c=e:GetHandler()
local ct=c:GetMaterial():GetCount()
if ct*2>=c:GetLevel() then return end
if Duel.IsPlayerCanDiscardDeck(e:GetHandlerPlayer(),ct*2) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()&1==1 and Duel.SelectEffectYesNo(tp,c) then
Duel.RegisterFlagEffect(tp,79029810,RESET_PHASE+PHASE_END,0,1)
if Duel.DiscardDeck(tp,ct*2,REASON_EFFECT) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(-(ct*2))
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
end
end
end
function c79029810.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c79029810.costfilter(c)
return c:IsSetCard(0xa991) and c:IsAbleToGraveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND))
end
function c79029810.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029810.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c79029810.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c79029810.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true 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 c79029810.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c79029810.tgtg(e,c)
return c:IsSetCard(0xa991) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
\ No newline at end of file
--构造的集结
function c79029811.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,79029811)
e1:SetTarget(c79029811.target)
e1:SetOperation(c79029811.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetCountLimit(1,19029811)
e2:SetTarget(c79029811.thtg)
e2:SetOperation(c79029811.thop)
c:RegisterEffect(e2)
end
function c79029811.filter(c)
return c:IsSetCard(0xa991) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c79029811.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029811.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c79029811.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c79029811.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
if tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function c79029811.thfilter(c)
return c:IsSetCard(0xa991) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToHand()
end
function c79029811.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029811.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c79029811.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c79029811.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--构造的压制
function c79029812.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_CHAINING)
e0:SetCost(c79029812.cost)
e0:SetCondition(c79029812.con)
e0:SetTarget(c79029812.tg)
e0:SetOperation(c79029812.op)
c:RegisterEffect(e0)
end
function c79029812.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c79029812.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev) and rp~=tp
end
function c79029812.rlfilter(c)
return bit.band(c:GetOriginalType(),TYPE_MONSTER)==TYPE_MONSTER and c:IsSetCard(0xa991) and c:IsReleasable()
end
function c79029812.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(c79029812.rlfilter,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return mg:GetCount()>0
end
local rg=Duel.SelectReleaseGroup(tp,c79029812.rlfilter,1,mg:GetCount(),nil)
local num_1=Duel.Release(rg,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if num_1>=2 then
e:SetCategory(CATEGORY_NEGATE+CATEGORY_DAMAGE)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,num_1*400,1-tp,0,0)
elseif num_1>=3 then
e:SetCategory(CATEGORY_NEGATE+CATEGORY_DAMAGE+CATEGORY_DRAW)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,num_1*400,1-tp,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,0,0)
elseif num_1>=4 then
e:SetCategory(CATEGORY_NEGATE+CATEGORY_DAMAGE+CATEGORY_DRAW+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,num_1*400,1-tp,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,0,0)
elseif num_1>=5 then
e:SetCategory(CATEGORY_NEGATE+CATEGORY_DAMAGE+CATEGORY_DRAW+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,num_1*400,1-tp,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,0,0)
end
if num_1>0 then
if re and re:GetHandler():IsRelateToEffect(e) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0,0)
end
end
e:SetLabel(num_1)
end
function c79029812.op(e,tp,eg,ep,ev,re,r,rp)
local num=e:GetLabel()
if num>0 and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
if num>1 then
Duel.Damage(1-tp,num*400,REASON_EFFECT)
end
if num>2 then
Duel.Draw(tp,1,REASON_EFFECT)
end
if num>3 then
local cg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(cg) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetCode(EFFECT_SET_DEFENSE_FINAL)
tc:RegisterEffect(e3)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
end
\ No newline at end of file
--构造基地 空中花园
function c79029813.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk&def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(c79029813.filter))
e2:SetValue(500)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--race
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCode(EFFECT_CHANGE_RACE)
e3:SetValue(RACE_MACHINE)
c:RegisterEffect(e3)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(79029813,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1)
e4:SetTarget(c79029813.sptg1)
e4:SetOperation(c79029813.spop1)
c:RegisterEffect(e4)
--Destroy replace
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_DESTROY_REPLACE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_FZONE)
e5:SetTarget(c79029813.desreptg)
e5:SetOperation(c79029813.desrepop)
c:RegisterEffect(e5)
end
function c79029813.filter(c)
return c:IsFaceup() and c:IsSetCard(0xa991)
end
function c79029813.spfilter1(c,e,tp)
return c:IsSetCard(0xa991)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c79029813.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029813.spfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c79029813.spop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c79029813.spfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c79029813.repfilter(c,e)
return c:IsFaceup() and c:IsSetCard(0xa991)
and c:IsAbleToGrave() and not c:IsImmuneToEffect(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end
function c79029813.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and Duel.IsExistingMatchingCard(c79029813.repfilter,tp,LOCATION_MZONE,0,1,c,e) end
if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,c79029813.repfilter,tp,LOCATION_MZONE,0,1,1,c,e)
e:SetLabelObject(g:GetFirst())
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true
else return false end
end
function c79029813.desrepop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.SendtoGrave(tc,REASON_REPLACE+REASON_EFFECT)
end
\ No newline at end of file
--构造终解 赤渊之上
function c79029814.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,79029814+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c79029814.target)
e1:SetOperation(c79029814.activate)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c79029814.reptg)
e2:SetValue(c79029814.repval)
e2:SetOperation(c79029814.repop)
c:RegisterEffect(e2)
end
function c79029814.filter0(c)
return c:IsSetCard(0xa991) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c79029814.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c79029814.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xa991) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c79029814.cfilter(c)
return c:GetSummonLocation()==LOCATION_EXTRA
end
function c79029814.fcheck(tp,sg,fc)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)<=1
end
function c79029814.gcheck(sg)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)<=1
end
function c79029814.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
if Duel.IsExistingMatchingCard(c79029814.cfilter,tp,0,LOCATION_MZONE,1,nil) then
local mg2=Duel.GetMatchingGroup(c79029814.filter0,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil)
if mg2:GetCount()>0 then
mg1:Merge(mg2)
aux.FCheckAdditional=c79029814.fcheck
aux.GCheckAdditional=c79029814.gcheck
end
end
local res=Duel.IsExistingMatchingCard(c79029814.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
aux.GCheckAdditional=nil
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c79029814.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c79029814.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c79029814.filter1,nil,e)
local exmat=false
if Duel.IsExistingMatchingCard(c79029814.cfilter,tp,0,LOCATION_MZONE,1,nil) then
local mg2=Duel.GetMatchingGroup(c79029814.filter0,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil)
if mg2:GetCount()>0 then
mg1:Merge(mg2)
exmat=true
end
end
if exmat then
aux.FCheckAdditional=c79029814.fcheck
aux.GCheckAdditional=c79029814.gcheck
end
local sg1=Duel.GetMatchingGroup(c79029814.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
aux.GCheckAdditional=nil
local mg3=nil
local sg2=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(c79029814.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
mg1:RemoveCard(tc)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if exmat then
aux.FCheckAdditional=c79029814.fcheck
aux.GCheckAdditional=c79029814.gcheck
end
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
aux.FCheckAdditional=nil
aux.GCheckAdditional=nil
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
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 fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
if tc:IsCode(79029808) then
--
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(79029814,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(c79029814.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1)
end
tc:CompleteProcedure()
end
end
function c79029814.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c79029814.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xa991)
and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c79029814.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c79029814.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c79029814.repval(e,c)
return c79029814.repfilter(c,e:GetHandlerPlayer())
end
function c79029814.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--个人行动-影霄·奔夜
function c79029900.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_REMOVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,79029900)
e1:SetTarget(c79029900.sptg)
e1:SetOperation(c79029900.spop)
c:RegisterEffect(e1)
--link
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,09029900)
e2:SetCost(c79029900.lkcost)
e2:SetTarget(c79029900.lktg)
e2:SetOperation(c79029900.lkop)
c:RegisterEffect(e2)
--cd
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e3:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c79029900.cdtg)
e3:SetTargetRange(LOCATION_MZONE,0)
c:RegisterEffect(e3)
end
function c79029900.spfil(c,e,tp)
return c:IsSetCard(0xa900) and c:IsType(TYPE_LINK) and c:IsLinkBelow(3)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c79029900.ckfil(c)
return c:IsSetCard(0xa900) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c79029900.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79029900.spfil,tp,LOCATION_EXTRA,0,1,nil,e,tp) and eg:IsExists(c79029900.ckfil,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c79029900.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c79029900.spfil,tp,LOCATION_EXTRA,0,nil,e,tp)
if g:GetCount()<=0 then return end
Debug.Message("死亡应该铭刻在我们的记忆里,永不遗忘,无论这死亡是谁带来的,又是被带给了谁。我们的错误永远不会变成正确......那些疤痕应该要一直提醒我们,警告我们有多脆弱。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029900,0))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c79029900.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c79029900.splimit(e,c)
return not c:IsSetCard(0xa900)
end
function c79029900.lkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c79029900.filter(c,mg)
return c:IsLinkSummonable(nil) and c:IsSetCard(0xa900)
end
function c79029900.lmfil(c)
return c:IsSetCard(0xa900) and c:IsCanBeLinkMaterial(nil)
end
function c79029900.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(c79029900.lmfil,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c79029900.filter,tp,LOCATION_EXTRA,0,1,nil,mg) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c79029900.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(c79029900.lmfil,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c79029900.filter,tp,LOCATION_EXTRA,0,1,1,nil,mg)
local tc=g:GetFirst()
if tc then
if tc:IsCode(79029359) then
Debug.Message("好的,我知道了。")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029900,2))
else
Debug.Message("行动开始。我们走!")
Duel.Hint(HINT_SOUND,0,aux.Stringid(79029900,1))
end
Duel.LinkSummon(tp,tc,mg)
end
end
function c79029900.cdtg(e,c)
return c:IsSetCard(0xa900) and c:IsType(TYPE_LINK)
end
...@@ -10,14 +10,18 @@ function c9910109.initial_effect(c) ...@@ -10,14 +10,18 @@ function c9910109.initial_effect(c)
e1:SetTarget(c9910109.sptg) e1:SetTarget(c9910109.sptg)
e1:SetOperation(c9910109.spop) e1:SetOperation(c9910109.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--activate limit --active limit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetCode(EFFECT_CANNOT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e2:SetValue(c9910109.aclimit) e2:SetCondition(c9910109.condition)
e2:SetTarget(c9910109.actlimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e3)
end end
function c9910109.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c9910109.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end if chk==0 then return not e:GetHandler():IsPublic() end
...@@ -54,6 +58,9 @@ function c9910109.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,6 +58,9 @@ function c9910109.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(c,nil,0,REASON_EFFECT) Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
end end
end end
function c9910109.aclimit(e,re,tp) function c9910109.condition(e,tp,eg,ep,ev,re,r,rp)
return re:GetActivateLocation()==LOCATION_GRAVE return e:GetHandler():IsRace(RACE_MACHINE)
end
function c9910109.actlimit(e,c)
return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER)
end end
...@@ -10,24 +10,23 @@ function c9910114.initial_effect(c) ...@@ -10,24 +10,23 @@ function c9910114.initial_effect(c)
e1:SetTarget(c9910114.sptg) e1:SetTarget(c9910114.sptg)
e1:SetOperation(c9910114.spop) e1:SetOperation(c9910114.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--pos --activate limit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SET_POSITION) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCondition(c9910114.poscon) e2:SetTargetRange(1,1)
e2:SetTarget(c9910114.postg) e2:SetCondition(c9910114.condition)
e2:SetValue(POS_FACEUP_DEFENSE) e2:SetValue(c9910114.aclimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--activate limit if not c9910114.global_check then
local e3=Effect.CreateEffect(c) c9910114.global_check=true
e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD) local ge1=Effect.CreateEffect(c)
e3:SetCode(EFFECT_CANNOT_ACTIVATE) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) ge1:SetCode(EVENT_BATTLED)
e3:SetTargetRange(1,1) ge1:SetOperation(c9910114.checkop)
e3:SetCondition(c9910114.poscon) Duel.RegisterEffect(ge1,0)
e3:SetValue(c9910114.aclimit) end
c:RegisterEffect(e3)
end end
function c9910114.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c9910114.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end if chk==0 then return not e:GetHandler():IsPublic() end
...@@ -64,15 +63,22 @@ function c9910114.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,15 +63,22 @@ function c9910114.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(c,nil,0,REASON_EFFECT) Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
end end
end end
function c9910114.poscon(e) function c9910114.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return e:GetHandler():IsRace(RACE_MACHINE)
return c:IsLocation(LOCATION_MZONE) and c:IsDefensePos()
end
function c9910114.postg(e,c)
return c:IsFaceup()
end end
function c9910114.aclimit(e,re,tp) function c9910114.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) local rc=re:GetHandler()
and (re:GetActivateLocation()==LOCATION_HAND return re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE and rc:IsAttackPos()
or (re:GetActivateLocation()==LOCATION_MZONE and re:GetHandler():IsAttackPos())) and rc:GetAttackedCount()==0 and rc:GetFlagEffect(9910114)==0
end
function c9910114.atkfilter(c)
return c:GetAttackedCount()>0 and c:IsFaceup() and c:GetFlagEffect(9910114)==0
end
function c9910114.checkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c9910114.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(9910114,RESET_EVENT+RESETS_STANDARD,0,1)
tc=g:GetNext()
end
end end
...@@ -9,47 +9,57 @@ function c9910134.initial_effect(c) ...@@ -9,47 +9,57 @@ function c9910134.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(2,9910134) e1:SetCountLimit(1)
e1:SetCost(c9910134.cost)
e1:SetTarget(c9910134.target) e1:SetTarget(c9910134.target)
e1:SetOperation(c9910134.operation) e1:SetOperation(c9910134.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCondition(c9910134.condition)
e2:SetCost(c9910134.cost)
c:RegisterEffect(e2)
end end
function c9910134.xyzfilter(c,xyzc) function c9910134.xyzfilter(c,xyzc)
return (c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x952) and c:IsFaceup())) return (c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x952) and c:IsFaceup()))
and c:IsRace(RACE_MACHINE) and c:IsRace(RACE_MACHINE)
end end
function c9910134.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c9910134.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c9910134.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c9910134.xfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ)
end end
function c9910134.filter(c,tp) function c9910134.xfilter2(c,e)
return c:IsFaceup() and not c:IsType(TYPE_TOKEN) and (c:IsControler(tp) or c:IsAbleToChangeControler()) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) and not c:IsImmuneToEffect(e)
end end
function c9910134.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9910134.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsOnField() and c9910134.filter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsCanOverlay() end
if chk==0 then return Duel.IsExistingTarget(c9910134.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,tp) end if chk==0 then return Duel.IsExistingTarget(Card.IsCanOverlay,tp,0,LOCATION_ONFIELD,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) and Duel.IsExistingMatchingCard(c9910134.xfilter,tp,LOCATION_MZONE,0,1,c) end
Duel.SelectTarget(tp,c9910134.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SelectTarget(tp,Card.IsCanOverlay,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function c9910134.operation(e,tp,eg,ep,ev,re,r,rp) function c9910134.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e)
and Duel.IsExistingMatchingCard(c9910134.xfilter2,tp,LOCATION_MZONE,0,1,c,e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=Duel.SelectMatchingCard(tp,c9910134.xfilter2,tp,LOCATION_MZONE,0,1,1,c,e)
local sc=sg:GetFirst()
local og=tc:GetOverlayGroup() local og=tc:GetOverlayGroup()
if og:GetCount()>0 then if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE) Duel.SendtoGrave(og,REASON_RULE)
end end
Duel.Overlay(c,Group.FromCards(tc)) Duel.Overlay(sc,Group.FromCards(tc))
else return end
local g=Duel.GetMatchingGroup(nil,1-tp,LOCATION_MZONE+LOCATION_HAND,0,nil)
if c:GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x952) and g:GetCount()>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_RULE)
end end
end end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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