Commit 7465d3e8 authored by POLYMER's avatar POLYMER

fix

parent fd9440e9
......@@ -27,6 +27,7 @@ function cm.initial_effect(c)
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnCount()<=0 then return end
local tab={LOCATION_DECK,LOCATION_HAND,LOCATION_ONFIELD,LOCATION_GRAVE,LOCATION_REMOVED,LOCATION_EXTRA}
for i=1,6 do
local loc=tab[i]
......@@ -169,7 +170,7 @@ function cm.adop(e,tp,eg,ep,ev,re,r,rp)
if mc:IsLocation(LOCATION_MZONE) then
Duel.ReleaseRitualMaterial(mat)
else
Duel.Release(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL+REASON_RELEASE)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
......@@ -183,7 +184,7 @@ function cm.adop(e,tp,eg,ep,ev,re,r,rp)
if mc:IsLocation(LOCATION_MZONE) then
Duel.ReleaseRitualMaterial(mat)
else
Duel.Release(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL+REASON_RELEASE)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
......
......@@ -44,7 +44,7 @@ end
function c49811227.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c49811227.spfilter,tp,0,LOCATION_MZONE,1,nil,tp) and Duel.IsExistingMatchingCard(c49811224.spfilter2,tp,LOCATION_MZONE,0,1,nil)
return Duel.IsExistingMatchingCard(c49811227.spfilter,tp,0,LOCATION_MZONE,1,nil,tp) and Duel.IsExistingMatchingCard(c49811227.spfilter2,tp,LOCATION_MZONE,0,1,nil)
end
function c49811227.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
......
......@@ -89,6 +89,6 @@ end
function s.efilter(e,te)
return te:GetOwner()~=e:GetOwner() and te:IsActiveType(TYPE_MONSTER)
end
function s.effectfilter(e,ct)
function s.effectfilter(e,te)
return te:GetHandler()==e:GetHandler()
end
\ No newline at end of file
......@@ -19,6 +19,7 @@ function cm.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(cm.imtg)
e3:SetValue(1)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
......
......@@ -28,6 +28,7 @@ function cm.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(cm.imtg)
e3:SetValue(1)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
......
......@@ -60,10 +60,11 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.bsfil1,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local g=Duel.GetMatchingGroup(cm.bsfil1,tp,LOCATION_SZONE,0,nil)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
local tg=g:GetMinGroup(Card.GetAttack)
local cg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tg=cg:GetMinGroup(Card.GetAttack)
if tg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=tg:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY)
local sg=tg:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_RULE)
else Duel.Destroy(tg,REASON_RULE) end
......@@ -72,10 +73,11 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.bsfil2,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.filter2,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local g=Duel.GetMatchingGroup(cm.bsfil2,tp,LOCATION_SZONE,0,nil)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
local cg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tg=g:GetMinGroup(Card.GetDefense)
if tg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=tg:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY)
local sg=tg:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_RULE)
else Duel.Destroy(tg,REASON_RULE) end
......
......@@ -33,14 +33,12 @@ end
function c65840030.Target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c65840030.nbfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.SelectMatchingCard(tp,c65840030.nbfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c65840030.activate1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
if g:GetCount()~=0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
......
......@@ -19,6 +19,7 @@ function c98920551.initial_effect(c)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,98930551)
e3:SetCondition(c98920551.spcon)
e3:SetTarget(c98920551.sptg)
e3:SetOperation(c98920551.spop)
c:RegisterEffect(e3)
......@@ -81,4 +82,7 @@ function c98920551.spop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2,true)
end
end
function c98920551.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
\ No newline at end of file
......@@ -48,7 +48,7 @@ function c98920632.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c98920632.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c98920632.filter),tp,LOCATION_DECK,0,nil,e,tp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c98920632.spfilter),tp,LOCATION_DECK,0,nil,e,tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 or g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c98920632.fselect,false,2,2,tp)
......@@ -77,7 +77,7 @@ function c98920632.spop(e,tp,eg,ep,ev,re,r,rp)
if sg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local xyzg=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil,sg,2,2)
local tg=Duel.GetMatchingGroup(c98920632.synfilter,tp,LOCATION_EXTRA,0,nil,sg)
if xyzg:GetCount()>0 and (tg:GetCount()==0 or Duel.SelectOption(tp,1165,1164)==0) then
if xyzg:GetCount()>0 and Duel.SelectOption(tp,1165,1164)==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,sg)
......@@ -87,4 +87,15 @@ function c98920632.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SynchroSummon(tp,rg:GetFirst(),nil,og)
end
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c98920632.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c98920632.splimit(e,c)
return not c:IsRace(RACE_CYBERSE) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
......@@ -36,14 +36,14 @@ function c9910084.spcon1(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()==0 then return false end
local tg=g:GetMaxGroup(Card.GetAttack)
return tg:IsExists(Card.IsControler,1,nil,1-tp)
and not Duel.IsExistingMatchingCard(c9910084.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
and not Duel.IsEnvironment(9910059,tp) and not Duel.IsExistingMatchingCard(c9910084.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c9910084.spcon2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()==0 then return false end
local tg=g:GetMaxGroup(Card.GetAttack)
return tg:IsExists(Card.IsControler,1,nil,1-tp)
and Duel.IsExistingMatchingCard(c9910084.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
and (Duel.IsEnvironment(9910059,tp) or Duel.IsExistingMatchingCard(c9910084.cfilter,tp,LOCATION_ONFIELD,0,1,nil))
end
function c9910084.rfilter(c,tp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
......
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