Commit 1b7bf044 authored by Tachibana's avatar Tachibana

ndyd

parent 335c4b6f
Pipeline #4673 passed with stages
in 19 minutes and 57 seconds
No preview for this file type
expansions/pics/40006873.jpg

18 KB | W: | H:

expansions/pics/40006873.jpg

19.1 KB | W: | H:

expansions/pics/40006873.jpg
expansions/pics/40006873.jpg
expansions/pics/40006873.jpg
expansions/pics/40006873.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40006875.jpg

16.1 KB | W: | H:

expansions/pics/40006875.jpg

18.4 KB | W: | H:

expansions/pics/40006875.jpg
expansions/pics/40006875.jpg
expansions/pics/40006875.jpg
expansions/pics/40006875.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40006877.jpg

17.1 KB | W: | H:

expansions/pics/40006877.jpg

17.6 KB | W: | H:

expansions/pics/40006877.jpg
expansions/pics/40006877.jpg
expansions/pics/40006877.jpg
expansions/pics/40006877.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40006879.jpg

16.5 KB | W: | H:

expansions/pics/40006879.jpg

17.8 KB | W: | H:

expansions/pics/40006879.jpg
expansions/pics/40006879.jpg
expansions/pics/40006879.jpg
expansions/pics/40006879.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40006881.jpg

15.5 KB | W: | H:

expansions/pics/40006881.jpg

17.7 KB | W: | H:

expansions/pics/40006881.jpg
expansions/pics/40006881.jpg
expansions/pics/40006881.jpg
expansions/pics/40006881.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40006882.jpg

17.2 KB | W: | H:

expansions/pics/40006882.jpg

16.7 KB | W: | H:

expansions/pics/40006882.jpg
expansions/pics/40006882.jpg
expansions/pics/40006882.jpg
expansions/pics/40006882.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40006884.jpg

17.2 KB | W: | H:

expansions/pics/40006884.jpg

18.4 KB | W: | H:

expansions/pics/40006884.jpg
expansions/pics/40006884.jpg
expansions/pics/40006884.jpg
expansions/pics/40006884.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40006885.jpg

18.4 KB | W: | H:

expansions/pics/40006885.jpg

18.7 KB | W: | H:

expansions/pics/40006885.jpg
expansions/pics/40006885.jpg
expansions/pics/40006885.jpg
expansions/pics/40006885.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40006886.jpg

19.3 KB | W: | H:

expansions/pics/40006886.jpg

19.5 KB | W: | H:

expansions/pics/40006886.jpg
expansions/pics/40006886.jpg
expansions/pics/40006886.jpg
expansions/pics/40006886.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40006887.jpg

16.9 KB | W: | H:

expansions/pics/40006887.jpg

18.9 KB | W: | H:

expansions/pics/40006887.jpg
expansions/pics/40006887.jpg
expansions/pics/40006887.jpg
expansions/pics/40006887.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40006889.jpg

16.9 KB | W: | H:

expansions/pics/40006889.jpg

16.5 KB | W: | H:

expansions/pics/40006889.jpg
expansions/pics/40006889.jpg
expansions/pics/40006889.jpg
expansions/pics/40006889.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40006890.jpg

15.2 KB | W: | H:

expansions/pics/40006890.jpg

14.8 KB | W: | H:

expansions/pics/40006890.jpg
expansions/pics/40006890.jpg
expansions/pics/40006890.jpg
expansions/pics/40006890.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/field/40006889.jpg

107 KB | W: | H:

expansions/pics/field/40006889.jpg

106 KB | W: | H:

expansions/pics/field/40006889.jpg
expansions/pics/field/40006889.jpg
expansions/pics/field/40006889.jpg
expansions/pics/field/40006889.jpg
  • 2-up
  • Swipe
  • Onion skin
