Commit f0bd706d authored by VanillaSalt's avatar VanillaSalt

fix

parent a1eba1a8
......@@ -51,7 +51,7 @@ function c286392.cfilter(c,ft,tp)
end
function c286392.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.CheckReleaseGroup(tp,c286392.cfilter,1,nil,ft,tp) end
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(tp,c286392.cfilter,1,nil,ft,tp) end
local g=Duel.SelectReleaseGroup(tp,c286392.cfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST)
end
......
......@@ -33,7 +33,7 @@ function c37267041.distg(e,c)
end
function c37267041.disop(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if tl==LOCATION_SZONE and re:IsActiveType(TYPE_SPELL) then
if bit.band(tl,LOCATION_SZONE)~=0 and re:IsActiveType(TYPE_SPELL) then
Duel.NegateEffect(ev)
end
end
......@@ -19,7 +19,7 @@ end
c55888045.xyz_number=106
function c55888045.negcon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return (loc==LOCATION_SZONE or loc==LOCATION_MZONE) and not e:GetHandler():IsStatus(STATUS_CHAINING)
return bit.band(loc,LOCATION_ONFIELD)~=0 and not e:GetHandler():IsStatus(STATUS_CHAINING)
and e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x48)
end
function c55888045.filter(c)
......
......@@ -35,7 +35,7 @@ function c61740673.distarget(e,c)
end
function c61740673.disoperation(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if tl==LOCATION_SZONE and re:IsActiveType(TYPE_SPELL) then
if bit.band(tl,LOCATION_SZONE)~=0 and re:IsActiveType(TYPE_SPELL) then
Duel.NegateEffect(ev)
end
end
......
......@@ -40,7 +40,8 @@ function c63767246.initial_effect(c)
end
c63767246.xyz_number=38
function c63767246.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_SZONE
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return bit.band(loc,LOCATION_SZONE)~=0
and re:IsActiveType(TYPE_SPELL) and Duel.IsChainDisablable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c63767246.distg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -19,7 +19,7 @@ function c69512157.initial_effect(c)
end
function c69512157.disop(e,tp,eg,ep,ev,re,r,rp)
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
if re:GetActiveType()==TYPE_PENDULUM+TYPE_SPELL and p~=tp and loc==LOCATION_SZONE then
if re:GetActiveType()==TYPE_PENDULUM+TYPE_SPELL and p~=tp and bit.band(loc,LOCATION_PZONE)~=0 then
Duel.NegateEffect(ev)
end
end
......@@ -29,10 +29,9 @@ function c69840739.initial_effect(c)
c:RegisterEffect(e2)
end
function c69840739.chcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return (re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE)
or ((rc:GetType()==TYPE_SPELL or rc:GetType()==TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE))
or ((re:GetActiveType()==TYPE_SPELL or re:GetActiveType()==TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function c69840739.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
......@@ -53,7 +53,7 @@ function c71983925.distg(e,c)
end
function c71983925.disop(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if tl==LOCATION_SZONE and re:IsActiveType(TYPE_SPELL) then
if bit.band(tl,LOCATION_SZONE)~=0 and re:IsActiveType(TYPE_SPELL) then
Duel.NegateEffect(ev)
end
end
......@@ -15,7 +15,7 @@ function c72648810.condition(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
local atype=re:GetActiveType()
return rp~=tp and (bit.band(atype,TYPE_PENDULUM+TYPE_MONSTER)==TYPE_PENDULUM+TYPE_MONSTER
or (atype==TYPE_PENDULUM+TYPE_SPELL and loc==LOCATION_SZONE and not re:IsHasType(EFFECT_TYPE_ACTIVATE)))
or (atype==TYPE_PENDULUM+TYPE_SPELL and bit.band(loc,LOCATION_PZONE)~=0 and not re:IsHasType(EFFECT_TYPE_ACTIVATE)))
and Duel.IsChainNegatable(ev)
end
function c72648810.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -51,7 +51,8 @@ function c72932673.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c72932673.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_SZONE
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return rp~=tp and bit.band(loc,LOCATION_SZONE)~=0
and re:IsActiveType(TYPE_SPELL) and Duel.IsChainDisablable(ev)
end
function c72932673.negop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -80,7 +80,7 @@ function c74841885.distg(e,c)
end
function c74841885.disop(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if tl==LOCATION_SZONE and re:IsActiveType(e:GetLabel()) then
if bit.band(tl,LOCATION_SZONE)~=0 and re:IsActiveType(e:GetLabel()) then
Duel.NegateEffect(ev)
end
end
......
......@@ -39,7 +39,7 @@ function c8102334.distg(e,c)
end
function c8102334.disop(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if tl==LOCATION_SZONE and re:IsActiveType(TYPE_FIELD) and tp~=rp then
if bit.band(tl,LOCATION_FZONE)~=0 and re:IsActiveType(TYPE_FIELD) and tp~=rp then
Duel.NegateEffect(ev)
end
end
......
......@@ -38,7 +38,8 @@ function c81254059.otop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function c81254059.costfilter(c,e,tp,ft)
return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and (ft>0 or c:GetSequence()<5)
return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
and Duel.IsExistingMatchingCard(c81254059.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetLevel())
end
function c81254059.spfilter(c,e,tp,lv)
......
......@@ -33,7 +33,7 @@ function c84636823.distg(e,c)
end
function c84636823.disop(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if tl==LOCATION_SZONE and re:IsActiveType(TYPE_SPELL) then
if bit.band(tl,LOCATION_SZONE)~=0 and re:IsActiveType(TYPE_SPELL) then
Duel.NegateEffect(ev)
end
end
......@@ -32,7 +32,7 @@ end
function c96474800.disop(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
local tpe=re:GetActiveType()
if tl==LOCATION_SZONE and bit.band(tpe,TYPE_SPELL)~=0 and bit.band(tpe,TYPE_EQUIP+TYPE_FIELD+TYPE_CONTINUOUS+TYPE_QUICKPLAY)~=0 then
if bit.band(tl,LOCATION_SZONE)~=0 and bit.band(tpe,TYPE_SPELL)~=0 and bit.band(tpe,TYPE_EQUIP+TYPE_FIELD+TYPE_CONTINUOUS+TYPE_QUICKPLAY)~=0 then
Duel.NegateEffect(ev)
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