Commit 6a818ac5 authored by TanakaKotoha's avatar TanakaKotoha

none

parent b61dae55
No preview for this file type
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
function c113212.initial_effect(c) function c113212.initial_effect(c)
--zone --zone
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(113212,2))
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -13,6 +14,7 @@ function c113212.initial_effect(c) ...@@ -13,6 +14,7 @@ function c113212.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(113212,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
...@@ -23,6 +25,18 @@ function c113212.initial_effect(c) ...@@ -23,6 +25,18 @@ function c113212.initial_effect(c)
e2:SetTarget(c113212.cttg1) e2:SetTarget(c113212.cttg1)
e2:SetOperation(c113212.ctop1) e2:SetOperation(c113212.ctop1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(113212,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetLabel(2)
e3:SetCountLimit(1,113212)
e3:SetCondition(c113212.ctcon2)
e3:SetTarget(c113212.cttg1)
e3:SetOperation(c113212.ctop1)
c:RegisterEffect(e3)
end end
function c113212.zotg(e,tp,eg,ep,ev,re,r,rp,chk) function c113212.zotg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,e:GetHandler(),0xcad) and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,e:GetHandler(),0xcad) and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
...@@ -42,6 +56,9 @@ function c113212.ctcon1(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,6 +56,9 @@ function c113212.ctcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE) return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE)
end end
function c113212.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,113225)~=0 and Duel.GetFlagEffect(tp,113222)==0
end
function c113212.filter1(c,e,tp) function c113212.filter1(c,e,tp)
local rk=c:GetRank() local rk=c:GetRank()
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ)
...@@ -57,6 +74,9 @@ function c113212.cttg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -57,6 +74,9 @@ function c113212.cttg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c113212.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(c113212.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c113212.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) Duel.SelectTarget(tp,c113212.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
if Duel.GetFlagEffect(tp,113225)~=0 and e:GetLabel()==2 then
Duel.RegisterFlagEffect(tp,113222,RESET_PHASE+PHASE_END,0,1)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c113212.upfil(c) function c113212.upfil(c)
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
function c113213.initial_effect(c) function c113213.initial_effect(c)
--sp --sp
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(113213,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
...@@ -11,6 +12,7 @@ function c113213.initial_effect(c) ...@@ -11,6 +12,7 @@ function c113213.initial_effect(c)
e1:SetOperation(c113213.spop) e1:SetOperation(c113213.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(113213,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
...@@ -21,6 +23,18 @@ function c113213.initial_effect(c) ...@@ -21,6 +23,18 @@ function c113213.initial_effect(c)
e2:SetTarget(c113213.cttg1) e2:SetTarget(c113213.cttg1)
e2:SetOperation(c113213.ctop1) e2:SetOperation(c113213.ctop1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(113213,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,013213)
e3:SetRange(LOCATION_MZONE)
e3:SetLabel(2)
e3:SetCondition(c113213.ctcon2)
e3:SetTarget(c113213.cttg1)
e3:SetOperation(c113213.ctop1)
c:RegisterEffect(e3)
end end
function c113213.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c113213.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
...@@ -60,6 +74,9 @@ end ...@@ -60,6 +74,9 @@ end
function c113213.ctcon1(e,tp,eg,ep,ev,re,r,rp) function c113213.ctcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c113213.cfilter,1,e:GetHandler()) return eg:IsExists(c113213.cfilter,1,e:GetHandler())
end end
function c113213.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,113225)~=0 and Duel.GetFlagEffect(tp,113222)==0
end
function c113213.xxfil(c) function c113213.xxfil(c)
return c:IsSetCard(0xcad) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsSSetable() return c:IsSetCard(0xcad) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end end
...@@ -67,6 +84,9 @@ function c113213.cttg1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -67,6 +84,9 @@ function c113213.cttg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c113213.xxfil,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c113213.xxfil,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c113213.xxfil,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c113213.xxfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
if Duel.GetFlagEffect(tp,113225)~=0 and e:GetLabel()==2 then
Duel.RegisterFlagEffect(tp,113222,RESET_PHASE+PHASE_END,0,1)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,0)
end end
function c113213.ctop1(e,tp,eg,ep,ev,re,r,rp) function c113213.ctop1(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -4,6 +4,7 @@ cm.name="疑问鲨鱼" ...@@ -4,6 +4,7 @@ cm.name="疑问鲨鱼"
function cm.initial_effect(c) function cm.initial_effect(c)
--dice --dice
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,3))
e1:SetCategory(CATEGORY_DICE+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_DICE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
...@@ -12,6 +13,7 @@ function cm.initial_effect(c) ...@@ -12,6 +13,7 @@ function cm.initial_effect(c)
e1:SetOperation(cm.dcop) e1:SetOperation(cm.dcop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
...@@ -22,6 +24,18 @@ function cm.initial_effect(c) ...@@ -22,6 +24,18 @@ function cm.initial_effect(c)
e2:SetTarget(cm.cttg1) e2:SetTarget(cm.cttg1)
e2:SetOperation(cm.ctop1) e2:SetOperation(cm.ctop1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,013215)
e3:SetRange(LOCATION_MZONE)
e3:SetLabel(2)
e3:SetCondition(cm.ctcon2)
e3:SetTarget(cm.cttg1)
e3:SetOperation(cm.ctop1)
c:RegisterEffect(e3)
end end
c113215.toss_dice=true c113215.toss_dice=true
function cm.splimit(e,c) function cm.splimit(e,c)
...@@ -89,10 +103,16 @@ end ...@@ -89,10 +103,16 @@ end
function cm.ctcon1(e,tp,eg,ep,ev,re,r,rp) function cm.ctcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,e:GetHandler(),tp) return eg:IsExists(cm.cfilter,1,e:GetHandler(),tp)
end end
function cm.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,113225)~=0 and Duel.GetFlagEffect(tp,113222)==0
end
function cm.cttg1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cttg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
if Duel.GetFlagEffect(tp,113225)~=0 and e:GetLabel()==2 then
Duel.RegisterFlagEffect(tp,113222,RESET_PHASE+PHASE_END,0,1)
end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function cm.ctop1(e,tp,eg,ep,ev,re,r,rp) function cm.ctop1(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -4,6 +4,7 @@ cm.name="伤心鲨鱼" ...@@ -4,6 +4,7 @@ cm.name="伤心鲨鱼"
function cm.initial_effect(c) function cm.initial_effect(c)
--zone --zone
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -15,6 +16,7 @@ function cm.initial_effect(c) ...@@ -15,6 +16,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--when move --when move
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
...@@ -25,6 +27,18 @@ function cm.initial_effect(c) ...@@ -25,6 +27,18 @@ function cm.initial_effect(c)
e2:SetTarget(cm.cttg1) e2:SetTarget(cm.cttg1)
e2:SetOperation(cm.ctop1) e2:SetOperation(cm.ctop1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,113219)
e3:SetRange(LOCATION_MZONE)
e3:SetLabel(2)
e3:SetCondition(cm.ctcon2)
e3:SetTarget(cm.cttg1)
e3:SetOperation(cm.ctop1)
c:RegisterEffect(e3)
end end
function cm.zotg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.zotg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0xcad) and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0xcad) and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
...@@ -46,6 +60,9 @@ end ...@@ -46,6 +60,9 @@ end
function cm.ctcon1(e,tp,eg,ep,ev,re,r,rp) function cm.ctcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,e:GetHandler(),tp) return eg:IsExists(cm.cfilter,1,e:GetHandler(),tp)
end end
function cm.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,113225)~=0 and Duel.GetFlagEffect(tp,113222)==0
end
function cm.splimit(e,c) function cm.splimit(e,c)
return not c:IsType(TYPE_XYZ) and not c:IsAttribute(ATTRIBUTE_WATER) return not c:IsType(TYPE_XYZ) and not c:IsAttribute(ATTRIBUTE_WATER)
end end
...@@ -54,6 +71,9 @@ function cm.spfilter(c,e,tp) ...@@ -54,6 +71,9 @@ function cm.spfilter(c,e,tp)
end end
function cm.cttg1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cttg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) end if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) end
if Duel.GetFlagEffect(tp,113225)~=0 and e:GetLabel()==2 then
Duel.RegisterFlagEffect(tp,113222,RESET_PHASE+PHASE_END,0,1)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function cm.ctop1(e,tp,eg,ep,ev,re,r,rp) function cm.ctop1(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -4,6 +4,7 @@ cm.name="鲨鱼娘Mio 农作系统-100%" ...@@ -4,6 +4,7 @@ cm.name="鲨鱼娘Mio 农作系统-100%"
function cm.initial_effect(c) function cm.initial_effect(c)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,3))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
...@@ -15,6 +16,7 @@ function cm.initial_effect(c) ...@@ -15,6 +16,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
...@@ -25,6 +27,18 @@ function cm.initial_effect(c) ...@@ -25,6 +27,18 @@ function cm.initial_effect(c)
e2:SetTarget(cm.cttg1) e2:SetTarget(cm.cttg1)
e2:SetOperation(cm.ctop1) e2:SetOperation(cm.ctop1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,013213)
e3:SetRange(LOCATION_MZONE)
e3:SetLabel(2)
e3:SetCondition(cm.ctcon2)
e3:SetTarget(cm.cttg1)
e3:SetOperation(cm.ctop1)
c:RegisterEffect(e3)
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsSetCard(0xcad) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() return c:IsSetCard(0xcad) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
...@@ -51,8 +65,14 @@ end ...@@ -51,8 +65,14 @@ end
function cm.ctcon1(e,tp,eg,ep,ev,re,r,rp) function cm.ctcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,e:GetHandler(),tp) return eg:IsExists(cm.cfilter,1,e:GetHandler(),tp)
end end
function cm.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,113225)~=0 and Duel.GetFlagEffect(tp,113222)==0
end
function cm.cttg1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cttg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
if Duel.GetFlagEffect(tp,113225)~=0 and e:GetLabel()==2 then
Duel.RegisterFlagEffect(tp,113222,RESET_PHASE+PHASE_END,0,1)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end end
function cm.ctop1(e,tp,eg,ep,ev,re,r,rp) function cm.ctop1(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -5,6 +5,7 @@ function cm.initial_effect(c) ...@@ -5,6 +5,7 @@ function cm.initial_effect(c)
--when move --when move
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_MOVE) e1:SetCode(EVENT_MOVE)
...@@ -17,8 +18,24 @@ function cm.initial_effect(c) ...@@ -17,8 +18,24 @@ function cm.initial_effect(c)
local e2=Effect.Clone(e1) local e2=Effect.Clone(e1)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1,113222)
e4:SetRange(LOCATION_HAND)
e4:SetLabel(2)
e4:SetCondition(cm.ctcon2)
e4:SetTarget(cm.cttg1)
e4:SetOperation(cm.ctop1)
c:RegisterEffect(e4)
local e5=Effect.Clone(e4)
e5:SetRange(LOCATION_GRAVE)
c:RegisterEffect(e5)
--Activate --Activate
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
...@@ -34,9 +51,15 @@ end ...@@ -34,9 +51,15 @@ end
function cm.ctcon1(e,tp,eg,ep,ev,re,r,rp) function cm.ctcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp) return eg:IsExists(cm.cfilter,1,nil,tp)
end end
function cm.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,113225)~=0 and Duel.GetFlagEffect(tp,113222)==0
end
function cm.cttg1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cttg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
if Duel.GetFlagEffect(tp,113225)~=0 and e:GetLabel()==2 then
Duel.RegisterFlagEffect(tp,113222,RESET_PHASE+PHASE_END,0,1)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.ctop1(e,tp,eg,ep,ev,re,r,rp) function cm.ctop1(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -75,6 +75,7 @@ function cm.thfilter(c,e,tp) ...@@ -75,6 +75,7 @@ function cm.thfilter(c,e,tp)
return c:IsRace(RACE_FAIRY) and c:IsLevelAbove(10) and c:IsAbleToHand() return c:IsRace(RACE_FAIRY) and c:IsLevelAbove(10) and c:IsAbleToHand()
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,2,nil) then return end if not Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,2,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local thg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,2,2,nil) local thg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,2,2,nil)
...@@ -92,7 +93,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,7 +93,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
e5:SetTarget(cm.distg) e5:SetTarget(cm.distg)
e5:SetLabelObject(sc) e5:SetLabelObject(sc)
Duel.RegisterEffect(e5,tp) Duel.RegisterEffect(e5,tp)
sc=g:GetNext() sc=og:GetNext()
end end
end end
end end
......
...@@ -187,7 +187,7 @@ function cm.dstg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -187,7 +187,7 @@ function cm.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp) function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg) Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT) Duel.SendtoDeck(eg,nil,2,REASON_EFFECT)
end end
function cm.toptarget(e,tp,eg,ep,ev,re,r,rp,chk) function cm.toptarget(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0) local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
......
...@@ -14,18 +14,6 @@ function c33502011.initial_effect(c) ...@@ -14,18 +14,6 @@ function c33502011.initial_effect(c)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetOperation(cm.drop) e2:SetOperation(cm.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local g=Group.CreateGroup()
g:KeepAlive()
e2:SetLabelObject(g)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_PUBLIC)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(0,LOCATION_HAND)
e3:SetCondition(cm.pubcon)
e3:SetTarget(cm.pubtg)
e3:SetLabelObject(g)
c:RegisterEffect(e3)
--e4=e2:Clone() --e4=e2:Clone()
--e4:SetCode(EVENT_TO_HAND) --e4:SetCode(EVENT_TO_HAND)
--c:RegisterEffect(e4) --c:RegisterEffect(e4)
...@@ -38,7 +26,6 @@ function c33502011.initial_effect(c) ...@@ -38,7 +26,6 @@ function c33502011.initial_effect(c)
e5:SetValue(cm.val) e5:SetValue(cm.val)
e5:SetCondition(cm.rdcon) e5:SetCondition(cm.rdcon)
e5:SetRange(LOCATION_SZONE) e5:SetRange(LOCATION_SZONE)
e5:SetLabelObject(g)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--indes --indes
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
...@@ -58,35 +45,27 @@ end ...@@ -58,35 +45,27 @@ end
cm.setname="Gmemories" cm.setname="Gmemories"
function cm.drop(e,tp,eg,ep,ev,re,r,rp) function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local pg=e:GetLabelObject()
if c:GetFlagEffect(m)==0 then
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,1)
pg:Clear()
end
local tc=eg:GetFirst() local tc=eg:GetFirst()
while tc do while tc do
pg:AddCard(tc)
tc:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD,0,1) tc:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD,0,1)
local e3=Effect.CreateEffect(tc)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_PUBLIC)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
tc=eg:GetNext() tc=eg:GetNext()
end end
end end
function cm.pubcon(e) function cm.sfilter(c,tp)
return e:GetHandler():GetFlagEffect(m)~=0 return c:IsPublic() and c:GetFlagEffect(m+1)>0 and c:GetOwner()==tp
end
function cm.pubtg(e,c)
return e:GetLabelObject():IsContains(c) and c:GetFlagEffect(m+1)~=0
end
function cm.sfilter(c,pg,tp)
return c:IsPublic() and pg:IsContains(c) and c:GetFlagEffect(m+1)>0 and c:GetOwner()==tp
end end
function cm.rdcon(e) function cm.rdcon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(cm.sfilter,tp,0,LOCATION_HAND,1,nil,e:GetLabelObject(),tp) return Duel.IsExistingMatchingCard(cm.sfilter,tp,0,LOCATION_HAND,1,nil,tp)
end end
function cm.val(e,re,dam,r,rp,rc) function cm.val(e,re,dam,r,rp,rc)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
local damg=dam-(500*Duel.GetMatchingGroupCount(cm.sfilter1,tp,0,LOCATION_HAND,nil,e:GetLabelObject(),tp)) local damg=dam-(500*Duel.GetMatchingGroupCount(cm.sfilter1,tp,0,LOCATION_HAND,nil,tp))
if damg<0 then damg=0 end if damg<0 then damg=0 end
return damg return damg
end end
......
...@@ -31,7 +31,6 @@ function cm.initial_effect(c) ...@@ -31,7 +31,6 @@ function cm.initial_effect(c)
e4:SetCode(EVENT_TO_GRAVE) e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m) e4:SetCountLimit(1,m)
e4:SetCondition(cm.spcon)
e4:SetTarget(cm.sptg) e4:SetTarget(cm.sptg)
e4:SetOperation(cm.spop) e4:SetOperation(cm.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -70,22 +69,19 @@ end ...@@ -70,22 +69,19 @@ end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x52c4) return c:IsFaceup() and c:IsSetCard(0x52c4)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.filter(c,e,sp) function cm.filter(c,e,sp)
return c:IsCode(75640050) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) return c:IsCode(75640050) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)==0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)>0 then return end if Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)>0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -31,7 +31,6 @@ function cm.initial_effect(c) ...@@ -31,7 +31,6 @@ function cm.initial_effect(c)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m) e3:SetCountLimit(1,m)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg) e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop) e3:SetOperation(cm.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -84,22 +83,19 @@ end ...@@ -84,22 +83,19 @@ end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x52c4) return c:IsFaceup() and c:IsSetCard(0x52c4)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.filter(c,e,sp) function cm.filter(c,e,sp)
return c:IsCode(75640050) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) return c:IsCode(75640050) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)==0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)>0 then return end if Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)>0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -32,7 +32,6 @@ function cm.initial_effect(c) ...@@ -32,7 +32,6 @@ function cm.initial_effect(c)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m) e3:SetCountLimit(1,m)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg) e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop) e3:SetOperation(cm.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -58,7 +57,7 @@ function cm.recop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +57,7 @@ function cm.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_DISEFFECT) e2:SetCode(EFFECT_CANNOT_DISEFFECT)
c:RegisterEffect(e2) Duel.RegisterEffect(e2,tp)
end end
function cm.effectfilter(e,ct) function cm.effectfilter(e,ct)
local p=e:GetHandler():GetControler() local p=e:GetHandler():GetControler()
...@@ -92,22 +91,19 @@ end ...@@ -92,22 +91,19 @@ end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x52c4) return c:IsFaceup() and c:IsSetCard(0x52c4)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.filter(c,e,sp) function cm.filter(c,e,sp)
return c:IsCode(75640050) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) return c:IsCode(75640050) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)==0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)>0 then return end if Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)>0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -21,7 +21,6 @@ function cm.initial_effect(c) ...@@ -21,7 +21,6 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -32,22 +31,19 @@ end ...@@ -32,22 +31,19 @@ end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x52c4) return c:IsFaceup() and c:IsSetCard(0x52c4)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.filter(c,e,tp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) return c:IsCode(75640050) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.filter(c,e,sp)
return c:IsCode(75640050) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)==0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)>0 then return end if Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)>0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -72,7 +72,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,7 +72,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
else else
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),4) local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),2)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if ft>0 then if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
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