Commit 9df625b2 authored by nanahira's avatar nanahira

new cards YCPC

parent bbebd185
--農園からの配送
function c27001740.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c27001740.condition)
e1:SetTarget(c27001740.target)
e1:SetOperation(c27001740.activate)
c:RegisterEffect(e1)
end
function c27001740.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL)
end
function c27001740.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c27001740.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c27001740.filter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsAbleToDeck()
end
function c27001740.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVE) and chkc:IsControler(tp) and c27001740.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c27001740.filter,tp,LOCATION_REMOVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c27001740.filter,tp,LOCATION_REMOVE,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c27001740.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
--魂の開封
function c90506641.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c90506641.condition)
e1:SetTarget(c90506641.target)
e1:SetOperation(c90506641.activate)
c:RegisterEffect(e1)
end
function c90506641.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL)
end
function c90506641.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c90506641.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c90506641.filter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToHand()
end
function c90506641.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,30459350)
and Duel.IsExistingMatchingCard(c90506641.filter,tp,LOCATION_DECK,0,5,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c90506641.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,30459350) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(90506641,0))
local g=Duel.SelectMatchingCard(tp,c90506641.filter,tp,LOCATION_DECK,0,5,5,nil)
if g:GetCount()<5 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
g:Sub(sg)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
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