Commit 0890da18 authored by VanillaSalt's avatar VanillaSalt

Merge pull request #665 from salix5/patch

fix
parents 3c794f51 602c1cdd
......@@ -38,7 +38,7 @@ end
function c12744567.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
......
......@@ -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)
end
function c21785144.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
......@@ -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)
end
function c22624373.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
......@@ -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)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT)
end
end
......@@ -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)
end
function c40164421.disop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,2,REASON_EFFECT)
end
......@@ -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)
end
function c44178886.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
......@@ -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)
end
function c4779823.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
......@@ -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
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
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)
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.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
......@@ -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)
Duel.Release(g,REASON_COST)
end
function c50260683.filter(c)
function c50260683.filter2(c)
return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack() and c:IsDestructable()
end
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 chk==0 then return Duel.IsExistingTarget(c50260683.filter,tp,0,LOCATION_MZONE,1,nil) 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.filter2,tp,0,LOCATION_MZONE,1,nil) end
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)
end
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)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,4)
end
function c57774843.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,4,REASON_EFFECT)
end
......@@ -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)
end
function c7183277.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,2,REASON_EFFECT)
end
......@@ -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)
end
function c74117290.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
Duel.BreakEffect()
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
local h1=Duel.Draw(tp,1,REASON_EFFECT)
local h2=Duel.Draw(1-tp,1,REASON_EFFECT)
if h1>0 or h2>0 then Duel.BreakEffect() end
if h1>0 then
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
......@@ -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)
end
function c77558536.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,2,REASON_EFFECT)
end
......@@ -20,6 +20,7 @@ end
function c79571449.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==3 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,aux.TRUE,2,2,REASON_EFFECT+REASON_DISCARD)
end
......
......@@ -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)
end
function c95503687.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
......@@ -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)
end
function c96235275.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardDeck(tp,2,REASON_EFFECT)
end
......@@ -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 chk==0 then return true end
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()
if tc then
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