Commit b291a7ad authored by VanillaSalt's avatar VanillaSalt

Merge pull request #901 from YuGiOhMoDDeR/patch-20

rename c22648577.lua to 72648577.lua
parents 63234eb2 c6628463
--DDDの人事権 --DDDの人事権
function c22648577.initial_effect(c) function c72648577.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c22648577.target) e1:SetTarget(c72648577.target)
e1:SetOperation(c22648577.operation) e1:SetOperation(c72648577.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c22648577.filter(c) function c72648577.filter(c)
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return false end if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return false end
if c:IsLocation(LOCATION_SZONE) then if c:IsLocation(LOCATION_SZONE) then
if c:GetSequence()<6 then return false end if c:GetSequence()<6 then return false end
elseif not c:IsType(TYPE_MONSTER) then return false end elseif not c:IsType(TYPE_MONSTER) then return false end
return c:IsSetCard(0xaf) and c:IsAbleToDeck() return c:IsSetCard(0xaf) and c:IsAbleToDeck()
end end
function c22648577.thfilter(c) function c72648577.thfilter(c)
return c:IsSetCard(0xaf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0xaf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c22648577.target(e,tp,eg,ep,ev,re,r,rp,chk) function c72648577.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22648577.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,0,3,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c72648577.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,0,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND)
end end
function c22648577.operation(e,tp,eg,ep,ev,re,r,rp) function c72648577.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22648577.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(c72648577.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,0,nil)
if g:GetCount()<3 then return end if g:GetCount()<3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,3,3,nil) local sg=g:Select(tp,3,3,nil)
local cg=sg:Filter(Card.IsLocation,nil,LOCATION_HAND) local cg=sg:Filter(Card.IsLocation,nil,LOCATION_HAND)
Duel.ConfirmCards(1-tp,cg) Duel.ConfirmCards(1-tp,cg)
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
local dg=Duel.GetMatchingGroup(c22648577.thfilter,tp,LOCATION_DECK,0,nil) local dg=Duel.GetMatchingGroup(c72648577.thfilter,tp,LOCATION_DECK,0,nil)
if dg:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(22648577,0)) then if dg:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(72648577,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=dg:Select(tp,2,2,nil) local tg=dg:Select(tp,2,2,nil)
......
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