Commit 91553dd7 authored by POLYMER's avatar POLYMER

update 250331 wd

parent c9cec246
...@@ -6349,6 +6349,51 @@ ...@@ -6349,6 +6349,51 @@
11561073 0 11561073 0
65830045 0 65830045 0
71210146 0 71210146 0
22022430 0
22022440 0
22022450 0
22022460 0
22022470 0
22022480 0
22022490 0
22022500 0
22022510 0
22022520 0
22022530 0
22022540 0
22022550 0
22022560 0
22022570 0
22022590 0
22022600 0
22022610 0
22022620 0
71000100 0
71000101 0
71000102 0
71000103 0
71000104 0
71000106 0
71000107 0
71000108 0
71000109 0
71000110 0
71000111 0
71000112 0
71000113 0
71000114 0
71000115 0
71000116 0
71000117 0
71000171 0
71000172 0
71000173 0
71000174 0
71000175 0
71000176 0
71000177 0
91010080 0
91011014 0
#limit #limit
33403513 1 33403513 1
82204250 0 82204250 0
......
No preview for this file type
No preview for this file type
...@@ -10,7 +10,6 @@ function s.initial_effect(c) ...@@ -10,7 +10,6 @@ function s.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(2,id) e1:SetCountLimit(2,id)
e1:SetCondition(s.condition)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.operation) e1:SetOperation(s.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -18,9 +17,6 @@ end ...@@ -18,9 +17,6 @@ end
function s.lcheck(g) function s.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xd2) return g:IsExists(Card.IsLinkSetCard,1,nil,0xd2)
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsFaceup() end if chkc then return chkc:IsOnField() and chkc:IsFaceup() end
......
--人理之基 和风伊丽莎白
function c22022430.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xff1),7,3,c22022430.ovfilter,aux.Stringid(22022430,3),3,c22022430.xyzop0)
c:EnableReviveLimit()
aux.AddCodeList(c,22020850)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22022430,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,22022430)
e1:SetCondition(c22022430.thcon)
e1:SetTarget(c22022430.thtg)
e1:SetOperation(c22022430.thop)
c:RegisterEffect(e1)
--activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22022430,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,22022431)
e2:SetCondition(c22022430.sccon)
e2:SetCost(c22022430.cost)
e2:SetTarget(c22022430.xyztg)
e2:SetOperation(c22022430.xyzop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(22022430,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e3:SetTarget(c22022430.sptg)
e3:SetOperation(c22022430.spop)
c:RegisterEffect(e3)
end
function c22022430.ovfilter(c)
return c:IsFaceup() and c:IsCode(22020850) or (aux.IsCodeListed(c,22020850) and not c:IsCode(22022430))
end
function c22022430.xyzop0(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,22022430)==0 end
Duel.RegisterFlagEffect(tp,22022430,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c22022430.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c22022430.filter(c)
return aux.IsCodeListed(c,22020850) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c22022430.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22022430.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c22022430.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c22022430.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
if tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function c22022430.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 c22022430.sccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c22022430.xyzfilter(c)
return c:IsSetCard(0xff1) and c:IsXyzSummonable(nil)
end
function c22022430.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22022430.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22022430.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22022430.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
function c22022430.filter0(c)
return c:IsOnField() and c:IsAbleToRemove()
end
function c22022430.filter1(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e) and c:IsAbleToRemove()
end
function c22022430.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xff1) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c22022430.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c22022430.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22022430.filter0,nil)
local mg2=Duel.GetMatchingGroup(c22022430.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c22022430.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 mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c22022430.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c22022430.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22022430.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c22022430.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c22022430.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c22022430.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,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
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 not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,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,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
\ No newline at end of file
--人理之基 灰姑娘伊丽莎白
function c22022440.initial_effect(c)
aux.AddCodeList(c,22020850)
c:EnableReviveLimit()
--material
aux.AddMaterialCodeList(c,22020850)
aux.AddFusionProcFunRep(c,c22022440.ffilter,2,true)
--choose effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22022440,9))
e1:SetCategory(CATEGORY_CONTROL+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,22022440)
e1:SetTarget(c22022440.target)
e1:SetOperation(c22022440.operation)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22022440,3))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22022441)
e2:SetTarget(c22022440.sptg)
e2:SetOperation(c22022440.spop)
c:RegisterEffect(e2)
--choose effect ere
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22022440,10))
e3:SetCategory(CATEGORY_CONTROL+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,22022440)
e3:SetCondition(c22022440.erecon)
e3:SetCost(c22022440.erecost)
e3:SetTarget(c22022440.target)
e3:SetOperation(c22022440.operation)
c:RegisterEffect(e3)
end
function c22022440.ffilter(c,fc,sub,mg,sg)
return c:IsFusionCode(22020850) or aux.IsCodeListed(c,22020850)
end
function c22022440.tgfilter(c,e,tp,ec,spchk)
return c:IsControlerCanBeChanged() or c:IsAbleToGrave()
end
function c22022440.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c22022440.tgfilter(chkc,e,tp,c,spchk) end
if chk==0 then return Duel.IsExistingTarget(c22022440.tgfilter,tp,0,LOCATION_MZONE,1,nil,e,tp,c,spchk) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c22022440.tgfilter,tp,0,LOCATION_MZONE,1,1,nil,e,tp,c,spchk)
Duel.SelectOption(tp,aux.Stringid(22022440,0))
end
function c22022440.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local b1=tc:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControlerCanBeChanged() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local b2=tc:IsRelateToEffect(e) and tc:IsAbleToGrave()
if b1 or b2 then
local s
if b1 and b2 then
s=Duel.SelectOption(1-tp,aux.Stringid(22022440,1),aux.Stringid(22022440,2))
elseif b1 then
s=Duel.SelectOption(tp,aux.Stringid(22022440,1))
else
s=Duel.SelectOption(tp,aux.Stringid(22022440,2))+1
end
if s==0 then
Duel.Hint(HINT_CARD,0,22022440)
Duel.SelectOption(tp,aux.Stringid(22022440,4))
Duel.SelectOption(tp,aux.Stringid(22022440,11))
Duel.SelectOption(1-tp,aux.Stringid(22022440,12))
Duel.GetControl(tc,tp)
end
if s==1 then
Duel.Hint(HINT_CARD,0,22020880)
Duel.SelectOption(tp,aux.Stringid(22022440,5))
Duel.SelectOption(tp,aux.Stringid(22022440,6))
Duel.SelectOption(tp,aux.Stringid(22022440,7))
Duel.SendtoGrave(tc,REASON_EFFECT)
Duel.Damage(1-tp,2400,REASON_EFFECT)
end
end
end
function c22022440.thfilter(c,tp)
return c:IsFaceup() and (c:IsCode(22020850) or aux.IsCodeListed(c,22020850)) and c:IsAbleToDeck() and Duel.GetMZoneCount(tp,c)
end
function c22022440.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c22022440.thfilter(chkc,tp) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c22022440.thfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c22022440.thfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22022440.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRelateToEffect(e) then
Duel.SelectOption(tp,aux.Stringid(22022440,8))
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c22022440.erecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,22020980)
end
function c22022440.erecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_CARD,0,22020980)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
\ No newline at end of file
--勇者伊丽酱的冒险
function c22022450.initial_effect(c)
aux.AddCodeList(c,22020850)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22022450+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22022450.target)
e1:SetOperation(c22022450.activate)
c:RegisterEffect(e1)
end
function c22022450.tgfilter(c,e,tp)
return c:IsFaceup() and (c:IsCode(22020850) or aux.IsCodeListed(c,22020850)) and c:IsCanBeFusionMaterial()
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_FMATERIAL)
and Duel.IsExistingMatchingCard(c22022450.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c22022450.spfilter(c,e,tp,tc)
return c:IsType(TYPE_FUSION) and c:IsCode(22022400)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function c22022450.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc==0 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c22022450.tgfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c22022450.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c22022450.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22022450.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_FMATERIAL) then return end
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeFusionMaterial() and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c22022450.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=sg:GetFirst()
if sc then
sc:SetMaterial(Group.FromCards(tc))
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
--人理嘘饰 九纹龙伊丽莎
function c22022460.initial_effect(c)
aux.AddCodeList(c,22020850)
c:EnableReviveLimit()
--material
aux.AddMaterialCodeList(c,22020850)
aux.AddFusionProcFunRep(c,c22022440.ffilter,9,true)
--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.fuslimit)
c:RegisterEffect(e1)
--coed
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetValue(22020850)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22022460,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c22022460.sptg)
e3:SetOperation(c22022460.spop)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22022460,1))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
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,22022460)
e4:SetCondition(c22022460.discon)
e4:SetCost(c22022460.cost)
e4:SetTarget(c22022460.distg)
e4:SetOperation(c22022460.disop)
c:RegisterEffect(e4)
--spsummon ere
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22022460,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1)
e5:SetCondition(c22022460.erecon)
e5:SetCost(c22022460.erecost)
e5:SetTarget(c22022460.sptg)
e5:SetOperation(c22022460.spop)
c:RegisterEffect(e5)
--negate ere
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(22022460,3))
e6:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_CHAINING)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e6:SetRange(LOCATION_GRAVE)
e6:SetCountLimit(1,22022460)
e6:SetCondition(c22022460.discon1)
e6:SetCost(c22022460.cost1)
e6:SetTarget(c22022460.distg)
e6:SetOperation(c22022460.disop)
c:RegisterEffect(e6)
end
function c22022460.spfilter(c,e,tp)
return (c:IsCode(22020850) or aux.IsCodeListed(c,22020850)) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c22022460.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22022460.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c22022460.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,aux.NecroValleyFilter(c22022460.spfilter),tp,LOCATION_HAND+LOCATION_DECK+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
function c22022460.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c22022460.costfilter(c)
return c:IsCode(22020850) and c:IsFaceup() and c:IsReleasable()
end
function c22022460.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22022460.costfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c22022460.costfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c22022460.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 c22022460.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 c22022460.erecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,22020980)
end
function c22022460.erecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_CARD,0,22020980)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c22022460.discon1(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and Duel.IsPlayerAffectedByEffect(tp,22020980)
end
function c22022460.costfilter(c)
return c:IsCode(22020850) and c:IsFaceup() and c:IsReleasable()
end
function c22022460.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22022460.costfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c22022460.costfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.Release(g,REASON_COST)
Duel.Hint(HINT_CARD,0,22020980)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
\ No newline at end of file
--九节棍史进君
function c22022470.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,22022470)
e1:SetTarget(c22022470.target)
e1:SetOperation(c22022470.operation)
c:RegisterEffect(e1)
end
function c22022470.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c22022470.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c22022470.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22022470.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c22022470.filter0,tp,LOCATION_GRAVE,0,nil)
local res=Duel.IsExistingMatchingCard(c22022470.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,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(c22022470.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,LOCATION_GRAVE)
end
function c22022470.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(c22022470.filter1,tp,LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c22022470.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,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(c22022470.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,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
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 not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,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,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--大魔术师 苍崎橙子
function c22022480.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22022480,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,22022480)
e1:SetCondition(c22022480.tkncon)
e1:SetTarget(c22022480.tkntg)
e1:SetOperation(c22022480.tknop)
c:RegisterEffect(e1)
--revive
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22022480,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22022481)
e2:SetCost(c22022480.spcost)
e2:SetTarget(c22022480.sptg2)
e2:SetOperation(c22022480.spop2)
c:RegisterEffect(e2)
end
function c22022480.tkncon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c22022480.tkntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,22022481,0,TYPES_TOKEN_MONSTER,3000,3000,3,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c22022480.tknop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,22022481,0,TYPES_TOKEN_MONSTER,3000,3000,3,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) then
for i=1,2 do
local token=Duel.CreateToken(tp,22022481)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
token:RegisterEffect(e2,true)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
token:RegisterEffect(e3,true)
local e4=e2:Clone()
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(e4,true)
end
Duel.SpecialSummonComplete()
end
end
function c22022480.cfilter(c,ft,tp)
return c:IsType(TYPE_TUNER)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c22022480.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(REASON_COST,tp,c22022480.cfilter,1,nil,ft,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,c22022480.cfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST)
end
function c22022480.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22022480.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 c22022490.initial_effect(c)
c:SetSPSummonOnce(22022490)
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)
e1:SetValue(0)
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_GRAVE)
e2:SetCondition(c22022490.spcon)
e2:SetOperation(c22022490.spop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22022490,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,22022001)
e3:SetCondition(c22022490.spcon1)
e3:SetTarget(c22022490.sptg1)
e3:SetOperation(c22022490.spop1)
c:RegisterEffect(e3)
end
function c22022490.spfilter0(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xff1) and c:IsAbleToGraveAsCost()
end
function c22022490.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22022490.spfilter0,c:GetControler(),LOCATION_HAND,0,1,c)
end
function c22022490.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c22022490.spfilter0,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST)
end
function c22022490.spcon1(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO and e:GetHandler():GetReasonCard():IsSetCard(0xff1)
end
function c22022490.spfilter(c,e,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and not c:IsCode(22022490) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c22022490.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local mg=e:GetHandler():GetReasonCard():GetMaterial()
if chkc then return mg:IsContains(chkc) and c22022490.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and mg:IsExists(c22022490.spfilter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=mg:FilterSelect(tp,c22022490.spfilter,1,1,nil,e,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c22022490.spop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--人理之基 虞美人
function c22022500.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xff1),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--summon success
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,22022500)
e1:SetCondition(c22022500.sumcon)
e1:SetOperation(c22022500.sumsuc)
c:RegisterEffect(e1)
--cannot activate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetCondition(c22022500.condition)
e2:SetValue(c22022500.aclimit)
c:RegisterEffect(e2)
--cannot be target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsCode,22022510))
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--special summon (grave)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22022500,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,22022501)
e4:SetCondition(c22022500.condition)
e4:SetCost(c22022500.spcost)
e4:SetTarget(c22022500.sptg)
e4:SetOperation(c22022500.spop)
c:RegisterEffect(e4)
end
function c22022500.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c22022500.sumsuc(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_DAMAGE)
e1:SetCondition(c22022500.recon1)
e1:SetOperation(c22022500.reop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c22022500.recon1(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c22022500.reop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,22022500)
Duel.Recover(tp,500,REASON_EFFECT)
end
function c22022500.cfilter(c)
return c:IsFaceup() and c:IsCode(22022510)
end
function c22022500.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22022500.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c22022500.aclimit(e,re,tp)
local loc=re:GetActivateLocation()
return loc==LOCATION_GRAVE or loc==LOCATION_REMOVED
end
function c22022500.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2000) end
Duel.PayLPCost(tp,2000)
end
function c22022500.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22022500.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
\ No newline at end of file
--人理之基 楚霸王
function c22022510.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xff1),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--summon success
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,22022510)
e1:SetCondition(c22022510.sumcon)
e1:SetOperation(c22022510.sumsuc)
c:RegisterEffect(e1)
--attack all
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ATTACK_ALL)
e2:SetValue(1)
c:RegisterEffect(e2)
--pierce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e3)
--summon success
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(c22022510.regcon)
e4:SetOperation(c22022510.regop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_MATERIAL_CHECK)
e5:SetValue(c22022510.valcheck)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
--destroy
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(22022510,1))
e6:SetCategory(CATEGORY_DESTROY)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_BATTLE_DAMAGE)
e6:SetCondition(c22022510.descon)
e6:SetTarget(c22022510.destg)
e6:SetOperation(c22022510.desop)
c:RegisterEffect(e6)
end
function c22022510.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c22022510.sumsuc(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_BATTLE_DAMAGE)
e1:SetCondition(c22022510.recon1)
e1:SetOperation(c22022510.reop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c22022510.recon1(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c22022510.reop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,22022510)
Duel.Damage(1-tp,500,REASON_EFFECT)
end
function c22022510.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1
end
function c22022510.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(22022510,RESET_EVENT+RESETS_STANDARD,0,1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(22022510,0))
end
function c22022510.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsCode,1,nil,22022500) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c22022510.descon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetFlagEffect(22022510)>0
end
function c22022510.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c22022510.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--人理之基 兰陵王
function c22022520.initial_effect(c)
--special summon (self)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22022520,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,22022520)
e1:SetCost(c22022520.cost)
e1:SetTarget(c22022520.sptg)
e1:SetOperation(c22022520.spop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22022520,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,22022521)
e2:SetTarget(c22022520.tgtg)
e2:SetOperation(c22022520.tgop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--search
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22022520,2))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetCountLimit(1,22022521)
e4:SetCondition(c22022520.thcon)
e4:SetTarget(c22022520.thtg)
e4:SetOperation(c22022520.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
end
function c22022520.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xff1) and c:IsDiscardable()
end
function c22022520.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22022520.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c22022520.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
end
function c22022520.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22022520.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
function c22022520.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xff1) and c:IsAbleToGrave()
end
function c22022520.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22022520.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c22022520.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c22022520.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c22022520.cfilter1(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3ff1)
end
function c22022520.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22022520.cfilter1,tp,LOCATION_GRAVE,0,1,nil)
end
function c22022520.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x6ff1) and c:IsAbleToHand()
end
function c22022520.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22022520.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22022520.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22022520.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
\ No newline at end of file
--人理之基 秦良玉
function c22022530.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(c22022530.spcon)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22022530,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,22022530)
e2:SetCondition(c22022530.thcon)
e2:SetTarget(c22022530.thtg)
e2:SetOperation(c22022530.thop)
c:RegisterEffect(e2)
end
function c22022530.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c22022530.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c22022530.thfilter(c)
return (c:IsSetCard(0xff1) and not c:IsCode(22022530)) and c:IsAbleToHand()
end
function c22022530.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22022530.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22022530.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c22022530.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end
function c22022530.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--人理之基 吕布
function c22022540.initial_effect(c)
c:SetUniqueOnField(1,0,22022540,LOCATION_MZONE)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--must attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MUST_ATTACK)
c:RegisterEffect(e1)
--disable and atk down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(c22022540.adcon)
e3:SetTarget(c22022540.adtg)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_DISABLE_EFFECT)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_SET_ATTACK_FINAL)
e5:SetValue(0)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_SET_DEFENSE_FINAL)
e6:SetValue(0)
c:RegisterEffect(e6)
--negate
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(22022540,0))
e7:SetCategory(CATEGORY_DISABLE)
e7:SetProperty(EFFECT_FLAG_CARD_TARGET)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_PHASE+PHASE_BATTLE)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1)
e7:SetCondition(c22022540.cona)
e7:SetTarget(c22022540.target)
e7:SetOperation(c22022540.operation)
c:RegisterEffect(e7)
end
function c22022540.adcon(e)
local c=e:GetHandler()
return Duel.GetAttacker()==c and c:GetBattleTarget()
and (Duel.GetCurrentPhase()==PHASE_DAMAGE or Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL)
end
function c22022540.adtg(e,c)
return c==e:GetHandler():GetBattleTarget()
end
function c22022540.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c and c:GetBattleTarget()
and (Duel.GetCurrentPhase()==PHASE_DAMAGE or Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL)
end
function c22022540.cona(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():IsAttackPos()
end
function c22022540.filter(c)
return c:IsFaceup()
end
function c22022540.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c22022540.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22022540.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c22022540.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
end
function c22022540.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) then
Duel.CalculateDamage(c,tc,true)
end
Duel.BreakEffect()
Duel.GetControl(c,1-tp)
end
\ No newline at end of file
--人理之诗 五军神兵
function c22022550.initial_effect(c)
aux.AddCodeList(c,22022540)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c22022550.target)
e1:SetOperation(c22022550.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c22022550.eqlimit)
c:RegisterEffect(e2)
--Atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(1000)
c:RegisterEffect(e3)
--eflimit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_CANNOT_TRIGGER)
c:RegisterEffect(e4)
--pierce
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e5)
end
function c22022550.eqlimit(e,c)
return c:IsFaceup() and (c:IsCode(22022540) or c.effect_canequip_hogu)
end
function c22022550.filter(c)
return c:IsFaceup() and (c:IsCode(22022540) or c.effect_canequip_hogu)
end
function c22022550.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22022550.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22022550.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c22022550.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c22022550.operation(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 tc:IsFaceup() then
Duel.Equip(tp,c,tc)
end
end
\ No newline at end of file
--人理之基 赤兔马
function c22022560.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--equip
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1)
e1:SetCondition(c22022560.thcon)
e1:SetTarget(c22022560.eqtg)
e1:SetOperation(c22022560.eqop)
c:RegisterEffect(e1)
--code
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(22022540)
e2:SetCondition(c22022560.codecon)
c:RegisterEffect(e2)
--disable and atk down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(c22022560.adcon)
e3:SetTarget(c22022560.adtg)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_DISABLE_EFFECT)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_SET_ATTACK_FINAL)
e5:SetValue(0)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_SET_DEFENSE_FINAL)
e6:SetValue(0)
c:RegisterEffect(e6)
end
function c22022560.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c22022560.eqfilter(c,tp)
return c:IsSetCard(0xff1) and c:IsType(TYPE_MONSTER) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c22022560.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c22022560.eqfilter,tp,LOCATION_EXTRA,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_EXTRA)
end
function c22022560.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c22022560.eqfilter,tp,LOCATION_EXTRA,0,1,1,tp)
local tc=g:GetFirst()
if not Duel.Equip(tp,tc,c) then return end
if tc:IsCode(22022540) then Duel.SelectOption(tp,aux.Stringid(22022560,1)) end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(c)
e1:SetValue(c22022560.eqlimit)
tc:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1500)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function c22022560.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c22022560.codecon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipGroup():IsExists(Card.IsCode,1,nil,22022540)
end
function c22022560.adtg(e,c)
return c==e:GetHandler():GetBattleTarget()
end
function c22022560.adcon(e)
local c=e:GetHandler()
return e:GetHandler():GetEquipGroup():IsExists(Card.IsCode,1,nil,22022540) and Duel.GetAttacker()==c and c:GetBattleTarget()
and (Duel.GetCurrentPhase()==PHASE_DAMAGE or Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL)
end
\ No newline at end of file
--人理之基 陈宫
function c22022570.initial_effect(c)
aux.AddCodeList(c,22022540)
--act limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetValue(c22022570.limval)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22022570,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,22022570)
e2:SetTarget(c22022570.target)
e2:SetOperation(c22022570.operation)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22022570,4))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,22022570)
e3:SetCondition(c22022570.erecon)
e3:SetCost(c22022570.erecost)
e3:SetTarget(c22022570.target)
e3:SetOperation(c22022570.operation)
c:RegisterEffect(e3)
end
function c22022570.limval(e,re,rp)
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER) and rc:IsCode(22022540)
end
function c22022570.filter(c,tp)
return c:IsFaceup() and (c:IsSetCard(0x6ff1) and not c:IsCode(22022570))
and Duel.IsExistingMatchingCard(c22022570.filter2,tp,0,LOCATION_MZONE,1,nil,c:GetAttack())
end
function c22022570.filter2(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk)
end
function c22022570.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c22022570.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c22022570.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectOption(tp,aux.Stringid(22022570,1))
local g=Duel.SelectTarget(tp,c22022570.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
local dg=Duel.GetMatchingGroup(c22022570.filter2,tp,0,LOCATION_MZONE,nil,g:GetFirst():GetAttack())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dg:GetCount()*500)
end
function c22022570.operation(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 tc:IsFaceup() then
local g=Duel.GetMatchingGroup(c22022570.filter2,tp,0,LOCATION_MZONE,nil,tc:GetAttack())
Duel.SelectOption(tp,aux.Stringid(22022570,2))
if g:GetCount()==0 then return end
local oc=Duel.Destroy(g,REASON_EFFECT)
if oc>0 then Duel.Damage(1-tp,oc*500,REASON_EFFECT) end
end
Duel.BreakEffect()
Duel.SelectOption(tp,aux.Stringid(22022570,3))
Duel.SendtoGrave(tc,REASON_RULE)
end
function c22022570.erecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,22020980)
end
function c22022570.erecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_CARD,0,22020980)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
\ No newline at end of file
--人理之基 壱与
function c22022590.initial_effect(c)
c:EnableReviveLimit()
--disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22022590,0))
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SUMMON)
e1:SetCountLimit(1,22022590)
e1:SetCondition(c22022590.condition)
e1:SetCost(c22022590.cost)
e1:SetTarget(c22022590.target)
e1:SetOperation(c22022590.operation)
c:RegisterEffect(e1)
--change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22022590,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,22022591)
e2:SetCondition(c22022590.chcon)
e2:SetOperation(c22022590.chop)
c:RegisterEffect(e2)
--change
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22022590,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,22022591)
e3:SetCost(c22022590.erecost)
e3:SetCondition(c22022590.chcon1)
e3:SetOperation(c22022590.chop)
c:RegisterEffect(e3)
end
function c22022590.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c22022590.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() and Duel.CheckLPCost(tp,2500) end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
Duel.PayLPCost(tp,2500)
end
function c22022590.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c22022590.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e1:SetValue(2)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c22022590.chcon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) and ep~=tp
end
function c22022590.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c22022590.repop)
end
function c22022590.filter(c,e,sp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function c22022590.repop(e,tp,eg,ep,ev,re,r,rp)
local cg=Duel.GetMatchingGroup(c22022590.filter,tp,LOCATION_HAND,0,nil,e,tp)
if cg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SelectYesNo(tp,aux.Stringid(22022590,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=cg:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c22022590.chcon1(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) and ep~=tp and Duel.IsPlayerAffectedByEffect(tp,22020980)
end
function c22022590.erecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_CARD,0,22020980)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
\ No newline at end of file
--人理之灵 巴泽特
function c22022600.initial_effect(c)
--spsummon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22022600,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,22022600)
e1:SetCost(c22022600.spcost)
e1:SetTarget(c22022600.sptg)
e1:SetOperation(c22022600.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,22022600)
c:RegisterEffect(e2)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22022600,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetCountLimit(1,22022601)
e3:SetCondition(c22022600.condition)
e3:SetTarget(c22022600.target)
e3:SetOperation(c22022600.activate)
c:RegisterEffect(e3)
end
function c22022600.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c22022600.filter(c,e,tp)
return c:IsSetCard(0x6ff1) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c22022600.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22022600.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c22022600.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,c22022600.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
if not tc:IsCode(22020260) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
end
end
Duel.SpecialSummonComplete()
end
function c22022600.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c22022600.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker()
if chkc then return chkc==tg end
if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
end
function c22022600.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--人理之基 库丘林·彼面
function c22022610.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xff1),4,3)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22022610,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,22022610)
e1:SetCondition(c22022610.condition1)
e1:SetCost(c22022610.cost)
e1:SetTarget(c22022610.target)
e1:SetOperation(c22022610.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetHintTiming(TIMING_DAMAGE_STEP,0x21e0)
e2:SetCondition(c22022610.condition2)
c:RegisterEffect(e2)
--Cannot activate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
e3:SetValue(c22022610.aclimit)
c:RegisterEffect(e3)
--battle indestructable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1)
c:RegisterEffect(e4)
--atk
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(c22022610.atkval)
c:RegisterEffect(e5)
end
function c22022610.condition1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0xff1)
end
function c22022610.condition2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0xff1)
and aux.dscon()
end
function c22022610.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 c22022610.filter(c)
return c:IsFaceup() and c:GetAttack()>0
end
function c22022610.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22022610.filter,tp,0,LOCATION_MZONE,1,nil) end
end
function c22022610.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c22022610.aclimit(e,re,tp)
local tc=re:GetHandler()
return tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and tc:IsAttackBelow(0) and re:IsActiveType(TYPE_MONSTER)
end
function c22022610.atkval(e,c)
return c:GetOverlayCount()*800
end
\ No newline at end of file
--啮碎死牙之兽
function c22022620.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,5,c22022620.ovfilter,aux.Stringid(22022620,0),3,c22022620.xyzop)
c:EnableReviveLimit()
--disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22022620,1))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c22022620.atktg)
e1:SetOperation(c22022620.atkop)
c:RegisterEffect(e1)
--ex atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22022620,2))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetCondition(c22022620.atcon)
e2:SetCost(c22022620.atcost)
e2:SetOperation(c22022620.atop)
c:RegisterEffect(e2)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22022620,3))
e4:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c22022620.spcon)
e4:SetTarget(c22022620.sptg)
e4:SetOperation(c22022620.spop)
c:RegisterEffect(e4)
--disable
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22022620,7))
e5:SetCategory(CATEGORY_DISABLE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1)
e5:SetCondition(c22022620.erecon)
e5:SetCost(c22022620.erecost)
e5:SetTarget(c22022620.atktg)
e5:SetOperation(c22022620.atkop)
c:RegisterEffect(e5)
end
function c22022620.cfilter(c)
return c:IsSetCard(0xff1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDiscardable()
end
function c22022620.ovfilter(c)
return c:IsFaceup() and c:IsCode(22022610)
end
function c22022620.xyzop(e,tp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22022620.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SelectOption(tp,aux.Stringid(22022620,5))
Duel.DiscardHand(tp,c22022620.cfilter,1,1,REASON_COST+REASON_DISCARD)
Duel.SelectOption(tp,aux.Stringid(22022620,6))
end
function c22022620.atktg(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:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function c22022620.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
function c22022620.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
e:SetLabelObject(bc)
return c==Duel.GetAttacker() and aux.dsercon(e)
and bc and c:IsStatus(STATUS_OPPO_BATTLE) and bc:IsOnField() and bc:IsRelateToBattle()
end
function c22022620.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1600) end
Duel.PayLPCost(tp,1600)
end
function c22022620.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
end
function c22022620.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c22022620.toexfilter(c,tp)
return c:IsType(TYPE_XYZ) and c:IsCode(22022610) and c:IsAbleToExtra() and c:GetOwner()==tp
end
function c22022620.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=c:GetOverlayGroup()
if chk==0 then return c:GetFlagEffect(22022620)==0 and g:IsExists(c22022620.toexfilter,1,nil,tp) end
c:RegisterFlagEffect(22022620,RESET_CHAIN,0,1)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c22022620.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetOverlayGroup()
if c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sc=g:FilterSelect(tp,c22022620.toexfilter,1,1,nil,tp):GetFirst()
if sc and Duel.SendtoDeck(sc,nil,0,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_EXTRA)
and c:IsFaceup() and c:IsControler(tp) and not c:IsImmuneToEffect(e)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and c:IsCanBeXyzMaterial(sc)
and sc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0
and Duel.SelectYesNo(tp,aux.Stringid(22022620,4)) then
Duel.BreakEffect()
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
function c22022620.erecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,22020980)
end
function c22022620.erecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_CARD,0,22020980)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
\ No newline at end of file
...@@ -32,10 +32,10 @@ function cm.initial_effect(c) ...@@ -32,10 +32,10 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT) if Duel.SelectYesNo(tp,aux.Stringid(m,0)) and Duel.IsPlayerCanDraw(tp,1) then Duel.Draw(tp,1,REASON_EFFECT) end
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsSetCard(0xc620) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0xc620) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......
--七仟陌
function c71000100.initial_effect(c)
c:EnableReviveLimit()
-- spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(c71000100.splimit)
c:RegisterEffect(e1)
-- cannot releaase
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UNRELEASABLE_SUM)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EFFECT_UNRELEASABLE_EFFECT)
c:RegisterEffect(e4)
local e5=e2:Clone()
e5:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e5)
local e6=e2:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
local e7=e2:Clone()
e7:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e7)
local e8=e2:Clone()
e8:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e8)
--atk,def
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_UPDATE_ATTACK)
e9:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e9:SetRange(LOCATION_MZONE)
e9:SetValue(c71000100.val)
c:RegisterEffect(e9)
local e10=e9:Clone()
e10:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e10)
--
local e22=Effect.CreateEffect(c)
e22:SetCategory(CATEGORY_TODECK)
e22:SetType(EFFECT_TYPE_QUICK_O)
e22:SetRange(LOCATION_MZONE)
e22:SetCode(EVENT_FREE_CHAIN)
e22:SetHintTiming(0,TIMING_END_PHASE)
e22:SetCountLimit(1)
e22:SetCost(c71000100.cost)
e22:SetTarget(c71000100.tg)
e22:SetOperation(c71000100.op)
c:RegisterEffect(e22)
--
local e21=Effect.CreateEffect(c)
e21:SetType(EFFECT_TYPE_SINGLE)
e21:SetCode(EFFECT_IMMUNE_EFFECT)
e21:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e21:SetRange(LOCATION_MZONE)
e21:SetCondition(c71000100.econ)
e21:SetValue(c71000100.efilter)
c:RegisterEffect(e21)
local e23=Effect.CreateEffect(c)
e23:SetType(EFFECT_TYPE_SINGLE)
e23:SetCode(EFFECT_IMMUNE_EFFECT)
e23:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e23:SetRange(LOCATION_MZONE)
e23:SetCondition(c71000100.xecon)
e23:SetValue(c71000100.xefilter)
c:RegisterEffect(e23)
local e24=Effect.CreateEffect(c)
e24:SetType(EFFECT_TYPE_SINGLE)
e24:SetCode(EFFECT_IMMUNE_EFFECT)
e24:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e24:SetRange(LOCATION_MZONE)
e24:SetCondition(c71000100.zecon)
e24:SetValue(c71000100.zefilter)
c:RegisterEffect(e24)
end
function c71000100.splimit(e,se,sp,st)
return se:GetHandler():IsCode(71000101,71000102)
end
function c71000100.val(e,c)
return c:GetOverlayCount()*300
end
function c71000100.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
local rt=Duel.GetFieldGroupCount(tp,LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED)
local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST)
e:SetLabel(ct)
end
function c71000100.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,e:GetLabel(),0,0)
end
function c71000100.stfilter(c)
return c:IsSetCard(0xe73) and c:IsSSetable()
end
function c71000100.op(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED,1,ct,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,CATEGORY_TODECK,REASON_EFFECT)
local st=Duel.GetMatchingGroup(c71000100.stfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71000100,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=st:Select(tp,1,ct,nil)
Duel.SSet(tp,sg)
end
end
end
function c71000100.econ(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,71000117)
end
function c71000100.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c71000100.xecon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,71000115)
end
function c71000100.xefilter(e,te)
return te:IsActiveType(TYPE_TRAP) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c71000100.zecon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,71000116)
end
function c71000100.zefilter(e,te)
return te:IsActiveType(TYPE_SPELL) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
\ No newline at end of file
--不知从何时开始
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCondition(s.condition)
e1:SetTarget(s.tg)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
end
function s.cfilter(c)
return (c:IsSummonType(SUMMON_TYPE_SPECIAL) and not c:IsSetCard(0xe73))
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xe73) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsType(TYPE_XYZ)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local sc=g:GetFirst()
if g:GetCount()>0 and c:IsRelateToEffect(e) and c:IsCanOverlay() and sc then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
c:CancelToGrave()
Duel.Overlay(sc,Group.FromCards(c))
end
aux.LabrynthDestroyOp(e,tp,res)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(s.aclimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp)
end
end
function s.aclimit(e,c)
return not c:IsSetCard(0xe73)
end
--and c:IsLocation(LOCATION_DECK+LOCATION_HAND+LOCATION_REMOVED+LOCATION_GRAVE+LOCATION_EXTRA)
--不知该何时结束
local s,id=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCondition(s.condition)
e1:SetTarget(s.tg)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(s.c)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return (c:IsSummonType(SUMMON_TYPE_SPECIAL) and not c:IsSetCard(0xe73))
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil)
end
function s.f(c,e,tp)
return c:IsSetCard(0xe73) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsType(TYPE_XYZ)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.f,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.f,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local sc=g:GetFirst()
if g:GetCount()>0 and c:IsRelateToEffect(e) and c:IsCanOverlay() and sc then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
c:CancelToGrave()
Duel.Overlay(sc,Group.FromCards(c))
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.a)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
end
function s.a(e,c)
return not c:IsSetCard(0xe73)
end
function s.c(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0
end
\ No newline at end of file
--许下永恒的誓言
function c71000103.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetOperation(c71000103.op)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(2,71000103)
e2:SetTarget(c71000103.xtg)
e2:SetOperation(c71000103.xop)
c:RegisterEffect(e2)
--
end
function c71000103.f(c)
return c:IsCode(71000101,71000102) and c:IsAbleToHand()
end
function c71000103.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c71000103.f,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71000103,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c71000103.xf(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsCode(71000100)
end
function c71000103.xtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c71000103.xf(chkc) and chkc:IsControler(tp) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c71000103.xf,tp,LOCATION_MZONE,0,1,c) and c:IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c71000103.xf,tp,LOCATION_MZONE,0,1,1,c)
end
function c71000103.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 c:IsCanOverlay() then
local mg=c:GetOverlayGroup()
if mg:GetCount()>0 then Duel.Overlay(tc,mg,false) end
Duel.Overlay(tc,Group.FromCards(c))
end
end
--初见之地
function c71000104.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetOperation(c71000104.op)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(c71000104.con)
e2:SetValue(aux.indoval)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetCode(EVENT_TO_DECK)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_FZONE)
e4:SetCondition(c71000104.damcon)
e4:SetOperation(c71000104.damop)
c:RegisterEffect(e4)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_PIERCE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsCode,71000100))
c:RegisterEffect(e3)
end
function c71000104.filter(c)
return c:IsCode(71000101,71000102) and c:IsAbleToHand()
end
function c71000104.ab(e,c)
return c:IsCode(71000100)
end
function c71000104.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c71000104.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71000104,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c71000104.xf(c,tp)
return c:GetOwner()
end
function c71000104.operation(e,tp,eg,ep,ev,re,r,rp)
local d1=eg:FilterCount(c71000104.xf,nil,tp)*300
Duel.Damage(1-tp,d1,REASON_EFFECT,true)
Duel.Recover(tp,d1,REASON_EFFECT,true)
Duel.RDComplete()
end
function c71000104.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c71000104.damop(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(Card.IsPreviousLocation,nil,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
if ct>0 then
Duel.Damage(1-tp,ct*300,REASON_EFFECT)
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
end
function c71000104.confilter(c)
return c:IsFaceup() and c:IsSetCard(0xe73) and c:GetOriginalType()&TYPE_MONSTER~=0
end
function c71000104.con(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c71000104.confilter,tp,LOCATION_ONFIELD,0,1,nil)
end
\ No newline at end of file
-- 七仟陌支援
-- 卡片ID:
local s,id=GetID()
function s.initial_effect(c)
-- 发动条件检查
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetCondition(s.condition)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
-- 发动条件:存在「七仟陌」
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
end
-- 超量怪兽过滤器
function s.xyzfilter(c)
return c:IsFaceup() and c:IsCode(71000100) and c:IsType(TYPE_XYZ)
end
function s.tgfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_REMOVED))
and not c:IsType(TYPE_TOKEN)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
-- 效果处理(操作阶段选择)
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
-- 选择超量怪兽
local xyzg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_MZONE,0,nil)
if #xyzg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local xyzc=xyzg:Select(tp,1,1,nil):GetFirst()
if not xyzc then return end
-- 选择场上的卡
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,Card.IsCanBeOverlay,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil)
local tc=g:GetFirst()
if tc and xyzc:IsType(TYPE_XYZ) then
-- 作为超量素材附加
Duel.Overlay(xyzc,Group.FromCards(tc))
-- 获取原始代码
local code=tc:GetOriginalCodeRule()
-- 效果无效化处理
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(s.distg)
e1:SetLabel(code)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
-- 连锁无效处理
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(s.discon)
e2:SetOperation(s.disop)
e2:SetLabel(code)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
end
-- 无效化过滤器
function s.distg(e,c)
return c:IsOriginalCodeRule(e:GetLabel())
end
-- 连锁无效条件
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOriginalCodeRule(e:GetLabel())
end
-- 连锁无效操作
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
-- 七仟陌支援
-- 卡片ID:
local s,id=GetID()
function s.initial_effect(c)
-- 发动条件检查
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.condition)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
-- 发动条件:存在「七仟陌」
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
end
-- 超量怪兽过滤器
function s.xyzfilter(c)
return c:IsFaceup() and c:IsCode(71000100) and c:IsType(TYPE_XYZ)
end
-- 效果处理(操作阶段选择)
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
-- 选择超量怪兽
local xyzg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_MZONE,0,nil)
if #xyzg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local xyzc=xyzg:Select(tp,1,1,nil):GetFirst()
if not xyzc then return end
-- 选择场上的卡
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,Card.IsCanBeOverlay,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,xyzc)
local tc=g:GetFirst()
if tc and xyzc:IsType(TYPE_XYZ) then
-- 作为超量素材附加
tc:CancelToGrave()
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(xyzc,Group.FromCards(tc))
-- 获取原始代码
local code=tc:GetOriginalCodeRule()
-- 效果无效化处理
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(s.distg)
e1:SetLabel(code)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
-- 连锁无效处理
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(s.discon)
e2:SetOperation(s.disop)
e2:SetLabel(code)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
end
-- 无效化过滤器
function s.distg(e,c)
return c:IsOriginalCodeRule(e:GetLabel())
end
-- 连锁无效条件
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOriginalCodeRule(e:GetLabel())
end
-- 连锁无效操作
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--一曲镇魂
function c71000108.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetCountLimit(1,71000108)
e1:SetCondition(c71000108.con)
e1:SetTarget(c71000108.tg)
e1:SetOperation(c71000108.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
end
function c71000108.f(c)
return c:IsFaceup() and c:IsCode(71000100) and c:IsType(TYPE_XYZ)
end
function c71000108.f2(c)
return c:IsFaceup() and c:IsCode(71000100) and c:IsType(TYPE_XYZ) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c71000108.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c71000108.f,tp,LOCATION_MZONE,0,1,nil)
and re:IsActiveType(TYPE_MONSTER+TYPE_TRAP)
and Duel.IsChainNegatable(ev)
end
function c71000108.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c71000108.op(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c71000108.f2,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 and not g:GetFirst():IsImmuneToEffect(e) and rc:IsCanOverlay() then
rc:CancelToGrave()
Duel.Overlay(g:GetFirst(),Group.FromCards(rc))
end
end
end
\ No newline at end of file
--尽在掌握
function c71000109.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetCondition(c71000109.con)
e1:SetTarget(c71000109.tg)
e1:SetOperation(c71000109.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
end
function c71000109.f(c)
return c:IsFaceup() and c:IsCode(71000100) and c:IsType(TYPE_XYZ)
end
function c71000109.f2(c)
return c:IsFaceup() and c:IsCode(71000100) and c:IsType(TYPE_XYZ) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c71000109.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c71000109.f,tp,LOCATION_MZONE,0,1,nil)
and re:IsActiveType(TYPE_TRAP+TYPE_SPELL)
and Duel.IsChainNegatable(ev)
end
function c71000109.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c71000109.op(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c71000109.f2,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 and not g:GetFirst():IsImmuneToEffect(e) and rc:IsCanOverlay() then
rc:CancelToGrave()
Duel.Overlay(g:GetFirst(),Group.FromCards(rc))
end
end
end
--魔归于无
function c71000110.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetCountLimit(1,71000110)
e1:SetCondition(c71000110.con)
e1:SetTarget(c71000110.tg)
e1:SetOperation(c71000110.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
end
function c71000110.f(c)
return c:IsFaceup() and c:IsCode(71000100) and c:IsType(TYPE_XYZ)
end
function c71000110.f2(c)
return c:IsFaceup() and c:IsCode(71000100) and c:IsType(TYPE_XYZ) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c71000110.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c71000110.f,tp,LOCATION_MZONE,0,1,nil)
and re:IsActiveType(TYPE_SPELL+TYPE_MONSTER)
and Duel.IsChainNegatable(ev)
end
function c71000110.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c71000110.op(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c71000110.f2,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 and not g:GetFirst():IsImmuneToEffect(e) and rc:IsCanOverlay() then
rc:CancelToGrave()
Duel.Overlay(g:GetFirst(),Group.FromCards(rc))
end
end
end
\ No newline at end of file
--最后的伙伴
function c71000111.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCountLimit(2,71000111)
e1:SetTarget(c71000111.tg)
e1:SetOperation(c71000111.op)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(2,71000111)
e2:SetTarget(c71000111.xtg)
e2:SetOperation(c71000111.xop)
c:RegisterEffect(e2)
end
function c71000111.f(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsSetCard(0xe73)
end
function c71000111.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71000111.f,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c71000111.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71000111.f,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 c71000111.xf(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsCode(71000100)
end
function c71000111.xtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c71000111.xf(chkc) and chkc:IsControler(tp) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c71000111.xf,tp,LOCATION_MZONE,0,1,c) and c:IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SetOperationInfo(tp,c71000111.xf,tp,LOCATION_MZONE,0,1,1,c)
end
function c71000111.xop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
-- local tc=Duel.GetFirstTarget()
local g=Duel.SelectMatchingCard(tp,c71000111.xf,tp,LOCATION_ONFIELD,0,1,1,nil)
local tc=g:GetFirst()
if c:IsRelateToEffect(e) then --and not tc:IsImmuneToEffect(e) and tc:IsCanOverlay()
local mg=c:GetOverlayGroup()
if mg:GetCount()>0 then Duel.Overlay(tc,mg,false) end
Duel.Overlay(tc,Group.FromCards(c))
end
end
\ No newline at end of file
--默然然
function c71000112.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71000112,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCountLimit(1,71000112)
e1:SetTarget(c71000112.tg)
e1:SetOperation(c71000112.op)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--
local e2=Effect.CreateEffect(c)
e2:SetCode(EVENT_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c71000112.xtg)
e2:SetOperation(c71000112.xop)
c:RegisterEffect(e2)
end
function c71000112.f(c)
return c:IsAbleToHand() and c:IsSetCard(0xe73)
end
function c71000112.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71000112.f,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c71000112.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71000112.f,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 c71000112.xtg(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 c71000112.xop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.Recover(tp,700,REASON_EFFECT)
Duel.Damage(1-tp,700,REASON_EFFECT)
end
end
\ No newline at end of file
local s, id = GetID()
function s.initial_effect(c)
-- 效果①:除外盖卡
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(2,id)
e1:SetCost(s.excost1)
e1:SetTarget(s.extg)
e1:SetOperation(s.exop)
c:RegisterEffect(e1)
--效果②:回收与LP操作
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0)
e2:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e2:SetCountLimit(2,id)
e2:SetCost(s.excost2)
e2:SetTarget(s.rectg)
e2:SetOperation(s.recop)
c:RegisterEffect(e2)
end
--===== 效果①处理 =====--
function s.excost1_filter(c)
return c:IsAbleToRemove() and (c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_ONFIELD)) and c:IsSetCard(0xe73)
end
function s.excost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
return Duel.IsExistingMatchingCard(s.excost1_filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
and c:IsAbleToRemove()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.excost1_filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(g:FilterCount(Card.IsSetCard,nil,0xe73))
end
function s.filter(c)
return c:IsSetCard(0xe73) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.extg(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
end
function s.exop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
local c=e:GetHandler()
if #g>0 then
local tc=Duel.SSet(tp,g:GetFirst())
Duel.Recover(tp,700,REASON_EFFECT)
Duel.Damage(1-tp,700,REASON_EFFECT)
-- 如果除外了七仟陌卡则允许当回合发动
if e:GetLabel()>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
c:RegisterEffect(e2)
end
end
end
--===== 效果②处理 =====--
function s.excost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(g:GetFirst():IsSetCard(0xe73) and 1 or 0)
end
function s.rectg(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)
-- Duel.SetPossibleOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,700)
end
function s.recop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 then
if e:GetLabel()>0 then
Duel.Recover(tp,700,REASON_EFFECT)
Duel.Damage(1-tp,700,REASON_EFFECT)
end
end
end
\ No newline at end of file
local s, id = GetID()
function s.initial_effect(c)
-- 效果①
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(2,id)
e1:SetCost(s.excost1)
e1:SetOperation(s.exop)
c:RegisterEffect(e1)
--效果②
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_REMOVED)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(2,71000114)
e2:SetTarget(c71000114.xtg)
e2:SetOperation(c71000114.xop)
c:RegisterEffect(e2)
--get effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_XMATERIAL)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.xcon)
e3:SetValue(s.xval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e6:SetValue(aux.tgoval)
c:RegisterEffect(e6)
end
--===== 效果①处理 =====--
function s.excost1_filter(c)
return c:IsAbleToRemove() and (c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_EXTRA) or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0xe73)
end
function s.excost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
return Duel.IsExistingMatchingCard(s.excost1_filter,tp,LOCATION_HAND+LOCATION_EXTRA+LOCATION_GRAVE,0,1,c)
and c:IsAbleToRemove()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.excost1_filter,tp,LOCATION_HAND+LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,c)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.filter(c)
return c:IsSetCard(0xe73) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.exop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(71000114,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTargetRange(LOCATION_SZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
Duel.RegisterEffect(e3,tp)
end
--===== 效果②处理 =====--
function c71000114.xf(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsCode(71000100)
end
function c71000114.xtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c71000114.xf(chkc) and chkc:IsControler(tp) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c71000114.xf,tp,LOCATION_MZONE,0,1,c) and c:IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c71000114.xf,tp,LOCATION_MZONE,0,1,1,c)
end
function c71000114.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 c:IsCanOverlay() then
local mg=c:GetOverlayGroup()
if mg:GetCount()>0 then Duel.Overlay(tc,mg,false) end
Duel.Overlay(tc,Group.FromCards(c))
end
end
--
function s.xcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSetCard(0xe73)
end
function s.xval(e,c)
return e:GetHandler():GetOverlayCount()*300
end
local s,id=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,s.mfilter,1,1)
--效果②
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_REMOVED+LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(2,id)
e1:SetTarget(s.xtg)
e1:SetOperation(s.xop)
c:RegisterEffect(e1)
--get effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_XMATERIAL)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.xcon)
e3:SetValue(s.xval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(2,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.activate)
c:RegisterEffect(e2)
end
--link
function s.mfilter(c)
return c:IsLinkSetCard(0xe73)
end
--1
function s.xf(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsCode(71000100)
end
function s.xtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.xf(chkc) and chkc:IsControler(tp) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(s.xf,tp,LOCATION_MZONE,0,1,c) and c:IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.xf,tp,LOCATION_MZONE,0,1,1,c)
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 c:IsCanOverlay() then
local mg=c:GetOverlayGroup()
if mg:GetCount()>0 then Duel.Overlay(tc,mg,false) end
Duel.Overlay(tc,Group.FromCards(c))
end
end
--2
function s.xcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSetCard(0xe73)
end
function s.xval(e,c)
return e:GetHandler():GetOverlayCount()*100
end
--3
function s.thfilter(c)
return c:IsSetCard(0xe73) and c:IsAbleToHand() and c:IsType(TYPE_TRAP)
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.activate(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: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()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,s.mfilter,1,1)
--效果②
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_REMOVED+LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(2,id)
e1:SetTarget(s.xtg)
e1:SetOperation(s.xop)
c:RegisterEffect(e1)
--get effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_XMATERIAL)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.xcon)
e3:SetValue(s.xval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--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:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(2,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.activate)
c:RegisterEffect(e2)
end
--===== 效果①处理 =====--
function s.mfilter(c)
return c:IsLinkSetCard(0xe73)
end
--===== 效果②处理 =====--
function s.xf(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsCode(71000100)
end
function s.xtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.xf(chkc) and chkc:IsControler(tp) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(s.xf,tp,LOCATION_MZONE,0,1,c) and c:IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.xf,tp,LOCATION_MZONE,0,1,1,c)
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 c:IsCanOverlay() then
local mg=c:GetOverlayGroup()
if mg:GetCount()>0 then Duel.Overlay(tc,mg,false) end
Duel.Overlay(tc,Group.FromCards(c))
end
end
--
function s.xcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSetCard(0xe73)
end
function s.xval(e,c)
return e:GetHandler():GetOverlayCount()*100
end
--
function s.thfilter(c)
return c:IsSetCard(0xe73) and c:IsAbleToHand() and c:IsType(TYPE_SPELL)
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.activate(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:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
local s,id=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,s.mfilter,1,1)
--效果②
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_REMOVED+LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(2,id)
e1:SetTarget(s.xtg)
e1:SetOperation(s.xop)
c:RegisterEffect(e1)
--get effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_XMATERIAL)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.xcon)
e3:SetValue(s.xval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--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:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(2,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.activate)
c:RegisterEffect(e2)
end
--===== 效果①处理 =====--
function s.mfilter(c)
return c:IsLinkSetCard(0xe73)
end
--===== 效果②处理 =====--
function s.xf(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsCode(71000100)
end
function s.xtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.xf(chkc) and chkc:IsControler(tp) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(s.xf,tp,LOCATION_MZONE,0,1,c) and c:IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.xf,tp,LOCATION_MZONE,0,1,1,c)
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 c:IsCanOverlay() then
local mg=c:GetOverlayGroup()
if mg:GetCount()>0 then Duel.Overlay(tc,mg,false) end
Duel.Overlay(tc,Group.FromCards(c))
end
end
--
function s.xcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSetCard(0xe73)
end
function s.xval(e,c)
return e:GetHandler():GetOverlayCount()*100
end
--
function s.thfilter(c)
return c:IsSetCard(0xe73) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
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.activate(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:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--默然然
function c71000171.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71000171,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCountLimit(2,71000171)
e1:SetTarget(c71000171.tg)
e1:SetOperation(c71000171.op)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--
local e12=Effect.CreateEffect(c)
e12:SetDescription(aux.Stringid(71000171,0))
e12:SetType(EFFECT_TYPE_FIELD)
e12:SetCode(EFFECT_SPSUMMON_PROC)
e12:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e12:SetCountLimit(2,71000171)
e12:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
e12:SetCondition(c71000171.spcon)
c:RegisterEffect(e12)
end
function c71000171.f(c)
return c:IsAbleToHand() and c:IsSetCard(0xe73)
end
function c71000171.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71000171.f,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c71000171.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71000171.f,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 c71000171.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe73) and c:IsType(TYPE_MONSTER)
end
function c71000171.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c71000171.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
--默然然
function c71000172.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71000172,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(3,71000172)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetCondition(c71000172.spcon)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71000172,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(3,71000172)
e2:SetCondition(c71000172.con)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71000172,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(3,71000172)
e3:SetTarget(c71000172.sptg)
e3:SetOperation(c71000172.spop)
c:RegisterEffect(e3)
end
function c71000172.filter(c,e,tp)
return c:IsSetCard(0xe73) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71000172.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c71000172.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c71000172.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,aux.NecroValleyFilter(c71000172.filter),tp,LOCATION_DECK+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
function c71000172.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe73) and c:IsType(TYPE_MONSTER)
end
function c71000172.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c71000172.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c71000172.con(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
\ No newline at end of file
--默然然
function c71000173.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71000173,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(3,71000173)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetCondition(c71000173.spcon)
c:RegisterEffect(e1)
end
function c71000173.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe73) and c:IsType(TYPE_MONSTER)
end
function c71000173.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c71000173.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c71000174.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c71000174.mfilter,1,1)
--效果②
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71000174,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,70333911)
e2:SetCondition(c71000174.drcon)
e2:SetTarget(c71000174.drtg)
e2:SetOperation(c71000174.drop)
c:RegisterEffect(e2)
--get effect
end
--===== 效果①处理 =====--
function c71000174.mfilter(c)
return c:IsLinkSetCard(0xe73)
end
--===== 效果②处理 =====--
function c71000174.drcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_LINK
end
function c71000174.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c71000174.drop(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 c71000175.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c71000175.mfilter,3,3)
--效果②
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71000175,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c71000175.sttg)
e2:SetOperation(c71000175.stop)
c:RegisterEffect(e2)
--get effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c71000175.chainop)
c:RegisterEffect(e1)
end
--===== 效果①处理 =====--
function c71000175.mfilter(c)
return c:IsLinkSetCard(0xe73)
end
--===== 效果②处理 =====--
function c71000175.chainop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():GetType()==TYPE_TRAP and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and ep==tp then
Duel.SetChainLimit(c71000175.chainlm)
end
end
function c71000175.chainlm(e,rp,tp)
return tp==rp or not e:IsActiveType(TYPE_MONSTER)
end
function c71000175.stfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0xe73) and c:IsSSetable()
end
function c71000175.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71000175.stfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
end
function c71000175.stop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c71000175.stfilter,tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
\ No newline at end of file
--七仟陌的时钟
function c71000176.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xe73),aux.NonTuner(Card.IsSetCard,0xe73),1)
c:EnableReviveLimit()
--1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71000176,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCountLimit(1,71000176)
e1:SetTarget(c71000176.tg)
e1:SetOperation(c71000176.op)
c:RegisterEffect(e1)
--2
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e4:SetValue(c71000176.atklimit)
c:RegisterEffect(e4)
--3
local e12=Effect.CreateEffect(c)
e12:SetDescription(aux.Stringid(71000176,0))
e12:SetType(EFFECT_TYPE_FIELD)
e12:SetCode(EFFECT_SPSUMMON_PROC)
e12:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e12:SetCountLimit(1,71000176)
e12:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e12:SetCondition(c71000176.spcon)
c:RegisterEffect(e12)
end
--1
function c71000176.f(c)
return c:IsAbleToHand() and c:IsSetCard(0xe73)
end
function c71000176.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71000176.f,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c71000176.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71000176.f,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
--2
function c71000176.atklimit(e,c)
return c:IsFaceup() and not c:IsCode(71000176) and c:IsRace(RACE_SPELLCASTER)
end
--3
function c71000176.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe73) and c:IsType(TYPE_MONSTER)
end
function c71000176.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c71000176.cfilter,c:GetControler(),LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
end
\ No newline at end of file
--七仟陌
function c71000177.initial_effect(c)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),7,3)
c:EnableReviveLimit()
-- spsummon condition
-- cannot releaase
aux.EnableChangeCode(c,71000100,LOCATION_MZONE)
--atk,def
--
local e22=Effect.CreateEffect(c)
e22:SetCategory(CATEGORY_TODECK)
e22:SetType(EFFECT_TYPE_IGNITION)
e22:SetRange(LOCATION_MZONE)
e22:SetCountLimit(1)
e22:SetCost(c71000177.cost)
e22:SetTarget(c71000177.tg)
e22:SetOperation(c71000177.op)
c:RegisterEffect(e22)
--
end
function c71000177.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
local rt=Duel.GetFieldGroupCount(tp,LOCATION_GRAVE+LOCATION_REMOVED,0)
local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST)
e:SetLabel(ct)
end
function c71000177.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,e:GetLabel(),0,0)
end
function c71000177.stfilter(c)
return c:IsSetCard(0xe73) and c:IsSSetable()
end
function c71000177.op(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,ct,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,CATEGORY_TODECK,REASON_EFFECT)
local st=Duel.GetMatchingGroup(c71000177.stfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71000177,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=st:Select(tp,1,1,nil)
Duel.SSet(tp,sg)
end
end
end
-- 荷鲁斯的圣棺守护者
-- Horus the Sacred Sarcophagus Guardian
local s,id=GetID()
function s.initial_effect(c)
-- Xyz Summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,nil,s.xyzcheck,2,2)
-- ①效果:超量召唤成功时检索
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCost(s.thcost)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
-- ②效果:荷鲁斯送墓回收
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.retcon)
e2:SetTarget(s.rettg)
e2:SetOperation(s.retop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id)
e3:SetCondition(s.condition)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter)
end
function s.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_XYZ)
end
function s.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ) or c:IsXyzType(TYPE_SYNCHRO)
end
function s.xyzcheck(g)
return g:GetClassCount(s.lvrk)==1
end
function s.lvrk(c)
if c:IsLevelAbove(1) then
return c:GetLevel()
elseif c:IsRankAbove(1) then
return c:GetRank()
else return nil end
end
-- ①效果条件:超量召唤成功
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SUMMON)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
-- ①效果目标:检索王之棺
function s.thfilter(c)
return c:IsCode(16528181) and c:IsAbleToHand()
end
function s.thfilter1(c,tp)
return c:IsCode(16528181) and c:IsAbleToHand() and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
local b=Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_GRAVE,0,1,nil,tp)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) or Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_GRAVE,0,1,nil,tp) end
if a and b and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
e:SetCategory(CATEGORY_GRAVE_ACTION)
elseif a and not b then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
elseif not a and b then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
e:SetCategory(CATEGORY_GRAVE_ACTION)
else
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
-- ①效果处理
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local n=e:GetLabel()
local g=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if n~=nil and n==1 then
g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
else
g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
end
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
-- 限制非超量怪兽特殊召唤
end
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)and not c:IsType(TYPE_XYZ)
end
-- ②效果条件:荷鲁斯送墓
function s.cfilter(c,tp)
return c:IsSetCard(0x19d) and c:IsType(TYPE_MONSTER)
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
-- ②效果目标:回收荷鲁斯
function s.retfilter(c)
return c:IsSetCard(0x19d) and c:IsAbleToHand()
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.retfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
-- ②效果处理
function s.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.retfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.cnfilter(c)
return c:IsPreviousControler(tp)
and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cnfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
--目标:将「卡诺匹斯的守护者」加入手牌
function s.target(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_TOHAND,nil,1,tp,LOCATION_DECK)
end
--检索过滤器
function s.filter(c)
return c:IsCode(1490690)--卡诺匹斯的守护者
end
--操作执行
function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment