Commit 3596f5e6 authored by mercury233's avatar mercury233

fix

parent 8d6ea06a
...@@ -72,7 +72,7 @@ end ...@@ -72,7 +72,7 @@ end
function c100268009.op(e,tp,eg,ep,ev,re,r,rp) function c100268009.op(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) then
if Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) then if Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
......
...@@ -29,7 +29,7 @@ function c101102001.cfilter(c,tp) ...@@ -29,7 +29,7 @@ function c101102001.cfilter(c,tp)
end end
function c101102001.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c101102001.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102001.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c101102001.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101102001,2)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM)
local c=Duel.SelectMatchingCard(tp,c101102001.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst() local c=Duel.SelectMatchingCard(tp,c101102001.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
c:RemoveOverlayCard(tp,1,1,REASON_COST) c:RemoveOverlayCard(tp,1,1,REASON_COST)
end end
......
...@@ -34,7 +34,7 @@ function c101102041.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,7 +34,7 @@ function c101102041.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c101102041.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101102041.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE):GetSum(Card.GetBaseAttack)>0 end if chk==0 then return Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()):GetSum(Card.GetBaseAttack)>0 end
end end
function c101102041.mgfilter(c) function c101102041.mgfilter(c)
return c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK) return c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK)
...@@ -44,30 +44,30 @@ function c101102041.tgfilter(c) ...@@ -44,30 +44,30 @@ function c101102041.tgfilter(c)
end end
function c101102041.operation(e,tp,eg,ep,ev,re,r,rp) function c101102041.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local atk=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE):GetSum(Card.GetBaseAttack) if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c) local atk=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,c):GetSum(Card.GetBaseAttack)
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(atk) e1:SetValue(atk)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local mg=c:GetOverlayGroup() local mg=c:GetOverlayGroup()
if mg:IsExists(c101102041.mgfilter,1,nil) then if mg:IsExists(c101102041.mgfilter,1,nil) then
local exc=aux.ExceptThisCard(e) local g=Duel.GetMatchingGroup(c101102041.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c)
local g=Duel.GetMatchingGroup(c101102041.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,exc) for tc in aux.Next(g) do
for tc in aux.Next(g) do local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE)
e1:SetCode(EFFECT_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e1)
tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e2)
tc:RegisterEffect(e2) end
end end
end end
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD) e0:SetType(EFFECT_TYPE_FIELD)
......
...@@ -35,19 +35,19 @@ end ...@@ -35,19 +35,19 @@ end
function c101102068.descfilter2(c) function c101102068.descfilter2(c)
return c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK) return c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK)
end end
function c101102068.descfilter(c,lg) function c101102068.descfilter(c,tp)
return c:IsSummonType(SUMMON_TYPE_XYZ) return c:IsSummonType(SUMMON_TYPE_XYZ) and c:GetSummonPlayer()==tp
and c:GetMaterial():IsExists(c101102068.descfilter2,1,nil) and c:GetMaterial():IsExists(c101102068.descfilter2,1,nil)
end end
function c101102068.descon(e,tp,eg,ep,ev,re,r,rp) function c101102068.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101102068.descfilter,1,nil,lg) return eg:IsExists(c101102068.descfilter,1,nil,tp)
end end
function c101102068.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101102068.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,PLAYER_ALL,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c101102068.desop(e,tp,eg,ep,ev,re,r,rp) function c101102068.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -23,22 +23,16 @@ function c101102069.cfilter(c,tp) ...@@ -23,22 +23,16 @@ function c101102069.cfilter(c,tp)
end end
function c101102069.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c101102069.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102069.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c101102069.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101102069,0)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM)
local c=Duel.SelectMatchingCard(tp,c101102069.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst() local c=Duel.SelectMatchingCard(tp,c101102069.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
local g2=c:GetOverlayGroup()
c:RemoveOverlayCard(tp,1,1,REASON_COST) c:RemoveOverlayCard(tp,1,1,REASON_COST)
local g3=c:GetOverlayGroup() local tc=Duel.GetOperatedGroup():GetFirst()
g2:Sub(g3)
local tc=g2:GetFirst()
if tc:IsSetCard(0xba) or tc:IsSetCard(0x10db) or tc:IsSetCard(0x2073) then if tc:IsSetCard(0xba) or tc:IsSetCard(0x10db) or tc:IsSetCard(0x2073) then
e:SetLabel(tc:GetBaseAttack()) e:SetLabel(1)
else else
e:SetLabel(0) e:SetLabel(0)
end end
end end
function c101102069.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xba) and c:IsType(TYPE_XYZ)
end
function c101102069.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101102069.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
...@@ -46,19 +40,21 @@ function c101102069.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -46,19 +40,21 @@ function c101102069.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end end
end end
function c101102069.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xba) and c:IsType(TYPE_XYZ)
end
function c101102069.operation(e,tp,eg,ep,ev,re,r,rp) function c101102069.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 and e:GetLabel()>0 then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 and e:GetLabel()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g=Duel.SelectMatchingCard(tp,c101102069.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c101102069.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g then local tc=g:GetFirst()
local tc=g:GetFirst() if 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_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(e:GetLabel()) e1:SetValue(eg:GetFirst():GetBaseAttack())
c:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
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