Commit b3aba0a6 authored by POLYMER's avatar POLYMER

update 250609 wd

parent ac556082
......@@ -6576,6 +6576,72 @@
53797035 0
60152302 0
60152314 0
10955013 0
10955014 0
10955016 0
10955017 0
10955018 0
10955019 0
10955020 0
10955021 0
10955022 0
10955023 0
10955025 0
10955026 0
10955027 0
10955029 0
10955030 0
10955031 0
5012601 0
5012602 0
5012603 0
5012604 0
5012605 0
5012606 0
5012607 0
5012608 0
5012609 0
5012610 0
5012611 0
5012612 0
5012613 0
5012614 0
5012615 0
5012616 0
5012617 0
5012618 0
5012619 0
5012620 0
5012621 0
5012622 0
5012623 0
5012624 0
5012625 0
5012626 0
5012627 0
5012628 0
5012629 0
5012630 0
5012631 0
5012632 0
5012634 0
5012635 0
5012636 0
5012637 0
5012638 0
5012639 0
5012681 0
5012682 0
5012683 0
5012684 0
5012685 0
5013115 0
5013300 0
5013355 0
5013400 0
5013411 0
5013507 0
90150000 0
#limit
33403513 1
82204250 0
......
No preview for this file type
expansions/pics/106556909.jpg

159 KB | W: | H:

expansions/pics/106556909.jpg

38 KB | W: | H:

expansions/pics/106556909.jpg
expansions/pics/106556909.jpg
expansions/pics/106556909.jpg
expansions/pics/106556909.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/119044827.jpg

133 KB | W: | H:

expansions/pics/119044827.jpg

33.2 KB | W: | H:

expansions/pics/119044827.jpg
expansions/pics/119044827.jpg
expansions/pics/119044827.jpg
expansions/pics/119044827.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/122638495.jpg

133 KB | W: | H:

expansions/pics/122638495.jpg

30.4 KB | W: | H:

expansions/pics/122638495.jpg
expansions/pics/122638495.jpg
expansions/pics/122638495.jpg
expansions/pics/122638495.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/134079868.jpg

161 KB | W: | H:

expansions/pics/134079868.jpg

37.2 KB | W: | H:

expansions/pics/134079868.jpg
expansions/pics/134079868.jpg
expansions/pics/134079868.jpg
expansions/pics/134079868.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/field/114722253.jpg

220 KB | W: | H:

expansions/pics/field/114722253.jpg

19.7 KB | W: | H:

expansions/pics/field/114722253.jpg
expansions/pics/field/114722253.jpg
expansions/pics/field/114722253.jpg
expansions/pics/field/114722253.jpg
  • 2-up
  • Swipe
  • Onion skin