--一人千面·五右卫门
function c40006873.initial_effect(c)
c:SetUniqueOnField(1,0,40006873)
local m=40006873
local cm=_G["c"..m]
cm.named_with_AShapeShifter=1
function cm.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40006873,0))
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,40006873)
e1:SetTarget(c40006873.eqtg)
e1:SetOperation(c40006873.eqop)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40006873,1))
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,40006874)
e2:SetCost(c40006873.cost)
e2:SetTarget(c40006873.target)
e2:SetOperation(c40006873.operation)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
c40006873.discard_effect=e2
--negate
cm.discard_effect=e2
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40006873,2))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_CHAINING)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(c40006873.negcon)
e3:SetCost(c40006873.negcost)
e3:SetTarget(c40006873.negtg)
e3:SetOperation(c40006873.negop)
e3:SetTarget(cm.tg)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
end
function c40006873.filter(c)
return c:IsFaceup()
end
function c40006873.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40006873.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c40006873.filter,tp,LOCATION_MZONE,0,1,nil) end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and Card.IsFaceup(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(m)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c40006873.filter,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
c:RegisterFlagEffect(m,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c40006873.eqop(e,tp,eg,ep,ev,re,r,rp)
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:IsControler(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
if not c:CheckUniqueOnField(tp,LOCATION_SZONE) or c:IsForbidden() then return end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c40006873.eqlimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
c:RegisterEffect(e1)
--race
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_PSYCHO)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
--equip effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
......@@ -88,10 +75,14 @@ function c40006873.eqop(e,tp,eg,ep,ev,re,r,rp)
e4:SetValue(1900)
c:RegisterEffect(e4)
end
function c40006873.eqlimit(e,c)
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c40006873.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.AShapeShifter(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_AShapeShifter
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
if c:IsLocation(LOCATION_HAND) then
......@@ -99,35 +90,39 @@ function c40006873.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
function c40006873.ctfilter(c)
return c:IsSetCard(0xdf1d) and c:IsType(TYPE_MONSTER) and not c:IsCode(40006873) and c:IsAbleToHand()
function cm.ctfilter(c)
return cm.AShapeShifter(c) and c:IsType(TYPE_MONSTER) and not c:IsCode(m) and c:IsAbleToHand()
end
function c40006873.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c40006873.ctfilter,tp,LOCATION_DECK,0,1,nil) end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.ctfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c40006873.operation(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c40006873.ctfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.ctfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c40006873.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c40006873.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and ep~=tp and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev)
function cm.thfilter0(c)
return cm.AShapeShifter(c) and not c:IsCode(m) and c:IsAbleToHand()
end
function c40006873.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(m)==0 and Duel.IsExistingMatchingCard(cm.thfilter0,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
c:RegisterFlagEffect(m,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c40006873.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoGrave(eg,REASON_EFFECT)
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter0,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end
\ No newline at end of file
--一人千面·约翰娜
function c40006875.initial_effect(c)
c:SetUniqueOnField(1,0,40006875)
--synchro limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c40006875.synlimit)
c:RegisterEffect(e0)
local m=40006875
local cm=_G["c"..m]
cm.named_with_AShapeShifter=1
function cm.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40006875,0))
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,40006875)
e1:SetTarget(c40006875.eqtg)
e1:SetOperation(c40006875.eqop)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40006875,1))
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,40006876)
e2:SetCost(c40006875.cost)
e2:SetTarget(c40006875.target)
e2:SetOperation(c40006875.operation)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
c40006875.discard_effect=e2
--special summon
cm.discard_effect=e2
--unequip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40006875,2))
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c40006875.sptg)
e3:SetOperation(c40006875.spop)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
--unsynchroable
local e4=Effect.CreateEffect(c)
......@@ -49,44 +42,35 @@ function c40006875.initial_effect(c)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c40006875.synlimit(e,c)
if not c then return false end
return not c:IsAttribute(ATTRIBUTE_DARK)
function cm.AShapeShifter(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_AShapeShifter
end
function c40006875.filter(c)
return c:IsFaceup()
end
function c40006875.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40006875.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c40006875.filter,tp,LOCATION_MZONE,0,1,nil) end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and Card.IsFaceup(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(m)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c40006875.filter,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
c:RegisterFlagEffect(m,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c40006875.eqop(e,tp,eg,ep,ev,re,r,rp)
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:IsControler(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
if not c:CheckUniqueOnField(tp,LOCATION_SZONE) or c:IsForbidden() then return end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c40006875.eqlimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
c:RegisterEffect(e1)
--race
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_PSYCHO)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
--equip effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
......@@ -102,10 +86,10 @@ function c40006875.eqop(e,tp,eg,ep,ev,re,r,rp)
e4:SetValue(1300)
c:RegisterEffect(e4)
end
function c40006875.eqlimit(e,c)
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c40006875.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
if c:IsLocation(LOCATION_HAND) then
......@@ -113,28 +97,39 @@ function c40006875.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
function c40006875.ctfilter(c)
return c:IsSetCard(0xdf1d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
function cm.ctfilter(c)
return cm.AShapeShifter(c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c40006875.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c40006875.ctfilter,tp,LOCATION_DECK,0,1,nil) end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.ctfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c40006875.operation(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c40006875.ctfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.ctfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c40006875.sptg(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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(m)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:RegisterFlagEffect(m,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c40006875.spop(e,tp,eg,ep,ev,re,r,rp)
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECKBOT)
c:RegisterEffect(e1)
end
end
end
--一人千面·死灵之书
function c40006877.initial_effect(c)
c:SetUniqueOnField(1,0,40006877)
local m=40006877
local cm=_G["c"..m]
cm.named_with_AShapeShifter=1
function cm.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40006877,0))
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,40006877)
e1:SetTarget(c40006877.eqtg)
e1:SetOperation(c40006877.eqop)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40006877,1))
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,40006878)
e2:SetCost(c40006877.cost)
e2:SetTarget(c40006877.sptgg)
e2:SetOperation(c40006877.spopp)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.sptgg)
e2:SetOperation(cm.spopp)
c:RegisterEffect(e2)
c40006877.discard_effect=e2
--special summon
cm.discard_effect=e2
--unequip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40006877,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCost(c40006877.spcost)
e3:SetTarget(c40006877.sptg)
e3:SetOperation(c40006877.spop)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function c40006877.filter(c)
return c:IsFaceup()
function cm.AShapeShifter(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_AShapeShifter
end
function c40006877.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40006877.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c40006877.filter,tp,LOCATION_MZONE,0,1,nil) end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and Card.IsFaceup(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(m)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c40006877.filter,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
c:RegisterFlagEffect(m,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c40006877.eqop(e,tp,eg,ep,ev,re,r,rp)
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:IsControler(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
if not c:CheckUniqueOnField(tp,LOCATION_SZONE) or c:IsForbidden() then return end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c40006877.eqlimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
c:RegisterEffect(e1)
--race
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_PSYCHO)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
--equip effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
......@@ -86,10 +79,10 @@ function c40006877.eqop(e,tp,eg,ep,ev,re,r,rp)
e4:SetValue(2100)
c:RegisterEffect(e4)
end
function c40006877.eqlimit(e,c)
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c40006877.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
if c:IsLocation(LOCATION_HAND) then
......@@ -97,30 +90,30 @@ function c40006877.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
function c40006877.filter2(c,e,tp)
return not c:IsCode(40006877) and c:IsSetCard(0xdf1d) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
function cm.filter2(c,e,tp)
return not c:IsCode(m) and cm.AShapeShifter(c) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c40006877.filter3(c,e,tp)
function cm.filter3(c,e,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPosition(POS_FACEUP) and c:GetControler()==tp
and c:IsType(TYPE_MONSTER)
end
function c40006877.sptgg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40006877.filter2,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c40006877.filter3,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(c40006877.filter2,tp,LOCATION_DECK,0,nil,e,tp)
function cm.sptgg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(cm.filter3,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_DECK,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c40006877.spopp(e,tp,eg,ep,ev,re,r,rp)
function cm.spopp(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151301,3))
local g=Duel.SelectMatchingCard(tp,c40006877.filter3,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,4))
local g=Duel.SelectMatchingCard(tp,cm.filter3,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151301,2))
local g1=Duel.SelectMatchingCard(tp,c40006877.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,3))
local g1=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
local tc2=g1:GetFirst()
if tc2:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(g1) end
......@@ -130,46 +123,40 @@ function c40006877.spopp(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c40006877.eqlimit2)
e1:SetValue(cm.eqlimit2)
e1:SetLabelObject(tc)
tc2:RegisterEffect(e1)
end
end
end
function c40006877.eqlimit2(e,c)
function cm.eqlimit2(e,c)
return c==e:GetLabelObject()
end
function c40006877.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c40006877.spfilter(c,e,tp)
return c:IsSetCard(0xdf1d) and c:IsType(TYPE_MONSTER) and not c:IsCode(40006877) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function cm.spfilter(c,e,tp)
return cm.AShapeShifter(c) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40006877.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c40006877.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c40006877.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c40006877.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(m)==0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
c:RegisterFlagEffect(m,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c40006877.spop(e,tp,eg,ep,ev,re,r,rp)
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECKBOT)
g:GetFirst():RegisterEffect(e1,true)
end
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c40006877.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c40006877.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_DARK)
end
--一人千面·米莱迪
function c40006879.initial_effect(c)
c:SetUniqueOnField(1,0,40006879)
local m=40006879
local cm=_G["c"..m]
cm.named_with_AShapeShifter=1
function cm.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40006879,0))
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,40006879)
e1:SetTarget(c40006879.eqtg)
e1:SetOperation(c40006879.eqop)
c:RegisterEffect(e1)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40006879,1))
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,40006880)
e2:SetCost(c40006879.cost)
e2:SetTarget(c40006879.target)
e2:SetOperation(c40006879.operation)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
c40006879.discard_effect=e2
--negate
cm.discard_effect=e2
--unequip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40006879,2))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_CHAINING)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(c40006879.negcon)
e3:SetCost(c40006879.negcost)
e3:SetTarget(c40006879.negtg)
e3:SetOperation(c40006879.negop)
e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop)
c:RegisterEffect(e3)
end
function c40006879.filter(c)
return c:IsFaceup()
function cm.AShapeShifter(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_AShapeShifter
end
function c40006879.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40006879.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c40006879.filter,tp,LOCATION_MZONE,0,1,nil) end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and Card.IsFaceup(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(m)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c40006879.filter,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
c:RegisterFlagEffect(m,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c40006879.eqop(e,tp,eg,ep,ev,re,r,rp)
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not tc:IsControler(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
if not c:CheckUniqueOnField(tp,LOCATION_SZONE) or c:IsForbidden() then return end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c40006879.eqlimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
c:RegisterEffect(e1)
--race
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_PSYCHO)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
--equip effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
......@@ -88,10 +79,10 @@ function c40006879.eqop(e,tp,eg,ep,ev,re,r,rp)
e4:SetValue(2500)
c:RegisterEffect(e4)
end
function c40006879.eqlimit(e,c)
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c40006879.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
if c:IsLocation(LOCATION_HAND) then
......@@ -99,47 +90,47 @@ function c40006879.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
function c40006879.ctfilter(c,e,tp)
return c:IsSetCard(0xdf1d) and not c:IsCode(40006879) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function cm.ctfilter(c,e,tp)
return cm.AShapeShifter(c) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40006879.target(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c40006879.ctfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(cm.ctfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c40006879.operation(e,tp,eg,ep,ev,re,r,rp)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c40006879.ctfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local g=Duel.SelectMatchingCard(tp,cm.ctfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
g:GetFirst():RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
tc:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
g:GetFirst():RegisterEffect(e2,true)
end
end
function c40006879.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
function cm.tgfilter(c)
return cm.AShapeShifter(c) and not c:IsCode(m) and c:IsAbleToGrave()
end
function c40006879.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and ep~=tp and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev)
end
function c40006879.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(m)==0 and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
c:RegisterFlagEffect(m,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c40006879.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoGrave(eg,REASON_EFFECT)
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
--JOKER·一人千面
function c40006881.initial_effect(c)
c:SetUniqueOnField(1,0,40006881)
local m=40006881
local cm=_G["c"..m]
cm.named_with_AShapeShifter=1
function cm.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40006881,0))
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCost(c40006881.sscost)
e1:SetTarget(c40006881.sstg)
e1:SetOperation(c40006881.ssop)
e1:SetCost(cm.sscost)
e1:SetTarget(cm.sstg)
e1:SetOperation(cm.ssop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40006881,1))
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,40008859)
e2:SetCondition(c40006881.spcon2)
e2:SetTarget(c40006881.eqtg)
e2:SetOperation(c40006881.eqop)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon2)
e2:SetTarget(cm.eqtg)
e2:SetOperation(cm.eqop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40006881,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,40006881)
e3:SetCondition(c40006881.thcon)
e3:SetTarget(c40006881.thtg)
e3:SetOperation(c40006881.thop)
c:RegisterEffect(e3)
--local e3=Effect.CreateEffect(c)
--e3:SetDescription(aux.Stringid(m,2))
--e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
--e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
--e3:SetProperty(EFFECT_FLAG_DELAY)
--e3:SetCode(EVENT_TO_GRAVE)
--e3:SetCountLimit(1,m)
--e3:SetCondition(cm.thcon)
--e3:SetTarget(cm.thtg)
--e3:SetOperation(cm.thop)
--c:RegisterEffect(e3)
end
function c40006881.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,e:GetHandler())
......@@ -45,32 +47,33 @@ function c40006881.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c40006881.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.sstg(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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c40006881.ssop(e,tp,eg,ep,ev,re,r,rp)
function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c40006881.spcon2(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0xdf1d)
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return cm.AShapeShifter(c)
end
function c40006881.eqfilter(c)
return c:IsRace(RACE_PSYCHO) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevelAbove(5) and not c:IsForbidden()
function cm.eqfilter(c)
return c:IsRace(RACE_PSYCHO) and c:IsAttribute(ATTRIBUTE_DARK) and not c:IsForbidden()
end
function c40006881.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c40006881.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
and Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c40006881.eqop(e,tp,eg,ep,ev,re,r,rp)
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c40006881.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c)
local g=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c)
local tc=g:GetFirst()
if c:IsFaceup() and c:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,true) then return end
......@@ -80,26 +83,30 @@ function c40006881.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c40006881.eqlimit)
e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1)
else Duel.SendtoGrave(tc,REASON_EFFECT) end
end
function c40006881.eqlimit(e,c)
function cm.eqlimit(e,c)
return e:GetOwner()==c
end
function c40006881.thcon(e,tp,eg,ep,ev,re,r,rp)
function cm.AShapeShifter(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_AShapeShifter
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c40006881.thfilter(c)
return c:IsSetCard(0xdf1d) and c:IsAbleToHand()
function cm.thfilter(c)
return cm.AShapeShifter(c) and c:IsAbleToHand()
end
function c40006881.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40006881.thfilter,tp,LOCATION_DECK,0,1,nil) end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c40006881.thop(e,tp,eg,ep,ev,re,r,rp)
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c40006881.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
--一人千面·展露真实
function c40006882.initial_effect(c)
local m=40006882
local cm=_G["c"..m]
cm.named_with_AShapeShifter=1
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,40006882)
e1:SetCost(c40006882.cost)
e1:SetTarget(c40006882.target)
e1:SetOperation(c40006882.activate)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40006882,0))
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_TO_DECK)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,40006883)
e2:SetCost(c40006882.thcost)
e2:SetCondition(c40006882.thcon)
e2:SetTarget(c40006882.thtg)
e2:SetOperation(c40006882.thop)
e2:SetCountLimit(1,m+1)
e2:SetCost(cm.thcost)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function c40006882.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.AShapeShifter(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_AShapeShifter
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil)
......@@ -34,47 +41,47 @@ function c40006882.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel.SendtoDeck(g,tp,2,REASON_COST)
end
function c40006882.filter1(c)
return c:IsSetCard(0xdf1d) and c:IsAbleToGrave() and not c:IsCode(40006882)
function cm.filter1(c)
return cm.AShapeShifter(c) and c:IsAbleToGrave() and not c:IsCode(m)
end
function c40006882.filter2(c)
return c:IsSetCard(0xdf1d) and c:IsAbleToHand() and not c:IsCode(40006882)
function cm.filter2(c)
return cm.AShapeShifter(c) and c:IsAbleToHand() and not c:IsCode(m)
end
function c40006882.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40006882.filter1,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c40006882.filter2,tp,LOCATION_DECK,0,1,nil) end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c40006882.activate(e,tp,eg,ep,ev,re,r,rp)
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c40006882.filter1,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c40006882.filter2,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c40006882.thfilter(c,tp)
return c:IsLocation(LOCATION_DECK) and c:IsSetCard(0xdf1d) and c:IsControler(tp)
function cm.thfilter(c,tp)
return c:IsLocation(LOCATION_DECK) and cm.AShapeShifter(c) and c:IsControler(tp)
end
function c40006882.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c40006882.thfilter,1,nil,tp)
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.thfilter,1,nil,tp)
end
function c40006882.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,1,REASON_COST)
end
function c40006882.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c40006882.thop(e,tp,eg,ep,ev,re,r,rp)
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--一人千面·佐罗
function c40006884.initial_effect(c)
c:SetSPSummonOnce(40006884)
c:SetUniqueOnField(1,0,40006884)
local m=40006884
local cm=_G["c"..m]
cm.named_with_AShapeShifter=1
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c40006884.matfilter,1,1)
aux.AddLinkProcedure(c,cm.matfilter,1,1)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40006884,0))
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCondition(c40006884.condition)
e1:SetTarget(c40006884.eqtg)
e1:SetOperation(c40006884.eqop)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40006884,1))
e2:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,40006884)
e2:SetCondition(c40006884.thcon)
e2:SetTarget(c40006884.thtg)
e2:SetOperation(c40006884.thop)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function c40006884.condition(e,tp,eg,ep,ev,re,r,rp)
function cm.AShapeShifter(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_AShapeShifter
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c40006884.matfilter(c)
return c:IsLinkSetCard(0xdf1d) and not c:IsLinkCode(40006884)
function cm.matfilter(c)
return c:IsLinkRace(RACE_PSYCHO) and not c:IsLinkCode(m)
end
function c40006884.filter(c)
return not c:IsCode(40006884) and c:IsSetCard(0xdf1d) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
function cm.filter(c)
return not c:IsCode(m) and cm.AShapeShifter(c) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c40006884.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40006884.filter(chkc) end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c40006884.filter,tp,LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c40006884.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c40006884.eqop(e,tp,eg,ep,ev,re,r,rp)
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
......@@ -58,55 +63,50 @@ function c40006884.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c40006884.eqlimit)
e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1)
end
end
function c40006884.eqlimit(e,c)
function cm.eqlimit(e,c)
return e:GetOwner()==c
end
function c40006884.thcon(e,tp,eg,ep,ev,re,r,rp)
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c40006884.filter2(c,e,tp)
return not c:IsCode(40006884) and c:IsSetCard(0xdf1d) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
function cm.cfilter(c)
return c:IsFaceup()
end
function c40006884.filter3(c,e,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPosition(POS_FACEUP) and c:GetControler()==tp
and c:IsType(TYPE_MONSTER)
function cm.filter2(c)
return not c:IsCode(m) and cm.AShapeShifter(c) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c40006884.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40006884.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c40006884.filter3,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(c40006884.filter2,tp,LOCATION_GRAVE,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.cfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
function c40006884.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(40006884,3))
local g=Duel.SelectMatchingCard(tp,c40006884.filter3,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(40006884,2))
local g1=Duel.SelectMatchingCard(tp,c40006884.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
local tc2=g1:GetFirst()
if tc2:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(g1) end
Duel.Equip(tp,tc2,tc,true,true)
Duel.EquipComplete()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c40006884.eqlimit2)
e1:SetLabelObject(tc)
tc2:RegisterEffect(e1)
end
if not tc:IsFaceup() or not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
local sc=sg:GetFirst()
if sc then
if not Duel.Equip(tp,sc,tc) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit2)
e1:SetLabelObject(tc)
sc:RegisterEffect(e1)
end
end
function c40006884.eqlimit2(e,c)
return c==e:GetLabelObject()
function cm.eqlimit2(e,c)
return e:GetLabelObject()==c
end
\ No newline at end of file
--一人千面·卡门
function c40006885.initial_effect(c)
c:SetUniqueOnField(1,0,40006885)
local m=40006885
local cm=_G["c"..m]
cm.named_with_AShapeShifter=1
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_PSYCHO),2,2)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40006885,0))
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCondition(c40006885.tecon)
e1:SetTarget(c40006885.eqtg)
e1:SetOperation(c40006885.eqop)
e1:SetCondition(cm.tecon)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40006885,1))
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,40006885)
e2:SetCondition(c40006885.thcon)
e2:SetTarget(c40006885.thtg)
e2:SetOperation(c40006885.thop)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function c40006885.tecon(e,tp,eg,ep,ev,re,r,rp)
function cm.AShapeShifter(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_AShapeShifter
end
function cm.tecon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c40006885.filter(c)
return not c:IsCode(40006885) and c:IsSetCard(0xdf1d) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
function cm.filter(c)
return not c:IsCode(m) and cm.AShapeShifter(c) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c40006885.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40006885.filter(chkc) end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c40006885.filter,tp,LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c40006885.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c40006885.eqop(e,tp,eg,ep,ev,re,r,rp)
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
......@@ -54,38 +60,31 @@ function c40006885.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c40006885.eqlimit)
e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1)
end
end
function c40006885.eqlimit(e,c)
function cm.eqlimit(e,c)
return e:GetOwner()==c
end
function c40006885.thcon(e,tp,eg,ep,ev,re,r,rp)
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c40006885.thfilter(c)
return c:IsSetCard(0xdf1d) and c:IsAbleToHand()
function cm.thfilter2(c,e)
return cm.AShapeShifter(c) and c:IsCanBeEffectTarget(e) and c:IsAbleToHand()
end
function c40006885.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40006885.thfilter(chkc) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c40006885.thfilter,tp,LOCATION_GRAVE,0,1,c) end
local g=Duel.GetMatchingGroup(c40006885.thfilter,tp,LOCATION_GRAVE,0,c):Filter(Card.IsCanBeEffectTarget,nil,e)
local tg=Group.CreateGroup()
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
tg:Merge(sg)
g:Remove(Card.IsCode,nil,sg:GetFirst():GetCode())
until tg:GetCount()==2 or g:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(40006885,2))
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,tg:GetCount(),0,0)
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(cm.thfilter2,tp,LOCATION_GRAVE,0,nil,e)
if chk==0 then return g:GetClassCount(Card.GetCode)>=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
Duel.SetTargetCard(g1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0)
end
function c40006885.thop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--一人千面·基德船长
function c40006886.initial_effect(c)
c:SetUniqueOnField(1,0,40006886)
local m=40006886
local cm=_G["c"..m]
cm.named_with_AShapeShifter=1
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_LINK),2)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40006886,0))
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCondition(c40006886.tecon)
e1:SetTarget(c40006886.eqtg)
e1:SetOperation(c40006886.eqop)
e1:SetCondition(cm.tecon)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
--spsummon link
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40006886,1))
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,40006886)
e2:SetCost(c40006886.spcost)
e2:SetTarget(c40006886.sptg)
e2:SetOperation(c40006886.spop)
e2:SetCountLimit(1,m)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function c40006886.tecon(e,tp,eg,ep,ev,re,r,rp)
function cm.AShapeShifter(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_AShapeShifter
end
function cm.tecon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c40006886.filter(c)
return not c:IsCode(40006886) and c:IsSetCard(0xdf1d) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
function cm.filter(c)
return not c:IsCode(m) and cm.AShapeShifter(c) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c40006886.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40006886.filter(chkc) end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c40006886.filter,tp,LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c40006886.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c40006886.eqop(e,tp,eg,ep,ev,re,r,rp)
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
......@@ -53,35 +59,35 @@ function c40006886.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c40006886.eqlimit)
e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1)
end
end
function c40006886.eqlimit(e,c)
function cm.eqlimit(e,c)
return e:GetOwner()==c
end
function c40006886.costfilter(c,ec)
function cm.costfilter(c,ec)
return c:IsFaceup() and c:GetEquipTarget()==ec and c:IsAbleToGraveAsCost()
end
function c40006886.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40006886.costfilter,tp,LOCATION_SZONE,0,1,nil,e:GetHandler()) end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_SZONE,0,1,nil,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c40006886.costfilter,tp,LOCATION_SZONE,0,1,1,nil,e:GetHandler())
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_SZONE,0,1,1,nil,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function c40006886.spfilter(c,e,tp,zone)
function cm.spfilter(c,e,tp,zone)
return c:IsType(TYPE_LINK) and c:IsLinkBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c40006886.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=Duel.GetLinkedZone(tp)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40006886.spfilter(chkc,e,tp,zone) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp,zone) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c40006886.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c40006886.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,zone)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c40006886.spop(e,tp,eg,ep,ev,re,r,rp)
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local zone=Duel.GetLinkedZone(tp)
if tc:IsRelateToEffect(e) and zone~=0 then
......
--一人千面·亚森
function c40006887.initial_effect(c)
c:SetUniqueOnField(1,0,40006887)
local m=40006887
local cm=_G["c"..m]
cm.named_with_AShapeShifter=1
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3)
c:EnableReviveLimit()
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40006887,0))
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCondition(c40006887.tecon)
e1:SetTarget(c40006887.eqtg)
e1:SetOperation(c40006887.eqop)
e1:SetCondition(cm.tecon)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
--spsummon link
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40006887,1))
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,40006887)
e2:SetCost(c40006887.spcost)
e2:SetTarget(c40006887.sptg)
e2:SetOperation(c40006887.spop)
e2:SetCountLimit(1,m)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40006887,2))
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c40006887.negcon)
e3:SetTarget(c40006887.negtg)
e3:SetOperation(c40006887.negop)
e3:SetCondition(cm.negcon)
e3:SetTarget(cm.negtg)
e3:SetOperation(cm.negop)
c:RegisterEffect(e3)
--spsummon count limit
local e4=Effect.CreateEffect(c)
......@@ -46,36 +48,40 @@ function c40006887.initial_effect(c)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(0,1)
e4:SetCondition(c40006887.eqcon)
e4:SetCondition(cm.eqcon)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c40006887.cfilter(c,zone)
function cm.cfilter(c,zone)
local seq=c:GetSequence()
if c:IsControler(1) then seq=seq+16 end
return bit.extract(zone,seq)~=0
end
function c40006887.eqcon(e,tp,eg,ep,ev,re,r,rp)
function cm.AShapeShifter(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_AShapeShifter
end
function cm.eqcon(e,tp,eg,ep,ev,re,r,rp)
local eg=e:GetHandler():GetEquipGroup()
local zone=Duel.GetLinkedZone(0)+Duel.GetLinkedZone(1)*0x10000
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c40006887.cfilter,1,nil,zone) and eg:GetCount()>0
return not eg:IsContains(e:GetHandler()) and eg:IsExists(cm.cfilter,1,nil,zone) and eg:GetCount()>0
end
function c40006887.tecon(e,tp,eg,ep,ev,re,r,rp)
function cm.tecon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c40006887.filter(c)
return not c:IsCode(40006887) and c:IsSetCard(0xdf1d) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
function cm.filter(c)
return not c:IsCode(m) and cm.AShapeShifter(c) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c40006887.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c40006887.filter(chkc,e,tp,e:GetHandler()) end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp,e:GetHandler()) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c40006887.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler()) end
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler()) end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.GetMatchingGroup(c40006887.filter,tp,LOCATION_GRAVE,0,nil,e,tp,e:GetHandler())
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil,e,tp,e:GetHandler())
local g1=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode())
if ft>1 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(40006887,3)) then
if ft>1 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g2=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,g2:GetFirst():GetCode())
......@@ -85,7 +91,7 @@ function c40006887.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c40006887.eqop(e,tp,eg,ep,ev,re,r,rp)
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if ft<g:GetCount() then return end
......@@ -99,37 +105,37 @@ function c40006887.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c40006887.eqlimit)
e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
Duel.EquipComplete()
end
function c40006887.eqlimit(e,c)
function cm.eqlimit(e,c)
return e:GetOwner()==c
end
function c40006887.costfilter(c,ec)
function cm.costfilter(c,ec)
return c:IsFaceup() and c:GetEquipTarget()==ec and c:IsAbleToGraveAsCost()
end
function c40006887.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40006887.costfilter,tp,LOCATION_SZONE,0,1,nil,e:GetHandler()) end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_SZONE,0,1,nil,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c40006887.costfilter,tp,LOCATION_SZONE,0,1,1,nil,e:GetHandler())
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_SZONE,0,1,1,nil,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function c40006887.filter2(c)
function cm.filter2(c)
return not c:IsForbidden() and c:IsType(TYPE_MONSTER)
end
function c40006887.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40006887.filter2(chkc) end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter2(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c40006887.filter2,tp,LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingTarget(cm.filter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c40006887.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectTarget(tp,cm.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c40006887.spop(e,tp,eg,ep,ev,re,r,rp)
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
......@@ -140,49 +146,49 @@ function c40006887.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c40006887.eqlimit2)
e1:SetValue(cm.eqlimit2)
tc:RegisterEffect(e1)
end
end
function c40006887.eqlimit2(e,c)
function cm.eqlimit2(e,c)
return e:GetOwner()==c
end
function c40006887.negcon(e,tp,eg,ep,ev,re,r,rp)
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local eg=e:GetHandler():GetEquipGroup()
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) and eg:GetCount()>0
end
function c40006887.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c40006887.negop(e,tp,eg,ep,ev,re,r,rp)
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoGrave(eg,REASON_EFFECT)
end
end
function c40006887.aclimit1(e,tp,eg,ep,ev,re,r,rp)
function cm.aclimit1(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or not re:IsActiveType(TYPE_MONSTER) then return end
e:GetHandler():RegisterFlagEffect(40006887,RESET_EVENT+0x3ff0000+RESET_PHASE+PHASE_END,0,1)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0x3ff0000+RESET_PHASE+PHASE_END,0,1)
end
function c40006887.cefilter1(c)
function cm.cefilter1(c)
return c:IsType(TYPE_LINK)
end
function c40006887.econ1(e)
function cm.econ1(e)
local c=e:GetHandler()
local eg=c:GetEquipGroup()
return e:GetHandler():IsExtraLinkState() and #eg>0
end
function c40006887.elimit(e,re,tp)
function cm.elimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e)
end
function c40006887.aclimit3(e,tp,eg,ep,ev,re,r,rp)
function cm.aclimit3(e,tp,eg,ep,ev,re,r,rp)
if ep~=tp or not re:IsActiveType(TYPE_MONSTER) then return end
e:GetHandler():RegisterFlagEffect(40006888,RESET_EVENT+0x3ff0000+RESET_PHASE+PHASE_END,0,1)
end
function c40006887.cefilter(c)
function cm.cefilter(c)
return c:IsType(TYPE_LINK)
end
function c40006887.econ2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c40006887.cefilter,tp,LOCATION_MZONE,0,5,nil)
function cm.econ2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cefilter,tp,LOCATION_MZONE,0,5,nil)
end
\ No newline at end of file
--一人千面·亚森
function c40006889.initial_effect(c)
--一人千面·聚欲成众
local m=40006889
local cm=_G["c"..m]
cm.named_with_AShapeShifter=1
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -28,72 +31,76 @@ function c40006889.initial_effect(c)
c:RegisterEffect(e4)
--search
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(40006889,0))
e5:SetDescription(aux.Stringid(m,0))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_TO_DECK)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,40006889)
e5:SetCondition(c40006889.thcon)
e5:SetTarget(c40006889.thtg)
e5:SetOperation(c40006889.thop)
e5:SetCountLimit(1,m)
e5:SetCondition(cm.thcon)
e5:SetTarget(cm.thtg)
e5:SetOperation(cm.thop)
c:RegisterEffect(e5)
--search
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(40006889,1))
e6:SetDescription(aux.Stringid(m,1))
e6:SetCategory(CATEGORY_EQUIP)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_FZONE)
e6:SetCountLimit(1,400068899)
e6:SetTarget(c40006889.sptgg)
e6:SetOperation(c40006889.spopp)
e6:SetCountLimit(1,m+2)
e6:SetTarget(cm.sptgg)
e6:SetOperation(cm.spopp)
c:RegisterEffect(e6)
end
function c40006889.thfilter(c,tp)
return c:IsLocation(LOCATION_DECK) and c:IsSetCard(0xdf1d) and c:IsControler(tp)
function cm.AShapeShifter(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_AShapeShifter
end
function c40006889.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c40006889.thfilter,1,nil,tp)
function cm.thfilter(c,tp)
return c:IsLocation(LOCATION_DECK) and cm.AShapeShifter(c) and c:IsControler(tp)
end
function c40006889.filter1(c)
return c:IsSetCard(0xdf1d) and c:IsAbleToHand() and not c:IsCode(40006889)
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.thfilter,1,nil,tp)
end
function c40006889.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40006889.filter1,tp,LOCATION_DECK,0,1,nil) end
function cm.filter1(c)
return cm.AShapeShifter(c) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c40006889.thop(e,tp,eg,ep,ev,re,r,rp)
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c40006889.filter1,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c40006889.filter2(c,e,tp)
return c:IsSetCard(0xdf1d) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
function cm.filter2(c,e,tp)
return cm.AShapeShifter(c) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c40006889.filter3(c,e,tp)
function cm.filter3(c,e,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPosition(POS_FACEUP) and c:GetControler()==tp
and c:IsSetCard(0xdf1d) and c:IsType(TYPE_MONSTER)
and cm.AShapeShifter(c) and c:IsType(TYPE_MONSTER)
end
function c40006889.sptgg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40006889.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c40006889.filter3,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(c40006889.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
function cm.sptgg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(cm.filter3,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c40006889.spopp(e,tp,eg,ep,ev,re,r,rp)
function cm.spopp(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local g=Duel.SelectMatchingCard(tp,c40006889.filter3,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,cm.filter3,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc:IsImmuneToEffect(e) then return end
local g1=Duel.SelectMatchingCard(tp,c40006889.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local g1=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
local tc2=g1:GetFirst()
if tc2:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(g1) end
......@@ -103,12 +110,12 @@ function c40006889.spopp(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c40006889.eqlimit2)
e1:SetValue(cm.eqlimit2)
e1:SetLabelObject(tc)
tc2:RegisterEffect(e1)
end
end
end
function c40006889.eqlimit2(e,c)
function cm.eqlimit2(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
--独我一人千面
function c40006890.initial_effect(c)
local m=40006890
local cm=_G["c"..m]
cm.named_with_AShapeShifter=1
function cm.initial_effect(c)
--Activate(summon)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON)
e1:SetCondition(c40006890.condition1)
e1:SetTarget(c40006890.target1)
e1:SetOperation(c40006890.activate1)
e1:SetCondition(cm.condition1)
e1:SetTarget(cm.target1)
e1:SetOperation(cm.activate1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON)
......@@ -20,9 +23,9 @@ function c40006890.initial_effect(c)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_ACTIVATE)
e4:SetCode(EVENT_CHAINING)
e4:SetCondition(c40006890.condition2)
e4:SetTarget(c40006890.target2)
e4:SetOperation(c40006890.activate2)
e4:SetCondition(cm.condition2)
e4:SetTarget(cm.target2)
e4:SetOperation(cm.activate2)
c:RegisterEffect(e4)
--Activate
local e5=Effect.CreateEffect(c)
......@@ -30,62 +33,66 @@ function c40006890.initial_effect(c)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_GRAVE)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetCountLimit(1,40006890)
e5:SetCost(c40006890.cost)
e5:SetTarget(c40006890.sptg)
e5:SetOperation(c40006890.spop)
e5:SetCountLimit(1,m)
e5:SetCost(cm.cost)
e5:SetTarget(cm.sptg)
e5:SetOperation(cm.spop)
c:RegisterEffect(e5)
end
function c40006890.cfilter(c)
function cm.AShapeShifter(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_AShapeShifter
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(40006887)
end
function c40006890.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and Duel.IsExistingMatchingCard(c40006890.cfilter,tp,LOCATION_MZONE,0,1,nil)
function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c40006890.target1(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c40006890.activate1(e,tp,eg,ep,ev,re,r,rp)
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function c40006890.condition2(e,tp,eg,ep,ev,re,r,rp)
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(c40006890.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c40006890.target2(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c40006890.activate2(e,tp,eg,ep,ev,re,r,rp)
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c40006890.spfilter(c,e,tp)
return c:IsSetCard(0xdf1d) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function cm.spfilter(c,e,tp)
return cm.AShapeShifter(c) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40006890.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40006890.spfilter(chkc,e,tp) end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c40006890.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c40006890.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c40006890.spop(e,tp,eg,ep,ev,re,r,rp)
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c40006890.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,2,REASON_COST)
......
......@@ -13,19 +13,19 @@ function cm.initial_effect(c)
e0:SetRange(LOCATION_PZONE)
e0:SetTarget(cm.distg)
c:RegisterEffect(e0)
--actlimit
--act limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(cm.actcon1)
e1:SetOperation(cm.actop1)
e1:SetCondition(cm.limcon)
e1:SetOperation(cm.limop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EVENT_CHAIN_END)
e2:SetOperation(cm.subop)
e2:SetOperation(cm.limop2)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
......@@ -44,42 +44,27 @@ end
function cm.distg(e,c)
return c:IsControler(e:GetHandlerPlayer()) and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL) and c:IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.actfilter1(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL) and c:IsSummonType(SUMMON_TYPE_RITUAL)
function cm.limfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_RITUAL) and c:IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.actcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.actfilter1,1,nil,tp)
function cm.limcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.limfilter,1,nil,tp)
end
function cm.actop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
function cm.limop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(cm.chlimit)
Duel.SetChainLimitTillChainEnd(cm.chainlm)
elseif Duel.GetCurrentChain()==1 then
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(cm.resetop)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_BREAK_EFFECT)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function cm.resetop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:ResetFlagEffect(m)
c:Reset()
end
function cm.subop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(m)~=0 then
Duel.SetChainLimitTillChainEnd(cm.chlimit)
function cm.limop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetOverlayCount()>0 and e:GetHandler():GetFlagEffect(m)~=0 then
Duel.SetChainLimitTillChainEnd(cm.chainlm)
end
e:GetHandler():ResetFlagEffect(m)
end
function cm.chlimit(e,ep,tp)
return ep==tp or e:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not e:IsHasType(EFFECT_TYPE_ACTIVATE)
function cm.chlimit(e,rp,tp)
return tp==rp or (e:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not e:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function cm.thfilter(c)
return c:IsCode(33334568) and c:IsAbleToHand()
......
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