Commit 6b3513c0 authored by Nemo Ma's avatar Nemo Ma

fix

parent 360c8295
...@@ -19,7 +19,7 @@ function c25000023.initial_effect(c) ...@@ -19,7 +19,7 @@ function c25000023.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0xfe,0xff) e1:SetTargetRange(0xfe,0xff)
e1:SetValue(LOCATION_REMOVED) e1:SetValue(LOCATION_REMOVED)
e1:SetTarget(c25000023.rmtg) e1:SetTarget(c25000023.rmtg2)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Damage --Damage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -49,7 +49,7 @@ end ...@@ -49,7 +49,7 @@ end
function c25000023.splimit(e,se,sp,st) function c25000023.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end end
function c25000023.rmtg(e,c) function c25000023.rmtg2(e,c)
return c:GetOwner()~=e:GetHandlerPlayer() return c:GetOwner()~=e:GetHandlerPlayer()
end end
function c25000023.filter(c,tp) function c25000023.filter(c,tp)
...@@ -78,19 +78,19 @@ function c25000023.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,19 +78,19 @@ function c25000023.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x17a0000) e1:SetReset(RESET_EVENT+0x17a0000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x17a0000) e2:SetReset(RESET_EVENT+0x17a0000)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
......
...@@ -13,17 +13,25 @@ function cm.initial_effect(c) ...@@ -13,17 +13,25 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
--e1:SetCountLimit(1,m) --e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon1) e1:SetCondition(cm.spcon1)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() --to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_RELEASE) e2:SetCode(EVENT_RELEASE)
--e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon2) e2:SetCondition(cm.spcon2)
c:RegisterEffect(e2) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--Destroy --Destroy
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1)) e4:SetDescription(aux.Stringid(m,1))
...@@ -50,20 +58,15 @@ function cm.spfilter(c,e,tp) ...@@ -50,20 +58,15 @@ function cm.spfilter(c,e,tp)
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 if chk==0 then
--local loc=LOCATION_MZONE return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,e:GetHandler())
-- if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then loc=LOCATION_MZONE end
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,0,0)
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 cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
-- local loc=LOCATION_MZONE
--if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then loc=LOCATION_MZONE end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,e:GetHandler())
if g:GetCount()>0 and Duel.Release(g,REASON_EFFECT)>0 then if g:GetCount()>0 and Duel.Release(g,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
......
...@@ -20,14 +20,6 @@ function cm.initial_effect(c) ...@@ -20,14 +20,6 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--fusion check
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(cm.matcon)
e2:SetOperation(cm.matop)
c:RegisterEffect(e2)
--special summon --special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2)) e3:SetDescription(aux.Stringid(m,2))
...@@ -42,14 +34,8 @@ function cm.initial_effect(c) ...@@ -42,14 +34,8 @@ function cm.initial_effect(c)
e3:SetOperation(cm.spop) e3:SetOperation(cm.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0xd6c0000,0,1)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp) function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0 return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function cm.cfilter2(c) function cm.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect() return c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect()
...@@ -60,7 +46,7 @@ end ...@@ -60,7 +46,7 @@ end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then if chk==0 then
local loc=LOCATION_MZONE local loc=LOCATION_MZONE+LOCATION_HAND
return Duel.IsExistingMatchingCard(cm.cfilter2,tp,loc,0,4,nil) return Duel.IsExistingMatchingCard(cm.cfilter2,tp,loc,0,4,nil)
and g:GetCount()>0 and g:GetCount()>0
end end
...@@ -73,13 +59,13 @@ function cm.chlimit(e,ep,tp) ...@@ -73,13 +59,13 @@ function cm.chlimit(e,ep,tp)
return tp==ep return tp==ep
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_MZONE local loc=LOCATION_MZONE+LOCATION_HAND
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=Duel.SelectMatchingCard(tp,cm.cfilter2,tp,loc,0,4,4,nil) local g1=Duel.SelectMatchingCard(tp,cm.cfilter2,tp,loc,0,4,4,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,nil) local g2=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,nil)
if g1:GetCount()>0 and Duel.Release(g1,REASON_EFFECT)>0 and g2:GetCount()>0 then if g1:GetCount()>0 and Duel.Release(g1,REASON_EFFECT)>0 and g2:GetCount()>0 then
Duel.SendtoGrave(g2,REASON_EFFECT) Duel.SendtoGrave(g2,REASON_EFFECT)
local sg=Duel.GetMatchingGroup(cm.sspfilter2,tp,LOCATION_DECK,0,nil,e,tp) local sg=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_DECK,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -14,7 +14,7 @@ function cm.initial_effect(c) ...@@ -14,7 +14,7 @@ function cm.initial_effect(c)
e2:SetDescription(aux.Stringid(m,0)) e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(cm.discon) --e2:SetCondition(cm.discon)
e2:SetTarget(cm.thtg) e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop) e2:SetOperation(cm.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
......
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