--艾札力
local s,id,o=GetID()
s.MoJin=true
---@param c Card
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--betarge
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.drcon1)
e2:SetTarget(s.drtg)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_BECOME_TARGET)
e3:SetCondition(s.drcon2)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_POSITION)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_GRAVE)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCountLimit(1,id*2)
e4:SetCost(aux.bfgcost)
e4:SetTarget(s.postg)
e4:SetOperation(s.posop)
c:RegisterEffect(e4)
end
function s.tdfilter1(c)
return c:IsType(TYPE_MONSTER)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0
and Duel.IsExistingTarget(s.tdfilter1,tp,LOCATION_GRAVE,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,s.tdfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=0
or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:Filter(Card.IsRelateToEffect,nil,e):GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(tc:GetCode())
c:RegisterEffect(e1)
end
function s.drcon1(e,tp,eg,ep,ev,re,r,rp)
local bc=eg:GetFirst()
local c=e:GetHandler()
return bc:IsSetCard(0x23c) and bc:IsControler(tp) and c:GetCode()~=c:GetOriginalCodeRule()
end
function s.cfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x23c)
end
function s.drcon2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and eg:IsExists(s.cfilter,1,nil,tp) and c:GetCode()~=c:GetOriginalCodeRule()
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
local trp=Duel.GetTurnPlayer()
if trp~=tp then
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
function s.posfilter(c)
return c:IsType(TYPE_MONSTER) and c.MoJin==true and c:IsPosition(POS_FACEUP_DEFENSE) and c:IsCanChangePosition()
end
function s.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
end
function s.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
if Duel.ChangePosition(tc,0,0,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0 and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,0,1,nil,TYPE_SYNCHRO) and Duel.GetFlagEffect(tp,id)~=0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.RegisterFlagEffect(tp,id,0,0,0)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SKIP_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
if Duel.GetTurnPlayer()~=tp and ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(s.skipcon)
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,1)
end
Duel.RegisterEffect(e1,tp)
end
end
end
function s.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
end
--幻想猛兽
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x23c),2,127,false)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
c:RegisterEffect(e0)
--attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.atkval)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.descon)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(s.efilter)
c:RegisterEffect(e3)
end
s.material_setcode=0x23c
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.desfilter(c)
return c:IsFaceup()
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local ct=e:GetHandler():GetMaterialCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(g,REASON_EFFECT)
end
function s.atkfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsLevelBelow(3)
end
function s.value(e,c)
return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*600
end
function s.efilter(e,re)
return re:IsActivated() and not e:GetHandler():GetColumnGroup():IsContains(re:GetHandler())
end
\ No newline at end of file
--誉望万化
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_HANDES)
e1:SetCode(EVENT_TO_HAND)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id*2)
e1:SetCondition(s.condition)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,id)
e4:SetCost(s.thcost)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,1-tp)
end
function s.chkfilter(c)
return c:IsCode(5012615) and c:IsFaceup()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local check=Duel.IsExistingMatchingCard(s.chkfilter,tp,LOCATION_ONFIELD,0,1,nil)
local check2=Duel.IsExistingMatchingCard(s.chkfilter2,tp,LOCATION_HAND,0,1,nil) and Duel.IsPlayerCanDraw(tp,2)
if chk==0 then return check or check2 end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1)
end
function s.filter(c,e,tp)
return c:IsRelateToEffect(e) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end
function s.chkfilter2(c)
return c:IsSetCard(0x23c) and c:IsDiscardable(REASON_EFFECT)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local check=Duel.IsExistingMatchingCard(s.chkfilter,tp,LOCATION_ONFIELD,0,1,nil)
local check2=Duel.IsExistingMatchingCard(s.chkfilter2,tp,LOCATION_HAND,0,1,nil) and Duel.IsPlayerCanDraw(tp,2)
local sg=eg:Filter(s.filter,nil,e,1-tp)
if check then
Duel.SendtoDeck(sg,tp,nil,REASON_EFFECT)
end
Duel.BreakEffect()
if check2 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
if Duel.DiscardHand(tp,s.chkfilter2,1,1,REASON_EFFECT+REASON_DISCARD,nil)~=0 then
Duel.Draw(tp,2,REASON_EFFECT)
end
end
end
function s.cfilter1(c)
return c:IsSetCard(0x23c) and c:IsAbleToRemoveAsCost()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter1,tp,LOCATION_GRAVE,0,1,1,c)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end
end
function s.refilter1(c,tc)
return c:IsType(tc:GetType()) and c:IsAbleToRemove()
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then return end
Duel.SortDecktop(tp,1-tp,1)
local tc=Duel.GetDecktopGroup(1-tp,1):GetFirst()
if Duel.IsExistingMatchingCard(s.refilter1,tp,LOCATION_DECK,0,1,nil,tc) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rc=Duel.SelectMatchingCard(tp,s.refilter1,tp,LOCATION_DECK,0,1,1,nil,tc):GetFirst()
Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--结标淡希
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,id)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--damage
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,id)
e4:SetCost(aux.bfgcost)
e4:SetTarget(s.damtg)
e4:SetOperation(s.damop)
c:RegisterEffect(e4)
end
function s.thfilter(c)
return (c.MoJin or c:IsSetCard(0x23c)) and c:IsLevelBelow(4) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.GetLP(tp)>=500 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local dg=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil,REASON_EFFECT)
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.SetLP(tp,Duel.GetLP(tp)-500)
Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
end
end
function s.tgfilter(c)
return c:IsType(TYPE_SPELL|TYPE_TRAP) and c:IsFaceup()
end
function s.linkfilter(c,e)
local e1=nil
--extra material
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(s.matval)
c:RegisterEffect(e1)
local res=c:IsLinkSummonable(nil) and c:IsCode(5012617)
if e1 then e1:Reset() end
return res
end
function s.linkchkfilter(c)
return c:IsCode(5012617) and c:IsFacedown()
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil) or Duel.IsExistingMatchingCard(s.linkfilter,tp,LOCATION_EXTRA,0,1,nil,e) end
if exc then e1:Reset() end
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local e1=nil
local b1=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
local b2=Duel.IsExistingMatchingCard(s.linkfilter,tp,LOCATION_EXTRA,0,1,nil,e)
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,1))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(id,0))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(id,1))+1
else return end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if g1:GetCount()>0 then
Duel.SendtoGrave(g1,REASON_EFFECT+REASON_RETURN)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.linkfilter,tp,LOCATION_EXTRA,0,1,1,nil,e)
local tc=g:GetFirst()
--extra material
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(s.matval)
tc:RegisterEffect(e1)
if tc then
Duel.LinkSummon(tp,tc,nil)
end
end
local ge1=Effect.CreateEffect(e:GetHandler())
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_END)
ge1:SetLabelObject(e1)
ge1:SetOperation(s.retop)
Duel.RegisterEffect(ge1,0)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local e=e:GetLabelObject()
if e then e:Reset() end
end
function s.exmatcheck(c,lc,tp)
if not c:IsControler(1-tp) then return false end
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local f=te:GetValue()
local related,valid=f(te,lc,nil,c,tp)
if related and not te:GetHandler():IsCode(5012617) then return false end
end
return true
end
function s.matval(e,lc,mg,c,tp)
local ct=1
if Duel.GetTurnPlayer()==tp then ct=2 end
if e:GetHandler()~=lc then return false,nil end
return true,not mg or not mg:IsExists(s.exmatcheck,ct,nil,lc,tp)
end
\ No newline at end of file
--米娜·马瑟斯
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
c:EnableReviveLimit()
--material
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_EFFECT),1,1)
--spsum once
c:SetSPSummonOnce(id)
--23c
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_EXTRA,0)
e1:SetTarget(s.sttg)
e1:SetValue(0x23c)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(s.cost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_COST)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCost(s.spcost)
c:RegisterEffect(e0)
if not s.global_check then
s.global_check = true
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(s.regop)
Duel.RegisterEffect(ge1,0)
end
end
function s.spcost(e,c,tp,st)
if bit.band(st,SUMMON_TYPE_LINK)~=SUMMON_TYPE_LINK then return true end
return Duel.GetFlagEffect(tp,id)>0
end
function s.chkfilter(c,tp)
return c:IsCode(5012604) and c:IsSummonPlayer(tp)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
for p=0,1 do
local tc=eg:GetFirst()
while tc do
if s.chkfilter(tc,p) then
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1)
end
tc=eg:GetNext()
end
end
end
function s.cfilter(c)
return c:IsAbleToRemoveAsCost() and (c:IsType(TYPE_FUSION) or c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_XYZ))
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.filter(c)
return c:IsSummonable(true,nil)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function s.sttg(e,c)
return c.MoJin and c:IsType(TYPE_FUSION)
end
\ No newline at end of file
--托特塔罗
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
c:SetUniqueOnField(1,1,10955019)
c:EnableReviveLimit()
--spirit return
aux.EnableSpiritReturn(c,EVENT_SPSUMMON_SUCCESS)
--fusion summon
aux.AddFusionProcFun2(c,s.ffilter1,s.ffilter2,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e9:SetRange(LOCATION_MZONE)
e9:SetCode(EVENT_CHAIN_SOLVING)
e9:SetCountLimit(2,id)
e9:SetCondition(s.chcon)
e9:SetOperation(s.chop)
c:RegisterEffect(e9)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.discon)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
end
function s.ffilter1(c)
return c.MoJin==true and not c:IsSetCard(0x23c)
end
function s.ffilter2(c)
return c:IsSetCard(0x23c) and not c.MoJin==true
end
function s.chcon(e,tp,eg,ep,ev,re,r,rp)
local hp=e:GetHandler():GetOwner()
return (re:GetActiveType()==TYPE_SPELL or re:GetActiveType()==TYPE_TRAP) and Duel.IsExistingMatchingCard(s.dsfilter,hp,LOCATION_DECK,0,1,nil) and e:GetHandler():IsDefensePos()
end
function s.dsfilter(c)
return c.MoJin==true and c:IsAbleToGrave()
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
return Duel.ChangeChainOperation(ev,s.repop)
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
local hp=e:GetHandler():GetOwner()
Duel.Hint(HINT_SELECTMSG,hp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(hp,s.dsfilter,hp,0,LOCATION_DECK,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op,loc,seq2=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
if loc&LOCATION_SZONE~=0 and seq2>4 then return false end
local seq1=aux.MZoneSequence(c:GetSequence())
seq2=aux.MZoneSequence(seq2)
return bit.band(loc,LOCATION_ONFIELD)~=0
and (op==1-tp and seq1==4-seq2 or op==tp and seq1==seq2) and e:GetHandler():IsAttackPos()
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,10955019)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--黄金黎明
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.spfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c.MoJin
end
function s.spcon(e,tp)
return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
end
function s.spfilter2(c,e,tp)
return ((c:IsFaceup() and c:IsType(TYPE_PENDULUM)) or c:IsLocation(LOCATION_GRAVE)) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_DEFENSE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 then
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP_DEFENSE)~=0 then
local xyzg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,0,nil,TYPE_XYZ)
if #xyzg>0 and e:GetHandler():IsRelateToEffect(e)
and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local xc=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.Overlay(xc,e:GetHandler())
end
end
end
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
\ No newline at end of file
--垣根帝都
local s,id,o=GetID()
function s.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetTargetRange(POS_FACEUP,1)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e2:SetTargetRange(POS_FACEUP,0)
e2:SetCondition(s.spcon2)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop)
e2:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e2)
--return to hand
local e23=Effect.CreateEffect(c)
e23:SetDescription(aux.Stringid(410904,0))
e23:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e23:SetCode(EVENT_SPSUMMON_SUCCESS)
e23:SetCountLimit(1,id+o+EFFECT_COUNT_CODE_DUEL)
e23:SetCondition(s.spcondition)
e23:SetOperation(s.rthop)
c:RegisterEffect(e23)
--search
local e14=Effect.CreateEffect(c)
e14:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e14:SetCode(EVENT_BATTLE_DESTROYED)
e14:SetCountLimit(1,id*10+EFFECT_COUNT_CODE_DUEL)
e14:SetCondition(s.condition)
e14:SetOperation(s.operation)
c:RegisterEffect(e14)
local e15=e14:Clone()
e14:SetCondition(s.condition2)
c:RegisterEffect(e15)
--atk
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SET_BASE_ATTACK)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(s.atkcon)
e0:SetValue(s.atkval)
c:RegisterEffect(e0)
local e5=e0:Clone()
e5:SetCode(EFFECT_SET_BASE_DEFENSE)
e5:SetValue(s.defval)
c:RegisterEffect(e5)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetCondition(s.atkcon)
e3:SetValue(s.efilter)
c:RegisterEffect(e3)
end
function s.atkcon(e,c)
return e:GetHandlerPlayer()~=e:GetHandler():GetOwner()
end
function s.atkval(e,c)
return e:GetHandler():GetTextAttack()*2
end
function s.defval(e,c)
return e:GetHandler():GetTextDefense()*2
end
function s.efilter(e,te)
if te:GetOwnerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end
if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g or not g:IsContains(e:GetHandler())
end
function s.cfilter(c,ep,tp)
local reg=c:GetColumnGroup():Filter(Card.IsControler,nil,ep)
return c:GetColumnGroupCount()>0 and c:IsReleasable(REASON_SPSUMMON) and Duel.GetMZoneCount(ep,c,tp)>0 and not reg:IsExists(s.regfilter,1,nil)
end
function s.regfilter(c,ep,tp)
return not c:IsReleasable(REASON_SPSUMMON)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local lg=Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE,nil,1-tp,tp)
return #lg>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE,nil,1-tp,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
local og=tc:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
og:AddCard(tc)
og:KeepAlive()
e:SetLabelObject(og)
return true
else return false end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
end
function s.spcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
local lg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil,tp,tp)
return #lg>0
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil,tp,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
local og=tc:GetColumnGroup():Filter(Card.IsControler,nil,tp)
og:AddCard(tc)
og:KeepAlive()
e:SetLabelObject(og)
return true
else return false end
end
function s.spcondition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function s.rthop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,0,0,1)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0xff0000)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(10)
c:RegisterEffect(e1)
local e13=Effect.CreateEffect(c)
e13:SetType(EFFECT_TYPE_SINGLE)
e13:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e13:SetValue(ATTRIBUTE_LIGHT)
e13:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e13)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_DRAW_COUNT)
e2:SetTargetRange(1,0)
e2:SetCondition(s.chkcon)
e2:SetValue(2)
Duel.RegisterEffect(e2,tp)
local e20=Effect.CreateEffect(c)
e20:SetType(EFFECT_TYPE_FIELD)
e20:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e20:SetCode(EFFECT_DRAW_COUNT)
e20:SetTargetRange(1,0)
e20:SetCondition(s.chkcon)
e20:SetValue(2)
Duel.RegisterEffect(e20,1-tp)
--half damage
local e12=Effect.CreateEffect(e:GetHandler())
e12:SetType(EFFECT_TYPE_FIELD)
e12:SetCode(EFFECT_CHANGE_DAMAGE)
e12:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e12:SetTargetRange(1,0)
e12:SetCondition(s.chkcon)
e12:SetValue(s.damval)
Duel.RegisterEffect(e12,tp)
local e19=Effect.CreateEffect(e:GetHandler())
e19:SetType(EFFECT_TYPE_FIELD)
e19:SetCode(EFFECT_CHANGE_DAMAGE)
e19:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e19:SetTargetRange(1,0)
e19:SetCondition(s.chkcon)
e19:SetValue(s.damval)
Duel.RegisterEffect(e19,1-tp)
end
function s.chkcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),id)>0
end
function s.damval(e,re,val,r,rp,rc)
return math.floor(val/2)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function s.condition2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0 and re:IsCode(5012603)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,id)>0 and Duel.GetFlagEffect(1-tp,id)>0 then return end
Duel.Hint(HINT_CARD,0,10955021)
if Duel.GetFlagEffect(tp,id)>0 then
Duel.ResetFlagEffect(tp,id)
Duel.RegisterFlagEffect(1-tp,id,0,0,1)
else
Duel.ResetFlagEffect(1-tp,id)
Duel.RegisterFlagEffect(tp,id,0,0,1)
end
end
\ No newline at end of file
--树形图设计者
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--destroy and set
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--selfdes
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e7:SetRange(LOCATION_MZONE)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(s.descon)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetRange(LOCATION_PZONE)
c:RegisterEffect(e8)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DESTROYED)
e2:SetOperation(s.op)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_PZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetValue(50)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,109550220)~=0 then return end
Duel.RegisterFlagEffect(tp,109550220,0,0,0)
Duel.RegisterFlagEffect(1-tp,109550220,0,0,0)
end
function s.dfilter(c)
return c:IsCode(5012601) and c:IsFaceup()
end
function s.descon(e)
return Duel.IsExistingMatchingCard(s.dfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetFlagEffect(tp,109550220)==0
end
function s.filter(c)
return c:IsSetCard(0x23c) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,0,1,e:GetHandler(),tp) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if not g:GetCount()>0 then return end
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then
Duel.ConfirmCards(1-tp,g)
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--上天意志
local s,id,o=GetID()
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,4,s.ovfilter,aux.Stringid(id,0))
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.xyzlimit)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(s.tg)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(s.rmcost)
e3:SetTarget(s.rmtg)
e3:SetOperation(s.rmop)
c:RegisterEffect(e3)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(s.reptg)
e3:SetOperation(s.repop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(s.destg)
e4:SetOperation(s.desop)
c:RegisterEffect(e4)
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsCode(5012602) and c:IsLevel(6)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2100)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2100)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(tp,Duel.GetLP(tp)-600)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED,1,nil)
and e:GetHandler():IsType(TYPE_XYZ) and not e:GetHandler():IsReason(REASON_REPLACE) end
return true
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e)
local tc=g:GetFirst()
if tc then
Duel.Overlay(e:GetHandler(),tc)
if e:GetHandler():GetOverlayCount()==6 then
Duel.Win(1-tp,WIN_REASON_RELAY_SOUL)
end
end
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
--整体意识
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
c:RegisterEffect(e1)
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(s.condition)
e1:SetOperation(s.operaion)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,3))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(s.drcost)
e2:SetTarget(s.drtg)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
end
function s.spfilter(c)
return c:IsFaceup() and c:IsRace(RACE_THUNDER) and c:IsSetCard(0x23c)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsCode(5012603)
end
function s.cfilter2(c)
return c:IsFaceup() and c:IsCode(5012604)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.operaion(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(c:GetAttack()*100)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE)
e2:SetValue(c:GetAttack()*100)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2,true)
end
function s.cfilter(c)
return c:IsRace(RACE_THUNDER) and c:IsAbleToRemoveAsCost()
end
function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,2,c,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,2,2,c,c,tp)+c
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then Duel.Draw(tp,1,REASON_EFFECT) end
end
end
\ No newline at end of file
--白井黑子
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sumtg)
e1:SetOperation(s.sumop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(s.con)
e3:SetCountLimit(1,id*2)
e3:SetTarget(s.sptg2)
e3:SetOperation(s.spop2)
c:RegisterEffect(e3)
end
function s.spfilter(c,tp)
return c:IsFaceup() and not c:IsRace(RACE_PSYCHO) and c:IsAbleToHandAsCost()
and Duel.GetMZoneCount(tp,c)>0
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoHand(g,nil,REASON_SPSUMMON)
end
function s.sumfilter(c)
return c:IsSummonable(true,nil)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function s.spfilter3(c)
return c:IsFaceup() and c:IsCode(5012615)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
if c==nil then return Duel.IsExistingMatchingCard(s.spfilter3,tp,LOCATION_ONFIELD,0,1,nil) end
local tp=c:GetControler()
return Duel.GetMZoneCount(tp)>0
end
function s.spfilter2(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsFaceup()
and c:IsAbleToExtra() and not c:IsAbleToDeckAsCost()
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.spfilter2(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(s.spfilter2,tp,LOCATION_MZONE,0,1,nil,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.spfilter2,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,#g,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)~=0
and tc:IsLocation(LOCATION_EXTRA)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e3:SetValue(500)
c:RegisterEffect(e3)
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--埃斯特尔·罗森塔尔
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
--discard to special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--disable special summon from GY
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetTarget(s.sumlimit)
c:RegisterEffect(e2)
--change race
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_RACE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(RACE_ZOMBIE)
e3:SetTarget(s.racefilter)
c:RegisterEffect(e3)
--cannot be synchro/link material
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetTarget(s.racefilter)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e5)
--special summon self
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,1))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCode(EVENT_RELEASE)
e6:SetCountLimit(1,id)
e6:SetTarget(s.selfsptg)
e6:SetOperation(s.selfspop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EVENT_REMOVE)
c:RegisterEffect(e7)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.spfilter(c,e,tp,ft)
if c:IsSetCard(0x23c) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
if c:IsLocation(LOCATION_DECK) then
return c:IsCode(5012603) and ft>0
else
return ft>0 or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,0,true)
end
end
return false
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,ft) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,ft)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_GRAVE)
end
function s.racefilter(e,c)
return c:IsSummonLocation(LOCATION_GRAVE)
end
function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.selfspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--aux.Stringid(id,0)对应"从卡组·墓地把1只「超炮」怪兽特殊召唤"
--aux.Stringid(id,1)对应"这张卡特殊召唤"
--削坂军霸
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcMix(c,true,true,s.ffilter1,s.ffilter2)
--pendulum
aux.EnablePendulumAttribute(c)
--Your damage becomes 1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(1,0)
e1:SetValue(s.damval)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--to pendulum zone
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_DECK)
e3:SetCondition(s.pencon)
e3:SetTarget(s.pentg)
e3:SetOperation(s.penop)
c:RegisterEffect(e3)
end
function s.ffilter1(c,fc,sumtype,tp)
return (c:IsSetCard(0x23c) or c:IsLevel(5))and c:IsType(TYPE_MONSTER)
end
function s.ffilter2(c,fc,sumtype,tp)
return c:IsAttackPos() and c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_MZONE)
end
function s.damval(e,re,val,r,rp,rc)
return 1
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_FZONE,0,1,nil)
end
function s.thfilter(c)
return c:IsFaceup() and c:IsAttackPos() and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function s.pencon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup()
end
function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function s.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
if Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then
--copy effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
--aux.Stringid(id,0)对应"以对方场上攻击表示的1只怪兽为对象,那只怪兽回到手卡"
--aux.Stringid(id,1)对应"这张卡在自己的灵摆区放置"
--佐天泪子
local s,id,o=GetID()
function s.initial_effect(c)
--pendulum
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
function s.filter(c,e,tp)
return c:IsSetCard(0x23c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
--cannot activate until damaged or equipped
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
e1:SetLabelObject(c)
e1:SetReset(RESET_PHASE+RESETS_STANDARD)
Duel.RegisterEffect(e1,tp)
--change scale
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_LSCALE)
e2:SetValue(0)
e2:SetCondition(s.sccon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CHANGE_RSCALE)
c:RegisterEffect(e3)
--check damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_DAMAGE)
e4:SetOperation(s.checkop)
e4:SetLabelObject(e1)
e4:SetReset(RESET_PHASE+RESETS_STANDARD)
Duel.RegisterEffect(e4,tp)
--check equip
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_EQUIP)
e5:SetOperation(s.checkop2)
e5:SetLabelObject(e1)
e5:SetReset(RESET_PHASE+RESETS_STANDARD)
Duel.RegisterEffect(e5,tp)
end
end
function s.sccon(e)
return e:GetHandler():GetFlagEffect(id)>0
end
function s.aclimit(e,re,tp)
return re:GetHandler()==e:GetLabelObject()
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp then
e:GetLabelObject():Reset()
e:GetHandler():ResetFlagEffect(id)
e:Reset()
end
end
function s.checkop2(e,tp,eg,ep,ev,re,r,rp)
local eq=eg:GetFirst()
if not eq then return end
local tc=eq:GetEquipTarget()
if tc:IsControler(tp) then
e:GetLabelObject():Reset()
e:GetHandler():ResetFlagEffect(id)
e:Reset()
end
end
--aux.Stringid(id,0)对应"手卡1只「超炮」怪兽特殊召唤"
--土御门元春
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcMix(c,true,true,s.ffilter1,s.ffilter2)
--special summon to your field
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA+LOCATION_GRAVE)
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--special summon to opponent's field
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,2))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetTargetRange(POS_FACEUP,1)
e0:SetRange(LOCATION_GRAVE)
e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
e0:SetCondition(s.spcon2)
e0:SetTarget(s.sptg2)
e0:SetOperation(s.spop2)
c:RegisterEffect(e0)
--on summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
--negate effects
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(s.negop)
c:RegisterEffect(e3)
--damage and recover
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetOperation(s.damop)
c:RegisterEffect(e4)
end
function s.cfilter(c,tp)
return c:IsFaceup() and c.MoJin and c:IsSetCard(0x23c)
and c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0
end
function s.cfilter2(c,tp)
return c:IsFaceup() and c.MoJin and c:IsSetCard(0x23c)
and c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,c)
local g=nil
local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil,tp)
if #rg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:Select(tp,1,1,nil)
end
if not g then return false end
g:KeepAlive()
e:SetLabelObject(g)
return true
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_COST)
g:DeleteGroup()
end
function s.spcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil,tp)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,c)
local g=nil
local rg=Duel.GetMatchingGroup(s.cfilter2,tp,LOCATION_MZONE,0,nil,tp)
if #rg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:Select(tp,1,1,nil)
end
if not g then return false end
g:KeepAlive()
e:SetLabelObject(g)
return true
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_COST)
g:DeleteGroup()
c:SetStatus(STATUS_SPSUMMON_TURN,true)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) then
e:SetLabel(1)
else
e:SetLabel(0)
end
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetCode(EFFECT_SKIP_DP)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_DRAW)
e1:SetCountLimit(1)
e1:SetOperation(s.checkop)
Duel.RegisterEffect(e1,tp)
end
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if ep~=tp then return end
local hg=eg:Filter(Card.IsLocation,nil,LOCATION_HAND)
if #hg==0 then return end
Duel.ConfirmCards(1-tp,hg)
local tc=hg:GetFirst()
while tc do
if tc:IsType(TYPE_MONSTER) and not tc.MoJin and not tc:IsSetCard(0x23c) then
Duel.Destroy(tc,REASON_EFFECT)
e:Reset()
break
end
tc=hg:GetNext()
end
Duel.ShuffleHand(tp)
end
function s.distg(e,c)
return c:GetColumnGroup():IsContains(e:GetHandler()) and not c:IsImmuneToEffect(e)
and not e:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
if rp~=tp then return end
local rc=re:GetHandler()
if rc:IsSetCard(0x23c) then
Duel.Recover(tp,200,REASON_EFFECT)
else
Duel.Damage(tp,400,REASON_EFFECT)
end
end
function s.ffilter1(c,fc,sumtype,tp)
return (c:IsSetCard(0x23c))and c:IsType(TYPE_MONSTER)
end
function s.ffilter2(c,fc,sumtype,tp)
return c:IsType(TYPE_MONSTER) and c.MoJin
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if rc:GetColumnGroup():IsContains(c) and not e:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
and not rc:IsImmuneToEffect(e) then
Duel.NegateEffect(ev)
end
end
--aux.Stringid(id,0)对应"本卡特殊召唤成功"
--aux.Stringid(id,1)对应"特殊召唤到自己场上"
--aux.Stringid(id,2)对应"特殊召唤到对方场上"
......@@ -4,7 +4,7 @@ function c116511113.initial_effect(c)
--special summon rule
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_CHAINING)
e6:SetCode(EVENT_CHAIN_SOLVING)
e6:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e6:SetRange(LOCATION_EXTRA)
e6:SetCondition(c116511113.chcon)
......@@ -115,9 +115,9 @@ function c116511113.chop(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(c116511113.xyzfilter2,nil,e,tp)
if Duel.GetFlagEffect(tp,116511113)==0 and g:GetCount()>0 and g:GetCount()==g2:GetCount() and rc:IsRelateToEffect(re)
and Duel.IsChainNegatable(ev) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0 and Duel.SelectYesNo(tp,aux.Stringid(116511113,3)) then
Duel.ConfirmCards(1-tp,c)
Duel.RegisterFlagEffect(tp,116511113,RESET_PHASE+PHASE_END,0,1)
if Duel.NegateEffect(ev) then
Duel.ConfirmCards(1-tp,c)
Duel.RegisterFlagEffect(tp,116511113,RESET_PHASE+PHASE_END,0,1)
rc:CancelToGrave()
g:AddCard(rc)
local tc=g:GetFirst()
......@@ -148,8 +148,9 @@ function c116511113.atop(e,tp,eg,ep,ev,re,r,rp)
if not a:IsRelateToEffect(e) and a:IsAttackable() and not a:IsStatus(STATUS_ATTACK_CANCELED)
and a:IsCanBeXyzMaterial(c) and d:IsCanBeXyzMaterial(c)
and not d:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(116511113,3)) then
Duel.ConfirmCards(1-tp,c)
if Duel.NegateAttack() then
Duel.ConfirmCards(1-tp,c)
Duel.RegisterFlagEffect(tp,116511113,RESET_PHASE+PHASE_END,0,1)
local g=Group.FromCards(a,d)
local tc=g:GetFirst()
while tc do
......
......@@ -5,7 +5,7 @@ function c260013010.initial_effect(c)
--special summon rule
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_CHAINING)
e6:SetCode(EVENT_CHAIN_SOLVING)
e6:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e6:SetRange(LOCATION_EXTRA)
e6:SetCondition(c260013010.chcon)
......
......@@ -5,7 +5,7 @@ function c260013011.initial_effect(c)
--special summon rule
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_CHAINING)
e6:SetCode(EVENT_CHAIN_SOLVING)
e6:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e6:SetRange(LOCATION_EXTRA)
e6:SetCondition(c260013011.chcon)
......
--茵蒂克丝
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(s.tg)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
--Recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(s.rccost)
e3:SetTarget(s.rctg)
e3:SetOperation(s.rcop)
c:RegisterEffect(e3)
end
function s.filter(c)
return c.MoJin and c:IsAbleToHand() and c:IsType(TYPE_SPELL)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToDeckAsCost()
end
function s.rccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,2,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function s.rctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function s.rcop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
--御坂美琴
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(1109)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_COIN)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetTarget(s.destg)
e5:SetOperation(s.desop)
c:RegisterEffect(e5)
--overlay
local e6=Effect.CreateEffect(c)
e6:SetDescription(1130)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
--e6:SetRange(LOCATION_REMOVED+LOCATION_GRAVE)
e6:SetCountLimit(2,id)
e6:SetTarget(s.ovtg)
e6:SetOperation(s.ovop)
c:RegisterEffect(e6)
end
function s.filter(c)
return not c.MoJin and c:IsAbleToHand() and c:IsSetCard(0x23c) --and c:IsLevelBelow(4)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
--if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local res=Duel.TossCoin(tp,1)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_HAND,0,nil)
if res==1 then
local cg=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sc=g:Select(tp,1,1,nil)
cg:Merge(sc)
end
Duel.Destroy(cg,REASON_EFFECT)
else
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function s.ovfilter(c)
return c:IsFaceup() and c.MoJin and c:IsType(TYPE_XYZ)
end
function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.ovfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(s.ovfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
and e:GetHandler():IsCanOverlay() and e:GetHandler():IsFaceupEx() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.ovfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end
function s.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) then
local og=c:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(tc,Group.FromCards(c))
end
end
--一方通行
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_IGNITION)
--e3:SetType(EFFECT_TYPE_QUICK_O)
--e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,id)
--e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(s.drcost)
e3:SetTarget(s.hdtg)
e3:SetOperation(s.hdop)
c:RegisterEffect(e3)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_REMOVE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
function s.resfilter(c)
return c:IsReleasable() and c.MoJin
end
function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rg=Duel.GetReleaseGroup(tp):Filter(Card.IsReleasable,nil)
if chk==0 then return c:IsReleasable() and Duel.IsExistingMatchingCard(s.resfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.resfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_RELEASE)
end
end
function s.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.hdop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
e1:SetValue(2)
Duel.RegisterEffect(e1,tp)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function s.filter(c,e,tp)
return (c.MoJin or c:IsSetCard(0x23c)) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--上条当麻
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
c:SetUniqueOnField(1,1,id)
--synchro summon
--aux.AddSynchroProcedure(c,s.sfliter,aux.TRUE,1)
aux.AddSynchroProcedure(c,s.sfliter,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.synlimit)
c:RegisterEffect(e0)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.condition1)
e1:SetOperation(s.operation1)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(1131)
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.discon)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(2)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e3:SetCondition(s.gspcon)
e3:SetTarget(s.gsptg)
e3:SetOperation(s.gspop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_BE_BATTLE_TARGET)
e4:SetCondition(s.gspcon2)
e4:SetTarget(s.gsptg2)
c:RegisterEffect(e4)
--eff
local e7=Effect.CreateEffect(c)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_ATTACK_ANNOUNCE)
e7:SetCondition(s.effcon)
e7:SetOperation(s.effop)
c:RegisterEffect(e7)
local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_DISEFFECT)
e5:SetRange(0xff)
e5:SetValue(s.effectfilter)
c:RegisterEffect(e5)
end
function s.sfliter(c)
return (c.MoJin or c:IsSetCard(0x23c))
end
function s.cfilter(c,e)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c==e:GetHandler()
end
function s.condition1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and g and g:IsExists(s.cfilter,1,nil,e)
and Duel.IsChainDisablable(ev) and not Duel.IsPlayerAffectedByEffect(tp,5012631)
end
function s.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.NegateEffect(ev)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and Duel.IsChainNegatable(ev) and not Duel.IsPlayerAffectedByEffect(tp,5012631)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPosition(POS_FACEUP_DEFENSE) or c:IsFacedown() then return end
if Duel.ChangePosition(c,POS_FACEUP_DEFENSE) then
Duel.NegateActivation(ev)
end
end
function s.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattleTarget()==nil
end
function s.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetBattleTarget()~=nil then return end
local lp1=Duel.GetLP(tp)
local lp2=Duel.GetLP(1-tp)
if lp1>lp2 then
--damage 0
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_NO_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(s.damcon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
e2:SetOwnerPlayer(tp)
c:RegisterEffect(e2)
elseif lp1<lp2 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetCondition(s.condition)
e1:SetValue(lp2-lp1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1)
else
--double
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_DAMAGE)
e4:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
c:RegisterEffect(e4)
end
end
function s.condition(e)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
return ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL
end
function s.damcon(e)
return e:GetHandlerPlayer()==e:GetOwnerPlayer()
end
function s.effectfilter(e,ct)
local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return p==tp and te:GetHandler()==e:GetHandler()
end
function s.gtfilter(c,tp)
return c:IsControler(tp) and (c.MoJin or c:IsSetCard(0x23c)) and c:IsType(TYPE_MONSTER)
and c:IsLocation(LOCATION_MZONE) and c:IsAbleToHand()
end
function s.gspcon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(s.gtfilter,1,nil,tp) and Duel.GetMZoneCount(tp,tg,tp)>0
end
function s.gspcon2(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
return d:IsFaceup() and (c.MoJin or c:IsSetCard(0x23c)) and d:IsControler(tp)
and Duel.GetMZoneCount(tp,d,tp)>0 and d:IsAbleToHand()
end
function s.gsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsFaceupEx()
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(s.gtfilter,nil,tp)
sg:KeepAlive()
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.gsptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=Duel.GetAttackTarget()
if chk==0 then return e:GetHandler():IsFaceupEx() and sg:IsAbleToDeck()
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.gstfilter(c,e)
return c:IsRelateToEffect(e) and c:IsAbleToHand()
end
function s.gspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(s.gstfilter,nil,e)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
if c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsFaceupEx() and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
--if Duel.SendtoHand(sg,nil,REASON_EFFECT)==0 then return end
--if c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsFaceupEx() and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local fid=c:GetFieldID()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(c)
e1:SetCondition(s.thcon)
e1:SetOperation(s.thop)
Duel.RegisterEffect(e1,tp)
end
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(id)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetLabelObject(),nil,SEQ_DECKTOP,REASON_EFFECT)
end
\ No newline at end of file
--奥雷欧斯·伊萨德
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,s.mfilter,nil,2,2,s.ovfilter,aux.Stringid(id,3),s.xyzop)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(1109)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(s.atkval)
c:RegisterEffect(e2)
--local e4=e2:Clone()
--e2:SetCode(EFFECT_UPDATE_DEFENSE)
--c:RegisterEffect(e4)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(s.cost)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.atkval(e,c)
return c:GetOverlayCount()*1000
end
function s.mfilter(c,xyzc)
return c:IsLevelAbove(4) and c.MoJin
end
function s.ovfilter(c)
return c:IsFaceup() and c.MoJin and c:IsLevelAbove(17) and c:IsLocation(LOCATION_MZONE)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.filter(c)
return c:IsCode(5012601) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsPlayerCanDraw(tp,2) and Duel.GetFlagEffect(tp,id+100)==0
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND,1,nil) and Duel.GetFlagEffect(tp,id+200)==0
local b3=Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,1,nil) and Duel.GetFlagEffect(tp,id+300)==0
if chk==0 then return b1 or b2 or b3 end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(id,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(id,1)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(id,2)
opval[off-1]=3
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_DRAW)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE+PHASE_END,0,1)
elseif sel==2 then
e:SetCategory(CATEGORY_TODECK)
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,1-tp,LOCATION_HAND)
Duel.RegisterFlagEffect(tp,id+200,RESET_PHASE+PHASE_END,0,1)
else
e:SetCategory(CATEGORY_TODECK)
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,1-tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
Duel.RegisterFlagEffect(tp,id+300,RESET_PHASE+PHASE_END,0,1)
end
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local sel=e:GetLabel()
if sel==1 then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
elseif sel==2 then
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 then
local sg=g:RandomSelect(tp,1)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleHand(1-tp)
end
else
local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,nil)
if #tg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=tg:Select(tp,1,1,nil)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
\ No newline at end of file
--没有你的完美世界
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.filter1(c,e,tp)
return c.MoJin and c:IsAbleToRemoveAsCost() and Duel.GetLocationCountFromEx(tp,tp,c)>0 and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,5,c) and c:IsFaceup()
end
function s.filter2(c)
return c.MoJin and c:IsAbleToRemoveAsCost() and c:IsFaceup() and c:IsFaceup()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,c,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g1:Clone()
sg:AddCard(c)
local g2=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,5,5,sg,e,tp)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function s.filter(c,e,tp)
return c:IsFacedown() and c.MoJin
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.matfilter2(c)
return c:IsCanOverlay() and c:IsType(TYPE_QUICKPLAY)
end
function s.cf(c)
return Card.IsCanOverlay and not c:IsCode(5012625,5012613,5012617) --Card.IsCanOverlay
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_EXTRA,0,nil,e,tp)
if g:GetCount()>0 then
local sg=g:RandomSelect(tp,1)
local tc=sg:GetFirst()
local mg=Duel.GetMatchingGroup(s.cf,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil)
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
--e1:SetDescription(1317)
--e1:SetType(EFFECT_TYPE_SINGLE)
--e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
--e1:SetCode(EFFECT_CANNOT_TRIGGER)
--e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
--tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
if tc:IsType(TYPE_XYZ) and #mg>0 and Duel.SelectYesNo(tp,aux.Stringid(5012606,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local mat=mg:Select(tp,1,3,nil)
Duel.Overlay(tc,mat)
end
end
end
function s.tdfilter(c)
return c:IsAbleToDeck() and c.MoJin
end
function s.thfilter(c)
return c:IsAbleToHand() and c:IsFaceup() and c.MoJin
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE,0,e:GetHandler())
if #sg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=sg:Select(tp,1,#sg,nil)
local tg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=tg:Select(tp,1,1,nil)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
--第10032次轮回
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
--e1:SetCountLimit(1,id)
--e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCost(s.cost)
c:RegisterEffect(e2)
--lv
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_REMOVED)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetCost(s.spcost)
--e3:SetCountLimit(1,id)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.cfilter(c,tp)
return c.MoJin and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,2,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,2,2,c,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function s.thfilter(c)
return c:IsAbleToDeck() or c:IsAbleToHand()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
sg:KeepAlive()
if Duel.Remove(sg,0,REASON_EFFECT+REASON_TEMPORARY) then
local og=Duel.GetOperatedGroup()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(sg)
e1:SetCountLimit(1)
e1:SetOperation(s.retop)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetValue(0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
local ct1=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_REMOVED,0,nil)
local ct2=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_REMOVED,nil)
if ct1<ct2 then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetTargetRange(1,0)
e4:SetValue(s.aclimit)
e4:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e4,tp)
elseif ct1>ct2 then
local tg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_REMOVED,0,nil)
local tohand=tg:Filter(Card.IsAbleToHand,nil)
local todeck=tg:Filter(Card.IsAbleToDeck,nil)
if (#tohand>1 or #todeck>1) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
if #todeck>2 and (#tohand<2 or Duel.SelectYesNo(tp,aux.Stringid(id,1))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dc=todeck:Select(tp,2,2,nil)
Duel.SendtoDeck(dc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=tohand:Select(tp,2,2,nil)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
end
end
function s.aclimit(e,re,tp)
local rc=re:GetHandler()
return not rc.MoJin
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
for tc in aux.Next(g) do
Duel.ReturnToField(tc)
end
end
function s.ndcfilter(c)
return c:IsFaceup() and c.MoJin
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
--return Duel.IsExistingMatchingCard(s.ndcfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
return ct>0 and ct==Duel.GetMatchingGroupCount(s.ndcfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
end
function s.spfilter(c,e,tp)
local b1=Duel.GetLocationCountFromEx(tp,1-tp,nil,c)>0 and c:IsLocation(LOCATION_EXTRA)
local b2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and not c:IsLocation(LOCATION_EXTRA)
return c:IsCode(5012613) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and (b1 or b2)
end
function s.spfilter2(c,e,tp)
local b1=Duel.GetLocationCountFromEx(tp,1-tp,nil,c)>0 and c:IsLocation(LOCATION_EXTRA)
local b2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and not c:IsLocation(LOCATION_EXTRA)
return c:IsCode(5012604) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,1-tp,true,true) and (b1 or b2)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)~=0 then
g:GetFirst():CompleteProcedure()
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if #sg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,1-tp,true,true,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
\ No newline at end of file
--幻想杀手
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(2)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsFacedown() or not(c.MoJin or c:IsSetCard(0x23c))
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
local tc=g:GetFirst()
if tc and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e,false) then
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+EVENT_CHAIN_END,0,0,0)
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
--if tc:IsControler(tp) and Duel.IsPlayerCanDraw(tp,1)
--and tc:GetFlagEffect(id)>0 and Duel.SelectYesNo(tp,aux.Stringid(2857636,1)) then
--Duel.Draw(tp,1,REASON_EFFECT)
--end
end
end
function s.spfilter(c,e,tp)
return c:IsCode(5012604) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,true)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetChainLimit(aux.FALSE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not
Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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