Commit 508e83e7 authored by wind2009's avatar wind2009

Fix

parent 28e4c93a
No preview for this file type
...@@ -3,6 +3,7 @@ local s,id,o=GetID() ...@@ -3,6 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -108,13 +109,13 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -108,13 +109,13 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(s.eqfilter2,tp,LOCATION_DECK,0,1,nil,tp) end and Duel.IsExistingMatchingCard(s.eqfilter2,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then if tc:IsRelateToChain() and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.eqfilter2,tp,LOCATION_DECK,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,s.eqfilter2,tp,LOCATION_DECK,0,1,1,nil,tp)
local ec=g:GetFirst() local ec=g:GetFirst()
......
...@@ -73,7 +73,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +73,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
if rg and rg:GetCount()>0 then if rg and rg:GetCount()>0 then
Duel.HintSelection(rg) Duel.HintSelection(rg)
if Duel.SendtoHand(rg,nil,REASON_EFFECT)~=0 and rg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND+LOCATION_EXTRA) and tc:IsRelateToChain() if Duel.SendtoHand(rg,nil,REASON_EFFECT)~=0 and rg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND+LOCATION_EXTRA)
and tc:IsRelateToChain() and aux.NecroValleyFilter()(tc)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -20,7 +20,7 @@ function s.initial_effect(c) ...@@ -20,7 +20,7 @@ function s.initial_effect(c)
e2:SetTarget(s.drtg) e2:SetTarget(s.drtg)
e2:SetOperation(s.drop) e2:SetOperation(s.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--did --disable
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DISABLE) e3:SetCategory(CATEGORY_DISABLE)
...@@ -66,6 +66,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,6 +66,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
Duel.BreakEffect()
end end
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
...@@ -84,7 +85,7 @@ function s.atktg(e,c) ...@@ -84,7 +85,7 @@ function s.atktg(e,c)
return c:IsAttribute(ATTRIBUTE_WIND) return c:IsAttribute(ATTRIBUTE_WIND)
end end
function s.discon(e,tp,eg,ep,ev,re,r,rp) function s.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsCode(5318639) return re:IsActivated() and re:GetHandler():IsCode(5318639)
end end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
......
...@@ -33,19 +33,20 @@ end ...@@ -33,19 +33,20 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.GetTargetsRelateToChain():Filter(aux.NecroValleyFilter(),nil) local rg=Duel.GetTargetsRelateToChain():Filter(aux.NecroValleyFilter(),nil)
if #rg==0 then return end if #rg==0 then return end
local dg=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0 then
if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0 local dg=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
and dg:GetCount()>0 and Duel.IsPlayerCanDraw(tp,1) if dg:GetCount()>0 and Duel.IsPlayerCanDraw(tp,1)
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=dg:Select(tp,1,1,nil) local sg=dg:Select(tp,1,1,nil)
local dtc=sg:GetFirst() local dtc=sg:GetFirst()
if dtc then if dtc then
Duel.BreakEffect()
Duel.HintSelection(sg)
if Duel.SendtoDeck(dtc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and dtc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT) Duel.HintSelection(sg)
if Duel.SendtoDeck(dtc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and dtc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end end
end end
end end
......
...@@ -19,7 +19,7 @@ function s.spfilter(c,e,tp) ...@@ -19,7 +19,7 @@ function s.spfilter(c,e,tp)
and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil,c:GetAttack()) and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil,c:GetAttack())
end end
function s.tgfilter(c,atk) function s.tgfilter(c,atk)
return (c:IsSetCard(0x145) or c:IsLocation(LOCATION_EXTRA)) return (c:IsSetCard(0x145) or c:IsLocation(LOCATION_EXTRA)) and c:IsType(TYPE_MONSTER)
and c:IsAttackAbove(atk) and c:IsAbleToGrave() and c:IsAttackAbove(atk) and c:IsAbleToGrave()
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
...@@ -24,7 +24,7 @@ function s.initial_effect(c) ...@@ -24,7 +24,7 @@ function s.initial_effect(c)
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetLabel(0) e:SetLabel(0)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToHand() or chkc:IsAbleToExtra() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and (chkc:IsAbleToHand() or chkc:IsAbleToExtra()) end
if chk==0 then return Duel.IsExistingTarget(aux.OR(Card.IsAbleToHand,Card.IsAbleToExtra),tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.OR(Card.IsAbleToHand,Card.IsAbleToExtra),tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,aux.OR(Card.IsAbleToHand,Card.IsAbleToExtra),tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.OR(Card.IsAbleToHand,Card.IsAbleToExtra),tp,0,LOCATION_MZONE,1,1,nil)
......
...@@ -87,8 +87,7 @@ function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -87,8 +87,7 @@ function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.recop(e,tp,eg,ep,ev,re,r,rp) function s.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT) if Duel.Recover(p,d,REASON_EFFECT)>0 and rp==1-tp then
if rp==1-tp then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Recover(p,500,REASON_EFFECT) Duel.Recover(p,500,REASON_EFFECT)
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