Commit e3dde512 authored by 聖園ミカ's avatar 聖園ミカ 🐟

vme50

parent 9d2b8915
......@@ -59,11 +59,11 @@ function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,47320210) then return false end
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,1,nil) or Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return false end
if c:IsLocation(LOCATION_HAND) then return true end
local g=Duel.GetDecktopGroup(tp,1)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsFaceup() and g:IsContains(c)
return c:IsFaceup() and g:IsContains(c)
end
function s.spsummon2(c)
local e1=Effect.CreateEffect(c)
......@@ -89,6 +89,14 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.spop(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(s.splimit)
Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
......@@ -98,14 +106,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,e:GetHandler())
end
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(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_WATER)
......
......@@ -60,10 +60,11 @@ function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,47320210) then return false end
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,1,nil) or Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return false end
if c:IsLocation(LOCATION_HAND) then return true end
local g=Duel.GetDecktopGroup(tp,1)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsFaceup() and g:IsContains(c)
return c:IsFaceup() and g:IsContains(c)
end
function s.destory(c)
local e1=Effect.CreateEffect(c)
......
......@@ -60,10 +60,11 @@ function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,47320210) then return false end
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,1,nil) or Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return false end
if c:IsLocation(LOCATION_HAND) then return true end
local g=Duel.GetDecktopGroup(tp,1)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsFaceup() and g:IsContains(c)
return c:IsFaceup() and g:IsContains(c)
end
function s.spsummon2(c)
local e1=Effect.CreateEffect(c)
......@@ -129,6 +130,14 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function s.spop2(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(s.splimit)
Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCountFromEx(tp)<1 then return end
if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0
and e:GetLabel()==1 and Duel.IsPlayerCanDraw(tp,1) then
......@@ -136,6 +145,9 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
function s.initial_effect(c)
s.peff(c)
s.spsummon(c)
......
--警戒地带·周子
function c81040016.initial_effect(c)
local m=81040015
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--tograve
local e1=Effect.CreateEffect(c)
......@@ -8,58 +11,56 @@ function c81040016.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_REMOVE)
e1:SetCountLimit(1,81040016)
e1:SetCondition(c81040016.tgcon)
e1:SetTarget(c81040016.tgtg)
e1:SetOperation(c81040016.tgop)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.tgcon)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,81040916)
e2:SetCondition(c81040016.thcon)
e2:SetTarget(c81040016.thtg)
e2:SetOperation(c81040016.thop)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.rgcon)
e2:SetTarget(cm.rgtg)
e2:SetOperation(cm.rgop)
c:RegisterEffect(e2)
end
function c81040016.cfilter(c,tp)
function cm.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp and c:IsSetCard(0x81c) and c:IsType(TYPE_MONSTER)
end
function c81040016.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c81040016.cfilter,1,nil,tp)
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function c81040016.tgfilter(c)
return c:IsAbleToGrave()
end
function c81040016.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81040016.tgfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_REMOVED)
end
function c81040016.tgop(e,tp,eg,ep,ev,re,r,rp)
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c81040016.tgfilter),tp,LOCATION_REMOVED,LOCATION_REMOVED,1,3,nil)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,3,nil)
if #g>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
function c81040016.thcon(e,tp,eg,ep,ev,re,r,rp)
function cm.rgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE)
end
function c81040016.thfilter(c)
return c:IsSetCard(0x81c) and c:IsAbleToHand() and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode())
function cm.rgfilter(c)
return not c:IsCode(m)
end
function c81040016.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81040016.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
function cm.rgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and cm.rgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.rgfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
local g=Duel.SelectTarget(tp,cm.rgfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c81040016.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c81040016.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
function cm.rgop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
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