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

vme50

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