Commit 0890da18 authored by VanillaSalt's avatar VanillaSalt

Merge pull request #665 from salix5/patch

fix
parents 3c794f51 602c1cdd
...@@ -38,7 +38,7 @@ end ...@@ -38,7 +38,7 @@ end
function c12744567.operation(e,tp,eg,ep,ev,re,r,rp) function c12744567.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local og=tc:GetOverlayGroup() local og=tc:GetOverlayGroup()
if og:GetCount()>0 then if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE) Duel.SendtoGrave(og,REASON_RULE)
......
...@@ -49,6 +49,5 @@ function c21785144.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,6 +49,5 @@ function c21785144.distg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end end
function c21785144.disop(e,tp,eg,ep,ev,re,r,rp) function c21785144.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,3,REASON_EFFECT) Duel.DiscardDeck(tp,3,REASON_EFFECT)
end end
...@@ -61,6 +61,5 @@ function c22624373.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,6 +61,5 @@ function c22624373.distg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end end
function c22624373.disop(e,tp,eg,ep,ev,re,r,rp) function c22624373.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,3,REASON_EFFECT) Duel.DiscardDeck(tp,3,REASON_EFFECT)
end end
...@@ -30,6 +30,8 @@ function c32339440.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,6 +30,8 @@ function c32339440.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c32339440.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c32339440.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT) Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT)
end end
end end
...@@ -77,6 +77,5 @@ function c40164421.distg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -77,6 +77,5 @@ function c40164421.distg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
end end
function c40164421.disop2(e,tp,eg,ep,ev,re,r,rp) function c40164421.disop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,2,REASON_EFFECT) Duel.DiscardDeck(tp,2,REASON_EFFECT)
end end
...@@ -41,6 +41,5 @@ function c44178886.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,6 +41,5 @@ function c44178886.distg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end end
function c44178886.disop(e,tp,eg,ep,ev,re,r,rp) function c44178886.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,3,REASON_EFFECT) Duel.DiscardDeck(tp,3,REASON_EFFECT)
end end
...@@ -81,6 +81,5 @@ function c4779823.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -81,6 +81,5 @@ function c4779823.distg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end end
function c4779823.disop(e,tp,eg,ep,ev,re,r,rp) function c4779823.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,3,REASON_EFFECT) Duel.DiscardDeck(tp,3,REASON_EFFECT)
end end
...@@ -37,9 +37,12 @@ function c50260683.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,9 +37,12 @@ function c50260683.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c50260683.filter(c)
return c:IsFaceup() and c:GetAttack()>0
end
function c50260683.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c50260683.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c50260683.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end end
...@@ -59,14 +62,14 @@ function c50260683.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,14 +62,14 @@ function c50260683.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x70) local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x70)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c50260683.filter(c) function c50260683.filter2(c)
return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack() and c:IsDestructable() return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack() and c:IsDestructable()
end end
function c50260683.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c50260683.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c50260683.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c50260683.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c50260683.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c50260683.filter2,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c50260683.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c50260683.filter2,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c50260683.desop(e,tp,eg,ep,ev,re,r,rp) function c50260683.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -72,6 +72,5 @@ function c57774843.target2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,6 +72,5 @@ function c57774843.target2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,4) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,4)
end end
function c57774843.operation2(e,tp,eg,ep,ev,re,r,rp) function c57774843.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,4,REASON_EFFECT) Duel.DiscardDeck(tp,4,REASON_EFFECT)
end end
...@@ -33,6 +33,5 @@ function c7183277.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,6 +33,5 @@ function c7183277.distg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
end end
function c7183277.disop(e,tp,eg,ep,ev,re,r,rp) function c7183277.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,2,REASON_EFFECT) Duel.DiscardDeck(tp,2,REASON_EFFECT)
end end
...@@ -15,9 +15,15 @@ function c74117290.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -15,9 +15,15 @@ function c74117290.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end end
function c74117290.activate(e,tp,eg,ep,ev,re,r,rp) function c74117290.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT) local h1=Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT) local h2=Duel.Draw(1-tp,1,REASON_EFFECT)
Duel.BreakEffect() if h1>0 or h2>0 then Duel.BreakEffect() end
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) if h1>0 then
Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
if h2>0 then
Duel.ShuffleHand(1-tp)
Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
end end
...@@ -58,6 +58,5 @@ function c77558536.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,6 +58,5 @@ function c77558536.distg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
end end
function c77558536.disop(e,tp,eg,ep,ev,re,r,rp) function c77558536.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,2,REASON_EFFECT) Duel.DiscardDeck(tp,2,REASON_EFFECT)
end end
...@@ -20,6 +20,7 @@ end ...@@ -20,6 +20,7 @@ end
function c79571449.activate(e,tp,eg,ep,ev,re,r,rp) function c79571449.activate(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)
if Duel.Draw(p,d,REASON_EFFECT)==3 then if Duel.Draw(p,d,REASON_EFFECT)==3 then
Duel.ShuffleHand(tp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.DiscardHand(tp,aux.TRUE,2,2,REASON_EFFECT+REASON_DISCARD) Duel.DiscardHand(tp,aux.TRUE,2,2,REASON_EFFECT+REASON_DISCARD)
end end
......
...@@ -54,6 +54,5 @@ function c95503687.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -54,6 +54,5 @@ function c95503687.distg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end end
function c95503687.disop(e,tp,eg,ep,ev,re,r,rp) function c95503687.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,3,REASON_EFFECT) Duel.DiscardDeck(tp,3,REASON_EFFECT)
end end
...@@ -34,6 +34,5 @@ function c96235275.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,6 +34,5 @@ function c96235275.distg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
end end
function c96235275.disop(e,tp,eg,ep,ev,re,r,rp) function c96235275.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,2,REASON_EFFECT) Duel.DiscardDeck(tp,2,REASON_EFFECT)
end end
...@@ -19,7 +19,7 @@ function c9748752.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -19,7 +19,7 @@ function c9748752.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
......
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