Commit d8984590 authored by VanillaSalt's avatar VanillaSalt

fix

parent da69f53b
...@@ -55,7 +55,7 @@ function c13032689.atkval(e,c) ...@@ -55,7 +55,7 @@ function c13032689.atkval(e,c)
return c:GetRank()*200 return c:GetRank()*200
end end
function c13032689.rcon(e,tp,eg,ep,ev,re,r,rp) function c13032689.rcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_COST)~=0 and re:GetHandler():IsType(TYPE_XYZ) return bit.band(r,REASON_COST)~=0 and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_XYZ)
and ep==e:GetOwnerPlayer() and e:GetHandler():GetEquipTarget()==re:GetHandler() and re:GetHandler():GetOverlayCount()>=ev-1 and ep==e:GetOwnerPlayer() and e:GetHandler():GetEquipTarget()==re:GetHandler() and re:GetHandler():GetOverlayCount()>=ev-1
end end
function c13032689.rop(e,tp,eg,ep,ev,re,r,rp) function c13032689.rop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -18,7 +18,7 @@ function c32999573.initial_effect(c) ...@@ -18,7 +18,7 @@ function c32999573.initial_effect(c)
end end
function c32999573.rcon(e,tp,eg,ep,ev,re,r,rp) function c32999573.rcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(32999573+ep)==0 return e:GetHandler():GetFlagEffect(32999573+ep)==0
and bit.band(r,REASON_COST)~=0 and re:GetHandler():IsType(TYPE_XYZ) and bit.band(r,REASON_COST)~=0 and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_XYZ)
and re:GetHandler():GetOverlayCount()>=ev-1 and re:GetHandler():GetOverlayCount()>=ev-1
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil)
end end
......
...@@ -16,8 +16,9 @@ function c55067058.initial_effect(c) ...@@ -16,8 +16,9 @@ function c55067058.initial_effect(c)
end end
c55067058.xyz_number=19 c55067058.xyz_number=19
function c55067058.rcon(e,tp,eg,ep,ev,re,r,rp) function c55067058.rcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_COST)~=0 and re:GetHandler():IsType(TYPE_XYZ) return bit.band(r,REASON_COST)~=0 and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_XYZ)
and ep==e:GetOwnerPlayer() and e:GetHandler():GetOverlayCount()>0 and re:GetHandler():GetOverlayCount()>=ev-1 and e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
and ep==e:GetOwnerPlayer() and re:GetHandler():GetOverlayCount()>=ev-1
end end
function c55067058.rop(e,tp,eg,ep,ev,re,r,rp) function c55067058.rop(e,tp,eg,ep,ev,re,r,rp)
local ct=bit.band(ev,0xffff) local ct=bit.band(ev,0xffff)
......
...@@ -214,11 +214,12 @@ end ...@@ -214,11 +214,12 @@ end
function Auxiliary.XyzCondition2(f,lv,minc,maxc,alterf,desc,op) function Auxiliary.XyzCondition2(f,lv,minc,maxc,alterf,desc,op)
return function(e,c,og) return function(e,c,og)
if c==nil then return true end if c==nil then return true end
local ft=Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE) local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft local ct=-ft
if minc<=ct then return false end if minc<=ct then return false end
if ct<1 and Duel.IsExistingMatchingCard(Auxiliary.XyzAlterFilter,c:GetControler(),LOCATION_MZONE,0,1,nil,alterf,c) if ct<1 and Duel.IsExistingMatchingCard(Auxiliary.XyzAlterFilter,tp,LOCATION_MZONE,0,1,nil,alterf,c)
and (not op or op(e,c:GetControler(),0)) then and (not op or op(e,tp,0)) then
return true return true
end end
return Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og) return Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og)
...@@ -235,9 +236,9 @@ function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op) ...@@ -235,9 +236,9 @@ function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op)
local b1=Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og) local b1=Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og)
local b2=ct<1 and Duel.IsExistingMatchingCard(Auxiliary.XyzAlterFilter,tp,LOCATION_MZONE,0,1,nil,alterf,c) local b2=ct<1 and Duel.IsExistingMatchingCard(Auxiliary.XyzAlterFilter,tp,LOCATION_MZONE,0,1,nil,alterf,c)
and (not op or op(e,tp,0)) and (not op or op(e,tp,0))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
if b2 and (not b1 or Duel.SelectYesNo(tp,desc)) then if b2 and (not b1 or Duel.SelectYesNo(tp,desc)) then
if op then op(e,tp,1) end if op then op(e,tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local mg=Duel.SelectMatchingCard(tp,Auxiliary.XyzAlterFilter,tp,LOCATION_MZONE,0,1,1,nil,alterf,c) local mg=Duel.SelectMatchingCard(tp,Auxiliary.XyzAlterFilter,tp,LOCATION_MZONE,0,1,1,nil,alterf,c)
local mg2=mg:GetFirst():GetOverlayGroup() local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then if mg2:GetCount()~=0 then
......
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