Commit 796caffe authored by VanillaSalt's avatar VanillaSalt

fix

parent 8a0f882e
......@@ -43,7 +43,7 @@ end
function c10875327.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK)
and (not re or re:GetHandler()~=c)
and (not re or re:GetOwner()~=c)
end
function c10875327.desfilter(c)
return c:IsFaceup() and c:IsDestructable()
......
......@@ -13,7 +13,7 @@ end
function c23639291.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return eg:GetCount()==1 and tc:IsControler(tp) and tc:GetPreviousControler()==tp and tc:IsReason(REASON_DESTROY)
and tc:GetReasonEffect() and tc:GetReasonEffect():GetHandler()==tc
and tc:GetReasonEffect() and tc:GetReasonEffect():GetOwner()==tc
end
function c23639291.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc==eg:GetFirst() end
......
......@@ -81,7 +81,7 @@ function c31111109.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
end
function c31111109.filter(c)
return (c:IsSetCard(0x9) or c:IsSetCard(0x1f) or c:IsSetCard(0x8)) and c:IsType(TYPE_MONSTER)
and not c:IsHasEffect(EFFECT_FORBIDDEN) and c:IsAbleToRemove()
and not c:IsForbidden() and c:IsAbleToRemove()
end
function c31111109.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c31111109.filter(chkc) end
......
......@@ -20,8 +20,16 @@ function c47121070.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x1034) end
end
function c47121070.tfop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x1034)
if g:GetCount()>0 then
......@@ -36,12 +44,4 @@ function c47121070.tfop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
Duel.RaiseEvent(tc,EVENT_CUSTOM+47408488,e,0,tp,0,0)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
......@@ -86,10 +86,10 @@ function c48770333.atkop(e,tp,eg,ep,ev,re,r,rp)
e3:SetCondition(c48770333.dircon)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetCondition(c48770333.atkcon2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_ATTACK)
e4:SetCondition(c48770333.atkcon2)
c:RegisterEffect(e4)
end
end
function c48770333.aclimit(e,re,tp)
......
......@@ -49,7 +49,7 @@ function c48948935.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function c48948935.filter(c)
return c:IsCode(22610082) and not c:IsHasEffect(EFFECT_FORBIDDEN)
return c:IsCode(22610082) and not c:IsForbidden()
end
function c48948935.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
......
......@@ -26,7 +26,7 @@ function c60668166.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c60668166.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct==0 then return end
if ct<=0 then return end
local g=Duel.GetMatchingGroup(c60668166.filter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 then
local t1=g:GetFirst()
......
......@@ -14,7 +14,7 @@ function c66127916.filter1(c,tp)
return c.material and Duel.IsExistingMatchingCard(c66127916.filter2,tp,LOCATION_DECK,0,1,nil,c)
end
function c66127916.filter2(c,fc)
if c:IsHasEffect(EFFECT_FORBIDDEN) or not c:IsAbleToHand() then return false end
if c:IsForbidden() or not c:IsAbleToHand() then return false end
return c:IsCode(table.unpack(fc.material))
end
function c66127916.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -11,5 +11,5 @@ function c67987302.initial_effect(c)
c:RegisterEffect(e1)
end
function c67987302.efilter(e,re,rp,c)
return re:GetHandler()==c
return re:GetOwner()==c
end
......@@ -13,7 +13,7 @@ function c75198893.initial_effect(c)
c:RegisterEffect(e1)
end
function c75198893.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_XYZ) and not c:IsHasEffect(EFFECT_FORBIDDEN)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_XYZ) and not c:IsForbidden()
end
function c75198893.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(1-tp) and c75198893.filter(chkc) end
......
......@@ -27,7 +27,7 @@ function c84451804.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,10456559)
if ft<ct then ct=ft end
if ct==0 then return end
if ct<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c84451804.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,ct,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
......
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