Commit 6ddde21c authored by POLYMER's avatar POLYMER

fix

parent c8f1fa25
--水精鳞-深渊海信使 --水精鳞-深渊海信使
local m=11451689 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--effect1 --effect1
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -35,7 +34,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +34,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(0) e:SetLabel(0)
local g=eg:Filter(cm.filter,nil) local g=eg:Filter(cm.filter,nil)
if #g>0 then if #g>0 then
if r&REASON_DISCARD>0 then e:SetLabel(1) end --if r&REASON_DISCARD>0 then e:SetLabel(1) end
return true return true
else else
return false return false
...@@ -45,11 +44,11 @@ function cm.spfilter(c,e,tp) ...@@ -45,11 +44,11 @@ function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.spfilter2(c,e,tp) function cm.spfilter2(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLocation(LOCATION_GRAVE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLocation(LOCATION_GRAVE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsReason(REASON_DISCARD)
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
if e:GetLabel()==1 then if e:GetLabel()==0 then
local g=eg:Filter(cm.spfilter2,nil,e,tp) local g=eg:Filter(cm.spfilter2,nil,e,tp)
return (Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) or #g>0) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 return (Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) or #g>0) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
else else
...@@ -66,7 +65,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +65,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g=eg:Filter(aux.NecroValleyFilter(cm.spfilter2),nil,e,tp) local g=eg:Filter(aux.NecroValleyFilter(cm.spfilter2),nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if e:GetLabel()==1 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then if e:GetLabel()==0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if #g>ft then g=g:Select(tp,ft,ft,nil) end if #g>ft then g=g:Select(tp,ft,ft,nil) end
......
...@@ -29,7 +29,8 @@ end ...@@ -29,7 +29,8 @@ end
function c13015710.tdrcost(e,tp,eg,ep,ev,re,r,rp,chk) function c13015710.tdrcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end if chk==0 then return not e:GetHandler():IsPublic() end
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.ShuffleHand(tp)
end end
function c13015710.thfil(c) function c13015710.thfil(c)
return c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xe01) and not c:IsCode(13015710) return c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xe01) and not c:IsCode(13015710)
...@@ -41,7 +42,7 @@ function c13015710.tdrtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,7 +42,7 @@ function c13015710.tdrtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c13015710.tdrop(e,tp,eg,ep,ev,re,r,rp) function c13015710.tdrop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT+REASON_DISCARD)
local g=Duel.GetMatchingGroup(c13015710.thfil,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c13015710.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
......
...@@ -27,7 +27,8 @@ function c13015711.initial_effect(c) ...@@ -27,7 +27,8 @@ function c13015711.initial_effect(c)
end end
function c13015711.tdrcost(e,tp,eg,ep,ev,re,r,rp,chk) function c13015711.tdrcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end if chk==0 then return not e:GetHandler():IsPublic() end
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.ShuffleHand(tp)
end end
function c13015711.tdrtg(e,tp,eg,ep,ev,re,r,rp,chk) function c13015711.tdrtg(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
...@@ -38,7 +39,7 @@ function c13015711.spfil(c,e,tp) ...@@ -38,7 +39,7 @@ function c13015711.spfil(c,e,tp)
end end
function c13015711.tdrop(e,tp,eg,ep,ev,re,r,rp) function c13015711.tdrop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -13,15 +13,7 @@ function c13015715.initial_effect(c) ...@@ -13,15 +13,7 @@ function c13015715.initial_effect(c)
c13015715.tdr_effect=e1 c13015715.tdr_effect=e1
c:RegisterEffect(e1) c:RegisterEffect(e1)
--splimit --splimit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetCountLimit(1,33015715)
e4:SetOperation(c13015715.op)
c:RegisterEffect(e4)
local e2=e4:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--draw --draw
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW) e3:SetCategory(CATEGORY_DRAW)
...@@ -50,7 +42,8 @@ local lv=c:GetLevel() ...@@ -50,7 +42,8 @@ local lv=c:GetLevel()
function c13015715.tdrcost(e,tp,eg,ep,ev,re,r,rp,chk) function c13015715.tdrcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end if chk==0 then return not e:GetHandler():IsPublic() end
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.ShuffleHand(tp)
end end
function c13015715.tdrtg(e,tp,eg,ep,ev,re,r,rp,chk) function c13015715.tdrtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) or Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsCanChangePosition() end,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) or Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) or Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsCanChangePosition() end,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) or Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
...@@ -64,7 +57,7 @@ return not (c:IsRace(RACE_AQUA) and c:IsAttribute(ATTRIBUTE_WATER)) ...@@ -64,7 +57,7 @@ return not (c:IsRace(RACE_AQUA) and c:IsAttribute(ATTRIBUTE_WATER))
end end
function c13015715.tdrop(e,tp,eg,ep,ev,re,r,rp) function c13015715.tdrop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT+REASON_DISCARD)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
...@@ -28,6 +28,9 @@ end ...@@ -28,6 +28,9 @@ end
function c13015724.tdrcost(e,tp,eg,ep,ev,re,r,rp,chk) function c13015724.tdrcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end if chk==0 then return not e:GetHandler():IsPublic() end
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.ShuffleHand(tp)
end end
function c13015724.setfil(c) function c13015724.setfil(c)
return c:IsSSetable() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0xe01) return c:IsSSetable() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0xe01)
...@@ -38,7 +41,7 @@ function c13015724.tdrtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,7 +41,7 @@ function c13015724.tdrtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c13015724.tdrop(e,tp,eg,ep,ev,re,r,rp) function c13015724.tdrop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT+REASON_DISCARD)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
...@@ -34,7 +34,7 @@ function cm.activate1(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,7 @@ function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local tp=eg:GetFirst():GetOwner() local tp=eg:GetFirst():GetOwner()
Duel.NegateSummon(eg) Duel.NegateSummon(eg)
if Duel.SendtoDeck(eg,nil,2,REASON_EFFECT)~=0 then if Duel.SendtoDeck(eg,nil,2,REASON_EFFECT)~=0 then
Debug.Message("1") --Debug.Message("1")
local bg=Duel.GetOperatedGroup() local bg=Duel.GetOperatedGroup()
local tbg=bg:Filter(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) local tbg=bg:Filter(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
local t=#tbg local t=#tbg
...@@ -44,7 +44,7 @@ function cm.activate1(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
ncode[i]=nc:GetCode() ncode[i]=nc:GetCode()
nc=tbg:GetNext() nc=tbg:GetNext()
end end
Debug.Message(t) --Debug.Message(t)
local csg=Duel.GetMatchingGroup(cm.fil,tp,LOCATION_DECK,0,nil,t,e,tp) local csg=Duel.GetMatchingGroup(cm.fil,tp,LOCATION_DECK,0,nil,t,e,tp)
local spg=csg:RandomSelect(tp,math.min(#csg,t)) local spg=csg:RandomSelect(tp,math.min(#csg,t))
Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP)
......
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