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
if Duel.NegateEffect(ev) then
Duel.ConfirmCards(1-tp,c)
Duel.RegisterFlagEffect(tp,116511113,RESET_PHASE+PHASE_END,0,1)
if Duel.NegateEffect(ev) then
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
--滨面仕上
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(1103)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(2)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
--e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--niu
local e3=Effect.CreateEffect(c)
e3:SetDescription(2)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
--e3:SetCode(EVENT_CHAINING)
--e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e3:SetCountLimit(1,id)
e3:SetTarget(s.gsptg)
e3:SetOperation(s.gspop)
c:RegisterEffect(e3)
end
function s.filter(c)
return c:IsType(TYPE_PENDULUM) and c.MoJin and c:IsAbleToGrave()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
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
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(1110)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
e1:SetCondition(s.damcon)
e1:SetOperation(s.damop)
Duel.RegisterEffect(e1,tp)
end
function s.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c.MoJin==true
end
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
if not s.damcon(e,tp,eg,ep,ev,re,r,rp) then return end
Duel.Hint(HINT_CARD,0,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.spfilter(c,e,tp)
return c.MoJin==true and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsType(TYPE_TUNER)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler(),tp)>0
and Duel.IsExistingMatchingCard(s.spfilter,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)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.gsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_EXTRA+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_EXTRA+LOCATION_REMOVED)
end
function s.eqfilter(c)
return c:IsFaceupEx() and c.MoJin==true and not c:IsForbidden()
end
function s.gspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_EXTRA+LOCATION_REMOVED,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
--e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(s.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_ADD_TYPE)
--e2:SetRange(LOCATION_SZONE)
e2:SetValue(TYPE_SPELL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
end
function s.eqlimit(e,c)
return e:GetOwner()==c
end
\ No newline at end of file
--食蜂操祈
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,s.mfilter,nil,3,3)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
--e1:SetOperation(s.sumsuc)
c:RegisterEffect(e1)
--ntr
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_CONTROL)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.condition1)
e2:SetCost(s.cost1)
e2:SetTarget(s.target)
e2:SetOperation(s.operation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_CONTROL)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.condition2)
e3:SetCost(s.cost2)
e3:SetTarget(s.target2)
e3:SetOperation(s.operation2)
c:RegisterEffect(e3)
end
function s.mfilter(c,xyzc)
return (c.MoJin or c:IsSetCard(0x23c))
end
function s.cfilter(c)
return c:IsCode(5012604) and c:IsFaceup()
end
function s.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsSummonType(SUMMON_TYPE_XYZ) then return end
if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,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
end
function s.condition1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,5012604)
end
function s.condition2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,5012604)
end
function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and e:GetHandler():GetAttackAnnouncedCount()==0 end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST)
and e:GetHandler():GetAttackAnnouncedCount()==0 end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp)
end
end
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk)
--if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
--local g=Duel.GetMatchingGroup(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,nil)
--Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
--end
if chk==0 then
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,nil)
return g:GetCount()>0 and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE)
end
function s.operation2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.GetControl(tc,tp)
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)
--link summon
aux.AddLinkProcedure(c,nil,2,3,s.lcheck)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(220414,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetOperation(s.ctop)
c:RegisterEffect(e1)
end
function s.sfliter(c)
return c.MoJin==true
end
function s.lcheck(g,lc)
return g:IsExists(s.sfliter,1,nil)
end
function s.atkfilter(c,atk)
return c:IsFaceup() and c:GetAttack()<atk
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=true
local b2=Duel.IsExistingMatchingCard(s.atkfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack())
if not b1 and b2 then return 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
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e1)
--to zero atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_START)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_BATTLE)
e2:SetOperation(s.zsop)
c:RegisterEffect(e2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,s.atkfilterp,tp,0,LOCATION_MZONE,1,1,nil,c:GetAttack())
for i=1,7 do
local tc=g:GetFirst()
local atk1=c:GetAttack()
local atk2=tc:GetAttack()
local lp=Duel.GetLP(1-tp)
local dam=atk1-atk2
local p=Duel.GetTurnPlayer()
if dam>lp then
Duel.SkipPhase(p,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
else
if c:GetFlagEffect(id)==0 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e3)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
end
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
end
end
end
function s.zsop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if not tc then return end
local lp=Duel.GetLP(1-tp)
local atk1=e:GetHandler():GetAttack()
local atk2=tc:GetAttack()
local atk=math.abs(atk1-atk2)
Duel.SetLP(1-tp,lp-atk)
end
\ No newline at end of file
-- 风斩冰华
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
c:SetSPSummonOnce(id)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,s.lcheck,1,1)
--aux.AddLinkProcedure(c,nil,1,1,s.lcheck)
--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)
e1:SetValue(aux.linklimit)
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(1110)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(s.thcost)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
--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)
end
function s.lcheck(c,lc)
return c.MoJin==true
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function s.filter(c)
return c.MoJin==true and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,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_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.cfilter(c)
return c:IsCode(5012615) and c:IsFaceup()
end
function s.descon(e)
return not Duel.IsExistingMatchingCard(s.cfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
\ No newline at end of file
--欧提努斯
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,5012604),1,1)
c:EnableReviveLimit()
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.synlimit)
c:RegisterEffect(e0)
--change lp
local e1=Effect.CreateEffect(c)
e1:SetDescription(1191)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(s.tgcon)
--e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop)
c:RegisterEffect(e1)
--acn't be attacked
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(s.atkcon)
e2:SetValue(aux.imval1)
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+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(s.efilter)
c:RegisterEffect(e3)
--control
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
c:RegisterEffect(e5)
--disable
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetCode(EFFECT_DISABLE)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e6:SetTarget(s.distg)
c:RegisterEffect(e6)
--disable
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetCode(EVENT_CHAIN_SOLVING)
e7:SetRange(LOCATION_MZONE)
e7:SetCondition(s.discon)
e7:SetOperation(s.disop)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_CANNOT_ACTIVATE)
e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(1,1)
e8:SetValue(s.elimit)
c:RegisterEffect(e8)
--atk/def
local e9=Effect.CreateEffect(c)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_SET_ATTACK_FINAL)
e9:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e9:SetRange(LOCATION_MZONE)
e9:SetCondition(s.ndcon)
e9:SetValue(0)
c:RegisterEffect(e9)
local e10=e9:Clone()
e10:SetCode(EFFECT_SET_DEFENSE_FINAL)
c:RegisterEffect(e10)
--CancelToGrave
local e11=Effect.CreateEffect(c)
e11:SetDescription(aux.Stringid(id,0))
e11:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e11:SetType(EFFECT_TYPE_QUICK_O)
e11:SetProperty(EFFECT_FLAG_CARD_TARGET)
e11:SetCode(EVENT_FREE_CHAIN)
e11:SetRange(LOCATION_MZONE)
e11:SetCountLimit(1)
e11:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e11:SetTarget(s.tgetg)
e11:SetOperation(s.tgeop)
c:RegisterEffect(e11)
--
local e20=Effect.CreateEffect(c)
e20:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e20:SetType(EFFECT_TYPE_FIELD)
e20:SetCode(EFFECT_CANNOT_DISEFFECT)
e20:SetValue(s.effectfilter)
c:RegisterEffect(e20)
--不能当召唤用素材--
local e21=Effect.CreateEffect(c)
e21:SetType(EFFECT_TYPE_SINGLE)
e21:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e21:SetRange(LOCATION_MZONE)
e21:SetCode(EFFECT_UNRELEASABLE_SUM)
e21:SetValue(1)
c:RegisterEffect(e21)
local e12=e21:Clone()
e12:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e12)
local e13=Effect.CreateEffect(c)
e13:SetType(EFFECT_TYPE_SINGLE)
e13:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e13:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e13:SetValue(1)
c:RegisterEffect(e13)
local e14=e13:Clone()
e14:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e14:SetValue(1)
c:RegisterEffect(e14)
local e15=e14:Clone()
e15:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e15)
local e16=e14:Clone()
e16:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e16)
--做超量素材时送去墓地
local e4=Effect.CreateEffect(c)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_ADJUST)
e14:SetCountLimit(13,id)
e4:SetOperation(s.rmop)
Duel.RegisterEffect(e4,0)
--maintain
local e17=Effect.CreateEffect(c)
e17:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e17:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e17:SetCode(EVENT_PHASE+PHASE_END)
--e17:SetRange(LOCATION_MZONE)
e17:SetCountLimit(1)
e17:SetCondition(s.mtcon)
e17:SetOperation(s.mtop)
c:RegisterEffect(e17)
end
function s.rmop(e)
local g=Duel.GetOverlayGroup(0,LOCATION_MZONE,LOCATION_MZONE)
local tgg=g:Filter(Card.IsCode,nil,id)
if tgg and #tgg>0 then
Duel.SendtoGrave(tgg,REASON_EFFECT)
end
end
function s.ndsfilter(c)
return c:IsFaceup() and c:IsCode(5012604)
end
function s.mtcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.ndsfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function s.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsAbleToExtra() or c:IsExtraDeckMonster()) then return end
Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)
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.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.tgfilter(c)
return c:IsAbleToGrave() and (c:IsFacedown() or not c:IsCode(5012613))
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local sg=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,sg,sg:GetCount(),0,0)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if #sg>0 then
Duel.SendtoGrave(sg,REASON_RULE)
end
end
function s.cfliter(c)
return c:IsFaceup() and c:IsCode(5012604)
end
function s.atkcon(e)
return Duel.IsExistingMatchingCard(s.cfliter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,POS_FACEDOWN_DEFENSE)
end
function s.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function s.distg(e,c)
return c:IsType(TYPE_SPELL)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
local rc=re:GetHandler()
return rc:IsType(TYPE_SPELL) and loc~=LOCATION_SZONE and loc~=LOCATION_MZONE
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function s.elimit(e,re,tp)
local rc=re:GetHandler()
return rc:IsFacedown() and rc:IsLocation(LOCATION_ONFIELD)
end
function s.tgetg(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA+LOCATION_DECK
if chk==0 then return Duel.GetLP(tp)<=1
and Duel.IsExistingMatchingCard(aux.TRUE,tp,loc,loc,1,e:GetHandler()) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,loc,loc,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,5000000)
end
function s.tgeop(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA+LOCATION_DECK
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,loc,loc,e:GetHandler())
if Duel.Destroy(sg,REASON_EFFECT)~=0 then
Duel.Damage(tp,5000000,REASON_EFFECT,true)
Duel.Damage(1-tp,5000000,REASON_EFFECT,true)
Duel.RDComplete()
end
end
function s.ndcon(e)
return Duel.GetLP(e:GetHandlerPlayer())>1
end
\ No newline at end of file
--右方之火
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--fusion
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,5012604,s.sfliter,2,true,true)
--special summon rule
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_FIELD)
e10:SetCode(EFFECT_SPSUMMON_PROC)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e10:SetRange(LOCATION_EXTRA)
e10:SetCondition(s.hspcon)
e10:SetTarget(s.hsptg)
e10:SetOperation(s.hspop)
c:RegisterEffect(e10)
--damage
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(s.damcost)
e1:SetTarget(s.damtg)
e1:SetOperation(s.damop)
c:RegisterEffect(e1)
--immune spell
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(s.efilter)
c:RegisterEffect(e2)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BATTLE_START)
e3:SetCondition(s.adcon)
e3:SetOperation(s.adop)
c:RegisterEffect(e3)
end
function s.sfliter(c)
return c.MoJin==true
end
function s.cfilter(c,mc)
return ((c.MoJin==true and c:IsLocation(LOCATION_MZONE)) or c:IsFusionCode(5012604))
and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial(mc)
and c:IsFusionType(TYPE_MONSTER)
end
function s.fselect(g,tp,mc)
return Duel.GetLocationCountFromEx(tp,tp,g,mc)>0
and g:IsExists(Card.IsFusionCode,1,nil,5012604) and g:IsExists(Card.IsFusionSetCard,2,nil,MoJin==true)
end
function s.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c.cfilter,tp,LOCATION_ONFIELD,0,nil,c)
return g:CheckSubGroup(s.fselect,3,3,tp,c)
end
function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD,0,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,s.fselect,false,3,3,tp,c)
sg:KeepAlive()
e:SetLabelObject(sg)
return true
end
function s.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
c:SetMaterial(g)
Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL)
g:DeleteGroup()
end
function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SendtoGrave(tc,REASON_COST+REASON_RELEASE)
end
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function s.efilter(e,re)
local rc=re:GetHandler()
return rc:IsType(TYPE_SPELL) or (rc:IsType(TYPE_MONSTER) and rc:GetBaseAttack()<=3800)
end
function s.adcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsFaceup() and (bc:IsAttackAbove(1700) or bc:IsDefenseAbove(800))
end
function s.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local atk=bc:GetAttack()
local def=bc:GetDefense()
local dam=atk
if atk<def then dam=def end
if c:IsFaceup() and Duel.SendtoDeck(bc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and dam>0 then
Duel.Damage(1-tp,dam,REASON_EFFECT)
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:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--level
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(2)
e2:SetTarget(s.lvtg)
e2:SetOperation(s.lvop)
c:RegisterEffect(e2)
--level
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_DESTROY)
--e3:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetCost(s.descost)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
end
function s.thfilter(c)
return c:IsType(TYPE_MONSTER) and (c.MoJin or c:IsSetCard(0x23c)) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
--if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
local sg=g:RandomSelect(tp,1)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
--act limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(s.aclimit)
Duel.RegisterEffect(e2,tp)
end
function s.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsType(TYPE_FIELD)
end
function s.filter(c)
return c:IsFaceup() and (c.MoJin or c:IsSetCard(0x23c)) and (c:GetLevel()>0 or c:GetRank()>0)
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local effcode=EFFECT_UPDATE_LEVEL
if tc:IsType(TYPE_XYZ) then effcode=EFFECT_UPDATE_RANK end
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(effcode)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function s.desfilter(c)
return c:IsReleasable() --and c.MoJin==true
end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Release(tc,REASON_COST)
end
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_ONFIELD,LOCATION_ONFIELD,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_ONFIELD,LOCATION_ONFIELD,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
--local tc=Duel.GetFirstTarget()
--local p=tc:GetControler()
--if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
--if Duel.GetLocationCount(p,LOCATION_MZONE)>0
--and Duel.IsPlayerCanSpecialSummonMonster(p,5012619,MoJin==true,TYPES_TOKEN_MONSTER+TYPE_TUNER,1245,0,3,RACE_ZOMBIE,ATTRIBUTE_DARK)
--and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
--local token=Duel.CreateToken(tp,5012619)
--Duel.SpecialSummon(token,0,tp,p,false,false,POS_FACEUP)
--end
--end
--end
--欧雷尔斯
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)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_PUBLIC)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_HAND)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetTarget(s.destg)
e4:SetOperation(s.desop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_CHAINING)
e5:SetOperation(s.desop2)
c:RegisterEffect(e5)
local e6=e4:Clone()
e6:SetCode(EVENT_SUMMON_SUCCESS)
e6:SetOperation(s.desop2)
c:RegisterEffect(e6)
local e7=e4:Clone()
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
e7:SetOperation(s.desop2)
c:RegisterEffect(e7)
local e8=e4:Clone()
e8:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
e8:SetOperation(s.desop2)
c:RegisterEffect(e8)
end
function s.mfilter(c,xyzc)
return c:IsLevelAbove(8) and c.MoJin==true --and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return --Duel.GetCurrentChain()<1 and
e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
and Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
end
function s.desfilter2(c)
return c:GetSequence()>4
end
function s.desfilter(c)
return not c:IsLocation(LOCATION_SZONE) or c:GetSequence()<5
end
function s.exmzfilter(c,tp,seq)
local p=c:GetControler()
local lseq=seq
if p==tp then lseq=math.abs(seq-4) end
return c:GetSequence()==lseq
end
function s.seqfilter(c,seq,tp)
local loc=LOCATION_MZONE
if seq>=8 then
loc=LOCATION_SZONE
seq=seq-8
end
if seq>=5 and loc==LOCATION_SZONE then return false end
if seq==7 and loc==LOCATION_MZONE then return false end
local cseq=c:GetSequence()
local p=c:GetControler()
if p==tp and c:IsLocation(LOCATION_SZONE) then return false end
if cseq<5 and p==tp and c:IsLocation(LOCATION_MZONE) then return false end
if p==tp and cseq<5 and c:IsLocation(LOCATION_MZONE) then
cseq=math.abs(cseq-4)
elseif p==tp and cseq==5 and c:IsLocation(LOCATION_MZONE) then
cseq=6
elseif p==tp and cseq==6 and c:IsLocation(LOCATION_MZONE) then
cseq=5
end
local cloc=c:GetLocation()
if cloc==LOCATION_SZONE and cseq>=5 then return false end
if cloc==LOCATION_MZONE and cseq>=5 and loc==LOCATION_MZONE
and (seq==1 and cseq==5 or seq==3 and cseq==6 or seq==cseq) then return true end
if cloc==LOCATION_MZONE and seq>=5 and loc==LOCATION_MZONE
and Duel.IsExistingMatchingCard(s.exmzfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp,seq) then
return seq==5 and cseq==1 or seq==6 and cseq==3
end
return cseq==seq or seq<5 and cseq<5 and cloc==loc and math.abs(cseq-seq)==1
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local filter=0
for i=0,15 do
if not Duel.IsExistingMatchingCard(s.seqfilter,tp,0,LOCATION_ONFIELD,1,nil,i,tp) then
filter=filter|1<<(i+16)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local flag=Duel.SelectField(tp,1,0,LOCATION_ONFIELD,filter)
Duel.Hint(HINT_ZONE,tp,flag)
local seq=math.log(flag>>16,2)
local ct=Duel.GetMatchingGroupCount(s.seqfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,seq,tp)
if ct<=0 then return end
if e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.seqfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil,seq,tp)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
Duel.Readjust()
end
end
function s.desop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_ONFIELD,1,nil)
and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and Duel.SelectEffectYesNo(tp,e:GetHandler()) then
s.desop(e,tp,eg,ep,ev,re,r,rp)
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)
--link summon
aux.AddLinkProcedure(c,nil,2,99,s.lcheck)
c:EnableReviveLimit()
--spsum condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetRange(LOCATION_EXTRA)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(aux.linklimit)
c:RegisterEffect(e0)
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)
--disable
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e8:SetCode(EVENT_CHAIN_SOLVING)
e8:SetRange(LOCATION_MZONE)
e8:SetCondition(s.discon)
e8:SetOperation(s.disop)
c:RegisterEffect(e8)
local e9=e8:Clone()
e9:SetCondition(s.discon2)
e9:SetOperation(s.disop2)
c:RegisterEffect(e9)
--atk/def
local e10=Effect.CreateEffect(c)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_SET_ATTACK_FINAL)
e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e10:SetRange(LOCATION_MZONE)
e10:SetCondition(s.ndcon)
e10:SetValue(0)
c:RegisterEffect(e10)
--selfdes
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e11:SetRange(LOCATION_MZONE)
e11:SetCode(EFFECT_SELF_DESTROY)
e11:SetCondition(s.descon)
c:RegisterEffect(e11)
end
function s.rmop(e)
local g=Duel.GetOverlayGroup(0,LOCATION_MZONE,LOCATION_MZONE)
local tgg=g:Filter(Card.IsCode,nil,id)
if tgg and #tgg>0 then
Duel.SendtoGrave(tgg,REASON_EFFECT)
end
end
function s.lcheck(g,lc)
return g:IsExists(Card.IsLinkCode,1,nil,5012604)
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.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)==0 and Duel.GetCurrentChain()<2
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function s.discon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()>1
end
function s.disop2(e,tp,eg,ep,ev,re,r,rp)
for i=2,ev do
Duel.NegateEffect(i)
end
if e:GetHandler():GetFlagEffect(id)==0 and Duel.GetCurrentChain()>1 then
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
end
end
function s.ndcfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function s.ndcon(e)
return not Duel.IsExistingMatchingCard(s.ndcfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,5012615)
end
function s.descon(e)
return not Duel.IsExistingMatchingCard(s.ndcfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,5012623)
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)
--level
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetTarget(s.sctg)
e1:SetOperation(s.scop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e2:SetCategory(CATEGORY_TODECK)
e3:SetCode(EVENT_REMOVE)
e3:SetTarget(s.tdtg2)
e3:SetOperation(s.tdop2)
c:RegisterEffect(e3)
end
function s.filter(c)
return c:IsFaceup() and c.MoJin
end
function s.tgfilter(c)
return c.MoJin and c:IsAbleToGrave()
end
function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
end
function s.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sc=c:GetLeftScale()
local b1=true
local b2=sc>5
local ct=6
if sc>5 and (sc<6 or Duel.SelectOption(tp,aux.Stringid(id,3),aux.Stringid(id,4))==1) then
ct=-6
else
ct=6
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE)
e1:SetValue(ct)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e2)
local sg=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_EXTRA,0,nil)
if #sg>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sc=sg:Select(tp,1,1,nil)
Duel.SendtoGrave(sc,REASON_EFFECT)
end
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(48976825,0))
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,ct,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCountLimit(1,id)
e1:SetCondition(s.thcon2)
e1:SetOperation(s.thop2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.thcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_REMOVED,0,1,nil)
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.tdtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
end
function s.tdop2(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,ct,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetDescription(aux.Stringid(id,2))
e1:SetCountLimit(1,id+5)
e1:SetCondition(s.thcon3)
e1:SetOperation(s.thop3)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.thcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,nil)
end
function s.thop3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToHand),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--云川芹亚
local s,id=GetID()
s.MoJin=true
local damageCnt=0
function s.initial_effect(c)
--回到卡组并回复LP和特召
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_RECOVER+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_HAND)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCost(s.tdcost)
e1:SetTarget(s.tdtg)
e1:SetOperation(s.tdop)
c:RegisterEffect(e1)
--确认对手卡并盖放陷阱
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(s.trcost)
e2:SetTarget(s.trtg)
e2:SetOperation(s.trop)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PREDRAW)
e4:SetRange(0xff)
e4:SetCountLimit(1,id+EFFECT_COUNT_CODE_CHAIN)
e4:SetCondition(s.condition)
e4:SetOperation(s.operation)
c:RegisterEffect(e4)
end
--①:回到卡组并回复LP和特召
function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck()end
Duel.ConfirmCards(1-tp,c)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
function s.spfilter(c,e,tp)
return c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,800)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetTargetRange(1,0)
e3:SetValue(s.val)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
Duel.RegisterFlagEffect(tp,id,0,0,1)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Recover(tp,800,REASON_EFFECT)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--②:确认对手卡并盖放陷阱
function s.cfilter(c)
return c.MoJin and c:IsAbleToRemove() and (c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_REMOVED))
end
function s.trcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RMTOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local tc=g:GetFirst()
if tc:IsLocation(LOCATION_GRAVE) then
Duel.Remove(tc,POS_FACEUP,REASON_COST)
else
Duel.SendtoGrave(tc,REASON_COST)
end
end
function s.trtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
and Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 end
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetTargetRange(1,0)
e3:SetValue(s.val)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
Duel.RegisterFlagEffect(tp,id,0,0,1)
end
function s.trapfilter(c)
return c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function s.trop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if #g==0 then return end
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:FilterSelect(tp,s.trapfilter,1,1,nil)
if #sg>0 then
Duel.SSet(1-tp,sg,1-tp,false)
end
Duel.ShuffleHand(1-tp)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,id)>0
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(tp,damageCnt,REASON_EFFECT)
Duel.ResetFlagEffect(tp,id)
damageCnt=0
end
function s.val(e,re,dam,r,rp,rc)
if dam>0 then
damageCnt=damageCnt+dam
end
return 0
end
--前方之风
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
--e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.cfilter(c)
return c.MoJin==true and c:IsFaceup()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc~=c end
local check=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,c)
local res=true
if check then res=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER+TYPE_NORMAL,2500,2500,5,RACE_SPELLCASTER,ATTRIBUTE_WIND) end
if chk==0 then return res
and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if check then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local check=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,c)
local res=true
if check then res=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER+TYPE_NORMAL,2500,2500,5,RACE_SPELLCASTER,ATTRIBUTE_WIND) end
if res then
if check and c:IsRelateToEffect(e) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
Duel.BreakEffect()
end
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--act limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(s.aclimit)
Duel.RegisterEffect(e2,tp)
end
function s.aclimit(e,re,tp)
local rc=re:GetHandler()
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and rc:GetType()==TYPE_SPELL
end
\ No newline at end of file
--托尔
local s,id,o=GetID()
c5012621.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(1102)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,id)
e1:SetCost(aux.bfgcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(1131)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
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:SetCost(s.discost)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(2)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,id)
e3:SetCost(s.spcost)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.thfilter(c)
return c.MoJin==true and c:IsAbleToRemove()
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) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function s.cfilter(c,tp)
return c:IsFaceup() and c:IsAbleToHandAsCost() and c.MoJin==true and Duel.GetMZoneCount(tp,c,tp)>0
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoHand(g,nil,REASON_COST)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsFaceup()
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
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) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--月咏小萌
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
--extra summon
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_SUMMON_SUCCESS)
e6:SetOperation(s.sumop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e7)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(2)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
--e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetType(EFFECT_TYPE_IGNITION)
--e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,id)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,id)
c:RegisterEffect(e4)
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.IsPlayerCanSummon(tp) or Duel.IsPlayerCanAdditionalSummon(tp)) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
--e1:SetTargetRange(1,0)
e1:SetTarget(s.estg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
function s.estg(e,c)
--return c.MoJin==true
return not c:IsSetCard(0x23333a)
end
function s.val(e,c)
local tp=e:GetHandlerPlayer()
local ct=Duel.GetFlagEffect(tp,id)
return ct+1
end
function s.mfilter1(c)
return c.MoJin==true and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function s.mfilter2(c)
return c.MoJin==true and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function s.sfselect(g,tp)
return Duel.IsExistingMatchingCard(s.synfilter,tp,LOCATION_EXTRA,0,1,nil,g)
end
function s.xfselect(g,tp)
return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,g)
end
function s.lfselect(g,tp)
return Duel.IsExistingMatchingCard(s.lfilter,tp,LOCATION_EXTRA,0,1,nil,g)
end
function s.chkfilter(c,e,tp,m,f,chkf)
if not c.MoJin==true then return end
return s.ffilter(c,e,tp,m,f,chkf) or c:IsSynchroSummonable(nil,m) or c:IsXyzSummonable(m) or c:IsLinkSummonable(m,nil)
end
function s.ffilter(c,e,tp,m,f,chkf)
return c.MoJin==true and c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.chksfilter(c,g)
return c:IsSynchroSummonable(nil,g)
end
function s.chkxfilter(c,g)
return c:IsXyzSummonable(g)
end
function s.chklfilter(c,g)
return c:IsLinkSummonable(g,nil)
end
function s.synfilter(c,g)
return c.MoJin==true and c:IsSynchroSummonable(nil,g,#g-1,#g-1)
end
function s.xyzfilter(c,g)
return c.MoJin==true and c:IsXyzSummonable(g,#g,#g)
end
function s.lfilter(c,g)
return c.MoJin==true and c:IsLinkSummonable(g,nil,#g,#g)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local chkf=tp
local c=e:GetHandler()
local sg=Duel.GetMatchingGroup(s.mfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,c)
local exg=Duel.GetMatchingGroup(s.mfilter2,tp,LOCATION_GRAVE,0,c)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 then
Duel.RegisterFlagEffect(tp,id,RESET_EVENT+RESET_CHAIN,0,1)
sg:Merge(exg)
end
local res=Duel.IsExistingMatchingCard(s.ffilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,sg,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(s.ffilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
local b1=res
local b2=sg:CheckSubGroup(s.sfselect,1,#sg,tp)
local b3=sg:CheckSubGroup(s.xfselect,1,#sg,tp)
local b4=sg:CheckSubGroup(s.lfselect,1,#sg,tp)
if chk==0 then return b1 or b2 or b3 or b4 end
local ckg=Duel.GetMatchingGroup(s.chkfilter,tp,LOCATION_EXTRA,0,nil,e,tp,sg,nil,chkf)
if #ckg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,5))
local chkccc=ckg:Select(tp,1,1,nil)
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(id,1)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(id,2)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(id,3)
opval[off-1]=3
off=off+1
end
if b4 then
ops[off]=aux.Stringid(id,4)
opval[off-1]=4
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_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local c=e:GetHandler()
local sel=e:GetLabel()
local sg=Duel.GetMatchingGroup(s.mfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,c)
local exg=Duel.GetMatchingGroup(s.mfilter2,tp,LOCATION_GRAVE,0,c)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFlagEffect(tp,id)>0 then
sg:Merge(exg)
end
if sel==1 then
local mg1=sg:Filter(s.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(s.ffilter,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(s.ffilter,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,5))
local chkccc=sg1:Select(tp,1,1,nil)
local fsg=sg1:Clone()
if sg2 then fsg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=fsg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
local tg=mat1:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_ONFIELD)
local rg=mat1:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
Duel.SendtoGrave(tg,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
elseif sel==2 then
local schk=Duel.GetMatchingGroup(s.chksfilter,tp,LOCATION_EXTRA,0,nil,sg)
if #schk==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,5))
local chkccc=schk:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,512)
local syg=sg:SelectSubGroup(tp,s.sfselect,false,1,#sg,tp)
local syng=Duel.GetMatchingGroup(s.synfilter,tp,LOCATION_EXTRA,0,nil,syg)
if #syng>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=syng:Select(tp,1,1,nil):GetFirst()
tc:SetMaterial(syg)
local tg=syg:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_ONFIELD)
local rg=syg:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
Duel.SendtoGrave(tg,REASON_EFFECT+REASON_MATERIAL+REASON_SYNCHRO)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_SYNCHRO)
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
elseif sel==3 then
local xchk=Duel.GetMatchingGroup(s.chkxfilter,tp,LOCATION_EXTRA,0,nil,sg)
if #xchk==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,5))
local chkccc=xchk:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,513)
local syg=sg:SelectSubGroup(tp,s.xfselect,false,1,#sg,tp)
local syng=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil,syg)
if #syng>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=syng:Select(tp,1,1,nil):GetFirst()
tc:SetMaterial(syg)
for sc in aux.Next(syg) do
local mg=sc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(tc,mg)
end
end
Duel.Overlay(tc,syg)
Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
else
local lchk=Duel.GetMatchingGroup(s.chklfilter,tp,LOCATION_EXTRA,0,nil,sg)
if #lchk==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,5))
local chkccc=lchk:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,533)
local syg=sg:SelectSubGroup(tp,s.lfselect,false,1,#sg,tp)
local syng=Duel.GetMatchingGroup(s.lfilter,tp,LOCATION_EXTRA,0,nil,syg)
if #syng>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=syng:Select(tp,1,1,nil):GetFirst()
tc:SetMaterial(syg)
local tg=syg:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_ONFIELD)
local rg=syg:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
Duel.SendtoGrave(tg,REASON_EFFECT+REASON_MATERIAL+REASON_LINK)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_LINK)
Duel.SpecialSummon(tc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP)
tc: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)
c:SetSPSummonOnce(id)
--link summon
aux.AddLinkProcedure(c,nil,2,2,s.lcheck)
c:EnableReviveLimit()
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(5012623,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
--e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.sfliter(c)
return (c.MoJin or c:IsSetCard(0x23c))
end
function s.lcheck(g,lc)
return g:IsExists(s.sfliter,1,nil)
end
function s.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c.MoJin==true and c:IsFaceupEx() 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.GetFieldGroupCount(tp,LOCATION_HAND,0)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--身既为佛
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012625)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
e1:SetLabel(0)
c:RegisterEffect(e1)
end
function s.tgfilter(c)
local b1=c:IsLocation(LOCATION_REMOVED)
local b2=c.MoJin==true and c:IsLocation(LOCATION_DECK) and c:IsType(TYPE_MONSTER)
local b3=c:IsFaceupEx() and c:IsCode(5012625) and c:IsLocation(LOCATION_MZONE)
return (b1 or b2 or b3) and c:IsAbleToGrave()
end
function s.filter(c,e,tp)
return c:IsCode(5012625) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
end
function s.fselect(g,tp)
return Duel.GetMZoneCount(tp,g,tp)>0
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local rg1=Duel.GetMatchingGroup(Card.IsReleasableByEffect,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local b1=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_REMOVED,0,1,nil)
local b2=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil)
local b3=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE,0,1,nil)
local b4=rg1:CheckSubGroup(s.fselect,11,11,tp)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp)
if chk==0 then return b1 or b2 or b3 or b4 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
if b4 then
ops[off]=aux.Stringid(id,4)
opval[off-1]=4
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_TOGRAVE)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
elseif sel==2 then
e:SetCategory(CATEGORY_TOGRAVE)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
elseif sel==3 then
e:SetCategory(CATEGORY_TOGRAVE)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
else
e:SetCategory(CATEGORY_RELEASE)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,rg1,11,0,LOCATION_ONFIELD)
end
end
function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
local sel=e:GetLabel()
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_REMOVED+LOCATION_DECK+LOCATION_MZONE,0,nil)
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_REMOVED)
if #sg>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end
elseif sel==2 then
--Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_DECK)
if #sg>0 then
Duel.SendtoGrave(sg,REASON_EFFECT)
end
elseif sel==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)+1
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local sg=g:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE)
local pg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if ft>0 and #sg>0 and Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)~=0 then
if pg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local cg=pg:Select(tp,1,1,nil)--cg=pg:Select(tp,1,ft,nil)
Duel.SpecialSummon(cg,0,tp,tp,false,false,POS_FACEUP)
end
end
else
local rg1=Duel.GetMatchingGroup(Card.IsReleasableByEffect,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rs=rg1:SelectSubGroup(tp,s.fselect,false,11,11,tp)
if Duel.Release(rs,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=rg:GetFirst()
if tc then
tc:SetMaterial(rs)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
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)
c:SetUniqueOnField(1,1,id)
c:EnableReviveLimit()
--cannot fusion material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e4)
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)
--spsummon proc
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_SPSUMMON_PROC)
e6:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e6:SetRange(LOCATION_GRAVE)
e6:SetCondition(s.hspcon)
e6:SetTarget(s.hsptg)
e6:SetValue(SUMMON_TYPE_RITUAL)
e6:SetOperation(s.hspop)
c:RegisterEffect(e6)
--disable
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
--e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetCode(EVENT_CHAIN_SOLVING)
e7:SetRange(LOCATION_MZONE)
e7:SetCondition(s.discon)
e7:SetOperation(s.disop)
c:RegisterEffect(e7)
--cannot release
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e8:SetRange(LOCATION_MZONE)
e8:SetCode(EFFECT_UNRELEASABLE_SUM)
e8:SetValue(1)
c:RegisterEffect(e8)
local e9=e8:Clone()
e9:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e9)
--做超量素材时送去墓地
local e11=Effect.CreateEffect(c)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e11:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e11:SetCode(EVENT_ADJUST)
e11:SetCountLimit(13,id)
e11:SetOperation(s.rmop)
Duel.RegisterEffect(e11,0)
--control
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e10:SetRange(LOCATION_MZONE)
e10:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
c:RegisterEffect(e10)
--maintain
local e17=Effect.CreateEffect(c)
e17:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
--e17:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e17:SetCode(EVENT_PHASE+PHASE_END)
e17:SetRange(LOCATION_MZONE)
e17:SetCountLimit(1)
e17:SetCondition(s.mtcon)
e17:SetOperation(s.mtop)
c:RegisterEffect(e17)
end
function s.rmop(e)
local g=Duel.GetOverlayGroup(0,LOCATION_MZONE,LOCATION_MZONE)
local tgg=g:Filter(Card.IsCode,nil,id)
if tgg and #tgg>0 then
Duel.SendtoGrave(tgg,REASON_EFFECT)
end
end
function s.ndsfilter(c)
return c:IsFaceup() and c:IsCode(5012604)
end
function s.mtcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.ndsfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function s.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsAbleToRemove() then return end
Duel.Remove(c,POS_FACEDOWN,REASON_EFFECT)
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.fselect(g,tp)
return Duel.GetMZoneCount(tp,g,tp)>0
end
function s.hspfilter(c)
return not c:IsLocation(LOCATION_GRAVE)
end
function s.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetRitualMaterial(tp):Filter(s.hspfilter,nil)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_REMOVED,0,c)
--local g=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_REMOVED,0,c)
local b1=aux.RitualUltimateFilter(c,nil,e,tp,mg,nil,Card.GetLevel,"Greater")
local b2=#g>10 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return b2 or b1
end
function s.tgfilter(c)
return c:IsAbleToGraveAsCost()and c.MoJin==true
end
function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local sg=nil
local mg=Duel.GetRitualMaterial(tp):Filter(s.hspfilter,nil)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_REMOVED,0,c)
--local g=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_REMOVED,0,c)
local b1=aux.RitualUltimateFilter(c,nil,e,tp,mg,nil,Card.GetLevel,"Greater")
local b2=#g>10 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if b1 and (#g<11 or Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,0))==1) then
::cancel::
mg=mg:Filter(Card.IsCanBeRitualMaterial,c,c)
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
else
mg:RemoveCard(c)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(c,c:GetLevel(),"Greater")
sg=mg:SelectSubGroup(tp,aux.RitualCheck,true,1,c:GetLevel(),tp,c,c:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not sg then goto cancel end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
sg=g:Select(tp,11,11,nil)
end
if sg then
e:SetLabel(sel)
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function s.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=e:GetLabelObject()
c:SetMaterial(sg)
if sel==1 then
Duel.Release(sg,REASON_COST+REASON_MATERIAL+REASON_RITUAL)
else
Duel.SendtoGrave(sg,REASON_COST+REASON_MATERIAL+REASON_RITUAL)
end
sg:DeleteGroup()
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
local rc=re:GetHandler()
return re:GetActivateLocation()~=LOCATION_MZONE and re:GetActivateLocation()~=LOCATION_SZONE and not re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--山缪·李德·麦奎恩·马瑟斯
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--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)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND+LOCATION_EXTRA)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--抽卡效果
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,3))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.discon)
e3:SetTarget(s.drawtg)
e3:SetOperation(s.drawop)
c:RegisterEffect(e3)
--免疫效果
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id+1)
e4:SetCondition(s.discon)
e4:SetTarget(s.immtg)
e4:SetOperation(s.immop)
c:RegisterEffect(e4)
--破坏对方怪兽
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,0))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,id+2)
e5:SetCondition(s.discon)
e5:SetTarget(s.destg)
e5:SetOperation(s.desop)
c:RegisterEffect(e5)
--随机丢弃
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,2))
e6:SetCategory(CATEGORY_HANDES)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_CHAINING)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1,id+3)
e6:SetCondition(s.discon)
e6:SetTarget(s.distg)
e6:SetOperation(s.disop)
c:RegisterEffect(e6)
--draw when sent to grave
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(id,3))
--e7:SetCategory(CATEGORY_DRAW+REASON_DISCARD)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e7:SetProperty(EFFECT_FLAG_DELAY)
e7:SetCode(EVENT_TO_GRAVE)
e7:SetTarget(s.drtg)
e7:SetOperation(s.drop)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EVENT_TO_HAND)
e8:SetCondition(s.drcon)
c:RegisterEffect(e8)
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
--if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
--Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
--Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local loc=e:GetActivateLocation()
if not c:IsLocation(loc) then return end
if Duel.SendtoExtraP(c,nil,REASON_EFFECT)~=0 then
--Duel.Draw(tp,1,REASON_EFFECT)
--Duel.Draw(1-tp,1,REASON_EFFECT)
Duel.ShuffleHand(tp)
--Duel.BreakEffect()
--Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
--Duel.ShuffleHand(1-tp)
--Duel.BreakEffect()
--Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_EXTRA)
end
function s.tgcfilter(c)
return c.MoJin==true and c:IsAbleToGraveAsCost() and c:IsFaceupEx()
end
function s.fselect(g,tp,mc)
if mc:IsLocation(LOCATION_EXTRA) then return Duel.GetLocationCountFromEx(tp,tp,g,mc)>0 end
return Duel.GetMZoneCount(tp,g,tp)>0
end
function s.spcon(e,c)
if c==nil then return true end
if c:IsFacedown() and c:IsLocation(LOCATION_EXTRA) then return end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(s.tgcfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,c)
return g:CheckSubGroup(s.fselect,4,4,tp,c)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.tgcfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:SelectSubGroup(tp,s.fselect,true,4,4,tp,c)
if not sg then return false end
sg:KeepAlive()
e:SetLabelObject(sg)
return true
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
--抽卡效果
function s.drawtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function s.drawop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--免疫效果
function s.immtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.immop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local egg=Group.CreateGroup()
for i=1,ev do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
egg:AddCard(te:GetHandler())
end
if #egg==0 then return end
egg:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(s.efilter)
e1:SetLabelObject(egg)
e1:SetReset(RESET_EVENT+RESET_CHAIN)
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,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,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.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--随机丢弃
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>1 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,LOCATION_HAND)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if hg:GetCount()>1 then
local sg=hg:RandomSelect(tp,2)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
end
function s.efilter(e,re)
local g=e:GetLabelObject()
return g:IsContains(re:GetHandler())
end
\ No newline at end of file
--Anti-Art-Attachment
local s,id=GetID()
s.MoJin=true
function s.initial_effect(c)
--link summon
c:EnableReviveLimit()
--不能特殊召唤
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--场上装备效果
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(s.eqtg1)
e2:SetOperation(s.eqop1)
c:RegisterEffect(e2)
--墓地装备效果
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1)
e3:SetTarget(s.eqtg2)
e3:SetOperation(s.eqop2)
c:RegisterEffect(e3)
--除外装备效果
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_REMOVED)
e4:SetCountLimit(1)
e4:SetTarget(s.eqtg3)
e4:SetOperation(s.eqop3)
c:RegisterEffect(e4)
end
--目标过滤器
function s.eqfilter(c,tp,loc)
local res=false
if loc==LOCATION_MZONE then
res=Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,c)
and Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,c)
elseif loc==LOCATION_GRAVE then
res=Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
and Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,c)
elseif loc==LOCATION_REMOVED then
res=Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
and Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,c)
end
return res and c:IsFaceup() and c.MoJin
end
function s.eqlimit(e,c)
local tc=e:GetLabelObject()
return c==tc and not c:IsDisabled()
end
--装备函数
function s.equipop(c,e,tp,tc,dam)
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(s.eqlimit)
e1:SetLabelObject(c)
tc:RegisterEffect(e1)
if dam and not (c:IsCode(5012602) or c:IsCode(5012617)) then
Duel.Damage(tp,3000,REASON_EFFECT)
end
end
--场上装备效果
function s.eqtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,nil,tp,LOCATION_MZONE)
and e:GetHandler():CheckUniqueOnField(tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function s.eqop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,LOCATION_MZONE)
local tc=g:GetFirst()
if not tc then return end
--装备自己
s.equipop(tc,e,tp,c,true)
--选择并装备墓地卡
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,tc)
if #g1>0 then
s.equipop(tc,e,tp,g1:GetFirst(),false)
end
--选择并装备除外卡
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,tc)
if #g2>0 then
s.equipop(tc,e,tp,g2:GetFirst(),false)
end
--注册当回合使用过的标记
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
--墓地装备效果
function s.eqtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id+1)==0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,nil,tp,LOCATION_GRAVE)
and e:GetHandler():CheckUniqueOnField(tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function s.eqop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,LOCATION_GRAVE)
local tc=g:GetFirst()
if not tc then return end
--装备自己
s.equipop(tc,e,tp,c,true)
--选择并装备场上卡
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc)
if #g1>0 then
s.equipop(tc,e,tp,g1:GetFirst(),false)
end
--选择并装备除外卡
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,tc)
if #g2>0 then
s.equipop(tc,e,tp,g2:GetFirst(),false)
end
--注册当回合使用过的标记
Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1)
end
--除外装备效果
function s.eqtg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id+2)==0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,nil,tp,LOCATION_REMOVED)
and e:GetHandler():CheckUniqueOnField(tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function s.eqop3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,LOCATION_REMOVED)
local tc=g:GetFirst()
if not tc then return end
--装备自己
s.equipop(tc,e,tp,c,true)
--选择并装备场上卡
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc)
if #g1>0 then
s.equipop(tc,e,tp,g1:GetFirst(),false)
end
--选择并装备墓地卡
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToChangeControler,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,tc)
if #g2>0 then
s.equipop(tc,e,tp,g2:GetFirst(),false)
end
--注册当回合使用过的标记
Duel.RegisterFlagEffect(tp,id+2,RESET_PHASE+PHASE_END,0,1)
end
--科隆尊
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
c:EnableReviveLimit()
--material
aux.AddFusionProcMix(c,false,true,s.matfilter,s.filter,aux.FilterBoolFunction(Card.IsFusionType,TYPE_MONSTER),nil)
s.AddContactFusionProcedure(c,Card.IsAbleToDeckOrExtraAsCost,LOCATION_MZONE,0,aux.tdcfop(c))
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_EXTRA)
e0:SetValue(s.splimit)
c:RegisterEffect(e0)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE+LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
c:RegisterEffect(e1)
--banish
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
--e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
--e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCost(s.rmcost)
e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop)
c:RegisterEffect(e2)
--equip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,3))
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+0x0200)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():CheckUniqueOnField(tp)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)==0 then return end
if not c:CheckUniqueOnField(tp) then return end
if not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c):GetFirst()
if not tc then return end
if tc:IsFacedown() then return end
if not c:CheckUniqueOnField(tp) then return end
if Duel.Equip(tp,c,tc,true,true) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(tc)
e1:SetValue(s.eqlimit)
c:RegisterEffect(e1,true)
--effect indestructable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,3))
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3,true)
end
Duel.EquipComplete()
end
function s.sqlimit(e,c)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
--return c==e:GetLabelObject()
end
function s.matfilter(c)
return c.MoJin==true and c:IsLevel(10)
end
function s.filter(c)
return c.MoJin==true
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) 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_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
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 not tc:IsRelateToEffect(e) or Duel.Destroy(tc,REASON_EFFECT)==0 then
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if Duel.Destroy(sg,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
local rg=og:Filter(Card.IsAbleToRemove,nil)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
end
function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanTurnSet() end
Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsFaceup() then return end
local fid=c:GetFieldID()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(id,2))
if Duel.GetFlagEffect(tp,id)==0 then
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetLabel(fid)
e2:SetLabelObject(c)
e2:SetCondition(s.indcon)
e2:SetTarget(s.indtg)
e2:SetValue(s.efilter)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
Duel.RegisterEffect(e2,tp)
end
end
function s.indcon(e)
local c=e:GetLabelObject()
return c:GetFlagEffectLabel(id)==e:GetLabel()
end
function s.indtg(e,c)
return c:IsFacedown() and c:GetFlagEffectLabel(id)==e:GetLabel()
end
function s.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function s.AddContactFusionProcedure(c,filter,self_location,opponent_location,mat_operation,...)
self_location=self_location or 0
opponent_location=opponent_location or 0
local operation_params={...}
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(s.ContactFusionCondition(filter,self_location,opponent_location))
e2:SetOperation(s.ContactFusionOperation(filter,self_location,opponent_location,mat_operation,operation_params))
c:RegisterEffect(e2)
return e2
end
function s.ContactFusionMaterialFilter(c,fc,filter)
return c:IsCanBeFusionMaterial(fc,SUMMON_TYPE_SPECIAL) and c:IsFusionType(TYPE_MONSTER)
and (not filter or filter(c,fc)) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED))
end
function s.ContactFusionCondition(filter,self_location,opponent_location)
return function(e,c)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(s.ContactFusionMaterialFilter,tp,self_location,opponent_location,c,c,filter)
return c:CheckFusionMaterial(mg,nil,tp|0x200)
end
end
function s.ContactFusionOperation(filter,self_location,opponent_location,mat_operation,operation_params)
return function(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(s.ContactFusionMaterialFilter,tp,self_location,opponent_location,c,c,filter)
local g=Duel.SelectFusionMaterial(tp,c,mg,nil,tp|0x200)
c:SetMaterial(g)
mat_operation(g,table.unpack(operation_params))
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)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,s.sfliter,s.sfliter,true)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,id)
e1:SetCondition(s.hspcon)
e1:SetTarget(s.hsptg)
e1:SetOperation(s.hspop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(1101)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1)
e2:SetTarget(s.target)
e2:SetOperation(s.operation)
c:RegisterEffect(e2)
end
function s.sfliter(c)
return c.MoJin
end
function s.cfilter(c,mc)
return c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(mc)
and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c.MoJin
end
function s.fselect(g,tp,mc)
return Duel.GetLocationCountFromEx(tp,tp,g,mc)>0 and g:IsExists(Card.IsSetCard,2,nil,MoJin==true)
end
function s.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,c)
return g:CheckSubGroup(s.fselect,2,2,tp,c)
end
function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,s.fselect,false,2,2,tp,c)
sg:KeepAlive()
e:SetLabelObject(sg)
return true
end
function s.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
c:SetMaterial(g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL)
g:DeleteGroup()
end
function s.afilter(c)
if not c:IsFaceup() then return end
local atk=c:GetAttack()
local def=c:GetDefense()
return (atk>3000 and atk<5000) or (def>3000 and def<5000)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsFaceup() and s.afilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.afilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.afilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--圣日耳曼
local cm,m,o=GetID()
local s,id,o=GetID()
s.MoJin=true
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetOperation(cm.spop)
c:RegisterEffect(e4)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
--e1:SetCountLimit(1,id)
e1:SetLabelObject(e4)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function cm.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) --and c.MoJin
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,nil,e,tp) end
--and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local eff=e:GetLabelObject()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local c=e:GetHandler()
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)
Duel.SpecialSummonComplete()
g:GetFirst():RegisterFlagEffect(m,RESET_EVENT+RESETS_REDIRECT,0,1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(cm.eftg)
e3:SetLabelObject(eff)
Duel.RegisterEffect(e3,tp)
end
end
function cm.eftg(e,c)
return c:GetFlagEffect(m)~=0
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetOperation(cm.dsop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Destroy(c,REASON_EFFECT)
end
--反转之位
local s,id,o=GetID()
c5012631.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--activate
--local e0=Effect.CreateEffect(c)
--e0:SetType(EFFECT_TYPE_ACTIVATE)
--e0:SetCode(EVENT_FREE_CHAIN)
--e0:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
--c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
--e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_FREE_CHAIN)
--e1:SetRange(LOCATION_SZONE)
--e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,3))
e2:SetCategory(CATEGORY_DRAW+REASON_DISCARD)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE+LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,id)
e2:SetCost(s.drcost)
e2:SetTarget(s.drtg)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(1339)
e3:SetType(EFFECT_TYPE_SINGLE)
--e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e3:SetCondition(s.handcon)
c:RegisterEffect(e3)
end
function s.ndcfilter(c)
return c:IsFaceup() and c.MoJin==true
end
function s.handcon(e)
return Duel.IsExistingMatchingCard(s.ndcfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function s.cfilter(c)
return c.MoJin==true 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_ONFIELD+LOCATION_GRAVE,0,2,c,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD+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.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
--if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
--Duel.SetTargetPlayer(tp)
--Duel.SetTargetParam(1)
--Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==2 then
Duel.ShuffleHand(p)
Duel.BreakEffect()
Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
--local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
--if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
--Duel.Draw(p,d,REASON_EFFECT)
--end
end
function s.filter(c)
return c:IsCode(5012608) and c:IsFaceupEx() and not c:IsForbidden()
end
function s.target(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 Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
and Duel.IsPlayerCanSpecialSummonMonster(tp,5012608,0x50a,TYPE_MONSTER+TYPE_EFFECT,1700,800,7,RACE_DRAGON,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if #sg>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,5012608,0x50a,TYPE_MONSTER+TYPE_EFFECT,1700,800,7,RACE_DRAGON,ATTRIBUTE_LIGHT) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=sg:Select(tp,1,1,nil):GetFirst()
tc:AddMonsterAttribute(TYPE_EFFECT)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0))
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,5))
--Negate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(s.condition1)
e1:SetOperation(s.operation1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc: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+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(s.discon)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
tc:RegisterEffect(e2)
--change effect type
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(id)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetTargetRange(1,0)
tc:RegisterEffect(e3)
Duel.SpecialSummonComplete()
end
end
function s.tcfilter(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.tcfilter,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
\ No newline at end of file
--逆源质拼图545
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,s.mfilter,nil,1,99)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--Search
local e2=Effect.CreateEffect(c)
e2:SetDescription(1153)
e2:SetType(EFFECT_TYPE_QUICK_O)
--e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
--e2:SetCountLimit(1,id)
e2:SetCountLimit(2)
e2:SetCost(s.setcost)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
--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)
end
function s.mfilter(c,xyzc)
return c.MoJin==true and c:IsType(TYPE_PENDULUM) and not c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function s.descon(e)
return e:GetHandler():GetOverlayCount()==0
end
function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.filter(c)
return c.MoJin==true and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
return --Duel.GetLocationCount(tp,LOCATION_SZONE) and
Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
--if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
end
end
\ No newline at end of file
--安娜·金斯福德
local cm,m,o=GetID()
local s,id,o=GetID()
s.MoJin=true
function cm.initial_effect(c)
--aux.AddSynchroProcedure(c,s.sfliter,aux.NonTuner(nil),1)
aux.AddSynchroProcedure(c,cm.fil1,cm.fil2,2)
c:EnableReviveLimit()
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_POSITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
--e3:SetCountLimit(1)
e3:SetCost(cm.rmcost)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
--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(cm.efilter)
c:RegisterEffect(e3)
end
function s.sfliter(c)
return c.MoJin==true
end
function cm.fil1(c)
return c:IsFaceup() and c:IsType(TYPE_TUNER) and c.Mojin==true
end
function cm.fil2(c)
return c:IsFaceup() --and not c:IsType(TYPE_TUNER)
end
function cm.rmfil(c)
return c:IsFaceup() and c:IsStatus(STATUS_EFFECT_ENABLED)
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m+10000000)<Duel.GetFlagEffect(tp,m)+1 end
Duel.RegisterFlagEffect(tp,m+10000000,RESET_PHASE+PHASE_END,0,1)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(cm.rmfil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectTarget(tp,cm.rmfil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:IsLocation(LOCATION_PZONE) then
Duel.SendtoDeck(tc,nil,2,REASON_RULE)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
elseif tc:IsLocation(LOCATION_SZONE) then
if Duel.ChangePosition(tc,POS_FACEDOWN)==0 then
Duel.SendtoDeck(tc,nil,2,REASON_RULE)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
else
if Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)==0 then
Duel.SendtoDeck(tc,nil,2,REASON_RULE)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
end
end
end
function cm.efilter(e,re)
return re:GetHandler():IsLocation(LOCATION_ONFIELD)
end
--阿拉迪娅
local s,id,o=GetID()
s.MoJin=true
s.Max=3
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(s.linkfilter,c),0,0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(1166)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(s.LinkCondition(aux.FilterBoolFunction(s.linkfilter),s.Max,s.Max))
e1:SetTarget(s.LinkTarget(aux.FilterBoolFunction(s.linkfilter),s.Max,s.Max))
e1:SetOperation(s.LinkOperation(aux.FilterBoolFunction(s.linkfilter),s.Max,s.Max))
e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1)
--Destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetTarget(s.desreptg)
e2:SetOperation(s.desrepop)
c:RegisterEffect(e2)
--battle
local eb1=Effect.CreateEffect(c)
eb1:SetType(EFFECT_TYPE_SINGLE)
eb1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
eb1:SetValue(1)
c:RegisterEffect(eb1)
--double
local eb2=Effect.CreateEffect(c)
eb2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
eb2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
eb2:SetRange(LOCATION_MZONE)
eb2:SetTargetRange(LOCATION_MZONE,0)
eb2:SetCondition(s.rdcon)
eb2:SetOperation(s.rdop)
c:RegisterEffect(eb2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetOperation(s.reop)
c:RegisterEffect(e3)
--des
local ed1=Effect.CreateEffect(c)
ed1:SetDescription(aux.Stringid(id,1))
ed1:SetCategory(CATEGORY_DESTROY)
ed1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
ed1:SetCode(EVENT_SPSUMMON_SUCCESS)
ed1:SetRange(LOCATION_MZONE)
ed1:SetTarget(s.destg)
ed1:SetOperation(s.desop)
c:RegisterEffect(ed1)
local ed2=ed1:Clone()
ed2:SetCode(EVENT_ATTACK_ANNOUNCE)
c:RegisterEffect(ed2)
local ed3=ed1:Clone()
ed3:SetCode(EVENT_BECOME_TARGET)
c:RegisterEffect(ed3)
local ed4=ed1:Clone()
ed4:SetCode(EVENT_BE_BATTLE_TARGET)
c:RegisterEffect(ed4)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(s.chk)
Duel.RegisterEffect(ge1,0)
end
end
function s.LCheckGoal(sg,tp,lc,gf,lmat,max)
return sg:CheckWithSumEqual(s.GetLinkCount,max,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg,lc,tp))
and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function s.GetLinkCount(c)
return 1
end
function s.LinkCondition(f,minct,maxct,gf)
return function(e,c,og,lmat,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=minct
local maxc=maxct
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
if s.Max<3 then
minc=s.Max
maxc=s.Max
end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(s.LCheckGoal,minc,maxc,tp,c,gf,lmat,maxc)
end
end
function s.LinkTarget(f,minct,maxct,gf)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=minct
local maxc=maxct
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
if s.Max<3 then
minc=s.Max
maxc=s.Max
end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,s.LCheckGoal,cancel,minc,maxc,tp,c,gf,lmat,maxc)
if s.Max>0 then
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
elseif s.Max==0 then
e:SetLabelObject(nil)
return true
end
end
end
function s.LinkOperation(f,minct,maxct,gf)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,lmat,min,max)
local g=e:GetLabelObject()
if g then
c:SetMaterial(g)
Auxiliary.LExtraMaterialCount(g,c,tp)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_LINK)
g:DeleteGroup()
elseif g==nil then
end
end
end
function s.chkfilter(c)
return c:IsCode(5012604) and c:IsPosition(POS_FACEUP)
end
function s.chk(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if s.chkfilter(tc) and s.Max>0 then
s.Max=s.Max-1
end
tc=eg:GetNext()
end
end
function s.linkfilter(c)
return c:IsCanBeLinkMaterial(nil) and c.MoJin
end
function s.repfilter(c)
return not c:IsStatus(STATUS_DESTROY_CONFIRMED)
end
function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
return c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
and Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_EXTRA,LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_EXTRA,1,c)
end
if Duel.SelectEffectYesNo(tp,c,96) then
local g=c:GetEquipGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_EXTRA,LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_EXTRA,1,1,c)
Duel.SetTargetCard(sg)
return true
else return false end
end
function s.desrepop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
function s.rdcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return ep==1-tp and tc==e:GetHandler()
end
function s.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(1-tp,ev*3)
end
function s.reop(e,tp,eg,ep,ev,re,r,rp)
s.Max=3
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,3,1,nil,LOCATION_ONFIELD)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,3,nil) then
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,3,3,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--安娜·施普伦格尔
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddMaterialCodeList(c,5012604)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,5012604),1,1)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(s.cost)
e1:SetTarget(s.tg)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
--免疫已发动的效果
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetValue(s.immval)
c:RegisterEffect(e5)
--上条当麻相关效果
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.drcon)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local cnt=e:GetHandler():GetFlagEffect(id)
local res=true
if cnt>0 then
res=Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,cnt,nil)
end
if chk==0 then return res end
Duel.DiscardHand(tp,Card.IsDiscardable,cnt,cnt,REASON_COST+REASON_DISCARD)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingTarget(aux.nzatk,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b2=Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local b3=Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)
+Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)
+Duel.GetLocationCount(tp,LOCATION_SZONE,PLAYER_NONE,0)
+Duel.GetLocationCount(1-tp,LOCATION_SZONE,PLAYER_NONE,0)>0
if chk==0 then return b1 or b2 or b3 end
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local b2=Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local b3=Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)
+Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)
+Duel.GetLocationCount(tp,LOCATION_SZONE,PLAYER_NONE,0)
+Duel.GetLocationCount(1-tp,LOCATION_SZONE,PLAYER_NONE,0)>0
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,0),0},
{b2,aux.Stringid(id,1),1},
{b3,aux.Stringid(id,2),2})
if op==0 then
local sg=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Destroy(sg,REASON_EFFECT)
elseif op==1 then
local sg=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if sg:GetCount()>0 then
local sc=sg:GetFirst()
while sc do
Duel.NegateRelatedChain(sc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
sc:RegisterEffect(e2)
if sc: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+RESET_CHAIN)
sc:RegisterEffect(e3)
end
sc=sg:GetNext()
end
end
elseif op==2 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE_FIELD)
e3:SetValue(0xffffffff)
e3:SetReset(RESET_PHASE+PHASE_END+RESET_CHAIN)
Duel.RegisterEffect(e3,tp)
end
end
function s.filter(c)
return c:IsFaceup() and c:IsCode(5012604)
end
function s.immval(e,te)
return te:IsActivated()
end
--上条当麻相关效果
function s.cfilter(c)
return c:IsFaceup() and c:IsCode(5012604)
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:GetHandler()==e:GetHandler() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--上里翔流
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
c:SetUniqueOnField(1,1,id)
c:SetSPSummonOnce(id)
aux.AddCodeList(c,5012604)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,5012604,s.sfliter,1,true,true)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,id)
e1:SetCondition(s.hspcon)
e1:SetTarget(s.hsptg)
e1:SetOperation(s.hspop)
c:RegisterEffect(e1)
--Remove
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop)
c:RegisterEffect(e2)
--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:SetValue(s.efilter)
c:RegisterEffect(e3)
if not s.global_flag then
s.global_flag=true
local ge1=Effect.CreateEffect(c)
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.sfliter(c)
return c.MoJin==true
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsCode(5012604) then
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),id,0,0,0)
end
end
end
function s.cfilter(c,mc)
return ((c.MoJin==true and c:IsLocation(LOCATION_MZONE+LOCATION_GRAVE)) or c:IsFusionCode(5012604))
and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial(mc)
and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0
end
function s.fselect(g,tp,mc)
return Duel.GetLocationCountFromEx(tp,tp,g,mc)>0
and g:IsExists(Card.IsFusionCode,1,nil,5012604) and g:IsExists(Card.IsFusionSetCard,1,nil,MoJin==true)
end
function s.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,c)
return g:CheckSubGroup(s.fselect,2,2,tp,c) and Duel.GetFlagEffect(tp,id)>0
end
function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,s.fselect,false,2,2,tp,c)
sg:KeepAlive()
e:SetLabelObject(sg)
return true
end
function s.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
c:SetMaterial(g)
Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL)
g:DeleteGroup()
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
end
function s.efilter(e,te)
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
\ 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:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
--e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--adjust
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(s.adjustop)
c:RegisterEffect(e2)
--change effect type
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e7:SetCode(id)
e7:SetRange(LOCATION_SZONE)
e7:SetTargetRange(1,0)
c:RegisterEffect(e7)
--
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_ADJUST)
e8:SetRange(LOCATION_SZONE)
e8:SetOperation(s.adjustop2)
c:RegisterEffect(e8)
end
function s.spfilter(c,e,tp)
return c:IsLevelBelow(5) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c.MoJin or c:IsSetCard(0x23c))
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
s.adjustop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
--act limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(s.aclimit)
Duel.RegisterEffect(e2,tp)
end
function s.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsType(TYPE_CONTINUOUS)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsCode(5012615)
end
function s.thfilter(c)
return c:IsAbleToHand() and c:IsCode(5012615)
end
function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD,0,nil)
if #g==0 then
Duel.Destroy(c,REASON_EFFECT)
local sg=Duel.GetFirstMatchingCard(s.thfilter,tp,LOCATION_DECK,0,nil)
if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
Duel.Readjust()
end
end
function s.actfilter(c,e)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and not c:IsImmuneToEffect(e)
end
function s.limitcon(e)
local tp=e:GetHandlerPlayer()
return Duel.IsPlayerAffectedByEffect(tp,id)
end
function s.adjustop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.actfilter,tp,LOCATION_MZONE,0,nil,e)
if #g==0 then return end
for tc in aux.Next(g) do
if tc:GetFlagEffect(id)==0 then
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0,0)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetCondition(s.limitcon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
end
function s.elimit(e,re,tp)
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_MZONE) and rc:IsSummonType(SUMMON_TYPE_SPECIAL)
end
\ No newline at end of file
--旅游
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1165)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(s.XyzLevelFreeCondition(s.filter,nil,2,2))
e0:SetTarget(s.XyzLevelFreeTarget(s.filter,nil,2,2))
e0:SetOperation(Auxiliary.XyzLevelFreeOperation(s.filter,nil,2,2))
e0:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e0)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--cannot direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(1104)
e1:SetCategory(CATEGORY_DESTROY)
--e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.SpiritReturnTargetForced)
e1:SetOperation(s.SpiritReturnOperation)
c:RegisterEffect(e1)
--remove
local ed1=Effect.CreateEffect(c)
ed1:SetDescription(aux.Stringid(id,1))
ed1:SetCategory(CATEGORY_REMOVE)
ed1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
ed1:SetCode(EVENT_SPSUMMON_SUCCESS)
ed1:SetRange(LOCATION_MZONE)
ed1:SetTarget(s.destg)
ed1:SetOperation(s.desop)
c:RegisterEffect(ed1)
local ed2=Effect.CreateEffect(c)
ed2:SetDescription(aux.Stringid(id,1))
ed2:SetCategory(CATEGORY_REMOVE)
ed2:SetType(EFFECT_TYPE_IGNITION)
ed2:SetRange(LOCATION_MZONE)
ed2:SetCost(s.cost)
ed2:SetTarget(s.destg)
ed2:SetOperation(s.desop)
c:RegisterEffect(ed2)
--不能当召唤用素材--
local e21=Effect.CreateEffect(c)
e21:SetType(EFFECT_TYPE_SINGLE)
e21:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e21:SetRange(LOCATION_MZONE)
e21:SetCode(EFFECT_UNRELEASABLE_SUM)
e21:SetValue(1)
c:RegisterEffect(e21)
local e12=e21:Clone()
e12:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e12)
local e13=Effect.CreateEffect(c)
e13:SetType(EFFECT_TYPE_SINGLE)
e13:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e13:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e13:SetValue(1)
c:RegisterEffect(e13)
local e14=e13:Clone()
e14:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e14:SetValue(1)
c:RegisterEffect(e14)
local e15=e14:Clone()
e15:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e15)
local e16=e14:Clone()
e16:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e16)
--做超量素材时送去墓地
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_ADJUST)
e4:SetCountLimit(13,id)
e4:SetOperation(s.rmop)
Duel.RegisterEffect(e4,0)
--maintain
local e17=Effect.CreateEffect(c)
e17:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e17:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e17:SetCode(EVENT_PHASE+PHASE_END)
e17:SetRange(LOCATION_MZONE)
e17:SetCountLimit(1)
e17:SetCondition(s.mtcon)
e17:SetOperation(s.mtop)
c:RegisterEffect(e17)
end
function s.ndsfilter(c)
return c:IsFaceup() and c:IsCode(5012613) and c:IsCode(5012625)
end
function s.mtcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.ndsfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function s.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsAbleToExtra() or c:IsExtraDeckMonster()) then return end
Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)
end
function s.SpiritReturnTargetForced(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.SpiritReturnOperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
function s.filter(c)
return c.MoJin and not c:IsSummonableCard()
end
function s.XyzLevelFreeFilter(c,xyzc,f)
return (not (c:IsOnField()or c:IsLocation(LOCATION_REMOVED)) or c:IsFaceup()) and c:IsCanBeXyzMaterial(xyzc) and (not f or f(c,xyzc))
end
function s.XyzLevelFreeGoal(g,tp,xyzc,gf)
return (not gf or gf(g)) and Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
end
function s.XyzLevelFreeCondition(f,gf,minct,maxct)
return function(e,c,og,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=minct
local maxc=maxct
if min then
minc=math.max(minc,min)
maxc=math.min(maxc,max)
end
if maxc<minc then return false end
local mg=nil
if og then
mg=og:Filter(s.XyzLevelFreeFilter,nil,c,f)
else
mg=Duel.GetMatchingGroup(s.XyzLevelFreeFilter,tp,LOCATION_MZONE+LOCATION_REMOVED,0,nil,c,f)
end
local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg)
Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
local res=mg:CheckSubGroup(Auxiliary.XyzLevelFreeGoal,minc,maxc,tp,c,gf)
Auxiliary.GCheckAdditional=nil
return res
end
end
function s.XyzLevelFreeTarget(f,gf,minct,maxct)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og and not min then
return true
end
local minc=minct
local maxc=maxct
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local mg=nil
if og then
mg=og:Filter(s.XyzLevelFreeFilter,nil,c,f)
else
mg=Duel.GetMatchingGroup(s.XyzLevelFreeFilter,tp,LOCATION_MZONE+LOCATION_REMOVED,0,nil,c,f)
end
local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
Duel.SetSelectedCard(sg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local cancel=Duel.IsSummonCancelable()
Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
local g=mg:SelectSubGroup(tp,Auxiliary.XyzLevelFreeGoal,cancel,minc,maxc,tp,c,gf)
Auxiliary.GCheckAdditional=nil
if g and g:GetCount()>0 then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
end
function s.rmcon(e)
local c=e:GetHandler()
return true --c:IsAbleToGrave()
end
function s.rmop(e)
local g=Duel.GetOverlayGroup(0,LOCATION_MZONE,LOCATION_MZONE)
local tgg=g:Filter(Card.IsCode,nil,id)
if tgg and #tgg>0 then
Duel.SendtoGrave(tgg,REASON_EFFECT)
end
end
function s.refilter(c)
return c:IsAbleToRemove()
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.refilter,tp,0xff,0xff,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,nil,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp)
--
local c=e:GetHandler()
Duel.RegisterFlagEffect(0,id+1,0,0,1)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_ADJUST)
e4:SetReset(RESET_PHASE+PHASE_END)
e4:SetLabel(ac)
e4:SetCondition(s.recon)
e4:SetOperation(s.reop)
Duel.RegisterEffect(e4,tp)
end
function s.retfilter(c,fid)
return c:GetFlagEffectLabel(id)==fid
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
if not e:GetLabelObject():IsExists(s.retfilter,1,nil,e:GetLabel()) then
e:GetLabelObject():DeleteGroup()
e:Reset()
return false
end
return true
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetFlagEffect(0,id+1)
local fid=e:GetLabel()
local g=e:GetLabelObject():Filter(s.retfilter,nil,fid)
if #g<=0 then return end
Duel.Hint(HINT_CARD,0,id)
for p in aux.TurnPlayers() do
local tg=g:Filter(Card.IsPreviousControler,nil,p)
local mt=Duel.GetLocationCount(p,LOCATION_MZONE)
local st=Duel.GetLocationCount(p,LOCATION_SZONE)
local mg=tg:Filter(Card.IsType,nil,TYPE_MONSTER)
local sg=tg:Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP)
while #mg>0 and mt>0 do
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TOFIELD)
local gg=mg:Select(p,1,1,nil)
Duel.ReturnToField(gg:GetFirst())
mg:Sub(gg)
end
while #sg>0 and st>0 do
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TOFIELD)
local gg=sg:Select(p,1,1,nil)
local gc=gg:GetFirst()
local sp=gc:GetPreviousControler()
if gc:IsType(TYPE_FIELD) then
local fc=Duel.GetFieldCard(p,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(gc,p,sp,LOCATION_FZONE,POS_FACEUP,true)
else
Duel.ReturnToField(gc)
end
if not gc:IsType(TYPE_CONTINUOUS+TYPE_FIELD) then
Duel.SendtoGrave(gc,REASON_RULE)
end
sg:Sub(gg)
end
end
e:GetLabelObject():DeleteGroup()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.retifilter(c,code)
return c:IsFaceup() and c:IsAbleToRemove() and c:IsCode(code)
end
function s.recon(e,tp)
local c=e:GetHandler()
local code=e:GetLabel()
local g=Duel.GetMatchingGroup(s.retifilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,code)
return g:IsExists(Card.IsAbleToRemove,1,nil,tp,POS_FACEUP) and Duel.GetFlagEffect(0,id+1)>0
end
function s.reop(e,tp)
local c=e:GetHandler()
local code=e:GetLabel()
local og=Duel.GetMatchingGroup(s.retifilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,code)
if og:GetCount()>0 then
Duel.Remove(og,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)
for tc in aux.Next(og) do
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
end
og:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabel(fid)
e1:SetLabelObject(og)
e1:SetCountLimit(1)
e1:SetCondition(s.retcon)
e1:SetOperation(s.retop)
Duel.RegisterEffect(e1,tp)
end
end
--木山春生
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.drcon)
e2:SetTarget(s.drtg)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
if not s.damage_flag then
s.damage_flag=true
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetOperation(s.regop)
Duel.RegisterEffect(e3,0)
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(0,id,0,0,1)
end
function s.spfilter(c,tp)
return c:IsLevelBelow(3)
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.CheckReleaseGroupEx(tp,s.spfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(s.spfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
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 tc=e:GetLabelObject()
Duel.Release(tc,REASON_SPSUMMON)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(5)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
c:RegisterEffect(e1)
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(0,id)>0 and
(e:GetHandler():IsLevel(5) or Duel.IsExistingMatchingCard(s.acfilter,tp,LOCATION_ONFIELD,0,1,nil))
end
function s.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x23c) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res and Duel.IsPlayerCanDraw(tp,1)
end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end
Duel.BreakEffect()
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
::cancel::
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or ce~=nil and not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
if #mat1==0 then goto cancel end
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
elseif ce~=nil then
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
if #mat2==0 then goto cancel end
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function s.acfilter(c)
return c:IsCode(5012615) and c:IsFaceup()
end
--Aiwass
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
--spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.FALSE)
c:RegisterEffect(e0)
--summon with s/t
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_ADD_EXTRA_TRIBUTE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_SPELL))
e1:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
--cannot release
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_UNRELEASABLE_SUM)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e5)
--summon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,2))
e6:SetCategory(CATEGORY_SUMMON)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetRange(LOCATION_HAND)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e6:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e6:SetCondition(s.sumcon)
e6:SetTarget(s.sumtg)
e6:SetOperation(s.sumop)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_MATERIAL_CHECK)
e7:SetValue(s.valcheck)
c:RegisterEffect(e7)
--draw
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_CHAINING)
e8:SetRange(LOCATION_MZONE)
e8:SetLabelObject(e7)
e8:SetCondition(s.drcon)
e8:SetOperation(s.draw)
c:RegisterEffect(e8)
--summon with 3 tribute
local e10=Effect.CreateEffect(c)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e10:SetCondition(s.ttcon)
e10:SetOperation(s.ttop)
e10:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e10)
local e12=e10:Clone()
e12:SetCode(EFFECT_LIMIT_SET_PROC)
c:RegisterEffect(e12)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
return minc<=3 and Duel.CheckTribute(c,3)
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function s.filter(c,e,tp)
return (c:IsCode(5012603) or c:IsCode(5012604) or c:IsCode(5012609)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
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_DECK+LOCATION_EXTRA+LOCATION_GRAVE)
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+LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(g:GetFirst():GetBaseAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,0,0)
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pos=0
if c:IsSummonable(true,nil,1) then pos=pos+POS_FACEUP_ATTACK end
if c:IsMSetable(true,nil,1) then pos=pos+POS_FACEDOWN_DEFENSE end
if pos==0 then return end
if Duel.SelectPosition(tp,c,pos)==POS_FACEUP_ATTACK then
Duel.Summon(tp,c,true,nil,1)
else
Duel.MSet(tp,c,true,nil,1)
end
end
function s.dfilter(c)
return c:IsType(TYPE_SPELL) and c.MoJin
end
function s.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(s.dfilter,1,nil) then
e:SetLabel(1)
else
e:SetLabel(0)
end
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetLabel()==1 and re:GetHandler()==e:GetHandler()
end
function s.draw(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.Draw(tp,1,REASON_EFFECT)
end
\ No newline at end of file
--莉莉丝·克劳利
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
--spirit return
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.FALSE)
c:RegisterEffect(e0)
--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)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(s.atkval)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetValue(9)
c:RegisterEffect(e2)
--inactivatable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_INACTIVATE)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(s.con)
e4:SetValue(s.effectfilter)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_DISEFFECT)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(s.con)
e5:SetValue(s.effectfilter)
c:RegisterEffect(e5)
end
function s.filter(c)
return c.MoJin==true and c:IsAbleToHand() and c:IsType(TYPE_TRAP)
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.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_ONFIELD,0,nil,5012617)*2200
end
function s.con(e)
return e:GetHandler():IsAttackAbove(1)
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():IsType(TYPE_MONSTER) and bit.band(loc,LOCATION_MZONE)~=0
end
\ No newline at end of file
--蕾薇妮雅·柏德蔚
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,10,2)
--lv change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(s.lvtg)
e1:SetValue(s.lvval)
c:RegisterEffect(e1)
--cannot be link material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e3:SetValue(1)
c:RegisterEffect(e3)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(s.XyzCondition(nil,10,2,2))
e2:SetTarget(Auxiliary.XyzTarget(nil,10,2,2))
e2:SetOperation(Auxiliary.XyzOperation(nil,10,2,2))
e2:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e2)
--remove
local e14=Effect.CreateEffect(c)
e14:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e14:SetCode(EVENT_SPSUMMON_SUCCESS)
e14:SetCondition(s.rmcon)
e14:SetTarget(s.rmtg)
e14:SetOperation(s.rmop)
c:RegisterEffect(e14)
--
local e21=Effect.CreateEffect(c)
e21:SetDescription(aux.Stringid(id,1))
e21:SetType(EFFECT_TYPE_QUICK_O)
e21:SetProperty(EFFECT_FLAG_CARD_TARGET)
e21:SetRange(LOCATION_MZONE)
e21:SetCode(EVENT_FREE_CHAIN)
e21:SetCountLimit(3)
e21:SetCondition(s.xcon)
e21:SetTarget(s.xtg)
e21:SetOperation(s.xop)
c:RegisterEffect(e21)
--destroy
local e24=Effect.CreateEffect(c)
e24:SetDescription(aux.Stringid(id,1))
e24:SetCategory(CATEGORY_REMOVE)
e24:SetType(EFFECT_TYPE_QUICK_O)
e24:SetCode(EVENT_CHAINING)
e24:SetRange(LOCATION_MZONE)
e24:SetCondition(s.descon)
e24:SetTarget(s.destg)
e24:SetOperation(s.desop)
c:RegisterEffect(e24)
--cannot release
local e13=Effect.CreateEffect(c)
e13:SetType(EFFECT_TYPE_SINGLE)
e13:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e13:SetRange(LOCATION_MZONE)
e13:SetCode(EFFECT_UNRELEASABLE_SUM)
e13:SetValue(1)
c:RegisterEffect(e13)
local e25=e13:Clone()
e25:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e25)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(1)
c:RegisterEffect(e4)
--damage
local e41=Effect.CreateEffect(c)
e41:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e41:SetCode(EVENT_LEAVE_FIELD_P)
e41:SetOperation(s.damp)
c:RegisterEffect(e41)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_REMOVE)
e5:SetOperation(s.damop)
e5:SetLabelObject(e41)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EVENT_TO_DECK)
e6:SetCondition(s.tgcon)
c:RegisterEffect(e6)
end
function s.lvtg(e,c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsRace(RACE_SPELLCASTER) and c:IsLevelAbove(1)
end
function s.lvval(e,c,rc)
local lv=c:GetLevel()
if rc==e:GetHandler() then return 10
else return lv end
end
function s.XyzCondition(f,lv,minct,maxct)
--og: use special material
return function(e,c,og,min,max)
if c==nil then return true end
if not c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=minct
local maxc=maxct
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
return Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og)
end
end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.mtfilter(c,tp,e)
return not c:IsImmuneToEffect(e) and (c:IsAbleToChangeControler() or c:IsControler(tp))
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(s.mtfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil,tp,e)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
function s.xcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
function s.xtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp)
and chkc:IsCanOverlay() end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanOverlay,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SelectTarget(tp,Card.IsCanOverlay,tp,0,LOCATION_ONFIELD,1,1,nil)
end
function s.xop(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 tc:IsImmuneToEffect(e) and tc:IsCanOverlay() then
tc:CancelToGrave()
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(tc))
end
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetOverlayCount()>=22
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local og=c:GetOverlayGroup():Filter(Card.IsAbleToRemove,nil)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) and #og>0 end
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
g:Merge(og)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local og=c:GetOverlayGroup():Filter(Card.IsAbleToRemove,nil)
g:Merge(og)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
if not c:IsRelateToEffect(e) then return end
Duel.SendtoExtraP(c,nil,REASON_EFFECT)
end
function s.damp(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local og=c:GetOverlayGroup()
og:KeepAlive()
e:SetLabelObject(og)
end
function s.chkfilter(c,tp)
return c:IsLocation(LOCATION_EXTRA) and not c:IsControler(tp)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_EXTRA) and c:IsFacedown()
end
function s.tgfilter(c)
return c.MoJin and c:IsAbleToGrave()
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local og=e:GetLabelObject():GetLabelObject()
if not og then return end
local tg=og:Filter(Card.IsAbleToDeck,nil)
if Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then
local cg=Duel.GetOperatedGroup()
if cg:IsExists(s.chkfilter,3,nil,tp) then
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil)
if g:GetClassCount(Card.GetCode)<3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg1=g:SelectSubGroup(tp,aux.dncheck,false,3,3)
Duel.SendtoGrave(tg1,REASON_EFFECT)
end
end
end
\ No newline at end of file
--理想放逐
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_RECOVER+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_DAMAGE_STEP)
e1:SetCondition(s.condition)
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_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--no negate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_INACTIVATE)
e3:SetRange(0xff)
e3:SetCondition(s.nonegcon)
e3:SetValue(s.nonegval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_DISEFFECT)
c:RegisterEffect(e4)
end
function s.cfilter(c)
return c:IsFaceup() and c.MoJin --and c:IsType(TYPE_MONSTER)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
local b2=true
local b3=Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return b1 or b2 or b3 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,3),0},
{b2,aux.Stringid(id,4),1},
{b3,aux.Stringid(id,5),2})
e:SetLabel(op)
if op==0 then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD)
elseif op==1 then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1700)
elseif op==2 then
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
if Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE then
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
end
function s.eqfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op=e:GetLabel()
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
elseif op==1 then
if c:IsRelateToEffect(e) then
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.Recover(tp,1700,REASON_EFFECT)
end
end
elseif op==2 then
if c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
c:CancelToGrave()
if not Duel.Equip(tp,c,tc) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(s.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
--change original atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetValue(s.atkval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
end
end
if Duel.GetCurrentPhase()==PHASE_DAMAGE or Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL then
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
end
end
function s.eqlimit(e,c)
return c:IsType(TYPE_FUSION)
end
function s.atkval(e,c)
return c:GetLevel()*1700
end
function s.thfilter(c)
return c.MoJin and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsLevelAbove(7)
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) 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,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.nonegcon(e)
local tp=e:GetHandlerPlayer()
local c=e:GetHandler()
return c:GetFlagEffect(id)>0
end
function s.nonegval(e,ct)
local p=e:GetHandlerPlayer()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return p==tp and te and bit.band(loc,LOCATION_REMOVED+LOCATION_GRAVE)~=0
end
\ No newline at end of file
--嘿白融合怪
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,10))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(s.sprcon)
e1:SetTarget(s.sprtg)
e1:SetOperation(s.sprop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,11))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC_G)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetOperation(s.inspect_op)
c:RegisterEffect(e2)
--带来毁灭--
local e11=Effect.CreateEffect(c)
e11:SetCategory(CATEGORY_DESTROY)
e11:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
e11:SetTarget(s.target)
e11:SetOperation(s.activate)
c:RegisterEffect(e11)
--global check
if not s.global_check then
s.global_check=true
s.global_counter=0
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge1:SetOperation(function(e)
s.update_all_cards()
s.update_client_hint()
e:Reset()
end)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.GlobalEffect()
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_ADJUST)
ge2:SetOperation(function(e)
s.update_all_cards()
s.update_client_hint()
if s.global_counter>=98 then
s.global_counter=98
e:Reset()
end
end)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.GlobalEffect()
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CHAINING)
ge3:SetOperation(function(e)
s.global_counter=s.global_counter+1
s.update_client_hint()
if s.global_counter>=98 then
s.global_counter=98
e:Reset()
end
end)
Duel.RegisterEffect(ge3,0)
local ge4=ge3:Clone()
ge4:SetCode(EVENT_MOVE)
ge4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
s.update_group(eg)
s.update_client_hint()
if s.global_counter>=98 then
s.global_counter=98
e:Reset()
end
end)
Duel.RegisterEffect(ge4,0)
end
end
function s.update_counter(c)
if c:IsLocation(LOCATION_ONFIELD+LOCATION_HAND+LOCATION_DECK) then
if c:GetFlagEffect(id)~=0 then
if c:GetFlagEffectLabel(id)~=c:GetRealFieldID() then
c:SetFlagEffectLabel(id,c:GetRealFieldID())
s.global_counter=s.global_counter+1
end
else
c:RegisterFlagEffect(id,0,0,1,c:GetRealFieldID(),0)
end
else
if c:GetFlagEffect(id)~=0 then
c:ResetFlagEffect(id)
s.global_counter=s.global_counter+1
end
end
end
function s.update_all_cards()
local g=Duel.GetFieldGroup(0,0xff,0xff)
s.update_group(g)
end
function s.update_group(g)
for tc in aux.Next(g) do
s.update_counter(tc)
local og=tc:GetOverlayGroup()
for oc in aux.Next(og) do
s.update_counter(oc)
end
end
end
function s.update_client_hint()
if s.global_counter>=98 then
s.global_counter=98
end
local g=Duel.GetFieldGroup(0,0xff,0xff)
for tc in aux.Next(g) do
s.update_client_hint_single(tc)
local og=tc:GetOverlayGroup()
for oc in aux.Next(og) do
s.update_client_hint_single(oc)
end
end
end
function s.update_client_hint_single(c)
if c:GetOriginalCode()==id then
c:ResetFlagEffect(id+1)
if c:IsLocation(LOCATION_EXTRA) then
local v1=s.global_counter%10
local v2=(s.global_counter-v1)/10
if v2>0 then
c:RegisterFlagEffect(id+1,0,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id+1,v2))
end
if v1>0 then
c:RegisterFlagEffect(id+1,0,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,v1))
end
end
end
end
function s.spgoal(g,tp,c)
return Duel.GetLocationCountFromEx(tp,tp,g,c)>0
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
local count=99-s.global_counter
return mg:CheckSubGroup(s.spgoal,count,count,tp,c)
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local mg=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
local count=99-s.global_counter
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=mg:SelectSubGroup(tp,s.spgoal,true,count,count,tp,c)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_COST)
g:DeleteGroup()
end
function s.inspect_op(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
local v1=s.global_counter%10
local v2=(s.global_counter-v1)/10
if v2>0 then
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(id+1,v2))
end
if v1>0 then
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(id,v1))
end
if s.global_counter==0 then
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(id,0))
end
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.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,c)
Duel.Destroy(sg,REASON_EFFECT)
end
\ No newline at end of file
--宇智波斑
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_LINK),2)
c:EnableReviveLimit()
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
--e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.regcon)
e2:SetOperation(s.regop)
c:RegisterEffect(e2)
end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.efilter1(e,te)
return te:IsActiveType(TYPE_SPELL)
end
function s.efilter2(e,te)
return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner()
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
function c5013300.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetMaterialCount()>=2 then
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0))
end
if c:GetMaterialCount()>=3 then
--immune spell
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:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(s.efilter1)
c:RegisterEffect(e3)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
end
if c:GetMaterialCount()>=4 then
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
e4:SetTarget(s.destg)
e4:SetOperation(s.desop)
c:RegisterEffect(e4)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
if c:GetMaterialCount()>=5 then
--immune
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
e5:SetValue(s.efilter2)
c:RegisterEffect(e5)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
end
if c:GetMaterialCount()>=6 then
--cannot activate
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_ACTIVATE)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetReset(RESET_EVENT+RESETS_STANDARD)
e6:SetTargetRange(1,1)
e6:SetValue(c5013300.aclimit)
c:RegisterEffect(e6)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,4))
end
end
\ No newline at end of file
--蓝染惣右介
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),7,7)
c:EnableReviveLimit()
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.regcon)
e2:SetOperation(s.regop)
c:RegisterEffect(e2)
end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetMaterialCount()==7 then
--sp summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(s.con)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
--quick
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(s.qcon)
e2:SetOperation(s.qop)
c:RegisterEffect(e2)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,5))
end
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return bit.band(loc,LOCATION_ONFIELD)~=0 and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and (Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 or Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,1,nil))
end
function s.cfilter(c)
return c:IsOnField() or c:IsAbleToDeck()
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.SelectEffectYesNo(tp,e:GetHandler()) then return end
Duel.Hint(HINT_CARD,0,5013355)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,s.repop)
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=Duel.SelectMatchingCard(1-tp,s.cfilter,1-tp,LOCATION_ONFIELD,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,1,1,nil):GetFirst()
if not tc then return end
if not tc:IsOnField() or not Duel.SelectYesNo(1-tp,aux.Stringid(5013355,0)) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
else
Duel.Destroy(tc,REASON_EFFECT)
end
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and ((re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE) or re:IsActiveType(EFFECT_TYPE_ACTIVATE))
end
function s.defilter(c)
return c:IsAbleToDeck() or c:IsLocation(LOCATION_ONFIELD)
end
function s.frepop(e,tp,eg,ep,ev,re,r,rp)
--Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.defilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc:IsAbleToDeck() and (not tc:IsLocation(LOCATION_ONFIELD) or Duel.SelectOption(tp,aux.Stringid(id,4),1105)==1) then
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
else
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.defilter,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)
and Duel.SelectEffectYesNo(tp,e:GetHandler()) then
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,s.frepop)
end
end
function s.qcon(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
return d:IsFaceup() and d:IsControler(tp)
end
function s.aefilter(c)
return (c:IsFaceup() and c:GetAttack()~=0) or (not c:IsLocation(LOCATION_MZONE))
end
function s.qop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.aefilter,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.SelectEffectYesNo(tp,e:GetHandler()) then
Duel.NegateAttack()
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.aefilter,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if tc:IsLocation(LOCATION_MZONE) and (not tc:IsFaceup() or tc:GetAttack()==0 or Duel.SelectOption(tp,aux.Stringid(id,3),aux.Stringid(id,4))==1) then
Duel.Destroy(tc,REASON_EFFECT)
else
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-tc:GetAttack())
end
end
end
--伊格尼兹
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,s.ffilter,3,true)
aux.AddContactFusionProcedure(c,aux.FilterBoolFunction(Card.IsAbleToGraveAsCost,REASON_SPSUMMON),LOCATION_MZONE,0,Duel.SendtoGrave,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)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--des
local e2=Effect.CreateEffect(c)
e2:SetDescription(1169)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL)
--e2:SetCondition(s.sumcon)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(s.distg)
c:RegisterEffect(e3)
--chain attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetCondition(s.atcon)
e4:SetOperation(s.atop)
c:RegisterEffect(e4)
end
function s.ffilter(c)
return c:IsRace(RACE_WARRIOR)
end
function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
--function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
--return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
--end
function s.filter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsCode(id) and c:CheckFusionMaterial()
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if not tc then return end
tc:SetMaterial(nil)
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
end
function s.distg(e,c)
return c==e:GetHandler():GetBattleTarget()
end
function s.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c and aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and c:IsChainAttackable()
end
function s.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
end
--翻车鱼
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--special summon 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)
--summon success
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(s.sumsuc)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SPSUMMON_PROC)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_HAND)
e3:SetCondition(s.spcon)
c:RegisterEffect(e3)
end
function s.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--Negate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(s.condition)
e1:SetOperation(s.operation)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ct1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local ct2=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
return ct1<ct2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local ct1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local ct2=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
return rp==1-tp and ct1<ct2
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
\ No newline at end of file
--无名的白银姬
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA+LOCATION_GRAVE)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--summon success
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(s.sumsuc)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(s.settg)
e3:SetOperation(s.setop)
c:RegisterEffect(e3)
--dis
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id+100)
e4:SetCondition(s.discon)
e4:SetTarget(s.distg)
e4:SetOperation(s.disop)
c:RegisterEffect(e4)
end
function s.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsRace(RACE_FIEND)
end
function s.cfilter(c)
return c:GetType()==TYPE_TRAP and c:IsAbleToGraveAsCost()
end
function s.fselect(g,tp,mc)
if mc:IsLocation(LOCATION_GRAVE) then return Duel.GetMZoneCount(tp,g,tp)>0 end
return Duel.GetLocationCountFromEx(tp,tp,g,mc)>0
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
return g:CheckSubGroup(s.fselect,2,2,tp,c)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:SelectSubGroup(tp,s.fselect,true,2,2,tp,c)
if not sg then return false end
sg:KeepAlive()
e:SetLabelObject(sg)
return true
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_COST)
g:DeleteGroup()
end
function s.setfilter(c,e,tp)
local b1=c:IsSSetable()
local te,eg,ep,ev,re,r,rp=c:CheckActivateEffect(true,true,true)
local cost=nil
if te and te:GetCost() then cost=te:GetCost() end
local condition=nil
if te and te:GetCondition() then condition=te:GetCondition() end
local tg=nil
if te and te:GetTarget() then tg=te:GetTarget() end
local b2=c:CheckActivateEffect(true,true,false)~=nil
and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) and te:CheckCountLimit(tp)==true
and (not condition or condition(e,tp,eg,ep,ev,re,r,rp)) and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0))
return c:IsFaceupEx() and c:GetType()==TYPE_TRAP and (b1 or b2)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.setfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil,e,tp) end
local sg=Group.CreateGroup()
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,3,nil,e,tp)
sg:Merge(g)
sg:KeepAlive()
e:SetLabelObject(sg)
Duel.ClearTargetCard()
Duel.ClearOperationInfo(0)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if #tg~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sc=tg:Select(tp,1,1,nil):GetFirst()
if sc then
tg:RemoveCard(sc)
local te=sc:GetActivateEffect()
local cte,ceg,cep,cev,cre,cr,crp=sc:CheckActivateEffect(true,true,true)
local cost=nil
if cte and cte:GetCost() then cost=cte:GetCost() end
local condition=nil
if cte and cte:GetCondition() then condition=cte:GetCondition() end
local target=nil
if cte and cte:GetTarget() then target=cte:GetTarget() end
local b1=sc:CheckActivateEffect(true,true,false)~=nil
and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,0)) and te:CheckCountLimit(tp)==true
and (not condition or condition(e,tp,eg,ep,ev,re,r,rp)) and (not target or target(e,tp,eg,ep,ev,re,r,rp,0))
local b2=sc:IsSSetable()
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=1150
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=1153
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local bc=Duel.GetOperatedGroup():GetFirst()
te:UseCountLimit(tp,1,true)
sc:CreateEffectRelation(te)
Duel.RaiseEvent(sc,EVENT_CHAINING,cte,0,tp,tp,Duel.GetCurrentChain())
local tep=sc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
local target=te:GetTarget()
if target then target(e,tp,eg,ep,ev,re,r,rp,1) end
local ag=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
for ac in aux.Next(ag) do
--Duel.Hint(HINT_CARD,0,ac:GetOriginalCode())
ac:CreateEffectRelation(te)
end
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
sc:ReleaseEffectRelation(te)
for ac in aux.Next(ag) do
ac:ReleaseEffectRelation(te)
end
if not sc:IsType(TYPE_CONTINUOUS) then
Duel.SendtoGrave(sc,REASON_RULE)
end
else
if sc and Duel.SSet(tp,sc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
end
end
Duel.BreakEffect()
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rc:GetType()==TYPE_TRAP and re:IsHasType(EFFECT_TYPE_ACTIVATE) --and re:GetActivateLocation()==LOCATION_SZONE
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function s.disop(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,nil)
local tc=g:GetFirst()
if tc and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e,false) then
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
end
end
\ No newline at end of file
--桑博梓疗
local s,id,o=GetID()
function s.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e0:SetTarget(s.target)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,id)
e1:SetCost(aux.bfgcost)
e1:SetTarget(s.lvtg)
e1:SetOperation(s.lvop)
c:RegisterEffect(e1)
end
function s.filter1(c)
return c:IsLevel(2) and c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsReleasable()
end
function s.filter2(c)
return c:IsLevel(5) and c:IsRace(RACE_PSYCHO) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToRemove()
end
function s.filter3(c)
return c:IsLevel(7) and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToGrave()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,nil)
local b3=Duel.IsExistingMatchingCard(s.filter3,tp,LOCATION_DECK,0,1,nil)
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
e:SetCategory(CATEGORY_RELEASE)
e:SetOperation(s.draw)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_DECK)
elseif opval[op]==2 then
e:SetCategory(CATEGORY_REMOVE)
e:SetOperation(s.control)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
elseif opval[op]==3 then
e:SetCategory(CATEGORY_TOGRAVE)
e:SetOperation(s.todeck)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
end
function s.draw(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Release(g,REASON_EFFECT)
end
end
function s.control(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function s.todeck(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.filter3,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function s.lvfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1)
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
local lv=g:GetFirst():GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,4))
e:SetLabel(Duel.AnnounceLevel(tp,1,12,lv))
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
......@@ -1219,6 +1219,9 @@
#LISILI
!setname 0xa5f 武装龙族
#嘿白
!setname 0x23c 超炮
#黑芽之魔术师
!setname 0x891 N#
!setname 0x892 高速装甲 (Speedgear)
......
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