Commit 4f90d901 authored by wind2009's avatar wind2009

AC04 related Fix

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