Commit 3596f5e6 authored by mercury233's avatar mercury233

fix

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