Commit 4e7db7f7 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent bf8aa846
--铳影-异朵 --铳影-异朵
local m=12825615 local s,id,o=GetID()
local cm=_G["c"..m] function s.initial_effect(c)
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,id)
e1:SetCondition(cm.condition) e1:SetCondition(s.condition)
e1:SetOperation(cm.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand --to hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -18,36 +17,36 @@ function cm.initial_effect(c) ...@@ -18,36 +17,36 @@ function cm.initial_effect(c)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m+1000) e3:SetCountLimit(1,id+1000)
e3:SetCondition(cm.thcon2) e3:SetCondition(s.thcon2)
e3:SetTarget(cm.thtg2) e3:SetTarget(s.thtg2)
e3:SetOperation(cm.thop2) e3:SetOperation(s.thop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.filter1(c,e,tp) function s.filter1(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode()) return c:IsFaceup() and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode())
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and c:IsSetCard(0x4a76) and c:IsType(TYPE_MONSTER) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and c:IsSetCard(0x4a76) and c:IsType(TYPE_MONSTER)
end end
function cm.filter2(c,e,tp,mc,code) function s.filter2(c,e,tp,idc,code)
return mc:IsCanBeXyzMaterial(c) and not c:IsCode(code) and c:IsType(TYPE_XYZ) return mc:IsCanBeXyzMaterial(c) and not c:IsCode(code) and c:IsType(TYPE_XYZ)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsSetCard(0x4a76) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsSetCard(0x4a76) and Duel.GetLocationCountFromEx(tp,tp,idc,c)>0
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g1=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) local g1=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
local tc=g1:GetFirst() local tc=g1:GetFirst()
if tc then if tc then
Duel.HintSelection(g1) Duel.HintSelection(g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetCode())
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then if mg:GetCount()~=0 then
Duel.Overlay(sc,mg) Duel.Overlay(sc,idg)
end end
sc:SetMaterial(Group.FromCards(tc)) sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc)) Duel.Overlay(sc,Group.FromCards(tc))
...@@ -56,28 +55,28 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,28 +55,28 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function cm.thcfilter(c,tp) function s.thcfilter(c,tp)
return c:IsSetCard(0x4a76) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) return c:IsSetCard(0x4a76) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEUP) and c:GetReasonPlayer()==1-tp and c:IsType(TYPE_XYZ) and c:IsPreviousPosition(POS_FACEUP) and c:GetReasonPlayer()==1-tp and c:IsType(TYPE_XYZ)
end end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp) function s.thcon2(e,tp,eg,ep,ev,re,r,rp)
local g2=eg:Filter(cm.thcfilter,nil) local g2=eg:Filter(s.thcfilter,nil,tp)
g2:KeepAlive() g2:KeepAlive()
e:SetLabelObject(g2) e:SetLabelObject(g2)
return eg:IsExists(cm.thcfilter,1,nil,tp) return eg:IsExists(s.thcfilter,1,nil,tp)
end end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(cm.thcfilter,1,nil,tp) end if chk==0 then return eg:IsExists(s.thcfilter,1,nil,tp) 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 cm.spfilter(c,e,tp,code) function s.spfilter(c,e,tp,code)
return aux.IsCodeListed(c,code) and c:IsAbleToHand() and c:IsSetCard(0x4a76) and c:IsType(TYPE_SPELL) return aux.IsCodeListed(c,code) and c:IsAbleToHand() and c:IsSetCard(0x4a76) and c:IsType(TYPE_SPELL)
end end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp) function s.thop2(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject() local g=e:GetLabelObject()
local ts=g:GetFirst() local ts=g:GetFirst()
if not g then return end if not g then return end
local scc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,ts:GetCode()) local scc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,ts:GetCode())
if scc then if scc then
Duel.SendtoHand(scc,nil,REASON_EFFECT) Duel.SendtoHand(scc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,scc) Duel.ConfirmCards(1-tp,scc)
......
...@@ -23,7 +23,7 @@ function s.initial_effect(c) ...@@ -23,7 +23,7 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST) e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetOperation(s.adjustop) e2:SetOperation(s.adjustop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -76,10 +76,10 @@ end ...@@ -76,10 +76,10 @@ end
function s.adjustop(e,tp,eg,ep,ev,re,r,rp) function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE,0,nil) local sg=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE,0,nil)
if #sg>1 then if #sg>1 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sc=sg:Select(tp,1,1,nil):GetFirst() local sc=sg:Select(tp,1,1,nil):GetFirst()
sg:RemoveCard(sc) sg:RemoveCard(sc)
Duel.SendtoGrave(sg,REASON_RULE) Duel.SendtoGrave(sg,REASON_RULE)
Duel.Readjust() --Duel.Readjust()
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment