Commit 7d3d2a41 authored by Chen Bill's avatar Chen Bill

update Auxiliary.IsCanBeQuickEffect

parent 311364bc
...@@ -21,10 +21,10 @@ function c21441617.initial_effect(c) ...@@ -21,10 +21,10 @@ function c21441617.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c21441617.spcon1(e,tp,eg,ep,ev,re,r,rp) function c21441617.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not aux.IsCanbeQuickEffect(e:GetHandler(),tp,90351981,0x11b) return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c21441617.spcon2(e,tp,eg,ep,ev,re,r,rp) function c21441617.spcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.IsCanbeQuickEffect(e:GetHandler(),tp,90351981,0x11b) return aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c21441617.spfilter(c,e,tp) function c21441617.spfilter(c,e,tp)
return c:IsSetCard(0x11b) and not c:IsCode(21441617) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x11b) and not c:IsCode(21441617) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -48,11 +48,11 @@ function c23756165.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,11 +48,11 @@ function c23756165.regop(e,tp,eg,ep,ev,re,r,rp)
end end
function c23756165.eqcon1(e,tp,eg,ep,ev,re,r,rp) function c23756165.eqcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and not aux.IsCanbeQuickEffect(c,tp,95937545,0x3) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and not aux.IsCanBeQuickEffect(c,tp,95937545)
end end
function c23756165.eqcon2(e,tp,eg,ep,ev,re,r,rp) function c23756165.eqcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and aux.IsCanbeQuickEffect(c,tp,95937545,0x3) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and aux.IsCanBeQuickEffect(c,tp,95937545)
end end
function c23756165.filter(c) function c23756165.filter(c)
return c:IsLevelBelow(5) and c:IsFaceup() and c:IsAbleToChangeControler() return c:IsLevelBelow(5) and c:IsFaceup() and c:IsAbleToChangeControler()
......
...@@ -37,10 +37,10 @@ function c30741503.indcon(e) ...@@ -37,10 +37,10 @@ function c30741503.indcon(e)
return e:GetHandler():IsLinkState() return e:GetHandler():IsLinkState()
end end
function c30741503.tdcon1(e,tp,eg,ep,ev,re,r,rp) function c30741503.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not aux.IsCanbeQuickEffect(e:GetHandler(),tp,90351981,0x11b) return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c30741503.tdcon2(e,tp,eg,ep,ev,re,r,rp) function c30741503.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.IsCanbeQuickEffect(e:GetHandler(),tp,90351981,0x11b) return aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c30741503.tdfilter(c) function c30741503.tdfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAbleToDeck() return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAbleToDeck()
......
...@@ -42,10 +42,10 @@ function c3134857.indcon(e) ...@@ -42,10 +42,10 @@ function c3134857.indcon(e)
return e:GetHandler():IsLinkState() return e:GetHandler():IsLinkState()
end end
function c3134857.tdcon1(e,tp,eg,ep,ev,re,r,rp) function c3134857.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not aux.IsCanbeQuickEffect(e:GetHandler(),tp,90351981,0x11b) return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c3134857.tdcon2(e,tp,eg,ep,ev,re,r,rp) function c3134857.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon(e,tp,eg,ep,ev,re,r,rp) and aux.IsCanbeQuickEffect(e:GetHandler(),tp,90351981,0x11b) return aux.dscon(e,tp,eg,ep,ev,re,r,rp) and aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c3134857.tdfilter(c) function c3134857.tdfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAbleToDeck() return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAbleToDeck()
......
...@@ -29,10 +29,10 @@ function c4055337.indval(e,c) ...@@ -29,10 +29,10 @@ function c4055337.indval(e,c)
return c:IsType(TYPE_LINK) return c:IsType(TYPE_LINK)
end end
function c4055337.atkcon1(e,tp,eg,ep,ev,re,r,rp) function c4055337.atkcon1(e,tp,eg,ep,ev,re,r,rp)
return not aux.IsCanbeQuickEffect(e:GetHandler(),tp,90351981,0x11b) return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c4055337.atkcon2(e,tp,eg,ep,ev,re,r,rp) function c4055337.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon(e,tp,eg,ep,ev,re,r,rp) and aux.IsCanbeQuickEffect(e:GetHandler(),tp,90351981,0x11b) return aux.dscon(e,tp,eg,ep,ev,re,r,rp) and aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c4055337.tgfilter(c) function c4055337.tgfilter(c)
return c:IsFaceup() return c:IsFaceup()
......
...@@ -36,11 +36,11 @@ function c50140163.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,11 +36,11 @@ function c50140163.regop(e,tp,eg,ep,ev,re,r,rp)
end end
function c50140163.eqcon1(e,tp,eg,ep,ev,re,r,rp) function c50140163.eqcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and not aux.IsCanbeQuickEffect(c,tp,95937545,0x3) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and not aux.IsCanBeQuickEffect(c,tp,95937545)
end end
function c50140163.eqcon2(e,tp,eg,ep,ev,re,r,rp) function c50140163.eqcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and aux.IsCanbeQuickEffect(c,tp,95937545,0x3) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and aux.IsCanBeQuickEffect(c,tp,95937545)
end end
function c50140163.filter(c) function c50140163.filter(c)
return c:IsAbleToChangeControler() return c:IsAbleToChangeControler()
......
...@@ -20,10 +20,10 @@ function c57835716.initial_effect(c) ...@@ -20,10 +20,10 @@ function c57835716.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c57835716.spcon1(e,tp,eg,ep,ev,re,r,rp) function c57835716.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not aux.IsCanbeQuickEffect(e:GetHandler(),tp,90351981,0x11b) return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c57835716.spcon2(e,tp,eg,ep,ev,re,r,rp) function c57835716.spcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.IsCanbeQuickEffect(e:GetHandler(),tp,90351981,0x11b) return aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c57835716.spfilter(c,e,tp) function c57835716.spfilter(c,e,tp)
return c:IsSetCard(0x11b) and not c:IsCode(57835716) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x11b) and not c:IsCode(57835716) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -39,10 +39,10 @@ function c76145142.indcon(e) ...@@ -39,10 +39,10 @@ function c76145142.indcon(e)
return e:GetHandler():IsLinkState() return e:GetHandler():IsLinkState()
end end
function c76145142.tdcon1(e,tp,eg,ep,ev,re,r,rp) function c76145142.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not aux.IsCanbeQuickEffect(e:GetHandler(),tp,90351981,0x11b) return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c76145142.tdcon2(e,tp,eg,ep,ev,re,r,rp) function c76145142.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.IsCanbeQuickEffect(e:GetHandler(),tp,90351981,0x11b) return aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c76145142.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) function c76145142.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
......
...@@ -35,11 +35,11 @@ end ...@@ -35,11 +35,11 @@ end
c87257460.lvup={23756165} c87257460.lvup={23756165}
function c87257460.eqcon1(e,tp,eg,ep,ev,re,r,rp) function c87257460.eqcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and not aux.IsCanbeQuickEffect(c,tp,95937545,0x3) return not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and not aux.IsCanBeQuickEffect(c,tp,95937545)
end end
function c87257460.eqcon2(e,tp,eg,ep,ev,re,r,rp) function c87257460.eqcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and aux.IsCanbeQuickEffect(c,tp,95937545,0x3) return not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and aux.IsCanBeQuickEffect(c,tp,95937545)
end end
function c87257460.filter(c) function c87257460.filter(c)
return c:IsLevelBelow(3) and c:IsFaceup() and c:IsAbleToChangeControler() return c:IsLevelBelow(3) and c:IsFaceup() and c:IsAbleToChangeControler()
......
...@@ -20,10 +20,10 @@ function c94046012.initial_effect(c) ...@@ -20,10 +20,10 @@ function c94046012.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c94046012.spcon1(e,tp,eg,ep,ev,re,r,rp) function c94046012.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not aux.IsCanbeQuickEffect(e:GetHandler(),tp,90351981,0x11b) return not aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c94046012.spcon2(e,tp,eg,ep,ev,re,r,rp) function c94046012.spcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.IsCanbeQuickEffect(e:GetHandler(),tp,90351981,0x11b) return aux.IsCanBeQuickEffect(e:GetHandler(),tp,90351981)
end end
function c94046012.spfilter(c,e,tp) function c94046012.spfilter(c,e,tp)
return c:IsSetCard(0x11b) and not c:IsCode(94046012) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x11b) and not c:IsCode(94046012) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -1646,12 +1646,29 @@ end ...@@ -1646,12 +1646,29 @@ end
function Auxiliary.IsSelfEquip(c,id) function Auxiliary.IsSelfEquip(c,id)
return c:GetEquipGroup():IsExists(Card.GetFlagEffect,1,nil,id) return c:GetEquipGroup():IsExists(Card.GetFlagEffect,1,nil,id)
end end
---Orcustrated Babel
---@param c Card
---@return boolean
function Auxiliary.OrcustratedBabelFilter(c)
return c:IsOriginalSetCard(0x11b) and
(c:IsLocation(LOCATION_MZONE) and c:IsAllTypes(TYPE_LINK+TYPE_MONSTER) or c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER))
end
---Golden Allure Queen
---@param c Card
---@return boolean
function Auxiliary.GoldenAllureQueenFilter(c)
return c:IsOriginalSetCard(0x3)
end
--The table of all "become quick effects"
Auxiliary.quick_effect_filter={}
Auxiliary.quick_effect_filter[90351981]=Auxiliary.OrcustratedBabelFilter
Auxiliary.quick_effect_filter[95937545]=Auxiliary.GoldenAllureQueenFilter
---Check if the effect of c becomes a Quick Effect. ---Check if the effect of c becomes a Quick Effect.
---@param c Card ---@param c Card
---@param tp integer ---@param tp integer
---@param code integer ---@param code integer
---@param setname integer
---@return boolean ---@return boolean
function Auxiliary.IsCanbeQuickEffect(c,tp,code,setname) function Auxiliary.IsCanBeQuickEffect(c,tp,code)
return Duel.IsPlayerAffectedByEffect(tp,code) and c:IsOriginalSetCard(setname) local filter=Auxiliary.quick_effect_filter[code]
return Duel.IsPlayerAffectedByEffect(tp,code)~=nil and filter~=nil and filter(c)
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