Commit 5ad5bc1a authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream/master' into master

parents e9aa92cf 4e0fbaf3
--魅惑の女王 LV5 --魅惑の女王 LV5
local s,id,o=GetID()
function c23756165.initial_effect(c) function c23756165.initial_effect(c)
aux.AddCodeList(c,87257460,50140163) aux.AddCodeList(c,87257460,50140163)
--equip --flag effect id+1
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)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c23756165.regop) e1:SetOperation(c23756165.regop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --equip
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(23756165,1)) e2:SetDescription(aux.Stringid(23756165,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY) e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(c23756165.spcon) e2:SetCondition(c23756165.eqcon1)
e2:SetCost(c23756165.spcost) e2:SetTarget(c23756165.eqtg)
e2:SetTarget(c23756165.sptg) e2:SetOperation(c23756165.eqop)
e2:SetOperation(c23756165.spop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(c23756165.eqcon2)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(23756165,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetCondition(c23756165.spcon)
e4:SetCost(c23756165.spcost)
e4:SetTarget(c23756165.sptg)
e4:SetOperation(c23756165.spop)
c:RegisterEffect(e4)
end end
c23756165.lvup={50140163,87257460} 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 or (re and re:GetHandler():IsCode(87257460)) then if c:GetSpecialSummonInfo(SUMMON_INFO_CODE)==87257460 then
local e1=Effect.CreateEffect(c) c:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD,0,1)
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,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
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 ec=e:GetLabelObject():GetLabelObject() local c=e:GetHandler()
return (ec==nil or ec:GetFlagEffect(23756165)==0) and not Duel.IsPlayerAffectedByEffect(tp,95937545) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,id) and not Duel.IsPlayerAffectedByEffect(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 ec=e:GetLabelObject():GetLabelObject() local c=e:GetHandler()
return (ec==nil or ec:GetFlagEffect(23756165)==0) and Duel.IsPlayerAffectedByEffect(tp,95937545) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,id) 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()
...@@ -66,7 +66,7 @@ function c23756165.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -66,7 +66,7 @@ function c23756165.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end end
function c23756165.eqlimit(e,c) function c23756165.eqlimit(e,c)
return e:GetOwner()==c and not c:IsDisabled() return e:GetOwner()==c
end end
function c23756165.eqop(e,tp,eg,ep,ev,re,r,rp) function c23756165.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -78,8 +78,7 @@ function c23756165.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,8 +78,7 @@ function c23756165.eqop(e,tp,eg,ep,ev,re,r,rp)
if def<0 then def=0 end if def<0 then def=0 end
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit --Add Equip limit
tc:RegisterFlagEffect(23756165,RESET_EVENT+RESETS_STANDARD,0,0) tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0)
e:GetLabelObject():SetLabelObject(tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
...@@ -100,8 +99,7 @@ function c23756165.repval(e,re,r,rp) ...@@ -100,8 +99,7 @@ function c23756165.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 return bit.band(r,REASON_BATTLE)~=0
end end
function c23756165.spcon(e,tp,eg,ep,ev,re,r,rp) function c23756165.spcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject():GetLabelObject() return Duel.GetTurnPlayer()==tp and aux.IsSelfEquip(e:GetHandler(),id)
return Duel.GetTurnPlayer()==tp and ec and ec:GetFlagEffect(23756165)~=0
end end
function c23756165.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c23756165.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
...@@ -122,6 +120,5 @@ function c23756165.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -122,6 +120,5 @@ function c23756165.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
tc:CompleteProcedure()
end end
end end
...@@ -21,9 +21,13 @@ function c33900648.initial_effect(c) ...@@ -21,9 +21,13 @@ function c33900648.initial_effect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_PUBLIC) e4:SetCode(EFFECT_PUBLIC)
e4:SetRange(LOCATION_FZONE) e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(LOCATION_HAND,LOCATION_HAND) e4:SetTargetRange(LOCATION_HAND,0)
e4:SetTarget(c33900648.lighttg) e4:SetCondition(c33900648.lightcon1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e4_=e4:Clone()
e4_:SetTargetRange(0,LOCATION_HAND)
e4_:SetCondition(c33900648.lightcon2)
c:RegisterEffect(e4_)
--dark --dark
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD) e5:SetType(EFFECT_TYPE_FIELD)
...@@ -103,97 +107,87 @@ function c33900648.mtop(e,tp,eg,ep,ev,re,r,rp) ...@@ -103,97 +107,87 @@ function c33900648.mtop(e,tp,eg,ep,ev,re,r,rp)
end end
function c33900648.attributechk(tp) function c33900648.attributechk(tp)
local attchk=0 local attchk=0
if Duel.IsPlayerAffectedByEffect(tp,6089145) then if Duel.IsPlayerAffectedByEffect(tp,97811903) then
attchk=ATTRIBUTE_LIGHT+ATTRIBUTE_DARK+ATTRIBUTE_EARTH+ATTRIBUTE_WATER+ATTRIBUTE_FIRE+ATTRIBUTE_WIND attchk=0
elseif Duel.IsPlayerAffectedByEffect(tp,6089145) then
attchk=ATTRIBUTE_LIGHT|ATTRIBUTE_DARK|ATTRIBUTE_EARTH|ATTRIBUTE_WATER|ATTRIBUTE_FIRE|ATTRIBUTE_WIND
else else
local rac=0
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,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()) attchk=attchk|tc:GetAttribute()
tc=g:GetNext() tc=g:GetNext()
end end
attchk=rac
end end
return attchk return attchk
end end
function c33900648.lighttg(e,c) function c33900648.lightcon1(e)
return bit.band(c33900648.attributechk(c:GetControler()),ATTRIBUTE_LIGHT)~=0 local tp=e:GetHandlerPlayer()
and not Duel.IsPlayerAffectedByEffect(c:GetControler(),97811903) return c33900648.attributechk(tp)&ATTRIBUTE_LIGHT~=0
end
function c33900648.lightcon2(e)
local tp=e:GetHandlerPlayer()
return c33900648.attributechk(1-tp)&ATTRIBUTE_LIGHT~=0
end end
function c33900648.darkcon1(e) function c33900648.darkcon1(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return bit.band(c33900648.attributechk(tp),ATTRIBUTE_DARK)~=0 return c33900648.attributechk(tp)&ATTRIBUTE_DARK~=0
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>=2 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>=2
and not Duel.IsPlayerAffectedByEffect(tp,97811903)
end end
function c33900648.darkcon2(e) function c33900648.darkcon2(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return bit.band(c33900648.attributechk(1-tp),ATTRIBUTE_DARK)~=0 return c33900648.attributechk(1-tp)&ATTRIBUTE_DARK~=0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>=2 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.attributechk(Duel.GetTurnPlayer()),ATTRIBUTE_EARTH)~=0 return 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) function c33900648.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local turnp=Duel.GetTurnPlayer() local turnp=Duel.GetTurnPlayer()
if chk==0 then return true end if chk==0 then return Duel.IsExistingMatchingCard(c33900648.desfilter,turnp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-turnp,aux.Stringid(33900648,1)) Duel.Hint(HINT_OPSELECTED,1-turnp,aux.Stringid(33900648,1))
end end
function c33900648.desop(e,tp,eg,ep,ev,re,r,rp) function c33900648.desop(e,tp,eg,ep,ev,re,r,rp)
local turnp=Duel.GetTurnPlayer() 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) Duel.Hint(HINT_SELECTMSG,turnp,HINTMSG_DESTROY)
local tg=Duel.SelectMatchingCard(turnp,c33900648.desfilter,turnp,LOCATION_MZONE,0,1,1,nil) local tg=Duel.SelectMatchingCard(turnp,c33900648.desfilter,turnp,LOCATION_MZONE,0,1,1,nil)
if tg:GetCount()>0 then
Duel.HintSelection(tg) Duel.HintSelection(tg)
Duel.Destroy(tg,REASON_EFFECT) Duel.Destroy(tg,REASON_EFFECT)
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.attributechk(Duel.GetTurnPlayer()),ATTRIBUTE_WATER)~=0 return 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
local turnp=Duel.GetTurnPlayer() local turnp=Duel.GetTurnPlayer()
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,turnp,1) if chk==0 then return Duel.GetFieldGroupCount(turnp,LOCATION_HAND,0)>0 end
Duel.Hint(HINT_OPSELECTED,1-turnp,aux.Stringid(33900648,2)) 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)
local turnp=Duel.GetTurnPlayer() 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) 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.attributechk(Duel.GetTurnPlayer()),ATTRIBUTE_FIRE)~=0 return 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.Hint(HINT_OPSELECTED,1-turnp,aux.Stringid(33900648,3)) 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)
local turnp=Duel.GetTurnPlayer() 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) Duel.Damage(turnp,1000,REASON_EFFECT)
end end
function c33900648.windcon1(e) function c33900648.windcon1(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return bit.band(c33900648.attributechk(tp),ATTRIBUTE_WIND)~=0 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)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return bit.band(c33900648.attributechk(1-tp),ATTRIBUTE_WIND)~=0 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)
......
--魅惑の女王 LV7 --魅惑の女王 LV7
local s,id,o=GetID()
function c50140163.initial_effect(c) function c50140163.initial_effect(c)
aux.AddCodeList(c,23756165) aux.AddCodeList(c,23756165)
--equip --flag effect id+1
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)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c50140163.regop) e1:SetOperation(c50140163.regop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(50140163,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c50140163.eqcon1)
e2:SetTarget(c50140163.eqtg)
e2:SetOperation(c50140163.eqop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(c50140163.eqcon2)
c:RegisterEffect(e3)
end end
c50140163.lvup={23756165} 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 or (re and re:GetHandler():IsCode(23756165)) then if c:GetSpecialSummonInfo(SUMMON_INFO_CODE)==23756165 then
local e1=Effect.CreateEffect(c) c:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD,0,1)
e1:SetDescription(aux.Stringid(50140163,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(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
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 ec=e:GetLabelObject():GetLabelObject() local c=e:GetHandler()
return (ec==nil or ec:GetFlagEffect(50140163)==0) and not Duel.IsPlayerAffectedByEffect(tp,95937545) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,id) and not Duel.IsPlayerAffectedByEffect(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 ec=e:GetLabelObject():GetLabelObject() local c=e:GetHandler()
return (ec==nil or ec:GetFlagEffect(50140163)==0) and Duel.IsPlayerAffectedByEffect(tp,95937545) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,id) and Duel.IsPlayerAffectedByEffect(tp,95937545)
end end
function c50140163.filter(c) function c50140163.filter(c)
return c:IsAbleToChangeControler() return c:IsAbleToChangeControler()
...@@ -53,7 +54,7 @@ function c50140163.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -53,7 +54,7 @@ function c50140163.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end end
function c50140163.eqlimit(e,c) function c50140163.eqlimit(e,c)
return e:GetOwner()==c and not c:IsDisabled() return e:GetOwner()==c
end end
function c50140163.eqop(e,tp,eg,ep,ev,re,r,rp) function c50140163.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -65,8 +66,7 @@ function c50140163.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,8 +66,7 @@ function c50140163.eqop(e,tp,eg,ep,ev,re,r,rp)
if def<0 then def=0 end if def<0 then def=0 end
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit --Add Equip limit
tc:RegisterFlagEffect(50140163,RESET_EVENT+RESETS_STANDARD,0,0) tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0)
e:GetLabelObject():SetLabelObject(tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
......
...@@ -6,8 +6,8 @@ function c50907446.initial_effect(c) ...@@ -6,8 +6,8 @@ function c50907446.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_FUSION_MATERIAL) e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetCondition(c50907446.FShaddollCondition()) e1:SetCondition(c50907446.FShaddollCondition)
e1:SetOperation(c50907446.FShaddollOperation()) e1:SetOperation(c50907446.FShaddollOperation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--cannot spsummon --cannot spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -131,8 +131,7 @@ function c50907446.FShaddollSpFilter2(c,fc,tp,mc,chkf) ...@@ -131,8 +131,7 @@ function c50907446.FShaddollSpFilter2(c,fc,tp,mc,chkf)
or (c50907446.FShaddollFilter1(mc,sg) and c50907446.FShaddollFilter2(c))) or (c50907446.FShaddollFilter1(mc,sg) and c50907446.FShaddollFilter2(c)))
and (chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(tp,tp,sg,fc)>0) and (chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(tp,tp,sg,fc)>0)
end end
function c50907446.FShaddollCondition() function c50907446.FShaddollCondition(e,g,gc,chkf)
return function(e,g,gc,chkf)
if g==nil then return aux.MustMaterialCheck(nil,e:GetHandlerPlayer(),EFFECT_MUST_BE_FMATERIAL) end if g==nil then return aux.MustMaterialCheck(nil,e:GetHandlerPlayer(),EFFECT_MUST_BE_FMATERIAL) end
local c=e:GetHandler() local c=e:GetHandler()
local mg=g:Filter(c50907446.FShaddollFilter,nil,c) local mg=g:Filter(c50907446.FShaddollFilter,nil,c)
...@@ -148,10 +147,8 @@ function c50907446.FShaddollCondition() ...@@ -148,10 +147,8 @@ function c50907446.FShaddollCondition()
return c50907446.FShaddollSpFilter1(gc,c,tp,mg,exg,chkf) return c50907446.FShaddollSpFilter1(gc,c,tp,mg,exg,chkf)
end end
return mg:IsExists(c50907446.FShaddollSpFilter1,1,nil,c,tp,mg,exg,chkf) return mg:IsExists(c50907446.FShaddollSpFilter1,1,nil,c,tp,mg,exg,chkf)
end
end end
function c50907446.FShaddollOperation() function c50907446.FShaddollOperation(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local c=e:GetHandler() local c=e:GetHandler()
local mg=eg:Filter(c50907446.FShaddollFilter,nil,c) local mg=eg:Filter(c50907446.FShaddollFilter,nil,c)
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
...@@ -181,5 +178,4 @@ function c50907446.FShaddollOperation() ...@@ -181,5 +178,4 @@ function c50907446.FShaddollOperation()
g:Merge(sg) g:Merge(sg)
end end
Duel.SetFusionMaterial(g) Duel.SetFusionMaterial(g)
end
end end
--魅惑の女王 LV3 --魅惑の女王 LV3
local s,id,o=GetID()
function c87257460.initial_effect(c) function c87257460.initial_effect(c)
aux.AddCodeList(c,87257460,23756165) aux.AddCodeList(c,87257460,23756165)
--equip --equip
...@@ -11,15 +12,14 @@ function c87257460.initial_effect(c) ...@@ -11,15 +12,14 @@ function c87257460.initial_effect(c)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetCondition(c87257460.eqcon1) e1:SetCondition(c87257460.eqcon1)
e1:SetTarget(c87257460.eqtg) e1:SetTarget(c87257460.eqtg)
e1:SetOperation(c87257460.eqop1) e1:SetOperation(c87257460.eqop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c87257460.eqcon2) e2:SetCondition(c87257460.eqcon2)
e2:SetOperation(c87257460.eqop2)
e2:SetLabelObject(e1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(87257460,1)) e3:SetDescription(aux.Stringid(87257460,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -30,17 +30,14 @@ function c87257460.initial_effect(c) ...@@ -30,17 +30,14 @@ function c87257460.initial_effect(c)
e3:SetCost(c87257460.spcost) e3:SetCost(c87257460.spcost)
e3:SetTarget(c87257460.sptg) e3:SetTarget(c87257460.sptg)
e3:SetOperation(c87257460.spop) e3:SetOperation(c87257460.spop)
e3:SetLabelObject(e1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end 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 ec=e:GetLabelObject() return not aux.IsSelfEquip(e:GetHandler(),id) and not Duel.IsPlayerAffectedByEffect(tp,95937545)
return (ec==nil or ec:GetFlagEffect(87257460)==0) and not Duel.IsPlayerAffectedByEffect(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 ec=e:GetLabelObject():GetLabelObject() return not aux.IsSelfEquip(e:GetHandler(),id) and Duel.IsPlayerAffectedByEffect(tp,95937545)
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()
...@@ -54,40 +51,15 @@ function c87257460.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -54,40 +51,15 @@ function c87257460.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end end
function c87257460.eqlimit(e,c) function c87257460.eqlimit(e,c)
return e:GetOwner()==c and not c:IsDisabled() return e:GetOwner()==c
end end
function c87257460.eqop1(e,tp,eg,ep,ev,re,r,rp) function c87257460.eqop(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
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit --Add Equip limit
tc:RegisterFlagEffect(87257460,RESET_EVENT+RESETS_STANDARD,0,0) tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0)
e: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.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) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
...@@ -108,8 +80,7 @@ function c87257460.repval(e,re,r,rp) ...@@ -108,8 +80,7 @@ function c87257460.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 return bit.band(r,REASON_BATTLE)~=0
end end
function c87257460.spcon(e,tp,eg,ep,ev,re,r,rp) function c87257460.spcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject():GetLabelObject() return Duel.GetTurnPlayer()==tp and aux.IsSelfEquip(e:GetHandler(),id)
return Duel.GetTurnPlayer()==tp and ec and ec:GetFlagEffect(87257460)~=0
end end
function c87257460.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c87257460.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
...@@ -130,6 +101,5 @@ function c87257460.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -130,6 +101,5 @@ function c87257460.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
tc:CompleteProcedure()
end end
end end
\ No newline at end of file
...@@ -1961,8 +1961,8 @@ function Auxiliary.EnablePendulumAttribute(c,reg) ...@@ -1961,8 +1961,8 @@ function Auxiliary.EnablePendulumAttribute(c,reg)
e1:SetCode(EFFECT_SPSUMMON_PROC_G) e1:SetCode(EFFECT_SPSUMMON_PROC_G)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCondition(Auxiliary.PendCondition()) e1:SetCondition(Auxiliary.PendCondition)
e1:SetOperation(Auxiliary.PendOperation()) e1:SetOperation(Auxiliary.PendOperation)
e1:SetValue(SUMMON_TYPE_PENDULUM) e1:SetValue(SUMMON_TYPE_PENDULUM)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--register by default --register by default
...@@ -2002,8 +2002,7 @@ function Auxiliary.PConditionFilter(c,e,tp,lscale,rscale,eset) ...@@ -2002,8 +2002,7 @@ function Auxiliary.PConditionFilter(c,e,tp,lscale,rscale,eset)
and not c:IsForbidden() and not c:IsForbidden()
and (Auxiliary.PendulumChecklist&(0x1<<tp)==0 or Auxiliary.PConditionExtraFilter(c,e,tp,lscale,rscale,eset)) and (Auxiliary.PendulumChecklist&(0x1<<tp)==0 or Auxiliary.PConditionExtraFilter(c,e,tp,lscale,rscale,eset))
end end
function Auxiliary.PendCondition() function Auxiliary.PendCondition(e,c,og)
return function(e,c,og)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)} local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_EXTRA_PENDULUM_SUMMON)}
...@@ -2024,7 +2023,6 @@ function Auxiliary.PendCondition() ...@@ -2024,7 +2023,6 @@ function Auxiliary.PendCondition()
g=Duel.GetFieldGroup(tp,loc,0) g=Duel.GetFieldGroup(tp,loc,0)
end end
return g:IsExists(Auxiliary.PConditionFilter,1,nil,e,tp,lscale,rscale,eset) return g:IsExists(Auxiliary.PConditionFilter,1,nil,e,tp,lscale,rscale,eset)
end
end end
function Auxiliary.PendOperationCheck(ft1,ft2,ft) function Auxiliary.PendOperationCheck(ft1,ft2,ft)
return function(g) return function(g)
...@@ -2033,8 +2031,7 @@ function Auxiliary.PendOperationCheck(ft1,ft2,ft) ...@@ -2033,8 +2031,7 @@ function Auxiliary.PendOperationCheck(ft1,ft2,ft)
return #g<=ft and #exg<=ft2 and #mg<=ft1 return #g<=ft and #exg<=ft2 and #mg<=ft1
end end
end end
function Auxiliary.PendOperation() function Auxiliary.PendOperation(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
return function(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1) local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
local lscale=c:GetLeftScale() local lscale=c:GetLeftScale()
local rscale=rpz:GetRightScale() local rscale=rpz:GetRightScale()
...@@ -2096,7 +2093,6 @@ function Auxiliary.PendOperation() ...@@ -2096,7 +2093,6 @@ function Auxiliary.PendOperation()
sg:Merge(g) sg:Merge(g)
Duel.HintSelection(Group.FromCards(c)) Duel.HintSelection(Group.FromCards(c))
Duel.HintSelection(Group.FromCards(rpz)) Duel.HintSelection(Group.FromCards(rpz))
end
end end
--enable revive limit for monsters that are also pendulum sumonable from certain locations (Odd-Eyes Revolution Dragon) --enable revive limit for monsters that are also pendulum sumonable from certain locations (Odd-Eyes Revolution Dragon)
function Auxiliary.EnableReviveLimitPendulumSummonable(c, loc) function Auxiliary.EnableReviveLimitPendulumSummonable(c, loc)
......
...@@ -1639,3 +1639,10 @@ end ...@@ -1639,3 +1639,10 @@ end
function Auxiliary.BanishRedirectCondition(e) function Auxiliary.BanishRedirectCondition(e)
return e:GetHandler():IsFaceup() return e:GetHandler():IsFaceup()
end end
---Check if c has a equip card equipped by the effect of itself.
---@param c Card
---@param id integer
---@return boolean
function Auxiliary.IsSelfEquip(c,id)
return c:GetEquipGroup():IsExists(Card.GetFlagEffect,1,nil,id)
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