Commit 57a0a62d authored by 聖園ミカ's avatar 聖園ミカ 🐟

vme50

parent 74e1427a
No preview for this file type
...@@ -21,13 +21,13 @@ function c88178020.initial_effect(c) ...@@ -21,13 +21,13 @@ function c88178020.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,88179020) e2:SetCountLimit(1,88179020)
e2:SetCost(c88178020.spcost) e2:SetCost(c88178020.cost)
e2:SetTarget(c88178020.sptg) e2:SetTarget(c88178020.target)
e2:SetOperation(c88178020.spop) e2:SetOperation(c88178020.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88178020,0)) e3:SetDescription(aux.Stringid(88178020,0))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) e3:SetCategory(CATEGORY_TOEXTRA+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
...@@ -53,26 +53,26 @@ function c88178020.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,26 +53,26 @@ function c88178020.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c88178020.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c88178020.costfilter(c,tp)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,c88178020.costfilter,1,nil,tp) end return c:IsFaceup() and c:IsSetCard(0x3591)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) and Duel.GetMZoneCount(tp,c,tp)>0
local g=Duel.SelectReleaseGroup(REASON_COST,tp,c88178020.costfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end end
function c88178020.costfilter(c,e,tp) function c88178020.cost(e,tp,eg,ep,ev,re,r,rp,chk)
return c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 if chk==0 then return Duel.CheckReleaseGroup(tp,c88178020.costfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c88178020.costfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end end
function c88178020.spfilter(c,e,tp) function c88178020.filter(c,e,tp)
return c:IsSetCard(0x3591) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x3591) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c88178020.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c88178020.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178020.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c88178020.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_GRAVE)
end end
function c88178020.spop(e,tp,eg,ep,ev,re,r,rp) function c88178020.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c88178020.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c88178020.filter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
...@@ -81,19 +81,21 @@ function c88178020.tgfilter(c) ...@@ -81,19 +81,21 @@ function c88178020.tgfilter(c)
return c:IsSetCard(0x3591) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x3591) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c88178020.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c88178020.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88178020.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) if chk==0 then return c:IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end end
function c88178020.tgop(e,tp,eg,ep,ev,re,r,rp) function c88178020.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_EXTRA)
if Duel.IsExistingMatchingCard(c88178020.tgfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(88178020,2)) then and Duel.IsExistingMatchingCard(c88178020.tgfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(88178020,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88178020.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c88178020.tgfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then if #g>0 then
Duel.SendtoHand(g,REASON_EFFECT,nil) Duel.SendtoHand(g,REASON_EFFECT,nil)
end end
end end
end end
end end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment