Commit 4f90d901 authored by wind2009's avatar wind2009

AC04 related Fix

parent 102c8f93
......@@ -77,7 +77,7 @@ function s.thcon(e)
return tc and c:GetControler()==tc:GetControler()
end
function s.thfilter(c)
return not c:IsCode(id) and c:IsSetCard(0x2b8) and c:IsAbleToHand()
return not c:IsCode(id) and c:IsSetCard(0x1b6) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
--魅惑の女王 LV5
function c23756165.initial_effect(c)
aux.AddCodeList(c,87257460,50140163)
--equip
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -24,25 +25,34 @@ c23756165.lvup={50140163,87257460}
c23756165.lvdn={87257460}
function c23756165.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_LV then
if c:GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_LV or (re and re:GetHandler():IsCode(87257460)) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(23756165,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c23756165.eqcon)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetCondition(c23756165.eqcon1)
e1:SetTarget(c23756165.eqtg)
e1:SetOperation(c23756165.eqop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetLabelObject(e)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c23756165.eqcon2)
c:RegisterEffect(e2)
end
end
function c23756165.eqcon(e,tp,eg,ep,ev,re,r,rp)
function c23756165.eqcon1(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject():GetLabelObject()
return (ec==nil or ec:GetFlagEffect(23756165)==0) and not Duel.IsPlayerAffectedByEffect(tp,95937545)
end
function c23756165.eqcon2(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject():GetLabelObject()
return ec==nil or ec:GetFlagEffect(23756165)==0
return (ec==nil or ec:GetFlagEffect(23756165)==0) and Duel.IsPlayerAffectedByEffect(tp,95937545)
end
function c23756165.filter(c)
return c:IsLevelBelow(5) and c:IsFaceup() and c:IsAbleToChangeControler()
......@@ -111,7 +121,7 @@ function c23756165.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c23756165.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_LV,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
......@@ -75,7 +75,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.eftg(e,c)
return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x2b6)
return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x3)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
......@@ -84,7 +84,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST)
end
function s.thfilter(c,e,tp)
if not (c:IsSetCard(0x2b6) and c:IsType(TYPE_MONSTER)) then return false end
if not (c:IsSetCard(0x3) and c:IsType(TYPE_MONSTER)) then return false end
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
return c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp))
end
......
......@@ -7,6 +7,7 @@ function c33900648.initial_effect(c)
c:RegisterEffect(e1)
--maintain
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33900648,4))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EVENT_PHASE+PHASE_END)
......@@ -15,13 +16,6 @@ function c33900648.initial_effect(c)
e2:SetCondition(c33900648.mtcon)
e2:SetOperation(c33900648.mtop)
c:RegisterEffect(e2)
--adjust
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(LOCATION_FZONE)
e3:SetOperation(c33900648.adjustop)
c:RegisterEffect(e3)
--light
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
......@@ -48,7 +42,7 @@ function c33900648.initial_effect(c)
e7:SetDescription(aux.Stringid(33900648,1))
e7:SetCategory(CATEGORY_DESTROY)
e7:SetCode(EVENT_PHASE+PHASE_STANDBY)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e7:SetRange(LOCATION_FZONE)
e7:SetProperty(EFFECT_FLAG_CARD_TARGET)
e7:SetCountLimit(1)
......@@ -61,7 +55,7 @@ function c33900648.initial_effect(c)
e8:SetDescription(aux.Stringid(33900648,2))
e8:SetCategory(CATEGORY_HANDES)
e8:SetCode(EVENT_PHASE+PHASE_END)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetRange(LOCATION_FZONE)
e8:SetCountLimit(1)
e8:SetCondition(c33900648.hdcon)
......@@ -73,7 +67,7 @@ function c33900648.initial_effect(c)
e9:SetDescription(aux.Stringid(33900648,3))
e9:SetCategory(CATEGORY_DAMAGE)
e9:SetCode(EVENT_PHASE+PHASE_END)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e9:SetRange(LOCATION_FZONE)
e9:SetCountLimit(1)
e9:SetCondition(c33900648.damcon)
......@@ -107,91 +101,99 @@ function c33900648.mtop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_COST)
end
end
c33900648[0]=0
c33900648[1]=0
function c33900648.adjustop(e,tp,eg,ep,ev,re,r,rp)
for p=0,1 do
function c33900648.attributechk(tp)
local attchk=0
if Duel.IsPlayerAffectedByEffect(tp,6089145) then
attchk=ATTRIBUTE_LIGHT+ATTRIBUTE_DARK+ATTRIBUTE_EARTH+ATTRIBUTE_WATER+ATTRIBUTE_FIRE+ATTRIBUTE_WIND
else
local rac=0
local g=Duel.GetMatchingGroup(Card.IsFaceup,p,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
rac=bit.bor(rac,tc:GetAttribute())
tc=g:GetNext()
end
c33900648[p]=rac
attchk=rac
end
return attchk
end
function c33900648.lighttg(e,c)
return bit.band(c33900648[c:GetControler()],ATTRIBUTE_LIGHT)~=0
return bit.band(c33900648.attributechk(c:GetControler()),ATTRIBUTE_LIGHT)~=0
and not Duel.IsPlayerAffectedByEffect(c:GetControler(),97811903)
end
function c33900648.darkcon1(e)
return bit.band(c33900648[e:GetHandlerPlayer()],ATTRIBUTE_DARK)~=0
and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>=2
and not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),97811903)
local tp=e:GetHandlerPlayer()
return bit.band(c33900648.attributechk(tp),ATTRIBUTE_DARK)~=0
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>=2
and not Duel.IsPlayerAffectedByEffect(tp,97811903)
end
function c33900648.darkcon2(e)
return bit.band(c33900648[1-e:GetHandlerPlayer()],ATTRIBUTE_DARK)~=0
and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)>=2
and not Duel.IsPlayerAffectedByEffect(1-e:GetHandlerPlayer(),97811903)
local tp=e:GetHandlerPlayer()
return bit.band(c33900648.attributechk(1-tp),ATTRIBUTE_DARK)~=0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>=2
and not Duel.IsPlayerAffectedByEffect(1-tp,97811903)
end
function c33900648.descon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_EARTH)~=0
return bit.band(c33900648.attributechk(Duel.GetTurnPlayer()),ATTRIBUTE_EARTH)~=0
end
function c33900648.desfilter(c)
return c:IsPosition(POS_FACEUP_DEFENSE)
end
function c33900648.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c33900648.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local turnp=Duel.GetTurnPlayer()
if chkc then return chkc:IsControler(turnp) and chkc:IsLocation(LOCATION_MZONE) and c33900648.desfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(turnp,c33900648.desfilter,turnp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
Duel.Hint(HINT_OPSELECTED,1-turnp,aux.Stringid(33900648,1))
end
function c33900648.desop(e,tp,eg,ep,ev,re,r,rp)
if bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_EARTH)==0
or Duel.IsPlayerAffectedByEffect(Duel.GetTurnPlayer(),97811903) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsPosition(POS_FACEUP_DEFENSE) then
Duel.Destroy(tc,REASON_EFFECT)
local turnp=Duel.GetTurnPlayer()
if bit.band(c33900648.attributechk(turnp),ATTRIBUTE_EARTH)==0
or Duel.IsPlayerAffectedByEffect(turnp,97811903) then return end
Duel.Hint(HINT_SELECTMSG,turnp,HINTMSG_DESTROY)
local tg=Duel.SelectMatchingCard(turnp,c33900648.desfilter,turnp,LOCATION_MZONE,0,1,1,nil)
if tg:GetCount()>0 then
Duel.HintSelection(tg)
Duel.Destroy(tg,REASON_EFFECT)
end
end
function c33900648.hdcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_WATER)~=0
return bit.band(c33900648.attributechk(Duel.GetTurnPlayer()),ATTRIBUTE_WATER)~=0
end
function c33900648.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local turnp=Duel.GetTurnPlayer()
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,turnp,1)
Duel.Hint(HINT_OPSELECTED,1-turnp,aux.Stringid(33900648,2))
end
function c33900648.hdop(e,tp,eg,ep,ev,re,r,rp)
if bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_WATER)==0
or Duel.IsPlayerAffectedByEffect(Duel.GetTurnPlayer(),97811903) then return end
Duel.DiscardHand(Duel.GetTurnPlayer(),nil,1,1,REASON_EFFECT+REASON_DISCARD)
local turnp=Duel.GetTurnPlayer()
if bit.band(c33900648.attributechk(turnp),ATTRIBUTE_WATER)==0
or Duel.IsPlayerAffectedByEffect(turnp,97811903) then return end
Duel.DiscardHand(turnp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
function c33900648.damcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_FIRE)~=0
return bit.band(c33900648.attributechk(Duel.GetTurnPlayer()),ATTRIBUTE_FIRE)~=0
end
function c33900648.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local turnp=Duel.GetTurnPlayer()
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,turnp,1000)
Duel.Hint(HINT_OPSELECTED,1-turnp,aux.Stringid(33900648,3))
end
function c33900648.damop(e,tp,eg,ep,ev,re,r,rp)
if bit.band(c33900648[Duel.GetTurnPlayer()],ATTRIBUTE_FIRE)==0
or Duel.IsPlayerAffectedByEffect(Duel.GetTurnPlayer(),97811903) then return end
Duel.Damage(Duel.GetTurnPlayer(),1000,REASON_EFFECT)
local turnp=Duel.GetTurnPlayer()
if bit.band(c33900648.attributechk(turnp),ATTRIBUTE_FIRE)==0
or Duel.IsPlayerAffectedByEffect(turnp,97811903) then return end
Duel.Damage(turnp,1000,REASON_EFFECT)
end
function c33900648.windcon1(e)
return bit.band(c33900648[e:GetHandlerPlayer()],ATTRIBUTE_WIND)~=0
and not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),97811903)
local tp=e:GetHandlerPlayer()
return bit.band(c33900648.attributechk(tp),ATTRIBUTE_WIND)~=0
and not Duel.IsPlayerAffectedByEffect(tp,97811903)
end
function c33900648.windcon2(e)
return bit.band(c33900648[1-e:GetHandlerPlayer()],ATTRIBUTE_WIND)~=0
and not Duel.IsPlayerAffectedByEffect(1-e:GetHandlerPlayer(),97811903)
local tp=e:GetHandlerPlayer()
return bit.band(c33900648.attributechk(1-tp),ATTRIBUTE_WIND)~=0
and not Duel.IsPlayerAffectedByEffect(1-tp,97811903)
end
function c33900648.actarget(e,te,tp)
return te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:IsActiveType(TYPE_SPELL)
......
--魅惑の女王 LV7
function c50140163.initial_effect(c)
aux.AddCodeList(c,23756165)
--equip
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -11,7 +12,7 @@ c50140163.lvup={23756165}
c50140163.lvdn={23756165,87257460}
function c50140163.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_LV then
if c:GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_LV or (re and re:GetHandler():IsCode(23756165)) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50140163,0))
e1:SetCategory(CATEGORY_EQUIP)
......@@ -19,17 +20,26 @@ function c50140163.regop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c50140163.eqcon)
e1:SetCondition(c50140163.eqcon1)
e1:SetTarget(c50140163.eqtg)
e1:SetOperation(c50140163.eqop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetLabelObject(e)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c50140163.eqcon2)
c:RegisterEffect(e2)
end
end
function c50140163.eqcon(e,tp,eg,ep,ev,re,r,rp)
function c50140163.eqcon1(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject():GetLabelObject()
return ec==nil or ec:GetFlagEffect(50140163)==0
return (ec==nil or ec:GetFlagEffect(50140163)==0) and not Duel.IsPlayerAffectedByEffect(tp,95937545)
end
function c50140163.eqcon2(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject():GetLabelObject()
return (ec==nil or ec:GetFlagEffect(50140163)==0) and Duel.IsPlayerAffectedByEffect(tp,95937545)
end
function c50140163.filter(c)
return c:IsAbleToChangeControler()
......
......@@ -31,7 +31,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.filter(c)
return (c:IsSetCard(0x2b6) and c:IsType(TYPE_MONSTER) or c:IsCode(31322640)) and c:IsAbleToHand()
return (c:IsSetCard(0x3) and c:IsType(TYPE_MONSTER) or c:IsCode(31322640)) and c:IsAbleToHand()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil)
......@@ -64,7 +64,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST)
end
function s.sfilter(c,e,tp)
return c:IsSetCard(0x2b6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
......
......@@ -11,5 +11,5 @@ function c71411377.initial_effect(c)
c:RegisterEffect(e1)
end
function c71411377.atlimit(e,c)
return c:IsCode(87257460,23756165,50140163)
return c:IsSetCard(0x3)
end
--魅惑の女王 LV3
function c87257460.initial_effect(c)
aux.AddCodeList(c,87257460,23756165)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87257460,0))
......@@ -7,29 +8,39 @@ function c87257460.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c87257460.eqcon)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetCondition(c87257460.eqcon1)
e1:SetTarget(c87257460.eqtg)
e1:SetOperation(c87257460.eqop)
e1:SetOperation(c87257460.eqop1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(87257460,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCondition(c87257460.spcon)
e2:SetCost(c87257460.spcost)
e2:SetTarget(c87257460.sptg)
e2:SetOperation(c87257460.spop)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c87257460.eqcon2)
e2:SetOperation(c87257460.eqop2)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(87257460,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(c87257460.spcon)
e3:SetCost(c87257460.spcost)
e3:SetTarget(c87257460.sptg)
e3:SetOperation(c87257460.spop)
e3:SetLabelObject(e1)
c:RegisterEffect(e3)
end
c87257460.lvup={23756165}
function c87257460.eqcon(e,tp,eg,ep,ev,re,r,rp)
function c87257460.eqcon1(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject()
return ec==nil or ec:GetFlagEffect(87257460)==0
return (ec==nil or ec:GetFlagEffect(87257460)==0) and not Duel.IsPlayerAffectedByEffect(tp,95937545)
end
function c87257460.eqcon2(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject():GetLabelObject()
return (ec==nil or ec:GetFlagEffect(87257460)==0) and Duel.IsPlayerAffectedByEffect(tp,95937545)
end
function c87257460.filter(c)
return c:IsLevelBelow(3) and c:IsFaceup() and c:IsAbleToChangeControler()
......@@ -45,7 +56,7 @@ end
function c87257460.eqlimit(e,c)
return e:GetOwner()==c and not c:IsDisabled()
end
function c87257460.eqop(e,tp,eg,ep,ev,re,r,rp)
function c87257460.eqop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
......@@ -69,6 +80,30 @@ function c87257460.eqop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2)
end
end
function c87257460.eqop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
tc:RegisterFlagEffect(87257460,RESET_EVENT+RESETS_STANDARD,0,0)
e:GetLabelObject():SetLabelObject(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c87257460.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c87257460.repval)
tc:RegisterEffect(e2)
end
end
function c87257460.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0
end
......@@ -94,7 +129,7 @@ function c87257460.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c87257460.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_LV,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
......@@ -42,7 +42,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x2b6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -86,7 +86,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2b6))
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3))
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
......
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