Commit b51cb932 authored by wind2009's avatar wind2009

Fix

parent 3481289d
Pipeline #42751 failed with stages
in 1 minute and 20 seconds
...@@ -73,6 +73,7 @@ function s.lvcon(e) ...@@ -73,6 +73,7 @@ function s.lvcon(e)
end end
function s.disfilter(c,tp,e) function s.disfilter(c,tp,e)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsSummonPlayer(1-tp) and c:IsCanBeEffectTarget(e) return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsSummonPlayer(1-tp) and c:IsCanBeEffectTarget(e)
and c:GetAttack()>0
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 eg:IsExists(aux.AND(Card.IsSummonPlayer,Card.IsFaceup),1,nil,1-tp) return eg:IsExists(aux.AND(Card.IsSummonPlayer,Card.IsFaceup),1,nil,1-tp)
...@@ -95,12 +96,13 @@ end ...@@ -95,12 +96,13 @@ end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local c=e:GetHandler() local c=e:GetHandler()
if tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER) and c:IsRelateToChain() and c:IsFaceup() then local atk=tc:GetAttack()
if tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER) and c:IsRelateToChain() and c:IsFaceup() and atk>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_DISABLE)
e1:SetValue(tc:GetAttack()) e1:SetValue(atk)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not c:IsHasEffect(EFFECT_REVERSE_UPDATE) then if not c:IsHasEffect(EFFECT_REVERSE_UPDATE) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
......
...@@ -65,9 +65,9 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,9 +65,9 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(ct) e:SetLabel(ct)
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsType(TYPE_SPELL+TYPE_TRAP) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
local ct=e:GetLabel() local ct=e:GetLabel()
if chkc then return chkc:IsOnField() and chkc:IsType(TYPE_SPELL+TYPE_TRAP) end
if chk==0 then return ct>0 and Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil,TYPE_SPELL+TYPE_TRAP) local tg=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,ct,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,ct,0,0)
......
...@@ -52,7 +52,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) if g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
......
...@@ -61,7 +61,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +61,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToChain() and c:IsFaceup() then if c:IsRelateToChain() and c:IsFaceup() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
...@@ -77,7 +77,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,7 +77,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local e4=e1:Clone() local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e4:SetDescription(aux.Stringid(id,1)) e4:SetDescription(aux.Stringid(id,1))
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......
...@@ -86,7 +86,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -86,7 +86,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then if tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER) 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