Commit a9b8d694 authored by Uytrewq's avatar Uytrewq Committed by GitHub

fix (#2259)

parent 19652da8
...@@ -127,8 +127,7 @@ function c17760003.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -127,8 +127,7 @@ function c17760003.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c17760003.operation3(e,tp,eg,ep,ev,re,r,rp) function c17760003.operation3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and c17760003.filter3(tc) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
...@@ -27,7 +27,7 @@ function c27827903.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -27,7 +27,7 @@ function c27827903.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c27827903.desop(e,tp,eg,ep,ev,re,r,rp) function c27827903.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
...@@ -23,15 +23,15 @@ end ...@@ -23,15 +23,15 @@ end
function c38049541.costg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c38049541.costg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c38049541.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c38049541.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c38049541.filter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c38049541.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-g:GetFirst():GetAttribute())
e:SetLabel(att) e:SetLabel(att)
end end
function c38049541.cosop(e,tp,eg,ep,ev,re,r,rp) function c38049541.cosop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsControler(tp) and c38049541.filter(tc) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
......
...@@ -33,7 +33,7 @@ function c38528901.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -33,7 +33,7 @@ function c38528901.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c38528901.operation(e,tp,eg,ep,ev,re,r,rp) function c38528901.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Destroy(tc,REASON_EFFECT)~=0 then if tc:IsRelateToEffect(e) and c38528901.desfilter(tc) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c38528901.sfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c38528901.sfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -74,7 +74,7 @@ function c44877690.rettg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -74,7 +74,7 @@ function c44877690.rettg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c44877690.retop2(e,tp,eg,ep,ev,re,r,rp) function c44877690.retop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsControler(1-tp) and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
...@@ -116,8 +116,7 @@ function c52709508.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -116,8 +116,7 @@ function c52709508.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c52709508.spop(e,tp,eg,ep,ev,re,r,rp) function c52709508.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and tc:IsAttribute(ATTRIBUTE_LIGHT) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,tc)
end end
end end
...@@ -15,5 +15,5 @@ end ...@@ -15,5 +15,5 @@ end
function c53944920.ntcon(e,c,minc) function c53944920.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c53944920.ntfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c53944920.ntfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end end
...@@ -30,11 +30,13 @@ function c56511382.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -30,11 +30,13 @@ function c56511382.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,1,1-tp,g:GetFirst():GetLevel()*400) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,1,1-tp,g:GetFirst():GetLevel()*400)
end end
function c56511382.desfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp)
end
function c56511382.desop(e,tp,eg,ep,ev,re,r,rp) function c56511382.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local lv=tc:GetLevel() local lv=tc:GetLevel()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and c56511382.desfilter(tc,tp) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Damage(1-tp,lv*400,REASON_EFFECT) Duel.Damage(1-tp,lv*400,REASON_EFFECT)
end end
end end
...@@ -43,7 +43,7 @@ function c59546528.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -43,7 +43,7 @@ function c59546528.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end end
function c59546528.operation(e,tp,eg,ep,ev,re,r,rp) function c59546528.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetTargetsRelateToChain():Filter(Card.IsFacedown,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
......
...@@ -37,7 +37,7 @@ function c64990807.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -37,7 +37,7 @@ function c64990807.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c64990807.activate(e,tp,eg,ep,ev,re,r,rp) function c64990807.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c64990807.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c64990807.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
......
...@@ -34,7 +34,7 @@ end ...@@ -34,7 +34,7 @@ end
function c66165755.spop(e,tp,eg,ep,ev,re,r,rp) function c66165755.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if not tc:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end or not tc:IsRace(RACE_MACHINE) or not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local atk=tc:GetBaseAttack() local atk=tc:GetBaseAttack()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -25,10 +25,14 @@ function c70583986.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -25,10 +25,14 @@ function c70583986.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c70583986.filter,tp,LOCATION_ONFIELD,0,1,12,e:GetHandler()) local g=Duel.SelectTarget(tp,c70583986.filter,tp,LOCATION_ONFIELD,0,1,12,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end end
function c70583986.thfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp)
end
function c70583986.operation(e,tp,eg,ep,ev,re,r,rp) function c70583986.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local rg=tg:Filter(Card.IsRelateToEffect,nil,e) local tg=Duel.GetTargetsRelateToChain()
local rg=tg:Filter(c70583986.thfilter,nil,tp)
Duel.SendtoHand(rg,nil,REASON_EFFECT) Duel.SendtoHand(rg,nil,REASON_EFFECT)
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -26,7 +26,7 @@ function c82263578.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -26,7 +26,7 @@ function c82263578.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c82263578.activate(e,tp,eg,ep,ev,re,r,rp) function c82263578.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and tc:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
......
...@@ -40,7 +40,7 @@ function c93211836.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -40,7 +40,7 @@ function c93211836.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c93211836.operation(e,tp,eg,ep,ev,re,r,rp) function c93211836.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
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