Commit 39d30c0e authored by wind2009's avatar wind2009

Fix

parent 4b7017a8
No preview for this file type
......@@ -45,7 +45,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsChainDisablable(ev) and not Duel.IsChainDisabled(ev)
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectEffectYesNo(tp,e:GetHandler()) then
if Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,3)) then
Duel.Hint(HINT_CARD,0,id)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
if Duel.NegateEffect(ev) then
......
......@@ -9,7 +9,7 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
......@@ -58,7 +58,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.rthfilter(c)
return c:IsFaceupEx() and c:IsSetCard(0x162) and c:IsAbleToHand() and not c:IsCode(id)
return c:IsFaceupEx() and c:IsSetCard(0x162) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and s.rthfilter(chkc) end
......@@ -113,7 +113,7 @@ function s.thcon3(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter2,1,nil,tp)
end
function s.thfilter2(c)
return c:IsFaceupEx() and not c:IsCode(id) and c:IsSetCard(0x162) and c:IsAbleToHand()
return c:IsFaceupEx() and c:IsSetCard(0x162) and c:IsAbleToHand()
end
function s.thtg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil) end
......@@ -121,7 +121,7 @@ function s.thtg3(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.thop3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
......@@ -12,7 +12,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
end
function s.thfilter(c)
return c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:IsAbleToGrave()
return c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function s.gcheck(g)
return g:GetClassCount(Card.GetCurrentScale)==2
......@@ -21,13 +21,16 @@ function s.spfilter(c,e,tp)
return c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
local b1=g:CheckSubGroup(s.gcheck,2,2)
and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c,REASON_EFFECT)
and (not e:IsCostChecked()
or Duel.GetFlagEffect(tp,id)==0)
local b2=Duel.GetFlagEffect(tp,id+o)==0 and Duel.GetFlagEffect(tp,id+o*3)==0
local b3=Duel.IsPlayerAffectedByEffect(tp,59822133)
local b2=Duel.GetFlagEffect(tp,id+o*3)==0
and (not e:IsCostChecked()
or Duel.GetFlagEffect(tp,id+o)==0)
local b3=not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_PZONE,0,2,nil,e,tp)
and (not e:IsCostChecked()
......@@ -43,20 +46,20 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(op)
if op==1 then
if e:IsCostChecked() then
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e:SetCategory(CATEGORY_HANDES|CATEGORY_SEARCH|CATEGORY_TOHAND|CATEGORY_SPECIAL_SUMMON)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
elseif op==2 then
if e:IsCostChecked() then
Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END,0,1)
e:SetCategory(0)
Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END,0,1)
end
elseif op==3 then
if e:IsCostChecked() then
Duel.RegisterFlagEffect(tp,id+o*2,RESET_PHASE+PHASE_END,0,1)
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.RegisterFlagEffect(tp,id+o*2,RESET_PHASE+PHASE_END,0,1)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_PZONE)
end
......@@ -67,13 +70,14 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()==1 then
if Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end
if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil,REASON_EFFECT)==0 then return end
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
if #g>0 then
if #g>0 and g:CheckSubGroup(s.gcheck,2,2) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:SelectSubGroup(tp,s.gcheck,false,2,2)
if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
local ag=g:SelectSubGroup(tp,s.gcheck,false,2,2)
if ag then
Duel.SendtoHand(ag,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,ag)
local dt=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_MZONE,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
......@@ -84,6 +88,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_HAND,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......
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