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