Commit fc2a8213 authored by Tachibana's avatar Tachibana

ybb

parent c31fb88d
...@@ -30,7 +30,7 @@ end ...@@ -30,7 +30,7 @@ end
function c17032290.spop(e,tp,eg,ep,ev,re,r,rp) function c17032290.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
if ft<=0 or not c:IsRelateToEffect(e) then return end if ft<=0 then return end
local sg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local sg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if sg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if sg:GetCount()>ft then if sg:GetCount()>ft then
......
...@@ -26,14 +26,22 @@ function cm.initial_effect(c) ...@@ -26,14 +26,22 @@ function cm.initial_effect(c)
e3:SetTargetRange(0xff,0xff) e3:SetTargetRange(0xff,0xff)
e3:SetValue(LOCATION_DECKBOT) e3:SetValue(LOCATION_DECKBOT)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c) local e4=e3:Clone()
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetCode(EFFECT_CANNOT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e4:SetTargetRange(0,LOCATION_DECK+LOCATION_EXTRA)
e3:SetCode(EVENT_LEAVE_FIELD) e4:SetTarget(function(e,c)
e3:SetCost(cm.co3) return c:GetOwner()~=e:GetHandlerPlayer() and (c:IsLocation(LOCATION_DECK)
e3:SetTarget(cm.tg3) or (c:IsLocation(LOCATION_EXTRA) and (c:GetOriginalType() & TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)~=0))
e3:SetOperation(cm.op3) end)
c:RegisterEffect(e3) c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCost(cm.co3)
e5:SetTarget(cm.tg3)
e5:SetOperation(cm.op3)
c:RegisterEffect(e5)
end end
--e1 --e1
function cm.tgf1(c,tp) function cm.tgf1(c,tp)
......
...@@ -38,7 +38,7 @@ function cm.tgf21(c,code) ...@@ -38,7 +38,7 @@ function cm.tgf21(c,code)
return c:IsAbleToHand() and c:IsCode(code) return c:IsAbleToHand() and c:IsCode(code)
end end
function cm.tgf2(c,tp) function cm.tgf2(c,tp)
return Duel.IsExistingMatchingCard(cm.tgf21,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c:GetCode()) return Duel.IsExistingMatchingCard(cm.tgf21,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c:GetCode()) and c:IsControler(tp)
end end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(cm.tgf2,nil,tp) local g=eg:Filter(cm.tgf2,nil,tp)
......
...@@ -17,15 +17,15 @@ function cm.initial_effect(c) ...@@ -17,15 +17,15 @@ function cm.initial_effect(c)
e2:SetOperation(cm.tdop) e2:SetOperation(cm.tdop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--disable summon --disable summon
local e2=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0) e3:SetTargetRange(1,0)
e2:SetCondition(cm.rmcon1) e3:SetCondition(cm.rmcon1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e4=e2:Clone() local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_SUMMON) e4:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not cm.global_check then if not cm.global_check then
......
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