Commit c92fd63c authored by POLYMER's avatar POLYMER

fix

parent 8cb68155
No preview for this file type
......@@ -41,9 +41,7 @@ function cm.initial_effect(c)
e5:SetCode(EFFECT_CANNOT_SUMMON)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(1,1)
--e5:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e5:SetTarget(cm.costchk)
--e5:SetOperation(cm.costop)
Duel.RegisterEffect(e5,0)
end
end
......@@ -53,9 +51,13 @@ function cm.costchk(e,c,tp,st)
return false
end
function cm.filter(c,e)
return c:IsOnField() and (c:IsFacedown() or c:IsStatus(STATUS_EFFECT_ENABLED)) --or not c:IsLocation(LOCATION_MZONE) or c:IsStatus(STATUS_CHAINING))
and not ((Duel.CheckEvent(EVENT_SUMMON_SUCCESS) or Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS)) and e:GetCode()==EVENT_MOVE and c:IsLocation(LOCATION_MZONE))
and not (e:GetCode()==EVENT_SUMMON_SUCCESS and c:GetFlagEffect(m)>0)
if not (c:IsOnField() and (c:IsFacedown() or c:IsStatus(STATUS_EFFECT_ENABLED))) then return false end
if e:GetCode()==EVENT_MOVE then
local b1,g1=Duel.CheckEvent(EVENT_SUMMON_SUCCESS,true)
local b2,g2=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true)
return (not b1 or not g1:IsContains(c)) and (not b2 or not g2:IsContains(c))
end
return not (e:GetCode()==EVENT_SUMMON_SUCCESS and c:GetFlagEffect(m)>0)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
if cm.mv then cm.mv=nil return false end
......@@ -72,8 +74,8 @@ function cm.desop3(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,ep,ev)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if EVO_GAME then return end
EVO_GAME=true
--if EVO_GAME then return end
--EVO_GAME=true
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -94,7 +96,7 @@ function cm.ntfilter(c,p)
end
local A=1103515245
local B=12345
local M=32767
local M=1073741824
function cm.roll(min,max)
min=tonumber(min)
max=tonumber(max)
......@@ -172,7 +174,7 @@ function cm.evoperation(e,tp,eg,ep,ev,re,r,rp)
local g12=g1+g2
local g123=g1+g2+g3
--if #g1>0 then Duel.Destroy(g1,REASON_RULE) end
if #g123>0 then Duel.Destroy(g123,REASON_EFFECT) end
if #g123>0 then Duel.Destroy(g123,REASON_RULE) end
local ct={}
ct[0]=g3:FilterCount(Card.IsControler,nil,0)+g12:FilterCount(cm.ntfilter,nil,0)
ct[1]=g3:FilterCount(Card.IsControler,nil,1)+g12:FilterCount(cm.ntfilter,nil,1)
......
--灵刀姬 露世pendulum
function c60001012.initial_effect(c)
aux.EnablePendulumAttribute(c)
--tohand(p1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60001012,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,60001012)
e3:SetTarget(c60001012.target)
e3:SetOperation(c60001012.operation)
c:RegisterEffect(e3)
--spsummon(p2)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001012,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,60001012)
e1:SetCondition(c60001012.spcon)
e1:SetTarget(c60001012.sptg)
e1:SetOperation(c60001012.spop)
c:RegisterEffect(e1)
--spsummon(m1)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(60001012,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetRange(LOCATION_HAND+LOCATION_EXTRA)
e5:SetCountLimit(1,90001012)
e5:SetCondition(c60001012.spcon1)
e5:SetTarget(c60001012.sptg)
e5:SetOperation(c60001012.spop1)
c:RegisterEffect(e5)
local e4=e5:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--spsummon(m2)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001012,3))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,90001012)
e1:SetTarget(c60001012.lktg)
e1:SetOperation(c60001012.lkop)
c:RegisterEffect(e1)
end
function c60001012.filter(c)
return c:IsSetCard(0x1624) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c60001012.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60001012.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c60001012.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60001012.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 c60001012.spfil(c)
return c:GetSequence()<5
end
function c60001012.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c60001012.spfil,tp,LOCATION_MZONE,0,1,nil)
end
function c60001012.sptg(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 c60001012.spop(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
function c60001012.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x1624) and not c:IsCode(60001012)
end
function c60001012.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c60001012.cfilter1,1,nil)
end
function c60001012.sptg(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 c60001012.spop1(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
function c60001012.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c60001012.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
--灵刀姬 零衣pendulum
function c60001013.initial_effect(c)
aux.EnablePendulumAttribute(c)
--tohand(p1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60001013,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,60001013)
e3:SetTarget(c60001013.target)
e3:SetOperation(c60001013.operation)
c:RegisterEffect(e3)
--spsummon(p2)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001013,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,60001013)
e1:SetCondition(c60001013.spcon)
e1:SetTarget(c60001013.sptg)
e1:SetOperation(c60001013.spop)
c:RegisterEffect(e1)
--spsummon(m1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001013,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,90001013)
e1:SetCost(c60001013.spcost1)
e1:SetTarget(c60001013.sptg1)
e1:SetOperation(c60001013.spop1)
c:RegisterEffect(e1)
--spsummon(m2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001013,3))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_GRAVE+LOCATION_EXTRA)
e2:SetCountLimit(1,90001013)
e2:SetCondition(c60001013.spcon2)
e2:SetTarget(c60001013.sptg2)
e2:SetOperation(c60001013.spop2)
c:RegisterEffect(e2)
end
function c60001013.filter(c)
return c:IsSetCard(0x624) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c60001013.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60001013.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c60001013.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60001013.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 c60001013.spfil(c)
return c:GetSequence()<5
end
function c60001013.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c60001013.spfil,tp,LOCATION_MZONE,0,1,nil)
end
function c60001013.sptg(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 c60001013.spop(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
function c60001013.spcost1(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 c60001013.spfilter1(c,e,tp,ec)
return c:IsSetCard(0x1624) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,ec,c,0x60)>0
end
function c60001013.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60001013.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c60001013.spop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60001013.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,e:GetHandler())
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,0x60)
end
end
function c60001013.cfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and bit.band(c:GetPreviousTypeOnField(),TYPE_LINK)~=0
and c:IsPreviousSetCard(0x1624) and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT)))
end
function c60001013.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c60001013.cfilter,1,nil,tp,rp) and not eg:IsContains(e:GetHandler())
end
function c60001013.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c60001013.spop2(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
--灵刀术式 神魔幻生
function c60001014.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c60001014.target)
e1:SetOperation(c60001014.activate)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1500)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetValue(c60001014.imfilter)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001014,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60001014)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001014.settg)
e2:SetOperation(c60001014.setop)
c:RegisterEffect(e2)
end
function c60001014.filter(c)
return c:IsFaceup() and c:IsSetCard(0x1624)
end
function c60001014.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c60001014.filter(chkc) end
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c60001014.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c60001014.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c60001014.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SOUND,0,aux.Stringid(60001014,0))
local c=e:GetHandler()
c:CancelToGrave()
if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c60001014.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
else
c:CancelToGrave(false)
end
end
function c60001014.eqlimit(e,c)
return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c
end
function c60001014.imfilter(e,te)
return te:GetOwner():GetControler()~=e:GetOwner():GetControler()
end
function c60001014.stfilter(c)
return c:IsSetCard(0x624) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c60001014.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c60001014.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
end
function c60001014.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,c60001014.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
--灵刀术式 烈火拔刀
function c60001015.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c60001015.condition)
e1:SetTarget(c60001015.target)
e1:SetOperation(c60001015.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001015,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60001015)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001015.settg)
e2:SetOperation(c60001015.setop)
c:RegisterEffect(e2)
end
function c60001015.cfilter(c)
return c:GetSequence()<5
end
function c60001015.rmvfil(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
function c60001015.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c60001015.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c60001015.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.IsPlayerCanDraw(tp,1) end
local g=Duel.GetMatchingGroup(c60001015.rmvfil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c60001015.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c60001015.stfilter(c)
return c:IsSetCard(0x624) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c60001015.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c60001015.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
end
function c60001015.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,c60001015.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
--灵刀术式 灵刀降临
function c60001016.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,90001016)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c60001016.target)
e1:SetOperation(c60001016.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001016,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60001016)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001016.settg)
e2:SetOperation(c60001016.setop)
c:RegisterEffect(e2)
end
function c60001016.filter(c,e,tp)
return c:IsSetCard(0x1624) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c60001016.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c60001016.filter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_DECK)
end
function c60001016.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60001016.filter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local fid=c:GetFieldID()
tc:RegisterFlagEffect(60001016,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetLabel(fid)
e3:SetLabelObject(tc)
e3:SetCondition(c60001016.thcon1)
e3:SetOperation(c60001016.thop1)
Duel.RegisterEffect(e3,tp)
Duel.SpecialSummonComplete()
end
end
function c60001016.thcon1(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(60001016)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end
function c60001016.thop1(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoDeck(tc,tp,nil,REASON_EFFECT)
end
function c60001016.stfilter(c)
return c:IsSetCard(0x624) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c60001016.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c60001016.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
end
function c60001016.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,c60001016.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
--灵刀术式 鲜血终结
function c60001017.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,90001017)
e1:SetTarget(c60001017.target)
e1:SetOperation(c60001017.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001017,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60001017)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001017.settg)
e2:SetOperation(c60001017.setop)
c:RegisterEffect(e2)
end
function c60001017.filter(c)
return c:IsSetCard(0x624) and not c:IsCode(60001017) and c:IsAbleToHand()
end
function c60001017.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60001017.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c60001017.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60001017.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 c60001017.stfilter(c)
return c:IsSetCard(0x624) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c60001017.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c60001017.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
end
function c60001017.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,c60001017.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
--灵刀术式 修罗之刃
function c60001018.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c60001018.target)
e1:SetOperation(c60001018.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001018,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60001018)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001018.settg)
e2:SetOperation(c60001018.setop)
c:RegisterEffect(e2)
end
function c60001018.target(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 sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c60001018.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
function c60001018.stfilter(c)
return c:IsSetCard(0x624) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c60001018.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c60001018.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
end
function c60001018.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,c60001018.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
--灵刀联合 双生灵刀
function c60001019.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,90001019)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c60001019.cost)
e1:SetTarget(c60001019.target)
e1:SetOperation(c60001019.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001019,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60001019)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001019.settg)
e2:SetOperation(c60001019.setop)
c:RegisterEffect(e2)
end
function c60001019.filter(c)
return c:IsSetCard(0x624) and c:IsAbleToDeck()
end
function c60001019.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60001019.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c60001019.filter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,3,REASON_COST)
end
function c60001019.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3)
end
function c60001019.activate(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 c60001019.stfilter(c)
return c:IsSetCard(0x624) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c60001019.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c60001019.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
end
function c60001019.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,c60001019.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
--灵刀域 烈火破败
function c60001020.initial_effect(c)
c:SetUniqueOnField(1,0,60001020)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c60001020.con)
e1:SetCountLimit(1,60001020)
c:RegisterEffect(e1)
--cannot activate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,0)
e2:SetCondition(c60001020.con1)
e2:SetValue(c60001020.aclimit)
c:RegisterEffect(e2)
--cannot activate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(0,1)
e3:SetCondition(c60001020.con2)
e3:SetValue(c60001020.aclimit)
c:RegisterEffect(e3)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001020,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60001020)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001020.settg)
e2:SetOperation(c60001020.setop)
c:RegisterEffect(e2)
end
function c60001020.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x624)
end
function c60001020.con(e)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)
return g:IsExists(c60001020.cfilter,1,nil)
end
function c60001020.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x624)
end
function c60001020.con1(e)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)
return not g:IsExists(c60001020.cfilter1,1,nil)
end
function c60001020.con2(e)
local g=Duel.GetFieldGroup(1-e:GetHandlerPlayer(),LOCATION_ONFIELD,0)
return not g:IsExists(c60001020.cfilter1,1,nil)
end
function c60001020.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function c60001020.stfilter(c)
return c:IsSetCard(0x624) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c60001020.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c60001020.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
end
function c60001020.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,c60001020.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
--灵刀姬 魁奈pendulum
function c60001021.initial_effect(c)
c:SetSPSummonOnce(60001021)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c60001021.matfilter,1,1)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001021,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,60001021)
e1:SetTarget(c60001021.destg)
e1:SetOperation(c60001021.desop)
c:RegisterEffect(e1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001021,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,60001021)
e1:SetTarget(c60001021.lktg)
e1:SetOperation(c60001021.lkop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001021,2))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_EXTRA)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001021.thtg)
e2:SetOperation(c60001021.thop)
c:RegisterEffect(e2)
end
function c60001021.matfilter(c)
return c:IsLinkSetCard(0x1624) and not c:IsLinkAttribute(ATTRIBUTE_EARTH)
end
function c60001021.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_HAND)
end
function c60001021.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local sg=g:RandomSelect(tp,1)
Duel.Destroy(sg,REASON_EFFECT)
end
function c60001021.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c60001021.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
function c60001021.thfilter(c)
return c:IsSetCard(0x624) and c:IsAbleToHand()
end
function c60001021.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60001021.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c60001021.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60001021.thfilter,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
--灵刀姬 燎里pendulum
function c60001022.initial_effect(c)
c:SetSPSummonOnce(60001022)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c60001022.matfilter,1,1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60001022,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,60001022)
e3:SetTarget(c60001022.thtg)
e3:SetOperation(c60001022.thop)
c:RegisterEffect(e3)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001022,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,60001022)
e1:SetTarget(c60001022.lktg)
e1:SetOperation(c60001022.lkop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001022,2))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_EXTRA)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001022.thtg1)
e2:SetOperation(c60001022.thop1)
c:RegisterEffect(e2)
end
function c60001022.matfilter(c)
return c:IsLinkSetCard(0x1624) and not c:IsLinkAttribute(ATTRIBUTE_FIRE)
end
function c60001022.thfilter(c,tp)
return c:IsSetCard(0x624) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c60001022.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c60001022.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60001022.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c60001022.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,0,0)
end
function c60001022.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 c60001022.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c60001022.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
function c60001022.thfilter1(c)
return c:IsSetCard(0x624) and c:IsAbleToHand()
end
function c60001022.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60001022.thfilter1,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c60001022.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60001022.thfilter1,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
\ No newline at end of file
--灵刀姬 飒天pendulum
function c60001023.initial_effect(c)
c:SetSPSummonOnce(60001023)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c60001023.matfilter,1,1)
--battle
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(60001023,0))
e9:SetType(EFFECT_TYPE_QUICK_O)
e9:SetCode(EVENT_FREE_CHAIN)
e9:SetProperty(EFFECT_FLAG_CARD_TARGET)
e9:SetRange(LOCATION_MZONE)
e9:SetHintTiming(0,TIMING_END_PHASE)
e9:SetCountLimit(1,60001023)
e9:SetTarget(c60001023.batg)
e9:SetOperation(c60001023.baop)
c:RegisterEffect(e9)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001023,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,60001023)
e1:SetTarget(c60001023.lktg)
e1:SetOperation(c60001023.lkop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001023,2))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_EXTRA)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001023.thtg1)
e2:SetOperation(c60001023.thop1)
c:RegisterEffect(e2)
end
function c60001023.matfilter(c)
return c:IsLinkSetCard(0x1624) and not c:IsLinkAttribute(ATTRIBUTE_WIND)
end
function c60001023.batg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return c:IsAttackable()
and Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
end
function c60001023.baop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsAttackable() and c:IsControler(tp) and c:IsFaceup() and c:IsRelateToEffect(e) then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
if tc:IsControler(1-tp) and tc:IsRelateToEffect(e) then
Duel.CalculateDamage(c,tc)
end
end
end
function c60001023.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c60001023.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
function c60001023.thfilter1(c)
return c:IsSetCard(0x624) and c:IsAbleToHand()
end
function c60001023.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60001023.thfilter1,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c60001023.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60001023.thfilter1,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
--灵刀姬 雫空pendulum
function c60001024.initial_effect(c)
c:SetSPSummonOnce(60001024)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c60001024.matfilter,1,1)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001024,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,60001024)
e1:SetTarget(c60001024.thtg)
e1:SetOperation(c60001024.thop)
c:RegisterEffect(e1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001024,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,60001024)
e1:SetTarget(c60001024.lktg)
e1:SetOperation(c60001024.lkop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001024,2))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_EXTRA)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001024.thtg1)
e2:SetOperation(c60001024.thop1)
c:RegisterEffect(e2)
end
function c60001024.matfilter(c)
return c:IsLinkSetCard(0x1624) and not c:IsLinkAttribute(ATTRIBUTE_WATER)
end
function c60001024.thfilter(c)
return c:IsSetCard(0x624) and c:IsAbleToHand()
end
function c60001024.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60001024.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c60001024.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60001024.thfilter,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 c60001024.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c60001024.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
function c60001024.thfilter1(c)
return c:IsSetCard(0x624) and c:IsAbleToHand()
end
function c60001024.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60001024.thfilter1,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c60001024.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60001024.thfilter1,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 c60001042.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001042,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c60001042.cost)
e1:SetTarget(c60001042.target)
e1:SetOperation(c60001042.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001042,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60001042)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001042.settg)
e2:SetOperation(c60001042.setop)
c:RegisterEffect(e2)
end
function c60001042.filter1(c)
return c:GetSequence()<5 and c:IsAbleToRemove()
end
function c60001042.filter2(c)
return c:GetSequence()>4 and c:IsAbleToRemove()
end
function c60001042.filter3(c)
return c:IsFaceup() and c:IsAbleToRemove()
end
function c60001042.filter4(c)
return c:IsFacedown() and c:IsAbleToRemove()
end
function c60001042.costfilter(c)
return c:IsSetCard(0x624) and c:IsAbleToGraveAsCost()
end
function c60001042.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rt=4
if not Duel.IsExistingMatchingCard(c60001042.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then rt=rt-1 end
if not Duel.IsExistingMatchingCard(c60001042.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then rt=rt-1 end
if not Duel.IsExistingMatchingCard(c60001042.filter3,tp,LOCATION_SZONE,LOCATION_SZONE,1,c) then rt=rt-1 end
if not Duel.IsExistingMatchingCard(c60001042.filter4,tp,LOCATION_SZONE,LOCATION_SZONE,1,c) then rt=rt-1 end
local cg=Duel.GetMatchingGroup(c60001042.costfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
local ct=cg:GetClassCount(Card.GetCode)
if chk==0 then return rt>0 and ct>0 end
local ctt={}
local ctp=1
while rt>=ctp and ct>=ctp do
ctt[ctp]=ctp
ctp=ctp+1
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60001042,0))
local st=Duel.AnnounceNumber(tp,table.unpack(ctt))
local rg=Group.CreateGroup()
for i=1,st do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=cg:Select(tp,1,1,nil)
cg:Remove(Card.IsCode,nil,sg:GetFirst():GetCode())
rg:Merge(sg)
end
Duel.SendtoGrave(rg,REASON_COST)
e:SetLabel(st)
end
function c60001042.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(c60001042.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b2=Duel.IsExistingMatchingCard(c60001042.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b3=Duel.IsExistingMatchingCard(c60001042.filter3,tp,LOCATION_SZONE,LOCATION_SZONE,1,c)
local b4=Duel.IsExistingMatchingCard(c60001042.filter4,tp,LOCATION_SZONE,LOCATION_SZONE,1,c)
if chk==0 then return b1 or b2 or b3 or b4 end
local ct=e:GetLabel()
if ct>=3 then Duel.SetChainLimit(c60001042.chainlm) end
local sel=0
local off=0
repeat
local ops={}
local opval={}
off=1
if b1 then
ops[off]=aux.Stringid(60001042,1)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(60001042,2)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(60001042,3)
opval[off-1]=3
off=off+1
end
if b4 then
ops[off]=aux.Stringid(60001042,4)
opval[off-1]=4
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
sel=sel+1
b1=false
elseif opval[op]==2 then
sel=sel+2
b2=false
elseif opval[op]==3 then
sel=sel+4
b3=false
else
sel=sel+8
b4=false
end
ct=ct-1
until ct==0 or off<3
e:SetLabel(sel)
if bit.band(sel,1)~=0 then
local g=Duel.GetMatchingGroup(c60001042.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,LOCATION_MZONE)
end
if bit.band(sel,2)~=0 then
local g=Duel.GetMatchingGroup(c60001042.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,LOCATION_MZONE)
end
if bit.band(sel,3)~=0 then
local g=Duel.GetMatchingGroup(c60001042.filter3,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,LOCATION_SZONE)
end
if bit.band(sel,4)~=0 then
local g=Duel.GetMatchingGroup(c60001042.filter4,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,LOCATION_SZONE)
end
end
function c60001042.chainlm(e,rp,tp)
return tp==rp
end
function c60001042.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if bit.band(sel,1)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c60001042.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
if bit.band(sel,2)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c60001042.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
if bit.band(sel,4)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c60001042.filter3,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,c)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
if bit.band(sel,8)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c60001042.filter4,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,c)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
function c60001042.stfilter(c)
return c:IsSetCard(0x624) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c60001042.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c60001042.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
end
function c60001042.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,c60001042.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
--灵刀术式 刃锋再起
function c60001043.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001043,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c60001043.target)
e1:SetOperation(c60001043.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001043,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60001043)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001043.settg)
e2:SetOperation(c60001043.setop)
c:RegisterEffect(e2)
end
function c60001043.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,7)
and Duel.GetDecktopGroup(tp,7):FilterCount(Card.IsAbleToHand,nil)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c60001043.filter(c)
return c:IsSetCard(0x624) and c:IsAbleToHand()
end
function c60001043.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanDiscardDeck(tp,7) then
Duel.ConfirmDecktop(tp,7)
local g=Duel.GetDecktopGroup(tp,7)
if g:GetCount()>0 then
if g:IsExists(c60001043.filter,1,nil) then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,c60001043.filter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
g:Sub(sg)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
else
Duel.ShuffleDeck(tp)
end
end
end
end
function c60001043.stfilter(c)
return c:IsSetCard(0x624) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c60001043.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c60001043.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
end
function c60001043.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,c60001043.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
--灵刀术式 修罗本我
function c60001044.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001044,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c60001044.target)
e1:SetOperation(c60001044.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001044,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60001044)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001044.settg)
e2:SetOperation(c60001044.setop)
c:RegisterEffect(e2)
end
function c60001044.filter(c)
return c:IsCode(60001044) and c:IsAbleToHand()
end
function c60001044.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60001044.filter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
function c60001044.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60001044.filter,tp,LOCATION_DECK+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 c60001044.stfilter(c)
return c:IsSetCard(0x624) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c60001044.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c60001044.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
end
function c60001044.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,c60001044.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
--灵刀术式 复战双裂
function c60001045.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001045,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c60001045.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001045,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60001045)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001045.settg)
e2:SetOperation(c60001045.setop)
c:RegisterEffect(e2)
end
function c60001045.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND)
e1:SetCondition(c60001045.drcon1)
e1:SetOperation(c60001045.drop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_TO_HAND)
e2:SetCondition(c60001045.regcon)
e2:SetOperation(c60001045.regop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetCondition(c60001045.drcon2)
e3:SetOperation(c60001045.drop2)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c60001045.cfilter(c,tp)
return c:IsControler(1-tp) and c:IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_ONFIELD)
end
function c60001045.drcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c60001045.cfilter,1,nil,tp)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function c60001045.drop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,60001045)
Duel.Draw(tp,1,REASON_EFFECT)
end
function c60001045.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c60001045.cfilter,1,nil,tp) and Duel.GetFlagEffect(tp,60001045)==0
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function c60001045.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,60001045,RESET_CHAIN,0,1)
end
function c60001045.drcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,60001045)>0
end
function c60001045.drop2(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetFlagEffect(tp,60001045)
Duel.Hint(HINT_CARD,0,60001045)
Duel.Draw(tp,1,REASON_EFFECT)
end
function c60001045.stfilter(c)
return c:IsSetCard(0x624) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c60001045.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c60001045.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
end
function c60001045.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,c60001045.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
--灵刀术式 影刃相向
function c60001046.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001046,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c60001046.target)
e1:SetOperation(c60001046.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001046,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60001046)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001046.settg)
e2:SetOperation(c60001046.setop)
c:RegisterEffect(e2)
end
function c60001046.filter(c)
return c:IsSetCard(0x624) and c:IsAbleToDeck()
end
function c60001046.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c60001046.filter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,2)
and Duel.IsExistingTarget(c60001046.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,5,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c60001046.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,5,5,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c60001046.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==5 then
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
end
function c60001046.stfilter(c)
return c:IsSetCard(0x624) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c60001046.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c60001046.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
end
function c60001046.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,c60001046.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
--灵刀域 量子重叠
function c60001047.initial_effect(c)
c:SetUniqueOnField(1,0,60001047)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c60001047.con)
e1:SetCountLimit(1,60001047)
c:RegisterEffect(e1)
--disable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c60001047.discon)
e4:SetOperation(c60001047.disop)
c:RegisterEffect(e4)
--disable2
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c60001047.discon1)
e4:SetOperation(c60001047.disop1)
c:RegisterEffect(e4)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001047,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60001047)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001047.settg)
e2:SetOperation(c60001047.setop)
c:RegisterEffect(e2)
end
function c60001047.cfilter0(c)
return c:IsFaceup() and c:IsSetCard(0x624)
end
function c60001047.con(e)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)
return g:IsExists(c60001047.cfilter0,1,nil)
end
function c60001047.cfilter(c,seq2)
local seq1=aux.MZoneSequence(c:GetSequence())
return c:IsSetCard(0x624) and seq1==4-seq2
end
function c60001047.discon(e,tp,eg,ep,ev,re,r,rp)
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
seq=aux.MZoneSequence(seq)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE
and Duel.IsExistingMatchingCard(c60001047.cfilter,tp,LOCATION_MZONE,0,1,nil,seq)
end
function c60001047.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,60001047)
Duel.NegateEffect(ev)
end
function c60001047.cfilter1(c,seq4)
local seq3=aux.SZoneSequence(c:GetSequence())
return c:IsSetCard(0x624) and seq3==4-seq4
end
function c60001047.discon1(e,tp,eg,ep,ev,re,r,rp)
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
seq=aux.SZoneSequence(seq)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE
and Duel.IsExistingMatchingCard(c60001047.cfilter1,tp,LOCATION_SZONE,0,1,nil,seq)
end
function c60001047.disop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,60001047)
Duel.NegateEffect(ev)
end
function c60001047.stfilter(c)
return c:IsSetCard(0x624) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c60001047.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c60001047.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
end
function c60001047.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,c60001047.stfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
--异格灵刀姬 暗鸦pendulum
function c60001048.initial_effect(c)
c:SetSPSummonOnce(60001048)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c60001048.matfilter,1,1)
--damage val
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_NO_BATTLE_DAMAGE)
e5:SetValue(1)
c:RegisterEffect(e5)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e8:SetValue(1)
c:RegisterEffect(e8)
--half
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e8:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e8:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e8:SetRange(LOCATION_MZONE)
e8:SetOperation(c60001048.lpop)
c:RegisterEffect(e8)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60001048,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,60001048)
e1:SetTarget(c60001048.lktg)
e1:SetOperation(c60001048.lkop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60001048,2))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_EXTRA)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60001048.thtg)
e2:SetOperation(c60001048.thop)
c:RegisterEffect(e2)
end
function c60001048.matfilter(c)
return c:IsLinkSetCard(0x1624) and not c:IsLinkAttribute(ATTRIBUTE_DARK)
end
function c60001048.lpop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,60001048)
Duel.SetLP(1-tp,math.ceil(Duel.GetLP(1-tp)/8))
end
function c60001048.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c60001048.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
function c60001048.thfilter(c)
return c:IsSetCard(0x624) and c:IsAbleToHand()
end
function c60001048.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60001048.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c60001048.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60001048.thfilter,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 c98920290.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--synchro summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920290,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,98920290)
e1:SetCondition(c98920290.sycon)
e1:SetTarget(c98920290.sytg)
e1:SetOperation(c98920290.syop)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,98930290)
e3:SetCondition(c98920290.spcon)
e3:SetTarget(c98920290.sptg)
e3:SetOperation(c98920290.spop)
c:RegisterEffect(e3)
end
function c98920290.sycon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c98920290.syfilter(c)
return c:IsSynchroSummonable(nil)
end
function c98920290.sytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920290.syfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98920290.syop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c98920290.syfilter,tp,LOCATION_EXTRA,0,nil,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local mg=aux.GetSynMaterials(tp,sg:GetFirst())
for tc in aux.Next(mg) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetTarget(c98920290.syntg)
e1:SetValue(1)
e1:SetOperation(c98920290.synop)
tc:RegisterEffect(e1)
end
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
function c98920290.adjustop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te and aux.GetValueType(te)=="Effect" then te:Reset() end
e:Reset()
end
function c98920290.syncheck(c,g,mg,tp,lv,syncard,minc,maxc)
g:AddCard(c)
local ct=g:GetCount()
local res=c98920290.syngoal(g,tp,lv,syncard,minc,ct) or (ct<maxc and mg:IsExists(c98920290.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc))
g:RemoveCard(c)
return res
end
function c98920290.syngoal(g,tp,lv,syncard,minc,ct)
return ct>=minc and g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard) and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0
end
function c98920290.syntg(e,syncard,f,min,max)
local minc=min+1
local maxc=max+1
local c=e:GetHandler()
local tp=syncard:GetControler()
local lv=syncard:GetLevel()
if lv<=c:GetLevel() then return false end
local g=Group.FromCards(c)
local mg=aux.GetSynMaterials(tp,syncard):Filter(f,nil,syncard)
return mg:IsExists(c98920290.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc)
end
function c98920290.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
local minc=min+1
local maxc=max+1
local c=e:GetHandler()
local lv=syncard:GetLevel()
local g=Group.FromCards(c)
local mg=aux.GetSynMaterials(tp,syncard):Filter(f,nil,syncard)
for i=1,maxc do
local cg=mg:Filter(c98920290.syncheck,g,g,mg,tp,lv,syncard,minc,maxc)
if #cg==0 then break end
local minct=1
if c98920290.syngoal(g,tp,lv,syncard,minc,i) then
minct=0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local sg=cg:Select(tp,minct,1,nil)
if #sg==0 then break end
g:Merge(sg)
end
Duel.SetSynchroMaterial(g)
if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then
local fid=c:GetFieldID()
local og=Duel.GetOperatedGroup()
for oc in aux.Next(og) do
oc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
end
end
end
function c98920290.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c98920290.spfilter(c,e,tp)
return c:IsSetCard(0xea) and not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c98920290.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98920290.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98920290.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98920290.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
fid=g:GetFirst():GetFieldID()
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c98920290.ftarget)
e2:SetLabel(fid)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c98920290.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
end
\ No newline at end of file
......@@ -199,6 +199,7 @@
!setname 0x5958 浩瀚生态
!setname 0x6958 浩瀚开拓者
!setname 0x9958 战车道
!setname 0xa958 胧之渺翳
#篁楠 10 0x200-0x20f
!setname 0xc204 Madoka
......
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