Commit 6ddde21c authored by POLYMER's avatar POLYMER

fix

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