Commit 2e535eb9 authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

fix equipped effect (#1852)

parent 87a9eaa0
...@@ -102,7 +102,8 @@ function c14457896.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,7 +102,8 @@ function c14457896.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
function c14457896.spcon(e,tp,eg,ep,ev,re,r,rp) function c14457896.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_SZONE) local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousEquipTarget()
end end
function c14457896.spfilter(c,e,tp) function c14457896.spfilter(c,e,tp)
return c:IsRace(RACE_INSECT) and c:IsLevelAbove(7) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsRace(RACE_INSECT) and c:IsLevelAbove(7) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
......
...@@ -13,7 +13,7 @@ function c168917.initial_effect(c) ...@@ -13,7 +13,7 @@ function c168917.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c168917.filter(c,e,tp) function c168917.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x30) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsFaceup() and c:GetEquipTarget() and c:IsSetCard(0x30) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c168917.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c168917.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c168917.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c168917.filter(chkc,e,tp) end
......
...@@ -59,7 +59,7 @@ end ...@@ -59,7 +59,7 @@ end
function c19190082.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c19190082.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(19190082)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return c:GetFlagEffect(19190082)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(19190082,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(19190082,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -71,7 +71,8 @@ function c19748583.eqlimit(e,c) ...@@ -71,7 +71,8 @@ function c19748583.eqlimit(e,c)
end end
function c19748583.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c19748583.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and c:GetEquipTarget():IsAttribute(ATTRIBUTE_LIGHT) local tc=c:GetEquipTarget()
if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and tc and tc:IsAttribute(ATTRIBUTE_LIGHT)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectEffectYesNo(e:GetOwnerPlayer(),c,96) return Duel.SelectEffectYesNo(e:GetOwnerPlayer(),c,96)
end end
......
...@@ -62,7 +62,7 @@ function c21977828.eqlimit(e,c) ...@@ -62,7 +62,7 @@ function c21977828.eqlimit(e,c)
end end
function c21977828.spcon(e,tp,eg,ep,ev,re,r,rp) function c21977828.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and not c:IsReason(REASON_LOST_TARGET) return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousEquipTarget() and not c:IsReason(REASON_LOST_TARGET)
end end
function c21977828.spfilter(c,e,tp) function c21977828.spfilter(c,e,tp)
return c:IsSetCard(0x56) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x56) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -61,10 +61,11 @@ function c23265594.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,10 +61,11 @@ function c23265594.eqop(e,tp,eg,ep,ev,re,r,rp)
aux.SetUnionState(c) aux.SetUnionState(c)
end end
function c23265594.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c23265594.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(23265594)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local c=e:GetHandler()
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end if chk==0 then return c:GetFlagEffect(23265594)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
e:GetHandler():RegisterFlagEffect(23265594,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(23265594,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
function c23265594.spop(e,tp,eg,ep,ev,re,r,rp) function c23265594.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -75,7 +75,8 @@ function c2461031.lvfilter(c) ...@@ -75,7 +75,8 @@ function c2461031.lvfilter(c)
end end
function c2461031.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c2461031.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c2461031.lvfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c2461031.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c2461031.lvfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return e:GetHandler():GetEquipTarget()
and Duel.IsExistingTarget(c2461031.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c2461031.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c2461031.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
......
...@@ -16,6 +16,7 @@ function c2602411.initial_effect(c) ...@@ -16,6 +16,7 @@ function c2602411.initial_effect(c)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e2:SetCondition(c2602411.condition)
e2:SetValue(c2602411.aclimit) e2:SetValue(c2602411.aclimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--tohand --tohand
...@@ -24,6 +25,7 @@ function c2602411.initial_effect(c) ...@@ -24,6 +25,7 @@ function c2602411.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c2602411.condition)
e3:SetCost(c2602411.thcost) e3:SetCost(c2602411.thcost)
e3:SetTarget(c2602411.thtg) e3:SetTarget(c2602411.thtg)
e3:SetOperation(c2602411.thop) e3:SetOperation(c2602411.thop)
...@@ -61,6 +63,9 @@ end ...@@ -61,6 +63,9 @@ end
function c2602411.eqlimit(e,c) function c2602411.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
end end
function c2602411.condition(e)
return e:GetHandler():GetEquipTarget()
end
function c2602411.aclimit(e,re,tp) function c2602411.aclimit(e,re,tp)
local loc=re:GetActivateLocation() local loc=re:GetActivateLocation()
return loc==LOCATION_GRAVE and re:IsActiveType(TYPE_MONSTER) return loc==LOCATION_GRAVE and re:IsActiveType(TYPE_MONSTER)
......
...@@ -33,9 +33,10 @@ function c29253591.slevel(e,c) ...@@ -33,9 +33,10 @@ function c29253591.slevel(e,c)
return (4<<16)+lv return (4<<16)+lv
end end
function c29253591.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c29253591.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c29253591.spop(e,tp,eg,ep,ev,re,r,rp) function c29253591.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -81,7 +81,7 @@ function c29353756.eqlimit(e,c) ...@@ -81,7 +81,7 @@ function c29353756.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
end end
function c29353756.negcon(e,tp,eg,ep,ev,re,r,rp) function c29353756.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_SZONE return e:GetHandler():GetEquipTarget() and rp==1-tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_SZONE
and re:IsActiveType(TYPE_TRAP) and re:IsActiveType(TYPE_TRAP)
end end
function c29353756.negop(e,tp,eg,ep,ev,re,r,rp) function c29353756.negop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -65,7 +65,7 @@ end ...@@ -65,7 +65,7 @@ end
function c30012506.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c30012506.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(30012506)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return c:GetFlagEffect(30012506)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(30012506,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(30012506,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -81,9 +81,10 @@ function c32164201.eqlimit(e,c) ...@@ -81,9 +81,10 @@ function c32164201.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
end end
function c32164201.negcon(e,tp,eg,ep,ev,re,r,rp) function c32164201.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE local c=e:GetHandler()
return c:GetEquipTarget() and rp==1-tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
and e:GetHandler():GetFlagEffect(32164201)==0 and c:GetFlagEffect(32164201)==0
end end
function c32164201.negop(e,tp,eg,ep,ev,re,r,rp) function c32164201.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(32164201,1)) then if Duel.SelectYesNo(tp,aux.Stringid(32164201,1)) then
......
...@@ -81,8 +81,9 @@ function c33725002.eqlimit(e,c) ...@@ -81,8 +81,9 @@ function c33725002.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
end end
function c33725002.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c33725002.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipTarget():CheckRemoveOverlayCard(tp,1,REASON_COST) end local c=e:GetHandler()
e:GetHandler():GetEquipTarget():RemoveOverlayCard(tp,1,1,REASON_COST) if chk==0 then return c:GetEquipTarget() and c:GetEquipTarget():CheckRemoveOverlayCard(tp,1,REASON_COST) end
c:GetEquipTarget():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c33725002.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c33725002.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
......
...@@ -65,7 +65,7 @@ end ...@@ -65,7 +65,7 @@ end
function c3405259.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c3405259.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(3405259)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return c:GetFlagEffect(3405259)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(3405259,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(3405259,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -56,7 +56,7 @@ function c36870345.eqlimit(e,c) ...@@ -56,7 +56,7 @@ function c36870345.eqlimit(e,c)
end end
function c36870345.descon(e,tp,eg,ep,ev,re,r,rp) function c36870345.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and not c:IsReason(REASON_LOST_TARGET) return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousEquipTarget() and not c:IsReason(REASON_LOST_TARGET)
end end
function c36870345.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c36870345.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
......
...@@ -79,7 +79,7 @@ end ...@@ -79,7 +79,7 @@ end
function c37433748.dircost(e,tp,eg,ep,ev,re,r,rp,chk) function c37433748.dircost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local ec=c:GetEquipTarget() local ec=c:GetEquipTarget()
if chk==0 then return Duel.IsExistingMatchingCard(c37433748.cfilter,tp,LOCATION_ONFIELD,0,1,c,ec) end if chk==0 then return ec and Duel.IsExistingMatchingCard(c37433748.cfilter,tp,LOCATION_ONFIELD,0,1,c,ec) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c37433748.cfilter,tp,LOCATION_ONFIELD,0,1,1,c,ec) local g=Duel.SelectMatchingCard(tp,c37433748.cfilter,tp,LOCATION_ONFIELD,0,1,1,c,ec)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
......
...@@ -16,12 +16,14 @@ function c38601126.initial_effect(c) ...@@ -16,12 +16,14 @@ function c38601126.initial_effect(c)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e2:SetCondition(c38601126.condition)
e2:SetValue(c38601126.aclimit) e2:SetValue(c38601126.aclimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--direct atk --direct atk
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c38601126.condition)
e3:SetCost(c38601126.dacost) e3:SetCost(c38601126.dacost)
e3:SetOperation(c38601126.daop) e3:SetOperation(c38601126.daop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -58,6 +60,9 @@ end ...@@ -58,6 +60,9 @@ end
function c38601126.eqlimit(e,c) function c38601126.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
end end
function c38601126.condition(e)
return e:GetHandler():GetEquipTarget()
end
function c38601126.aclimit(e,re,tp) function c38601126.aclimit(e,re,tp)
local loc=re:GetActivateLocation() local loc=re:GetActivateLocation()
return loc==LOCATION_SZONE and not re:IsHasType(EFFECT_TYPE_ACTIVATE) return loc==LOCATION_SZONE and not re:IsHasType(EFFECT_TYPE_ACTIVATE)
......
...@@ -59,6 +59,7 @@ function c38679204.eqlimit(e,c) ...@@ -59,6 +59,7 @@ function c38679204.eqlimit(e,c)
end end
function c38679204.descon(e,tp,eg,ep,ev,re,r,rp) function c38679204.descon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget() local ec=e:GetHandler():GetEquipTarget()
if not ec then return false end
local dt=nil local dt=nil
if ec==Duel.GetAttacker() then dt=Duel.GetAttackTarget() if ec==Duel.GetAttacker() then dt=Duel.GetAttackTarget()
elseif ec==Duel.GetAttackTarget() then dt=Duel.GetAttacker() end elseif ec==Duel.GetAttackTarget() then dt=Duel.GetAttacker() end
......
...@@ -109,7 +109,7 @@ end ...@@ -109,7 +109,7 @@ end
function c38783169.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c38783169.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(38783169)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return c:GetFlagEffect(38783169)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(38783169,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(38783169,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -61,7 +61,7 @@ end ...@@ -61,7 +61,7 @@ end
function c39299733.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c39299733.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(39299733)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return c:GetFlagEffect(39299733)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(39299733,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(39299733,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -66,7 +66,7 @@ end ...@@ -66,7 +66,7 @@ end
function c39890958.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c39890958.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(39890958)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return c:GetFlagEffect(39890958)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(39890958,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(39890958,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -18,7 +18,7 @@ function c39978267.initial_effect(c) ...@@ -18,7 +18,7 @@ function c39978267.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c39978267.desfilter(c) function c39978267.desfilter(c)
return c:IsType(TYPE_EQUIP) return c:GetEquipTarget() or c:IsFaceup() and c:IsType(TYPE_EQUIP)
end end
function c39978267.eqfilter(c,ec) function c39978267.eqfilter(c,ec)
return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec)
......
...@@ -58,10 +58,11 @@ function c42940404.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,10 +58,11 @@ function c42940404.eqop(e,tp,eg,ep,ev,re,r,rp)
aux.SetUnionState(c) aux.SetUnionState(c)
end end
function c42940404.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c42940404.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(42940404)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local c=e:GetHandler()
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return c:GetFlagEffect(42940404)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
e:GetHandler():RegisterFlagEffect(42940404,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(42940404,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
function c42940404.spop(e,tp,eg,ep,ev,re,r,rp) function c42940404.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -75,7 +75,7 @@ function c45078193.gyop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,7 @@ function c45078193.gyop(e,tp,eg,ep,ev,re,r,rp)
end end
function c45078193.con(e,tp,eg,ep,ev,re,r,rp) function c45078193.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and not c:IsReason(REASON_LOST_TARGET) return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousEquipTarget() and not c:IsReason(REASON_LOST_TARGET)
end end
function c45078193.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c45078193.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
...@@ -19,6 +19,7 @@ function c45082499.initial_effect(c) ...@@ -19,6 +19,7 @@ function c45082499.initial_effect(c)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_ONFIELD,0) e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107e)) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107e))
e2:SetCondition(c45082499.indcon)
e2:SetValue(aux.indoval) e2:SetValue(aux.indoval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy sub --destroy sub
...@@ -74,6 +75,9 @@ end ...@@ -74,6 +75,9 @@ end
function c45082499.eqlimit(e,c) function c45082499.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
end end
function c45082499.indcon(e)
return e:GetHandler():GetEquipTarget()
end
function c45082499.repval(e,re,r,rp) function c45082499.repval(e,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0 return bit.band(r,REASON_EFFECT)~=0
end end
...@@ -57,7 +57,7 @@ end ...@@ -57,7 +57,7 @@ end
function c52601736.dacon(e,tp,eg,ep,ev,re,r,rp) function c52601736.dacon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget() local tc=e:GetHandler():GetEquipTarget()
return Duel.IsAbleToEnterBP() return Duel.IsAbleToEnterBP()
and tc:IsAttackable() and tc:GetEffectCount(EFFECT_DIRECT_ATTACK)==0 and tc and tc:IsAttackable() and tc:GetEffectCount(EFFECT_DIRECT_ATTACK)==0
end end
function c52601736.ftarget(e,c) function c52601736.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID() return e:GetLabel()~=c:GetFieldID()
......
...@@ -19,10 +19,10 @@ function c5361816.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -19,10 +19,10 @@ function c5361816.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=e:GetHandler():GetEquipGroup() local g=e:GetHandler():GetEquipGroup()
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c5361816.desfilter,tp,LOCATION_SZONE,0,1,nil,g) and Duel.IsExistingTarget(c5361816.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,g)
and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c5361816.desfilter,tp,LOCATION_SZONE,0,1,1,nil,g) local g1=Duel.SelectTarget(tp,c5361816.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) local g2=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2) g1:Merge(g2)
......
...@@ -67,7 +67,7 @@ function c58257569.eqlimit(e,c) ...@@ -67,7 +67,7 @@ function c58257569.eqlimit(e,c)
end end
function c58257569.thcon(e,tp,eg,ep,ev,re,r,rp) function c58257569.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and not c:IsReason(REASON_LOST_TARGET) return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousEquipTarget() and not c:IsReason(REASON_LOST_TARGET)
end end
function c58257569.thfilter(c) function c58257569.thfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsLevel(1) and c:IsAbleToHand() return c:IsRace(RACE_DRAGON) and c:IsLevel(1) and c:IsAbleToHand()
......
...@@ -12,9 +12,10 @@ function c59755122.initial_effect(c) ...@@ -12,9 +12,10 @@ function c59755122.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c59755122.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c59755122.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c59755122.spop(e,tp,eg,ep,ev,re,r,rp) function c59755122.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -61,10 +61,11 @@ function c64500000.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,10 +61,11 @@ function c64500000.eqop(e,tp,eg,ep,ev,re,r,rp)
aux.SetUnionState(c) aux.SetUnionState(c)
end end
function c64500000.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c64500000.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(64500000)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local c=e:GetHandler()
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end if chk==0 then return c:GetFlagEffect(64500000)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
e:GetHandler():RegisterFlagEffect(64500000,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(64500000,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
function c64500000.spop(e,tp,eg,ep,ev,re,r,rp) function c64500000.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -61,10 +61,11 @@ function c65622692.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,10 +61,11 @@ function c65622692.eqop(e,tp,eg,ep,ev,re,r,rp)
aux.SetUnionState(c) aux.SetUnionState(c)
end end
function c65622692.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c65622692.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(65622692)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local c=e:GetHandler()
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end if chk==0 then return c:GetFlagEffect(65622692)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
e:GetHandler():RegisterFlagEffect(65622692,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(65622692,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
function c65622692.spop(e,tp,eg,ep,ev,re,r,rp) function c65622692.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -60,10 +60,11 @@ function c67159705.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,10 +60,11 @@ function c67159705.eqop(e,tp,eg,ep,ev,re,r,rp)
aux.SetUnionState(c) aux.SetUnionState(c)
end end
function c67159705.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c67159705.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(67159705)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local c=e:GetHandler()
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end if chk==0 then return c:GetFlagEffect(67159705)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
e:GetHandler():RegisterFlagEffect(67159705,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(67159705,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
function c67159705.spop(e,tp,eg,ep,ev,re,r,rp) function c67159705.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -75,7 +76,7 @@ function c67159705.desfilter(c) ...@@ -75,7 +76,7 @@ function c67159705.desfilter(c)
end end
function c67159705.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c67159705.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c67159705.desfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c67159705.desfilter(chkc) end
if chk==0 then return e:GetHandler():GetEquipTarget():GetAttack()>=1000 if chk==0 then return e:GetHandler():GetEquipTarget() and e:GetHandler():GetEquipTarget():GetAttack()>=1000
and Duel.IsExistingTarget(c67159705.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end and Duel.IsExistingTarget(c67159705.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c67159705.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c67159705.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
...@@ -73,7 +73,8 @@ function c69207766.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -73,7 +73,8 @@ function c69207766.descost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c69207766.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c69207766.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end if chk==0 then return e:GetHandler():GetEquipTarget()
and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
......
...@@ -47,8 +47,10 @@ function c69975751.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,8 +47,10 @@ function c69975751.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
function c69975751.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c69975751.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c69975751.spop2(e,tp,eg,ep,ev,re,r,rp) function c69975751.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -61,7 +61,7 @@ end ...@@ -61,7 +61,7 @@ end
function c70298454.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c70298454.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(70298454)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return c:GetFlagEffect(70298454)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(70298454,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(70298454,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -65,7 +65,7 @@ end ...@@ -65,7 +65,7 @@ end
function c77411244.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c77411244.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(77411244)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return c:GetFlagEffect(77411244)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(77411244,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(77411244,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -60,10 +60,11 @@ function c78349103.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,10 +60,11 @@ function c78349103.eqop(e,tp,eg,ep,ev,re,r,rp)
aux.SetUnionState(c) aux.SetUnionState(c)
end end
function c78349103.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c78349103.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(78349103)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local c=e:GetHandler()
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return c:GetFlagEffect(78349103)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
e:GetHandler():RegisterFlagEffect(78349103,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(78349103,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
function c78349103.spop(e,tp,eg,ep,ev,re,r,rp) function c78349103.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -67,7 +67,7 @@ end ...@@ -67,7 +67,7 @@ end
function c79538761.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c79538761.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(79538761)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return c:GetFlagEffect(79538761)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(79538761,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(79538761,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -64,7 +64,7 @@ function c79875526.eqlimit(e,c) ...@@ -64,7 +64,7 @@ function c79875526.eqlimit(e,c)
end end
function c79875526.spcon(e,tp,eg,ep,ev,re,r,rp) function c79875526.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and not c:IsReason(REASON_LOST_TARGET) return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousEquipTarget() and not c:IsReason(REASON_LOST_TARGET)
end end
function c79875526.spfilter(c,e,tp) function c79875526.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON+RACE_MACHINE) and c:IsSetCard(0x93) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_DRAGON+RACE_MACHINE) and c:IsSetCard(0x93) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -61,7 +61,7 @@ end ...@@ -61,7 +61,7 @@ end
function c81951640.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c81951640.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(81951640)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return c:GetFlagEffect(81951640)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(81951640,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(81951640,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
...@@ -72,7 +72,7 @@ function c81951640.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,7 +72,7 @@ function c81951640.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function c81951640.con(e,tp,eg,ep,ev,re,r,rp) function c81951640.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_SZONE) and not c:IsReason(REASON_LOST_TARGET) return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousEquipTarget() and not c:IsReason(REASON_LOST_TARGET)
end end
function c81951640.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c81951640.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -78,7 +78,7 @@ function c82562802.filter1(c) ...@@ -78,7 +78,7 @@ function c82562802.filter1(c)
end end
function c82562802.con(e,tp,eg,ep,ev,re,r,rp) function c82562802.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and not c:IsReason(REASON_LOST_TARGET) return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousEquipTarget() and not c:IsReason(REASON_LOST_TARGET)
end end
function c82562802.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c82562802.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c82562802.filter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c82562802.filter1(chkc) end
......
...@@ -7,6 +7,9 @@ function c88361177.initial_effect(c) ...@@ -7,6 +7,9 @@ function c88361177.initial_effect(c)
e1:SetCondition(c88361177.pcon) e1:SetCondition(c88361177.pcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c88361177.pfilter(c)
return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) and c:IsFaceup()
end
function c88361177.pcon(e) function c88361177.pcon(e)
return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x29) return e:GetHandler():GetEquipGroup():IsExists(c88361177.pfilter,1,nil)
end end
...@@ -62,7 +62,7 @@ function c94573223.eqlimit(e,c) ...@@ -62,7 +62,7 @@ function c94573223.eqlimit(e,c)
end end
function c94573223.spcon(e,tp,eg,ep,ev,re,r,rp) function c94573223.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and not c:IsReason(REASON_LOST_TARGET) return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousEquipTarget() and not c:IsReason(REASON_LOST_TARGET)
end end
function c94573223.spfilter(c,e,tp) function c94573223.spfilter(c,e,tp)
return c:IsSetCard(0x56) and not c:IsCode(94573223) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x56) and not c:IsCode(94573223) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -83,7 +83,8 @@ function c95886782.cfilter(c,tp) ...@@ -83,7 +83,8 @@ function c95886782.cfilter(c,tp)
return c:IsSummonPlayer(1-tp) return c:IsSummonPlayer(1-tp)
end end
function c95886782.atkcon(e,tp,eg,ep,ev,re,r,rp) function c95886782.atkcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActivated() and e:GetOwnerPlayer()==1-re:GetOwnerPlayer() and eg:IsExists(c95886782.cfilter,1,nil,tp) return e:GetHandler():GetEquipTarget() and re and re:IsActivated() and e:GetOwnerPlayer()==1-re:GetOwnerPlayer()
and eg:IsExists(c95886782.cfilter,1,nil,tp)
end end
function c95886782.atkop(e,tp,eg,ep,ev,re,r,rp) function c95886782.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -61,10 +61,11 @@ function c96300057.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,10 +61,11 @@ function c96300057.eqop(e,tp,eg,ep,ev,re,r,rp)
aux.SetUnionState(c) aux.SetUnionState(c)
end end
function c96300057.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c96300057.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(96300057)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local c=e:GetHandler()
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end if chk==0 then return c:GetFlagEffect(96300057)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
e:GetHandler():RegisterFlagEffect(96300057,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(96300057,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
function c96300057.spop(e,tp,eg,ep,ev,re,r,rp) function c96300057.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -60,7 +60,7 @@ end ...@@ -60,7 +60,7 @@ end
function c99249638.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c99249638.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(99249638)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return c:GetFlagEffect(99249638)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end and c:GetEquipTarget() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(99249638,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(99249638,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end end
...@@ -81,7 +81,7 @@ function c99249638.refilter(c,tc,tp) ...@@ -81,7 +81,7 @@ function c99249638.refilter(c,tc,tp)
end end
function c99249638.retg(e,tp,eg,ep,ev,re,r,rp,chk) function c99249638.retg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c99249638.refilter,tp,LOCATION_DECK,0,1,nil,c:GetEquipTarget(),tp) end if chk==0 then return c:GetEquipTarget() and Duel.IsExistingMatchingCard(c99249638.refilter,tp,LOCATION_DECK,0,1,nil,c:GetEquipTarget(),tp) end
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
Duel.SetTargetCard(tc) Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,tc,1,0,0)
......
...@@ -253,7 +253,7 @@ function Auxiliary.NeosReturnTargetOptional(set_category) ...@@ -253,7 +253,7 @@ function Auxiliary.NeosReturnTargetOptional(set_category)
end end
function Auxiliary.IsUnionState(effect) function Auxiliary.IsUnionState(effect)
local c=effect:GetHandler() local c=effect:GetHandler()
return c:IsHasEffect(EFFECT_UNION_STATUS) return c:IsHasEffect(EFFECT_UNION_STATUS) and c:GetEquipTarget()
end end
--set EFFECT_EQUIP_LIMIT after equipping --set EFFECT_EQUIP_LIMIT after equipping
function Auxiliary.SetUnionState(c) function Auxiliary.SetUnionState(c)
......
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