Commit 609bc4e3 authored by POLYMER's avatar POLYMER

fix

parent 2038dde0
......@@ -2165,43 +2165,6 @@
75010017 0
75010019 0
75010021 0
#「skip」系列 - 希尔薇&青苦宜
36700100 0
36700102 0
36700104 0
36700105 0
36700106 0
36700108 0
36700109 0
36700112 0
36700113 0
36700114 0
36700116 0
36700118 0
36700119 0
36700120 0
36700121 0
36700122 0
36700124 0
36700125 0
36700127 0
36700129 0
36700131 0
36700133 0
36700134 0
36700135 0
36700136 0
36700138 0
36700139 0
36700141 0
36700142 0
36700144 0
36700145 0
36700146 0
36700148 0
36700150 0
36700152 0
36700153 0
#「美树沙耶香」系列 - Laibill
60152901 0
60152902 0
......
No preview for this file type
......@@ -111,7 +111,8 @@ end
function c10200013.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.GetFieldGroupCount(tp,1,LOCATION_HAND)>0
and Duel.GetFieldGroupCount(1-tp,LOCATION_ONFIELD,0)>0
and Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,2,0,LOCATION_ONFIELD+LOCATION_HAND)
end
......
-- 渊灵归墟
function c10200022.initial_effect(c)
-- Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
-- 效果无效
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200022,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c10200022.con1)
e2:SetTarget(c10200022.tg1)
e2:SetOperation(c10200022.op1)
c:RegisterEffect(e2)
-- Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
-- 效果无效
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200022,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c10200022.con1)
e2:SetTarget(c10200022.tg1)
e2:SetOperation(c10200022.op1)
c:RegisterEffect(e2)
-- 遗言回收
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10200022,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetTarget(c10200022.tg2)
e3:SetOperation(c10200022.op2)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10200022,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetTarget(c10200022.tg2)
e3:SetOperation(c10200022.op2)
c:RegisterEffect(e3)
end
-- 1
function c10200022.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsSetCard(0xe21) end, tp, LOCATION_EXTRA, 0, 1, nil)
and ep==1-tp and Duel.IsChainDisablable(ev)
return Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsSetCard(0xe21) end,tp,LOCATION_EXTRA,0,1,nil)
and ep==1-tp and Duel.IsChainDisablable(ev)
end
function c10200022.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if not Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsSetCard(0xe21) end, tp, LOCATION_EXTRA, 0, 1, nil) then
return false
end
if chk==0 then
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,nil,0xe21)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_PZONE,0,1,1,nil,0xe21)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,nil,0xe21) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_PZONE)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c10200022.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsOnField() then
Duel.Destroy(tc,REASON_EFFECT)
end
if Duel.NegateEffect(ev) then
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_PZONE,0,1,1,nil,0xe21)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
if Duel.NegateEffect(ev) then end
end
end
-- 2
function c10200022.filter2(c)
return c:IsFaceup() and c:IsSetCard(0xe21) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsFaceup() and c:IsSetCard(0xe21) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c10200022.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200022.filter2,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
if chk==0 then return Duel.IsExistingMatchingCard(c10200022.filter2,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
end
function c10200022.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200022.filter2,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200022.filter2,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end
end
\ No newline at end of file
......@@ -3,7 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TODECK+CATEGORY_REMOVE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
......@@ -22,20 +22,20 @@ function s.initial_effect(c)
end
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsLocation(LOCATION_HAND) then
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if bit.band(loc,LOCATION_HAND)~=0 and Duel.GetFlagEffect(rp,id)==0 then
Duel.RegisterFlagEffect(rp,id,RESET_PHASE+PHASE_END,0,1)
end
if rc:IsLocation(LOCATION_DECK) then
if bit.band(loc,LOCATION_DECK)~=0 and Duel.GetFlagEffect(rp,id+1)==0 then
Duel.RegisterFlagEffect(rp,id+1,RESET_PHASE+PHASE_END,0,1)
end
if rc:IsLocation(LOCATION_ONFIELD) then
if bit.band(loc,LOCATION_ONFIELD)~=0 and Duel.GetFlagEffect(rp,id+2)==0 then
Duel.RegisterFlagEffect(rp,id+2,RESET_PHASE+PHASE_END,0,1)
end
if rc:IsLocation(LOCATION_GRAVE) then
if bit.band(loc,LOCATION_GRAVE)~=0 and Duel.GetFlagEffect(rp,id+3)==0 then
Duel.RegisterFlagEffect(rp,id+3,RESET_PHASE+PHASE_END,0,1)
end
if rc:IsLocation(LOCATION_REMOVED) then
if bit.band(loc,LOCATION_REMOVED)~=0 and Duel.GetFlagEffect(rp,id+4)==0 then
Duel.RegisterFlagEffect(rp,id+4,RESET_PHASE+PHASE_END,0,1)
end
end
......@@ -94,11 +94,12 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if #mg7>0 and Duel.GetFlagEffect(1-tp,id+4)>0 then
mg1:Merge(mg7)
end
if not c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) and c:IsCanBeFusionMaterial()
local ge=c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT)
if not ge and c:IsCanBeFusionMaterial()
and c:IsAbleToRemove() and Duel.GetFlagEffect(1-tp,id+3)>0 then
mg1:AddCard(c)
end
if c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) and c:IsCanBeFusionMaterial()
if ge and ge:GetValue()&LOCATION_REMOVED and c:IsCanBeFusionMaterial()
and c:IsAbleToDeck() and Duel.GetFlagEffect(1-tp,id+4)>0 then
mg1:AddCard(c)
end
......@@ -171,7 +172,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Auxiliary.FCheckAdditional=nil
Auxiliary.GCheckAdditional=nil
tc:SetMaterial(mat1)
local gmat=mat1:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_MZONE)
local gmat=mat1:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_MZONE+LOCATION_DECK)
local rmat=mat1:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
local dmat=mat1:Filter(Card.IsLocation,nil,LOCATION_REMOVED)
if #gmat>0 then Duel.SendtoGrave(gmat,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) end
......
......@@ -55,7 +55,7 @@ end
function c29065502.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) or (Duel.IsExistingMatchingCard(c29065502.amyfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c29065502.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)) end
if Duel.IsExistingMatchingCard(c29065502.ffilter,tp,LOCATION_MZONE,0,1,nil) then
if Duel.IsExistingMatchingCard(c29065502.amyfilter,tp,LOCATION_MZONE,0,1,nil) then
e:SetLabel(100)
if not Duel.IsPlayerCanDraw(tp,1) then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
......
......@@ -60,12 +60,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e12)
end
function c29065510.lvtg(e,c)
return c:IsRankAbove(1) and c:IsSetCard(0x87af)
return c:IsLevelAbove(1) and c:IsSetCard(0x87af)
end
function c29065510.lvval(e,c,rc)
if rc:IsSetCard(0x87af) then
return c:GetRank()
end
local lv=c:GetLevel()
if rc:IsSetCard(0x87af) then return rc:GetRank()+lv*0x10000
else return lv end
end
-------------------------------------------------
function cm.stf(c)
......
......@@ -44,10 +44,10 @@ function s.spsop(e,tp,eg,ep,ev,re,r,rp,c)
c:RegisterEffect(e1,true)
end
function s.spfilter(c,e,tp)
return not c:IsCode(id) and c:IsSetCard(0x5569) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return not c:IsCode(id) and c:IsSetCard(0x569) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.spfilter2(c,e,tp)
return c:IsFaceupEx() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(0x5569) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsFaceupEx() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(0x569) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -82,15 +82,7 @@ function s.op2(e,tp,eg,ep,ev,re,r,rp)
local lp_diff=math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))
if lp_diff>=2000 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
......
......@@ -73,15 +73,7 @@ function s.op2(e,tp,eg,ep,ev,re,r,rp)
local lp_diff=math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))
if lp_diff>=2000 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
......
......@@ -72,7 +72,7 @@ function s.lrop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,ev,REASON_EFFECT)
end
function s.cond3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_DECK,0,1,nil)
......
--skip-咖啡饮用
function c36700100.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,36700100)
e1:SetTarget(c36700100.target)
e1:SetOperation(c36700100.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,36700101)
e2:SetCondition(c36700100.thcon)
e2:SetTarget(c36700100.thtg)
e2:SetOperation(c36700100.thop)
c:RegisterEffect(e2)
if not c36700100.global_check then
c36700100.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(c36700100.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c36700100.checkfilter(c,tp)
return c:IsType(TYPE_FUSION) and c:IsControler(tp)
end
function c36700100.checkop(e,tp,eg,ep,ev,re,r,rp)
for p=0,1 do
if eg:IsExists(c36700100.checkfilter,1,nil,p) then Duel.RegisterFlagEffect(p,36700100,RESET_PHASE+PHASE_END,0,1) end
end
end
function c36700100.tgfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c36700100.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36700100.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c36700100.spfilter(c,e,tp,code)
return c:IsSetCard(0xc22) and not c:IsCode(code) and c:IsFaceupEx() and aux.NecroValleyFilter()(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c36700100.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,c36700100.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
local b1=tc:IsLevelAbove(1)
local b2=tc:IsAttackAbove(1) or tc:IsDefenseAbove(1)
local b3=Duel.IsExistingMatchingCard(c36700100.spfilter,tp,0x32,0,1,nil,e,tp,tc:GetCode()) and Duel.GetMZoneCount(tp)>0
local b4=true
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(36700100,0)},
{b2,aux.Stringid(36700100,1)},
{b3,aux.Stringid(36700100,2)},
{b4,aux.Stringid(36700100,3)})
if op~=4 then Duel.BreakEffect() end
if op==1 then
Duel.Damage(1-tp,tc:GetLevel()*100,REASON_EFFECT)
elseif op==2 then
Duel.Recover(tp,math.max(tc:GetAttack(),tc:GetDefense()),REASON_EFFECT)
elseif op==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c36700100.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function c36700100.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,36700100)>0 and Duel.GetCurrentPhase()==PHASE_END
end
function c36700100.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() or c:IsSSetable() end
end
function c36700100.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsAbleToHand() and (not c:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
else
Duel.SSet(tp,c)
end
end
--skip-飞世优马
function c36700102.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(1152)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,36700102)
e1:SetCondition(c36700102.spcon)
e1:SetTarget(c36700102.sptg)
e1:SetOperation(c36700102.spop)
c:RegisterEffect(e1)
--move
local e2=Effect.CreateEffect(c)
e2:SetHintTiming(TIMING_MAIN_END)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c36700102.seqcon)
e2:SetTarget(c36700102.seqtg)
e2:SetOperation(c36700102.seqop)
c:RegisterEffect(e2)
end
function c36700102.chkfilter(c)
return c:IsSetCard(0xc22) and c:IsFaceup()
end
function c36700102.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c36700102.chkfilter,tp,LOCATION_ONFIELD,0,1,nil)
or Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c36700102.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c36700102.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c36700102.seqcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c36700102.chfilter(c)
return c:GetSequence()<5
end
function c36700102.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
or Duel.IsExistingMatchingCard(c36700102.chfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c36700102.thfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c36700102.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or not c:IsControler(tp) then return end
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
local b2=Duel.IsExistingMatchingCard(c36700102.chfilter,tp,LOCATION_MZONE,0,1,nil)
if not (b1 or b2) then return end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(36700102,0)},
{b2,aux.Stringid(36700102,1)})
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
local seq=math.log(fd,2)
Duel.MoveSequence(c,seq)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,c36700102.chfilter,tp,LOCATION_MZONE,0,1,1,c):GetFirst()
Duel.HintSelection(Group.FromCards(tc))
Duel.SwapSequence(c,tc)
end
local s1=(c:GetSequence()==0 or c:GetSequence()==4) and Duel.IsExistingMatchingCard(c36700102.thfilter,tp,LOCATION_DECK,0,1,nil)
local s2=c:GetSequence()==2 and Duel.IsPlayerCanDraw(tp,1)
local s3=(c:GetSequence()==1 or c:GetSequence()==3) and c36700102.fsptg(e,tp,eg,ep,ev,re,r,rp,0)
if s1 and Duel.SelectYesNo(tp,aux.Stringid(36700102,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c36700102.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
elseif s2 and Duel.SelectYesNo(tp,aux.Stringid(36700102,2)) then
Duel.Draw(tp,1,REASON_EFFECT)
elseif s3 and Duel.SelectYesNo(tp,aux.Stringid(36700102,2)) then
c36700102.fspop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c36700102.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c36700102.filter2(c,e,tp,m,f,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,nil,chkf)
end
function c36700102.fcheck(tp,sg,fc)
return sg:IsExists(Card.IsSetCard,1,nil,0xc22)
end
function c36700102.fsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
aux.FCheckAdditional=c36700102.fcheck
local res=Duel.IsExistingMatchingCard(c36700102.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
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(c36700102.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
--Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c36700102.fspop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c36700102.filter1,nil,e)
aux.FCheckAdditional=c36700102.fcheck
local sg1=Duel.GetMatchingGroup(c36700102.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
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(c36700102.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or ce and not Duel.SelectYesNo(tp,ce:GetDescription())) then
aux.FCheckAdditional=c36700102.fcheck
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
aux.FCheckAdditional=nil
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
elseif ce then
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--skip-石堂柊
function c36700104.initial_effect(c)
--act limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_TRIGGER)
e0:SetRange(LOCATION_MZONE)
e0:SetTargetRange(0,LOCATION_ONFIELD)
e0:SetCondition(c36700104.accon)
e0:SetTarget(c36700104.actg)
e0:SetValue(1)
c:RegisterEffect(e0)
--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:SetCountLimit(1,36700104+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c36700104.hspcon)
e1:SetOperation(c36700104.hspop)
e1:SetValue(c36700104.hspval)
c:RegisterEffect(e1)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(36700104,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,36700104)
e3:SetCondition(c36700104.thcon)
e3:SetTarget(c36700104.thtg)
e3:SetOperation(c36700104.thop)
c:RegisterEffect(e3)
end
function c36700104.accon(e)
local race=e:GetHandler():GetSpecialSummonInfo(SUMMON_INFO_RACE)
return e:GetHandler():IsSummonType(SUMMON_VALUE_SELF) or race&RACE_WARRIOR~=0
end
function c36700104.acfilter(c,p)
return c:IsSetCard(0xc22) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsControler(1-p)
end
function c36700104.actg(e,c)
local g=c:GetColumnGroup()
return c:IsFaceup() and g:IsExists(c36700104.acfilter,1,nil,c:GetControler())
end
function c36700104.cfilter(c)
return c:IsSetCard(0xc22) and c:IsFaceup()
end
function c36700104.getzone(tp)
local zone=0
local g=Duel.GetMatchingGroup(c36700104.cfilter,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local seq=tc:GetSequence()
if seq==5 or seq==6 then
zone=zone|(1<<aux.MZoneSequence(seq))
else
if seq>0 then zone=zone|(1<<(seq-1)) end
if seq<4 then zone=zone|(1<<(seq+1)) end
end
end
return zone
end
function c36700104.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=c36700104.getzone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c36700104.hspop(e,tp,eg,ep,ev,re,r,rp,c)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(36700104,0))
end
function c36700104.hspval(e,c)
local tp=c:GetControler()
return SUMMON_VALUE_SELF,c36700104.getzone(tp)
end
function c36700104.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0xc22)
end
function c36700104.spfilter(c,e,tp)
return c:IsSetCard(0xc22) and c:IsType(TYPE_MONSTER) and c:IsFaceupEx()
and (c:IsAbleToHand() or (Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c36700104.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(0x30) and chkc:IsControler(tp) and c36700104.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c36700104.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c36700104.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
end
function c36700104.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if aux.NecroValleyNegateCheck(tc) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
--skip-夏目凛
function c36700105.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:SetCountLimit(1,36700105+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c36700105.hspcon)
e1:SetValue(c36700105.hspval)
c:RegisterEffect(e1)
--check and set
local e2=Effect.CreateEffect(c)
e2:SetHintTiming(TIMING_MAIN_END)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,36700105)
e2:SetCondition(c36700105.setcon)
e2:SetTarget(c36700105.settg)
e2:SetOperation(c36700105.setop)
c:RegisterEffect(e2)
end
function c36700105.cfilter(c)
return c:IsSetCard(0xc22) and c:IsFaceup()
end
function c36700105.getzone(tp)
local zone=0
local g=Duel.GetMatchingGroup(c36700105.cfilter,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local seq=tc:GetSequence()
if seq==5 or seq==6 then
zone=zone|(1<<aux.MZoneSequence(seq))
else
if seq>0 then zone=zone|(1<<(seq-1)) end
if seq<4 then zone=zone|(1<<(seq+1)) end
end
end
return zone
end
function c36700105.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=c36700105.getzone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c36700105.hspval(e,c)
local tp=c:GetControler()
return 0,c36700105.getzone(tp)
end
function c36700105.setcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c36700105.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5
or Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>=5 end
end
function c36700105.thfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsAbleToHand() or c:IsSSetable())
end
function c36700105.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(0,LOCATION_DECK,0)<5 and Duel.GetFieldGroupCount(0,0,LOCATION_DECK)<5 then return end
if Duel.GetFieldGroupCount(0,LOCATION_DECK,0)>=5 and Duel.GetFieldGroupCount(0,0,LOCATION_DECK)>=5 then
local st=Duel.SelectOption(tp,aux.Stringid(36700105,0),aux.Stringid(36700105,1))
if st==0 then Duel.SortDecktop(tp,tp,5) else Duel.SortDecktop(tp,1-tp,5) end
elseif Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 then
Duel.SortDecktop(tp,tp,5)
elseif Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>=5 then
Duel.SortDecktop(tp,1-tp,5)
end
if Duel.IsExistingMatchingCard(c36700105.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 and Duel.SelectYesNo(tp,aux.Stringid(36700105,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
local ac=Duel.AnnounceType(tp)
Duel.ConfirmDecktop(1-tp,1)
local g=Duel.GetDecktopGroup(1-tp,1)
local cc=g:GetFirst()
if not ((ac==0 and cc:IsType(TYPE_MONSTER)) or (ac==1 and cc:IsType(TYPE_SPELL)) or (ac==2 and cc:IsType(TYPE_TRAP))) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,c36700105.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SSet(tp,tc)
end
end
end
end
--skip-悠比
function c36700106.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:SetCountLimit(1,36700106+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c36700106.hspcon)
e1:SetValue(c36700106.hspval)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,36700106)
e2:SetTarget(c36700106.thtg)
e2:SetOperation(c36700106.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,36700107)
e4:SetTarget(c36700106.sptg)
e4:SetOperation(c36700106.spop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_REMOVE)
c:RegisterEffect(e5)
end
function c36700106.cfilter(c)
return c:IsSetCard(0xc22) and c:IsFaceup()
end
function c36700106.getzone(tp)
local zone=0
local g=Duel.GetMatchingGroup(c36700106.cfilter,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local seq=tc:GetSequence()
if seq==5 or seq==6 then
zone=zone|(1<<aux.MZoneSequence(seq))
else
if seq>0 then zone=zone|(1<<(seq-1)) end
if seq<4 then zone=zone|(1<<(seq+1)) end
end
end
return zone
end
function c36700106.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=c36700106.getzone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c36700106.hspval(e,c)
local tp=c:GetControler()
return 0,c36700106.getzone(tp)
end
function c36700106.thfilter(c)
if not (c:IsSetCard(0xc22) and c:IsType(TYPE_SPELL+TYPE_TRAP)) then return false end
return c:IsAbleToHand() or c:IsSSetable()
end
function c36700106.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36700106.thfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c36700106.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,c36700106.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SSet(tp,tc)
end
end
end
function c36700106.spfilter(c,e,tp)
return c:IsSetCard(0xc22) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c36700106.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c36700106.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c36700106.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c36700106.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
--skip-悠
function c36700108.initial_effect(c)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,36700108+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c36700108.sprcon)
e1:SetOperation(c36700108.sprop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c36700108.descon1)
e2:SetCost(c36700108.descost)
e2:SetTarget(c36700108.destg)
e2:SetOperation(c36700108.desop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(c36700108.descon2)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(c36700108.thcost)
e4:SetTarget(c36700108.thtg)
e4:SetOperation(c36700108.thop)
c:RegisterEffect(e4)
end
function c36700108.spfilter(c,tp)
return c:IsSetCard(0xc22) and c:IsType(TYPE_MONSTER) and c:IsFaceupEx() and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function c36700108.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c36700108.spfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,c,tp)
end
function c36700108.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c36700108.spfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,c,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c36700108.descon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp
end
function c36700108.descon2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE
end
function c36700108.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c36700108.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttacker()
if chk==0 then return (tc and tc:IsRelateToBattle()) or (re and re:GetHandler():IsRelateToEffect(re)) end
if not tc then tc=re:GetHandler() end
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
function c36700108.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
local atk=tc:GetBaseAttack()
if atk>0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
end
function c36700108.cfilter(c,e,tp)
return c:IsSetCard(0xc22) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingTarget(c36700108.thfilter,tp,LOCATION_GRAVE,0,1,c,e,tp)
end
function c36700108.thfilter(c,e,tp)
return c:IsSetCard(0xc22) and c:IsType(TYPE_MONSTER)
and (c:IsAbleToHand() and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c36700108.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c36700108.cfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c36700108.cfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c36700108.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c36700108.thfilter(chkc,e,tp) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c36700108.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
end
function c36700108.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if aux.NecroValleyNegateCheck(tc) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
--skip的同伴-亚刻
function c36700109.initial_effect(c)
--spsummon-self
local e1=Effect.CreateEffect(c)
e1:SetDescription(1152)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,36700109)
e1:SetCondition(c36700109.sscon1)
e1:SetTarget(c36700109.sstg)
e1:SetOperation(c36700109.ssop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c36700109.sscon2)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,36700110)
e3:SetTarget(c36700109.thtg)
e3:SetOperation(c36700109.thop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--spsummon-other
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e5:SetCountLimit(1,36700111)
e5:SetCondition(c36700109.spcon)
e5:SetTarget(c36700109.sptg)
e5:SetOperation(c36700109.spop)
c:RegisterEffect(e5)
end
function c36700109.sscon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c36700109.sscon2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c36700109.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c36700109.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c36700109.efilter)
e2:SetOwnerPlayer(tp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function c36700109.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c36700109.thfilter(c)
return c:IsSetCard(0xc22) and c:IsAbleToHand()
end
function c36700109.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36700109.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c36700109.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c36700109.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c36700109.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and bit.band(r,REASON_EFFECT+REASON_FUSION+REASON_LINK)~=0
end
function c36700109.spfilter(c,e,tp)
return not c:IsCode(36700109) and c:IsSetCard(0xc22) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c36700109.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c36700109.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(c36700109.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c36700109.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c36700109.spop(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 c36700112.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:SetCountLimit(1,36700112+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c36700112.hspcon)
e1:SetValue(c36700112.hspval)
c:RegisterEffect(e1)
--select
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetTarget(c36700112.target)
e2:SetOperation(c36700112.operation)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCountLimit(1,36700112)
e3:SetCondition(c36700112.drcon)
e3:SetTarget(c36700112.drtg)
e3:SetOperation(c36700112.drop)
c:RegisterEffect(e3)
end
function c36700112.cfilter(c)
return c:IsSetCard(0xc22) and c:IsFaceup()
end
function c36700112.getzone(tp)
local zone=0
local g=Duel.GetMatchingGroup(c36700112.cfilter,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local seq=tc:GetSequence()
if seq==5 or seq==6 then
zone=zone|(1<<aux.MZoneSequence(seq))
else
if seq>0 then zone=zone|(1<<(seq-1)) end
if seq<4 then zone=zone|(1<<(seq+1)) end
end
end
return zone
end
function c36700112.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=c36700112.getzone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c36700112.hspval(e,c)
local tp=c:GetControler()
return 0,c36700112.getzone(tp)
end
function c36700112.tfilter(c)
return c:IsSetCard(0xc22) and c:IsFaceup()
end
function c36700112.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c36700112.tfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c36700112.tfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c36700112.tfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c36700112.tgfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c36700112.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
local b1=true
local b2=Duel.IsExistingMatchingCard(c36700112.tgfilter,tp,LOCATION_DECK,0,1,nil)
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(36700112,0)},
{b2,aux.Stringid(36700112,1)})
if op==1 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=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e2)
elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local gc=Duel.SelectMatchingCard(tp,c36700112.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if not gc or Duel.SendtoGrave(gc,REASON_EFFECT)==0 or not gc:IsLocation(LOCATION_GRAVE) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_FUSION_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(gc:GetCode())
tc:RegisterEffect(e1)
end
end
function c36700112.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and bit.band(r,REASON_FUSION+REASON_LINK)~=0
end
function c36700112.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c36700112.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==2 then
Duel.ShuffleHand(p)
Duel.BreakEffect()
Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--arc觉醒器
function c36700113.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c36700113.target)
e1:SetOperation(c36700113.activate)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,36700113)
e2:SetCost(c36700113.thcost)
e2:SetTarget(c36700113.thtg)
e2:SetOperation(c36700113.thop)
c:RegisterEffect(e2)
end
function c36700113.mfilter(c,e)
return not c:IsImmuneToEffect(e)
end
function c36700113.ffilter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c36700113.target(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetFusionMaterial(tp)
if chk==0 then return Duel.IsExistingMatchingCard(c36700113.ffilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and #mg>=2 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c36700113.tgfilter(c,atk)
return c:IsAttackBelow(atk) and c:IsFaceup() and c:IsAbleToGrave()
end
function c36700113.activate(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetFusionMaterial(tp):Filter(c36700113.mfilter,nil,e)
if #mg<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c36700113.ffilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local mat=mg:Select(tp,2,#mg,nil)
tc:SetMaterial(mat)
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
if mat:IsExists(Card.IsSetCard,1,nil,0xc22) then
local g=Duel.GetMatchingGroup(c36700113.tgfilter,tp,0,LOCATION_MZONE,nil,tc:GetAttack())
if #g==0 then return end
Duel.BreakEffect()
if Duel.SendtoGrave(g,REASON_EFFECT)==0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(#g*500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
else
Duel.BreakEffect()
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:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(36700113,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetLabel(fid)
e3:SetLabelObject(tc)
e3:SetCondition(c36700113.descon)
e3:SetOperation(c36700113.desop)
e3:SetCountLimit(1)
Duel.RegisterEffect(e3,tp)
end
end
function c36700113.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(36700113)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end
function c36700113.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
function c36700113.costfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c36700113.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36700113.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c36700113.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c36700113.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c36700113.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
--arc光现
function c36700114.initial_effect(c)
--change code
aux.EnableChangeCode(c,36700113,LOCATION_SZONE+LOCATION_DECK)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--spsummon-deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(36700114,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,36700114)
e1:SetCondition(c36700114.dspcon)
e1:SetTarget(c36700114.dsptg)
e1:SetOperation(c36700114.dspop)
c:RegisterEffect(e1)
--spsummon-grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(36700114,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_DECK)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,36700115)
e2:SetCondition(c36700114.gspcon)
e2:SetTarget(c36700114.gsptg)
e2:SetOperation(c36700114.gspop)
c:RegisterEffect(e2)
end
function c36700114.dspconfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED)
and (c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousSetCard(0xc22)
or not c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsSetCard(0xc22))
end
function c36700114.dspcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_FUSION and eg:IsExists(c36700114.dspconfilter,1,nil,tp)
end
function c36700114.dspfilter(c,e,tp)
return c:IsSetCard(0xc22) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c36700114.dsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c36700114.dspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c36700114.dspop(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,c36700114.dspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c36700114.gspconfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xc22) and c:IsPreviousControler(tp) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c36700114.gspcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c36700114.gspconfilter,1,nil,tp)
end
function c36700114.gspfilter(c,e,tp)
return c:IsSetCard(0xc22) and c:IsFaceupEx() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c36700114.gsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c36700114.gspfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c36700114.gspop(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,c36700114.gspfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--arc魔方切换
function c36700116.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,36700116)
e1:SetTarget(c36700116.sptg)
e1:SetOperation(c36700116.spop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,36700117)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c36700116.drtg)
e2:SetOperation(c36700116.drop)
c:RegisterEffect(e2)
end
function c36700116.tdfilter(c,e,tp)
return c:IsSetCard(0xc22) and c:IsFaceup() and c:IsAbleToDeck()
and Duel.IsExistingMatchingCard(c36700116.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c36700116.spfilter(c,e,tp,tc)
return c:IsSetCard(0xc22) and not c:IsCode(tc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,tc)>0 or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0)
end
function c36700116.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36700116.tdfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c36700116.chkfilter(c)
return c:IsCode(36700102,36700109) and c:IsFaceupEx()
end
function c36700116.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectMatchingCard(tp,c36700116.tdfilter,tp,LOCATION_MZONE+LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if not tc then return end
Duel.HintSelection(Group.FromCards(tc))
if Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c36700116.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc):GetFirst()
if not sc then return end
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
if Duel.IsExistingMatchingCard(c36700116.chkfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) then return end
sc:RegisterFlagEffect(36700116,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCountLimit(1)
e3:SetLabelObject(sc)
e3:SetCondition(c36700116.descon)
e3:SetOperation(c36700116.desop)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_ATTACK)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e4,true)
end
end
function c36700116.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(36700116)~=0 then
return true
else
e:Reset()
return false
end
end
function c36700116.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
function c36700116.tfilter(c)
return c:IsSetCard(0xc22) and c:IsAbleToDeck()
end
function c36700116.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not Duel.IsPlayerCanDraw(tp,1) then return false end
local g=Duel.GetMatchingGroup(c36700116.tfilter,tp,LOCATION_GRAVE,0,e:GetHandler())
return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsType,TYPE_MONSTER,TYPE_SPELL+TYPE_TRAP)
end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c36700116.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c36700116.tfilter),tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsType,TYPE_MONSTER,TYPE_SPELL+TYPE_TRAP)
if sg and Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup()
if not og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then return end
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--释放你的想象力吧!
function c36700118.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES+CATEGORY_DRAW+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c36700118.condition)
e1:SetCost(c36700118.cost)
e1:SetTarget(c36700118.target)
e1:SetOperation(c36700118.activate)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,36700118)
e2:SetCost(c36700118.thcost)
e2:SetTarget(c36700118.thtg)
e2:SetOperation(c36700118.thop)
c:RegisterEffect(e2)
end
function c36700118.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c36700118.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c36700118.spfilter(c,e,tp)
return c:IsSetCard(0xc22) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c36700118.tgfilter(c)
return c:IsSetCard(0xc22) and c:IsAbleToGrave()
end
function c36700118.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetMatchingGroup(c36700118.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,e:GetHandler())
local b1=Duel.IsExistingMatchingCard(c36700118.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0
local b2=tg:CheckSubGroup(aux.gfcheck,2,2,Card.IsLocation,LOCATION_HAND,LOCATION_DECK) and Duel.IsPlayerCanDraw(tp,2) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3
local b3=Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0xc22)
if chk==0 then return b1 or b2 or b3 end
end
function c36700118.activate(e,tp,eg,ep,ev,re,r,rp)
--select
local tg=Duel.GetMatchingGroup(c36700118.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,e:GetHandler())
local b1=Duel.IsExistingMatchingCard(c36700118.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.GetMZoneCount(tp)>0
local b2=tg:CheckSubGroup(aux.gfcheck,2,2,Card.IsLocation,LOCATION_HAND,LOCATION_DECK)
and Duel.IsPlayerCanDraw(tp,2) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3
local b3=Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0xc22)
local op=aux.SelectFromOptions(tp,
{b1,1152},
{b2,1191},
{b3,1190})
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c36700118.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=tg:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsLocation,LOCATION_HAND,LOCATION_DECK)
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
elseif op==3 then
Duel.Damage(1-tp,500,REASON_EFFECT)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_DECK,0,nil,0xc22)
local dct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local seq=-1
local hc
for tc in aux.Next(g) do
local sq=tc:GetSequence()
if sq>seq then
seq=sq
hc=tc
end
end
Duel.BreakEffect()
if seq>-1 then
Duel.ConfirmDecktop(tp,dct-seq)
Duel.DisableShuffleCheck()
if hc:IsAbleToHand() then
Duel.SendtoHand(hc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hc)
Duel.ShuffleHand(tp)
else
Duel.SendtoGrave(hc,REASON_RULE)
end
else
Duel.ConfirmDecktop(tp,dct)
end
if dct-seq>1 then Duel.ShuffleDeck(tp) end
end
end
function c36700118.costfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c36700118.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36700118.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c36700118.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c36700118.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c36700118.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
--arc-泰拉光弹
function c36700119.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c36700119.condition)
e1:SetTarget(c36700119.target)
e1:SetOperation(c36700119.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,36700119)
e2:SetCondition(c36700119.thcon)
e2:SetTarget(c36700119.thtg)
e2:SetOperation(c36700119.thop)
c:RegisterEffect(e2)
if not c36700119.global_check then
c36700119.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(c36700119.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c36700119.checkfilter(c,tp)
return c:IsType(TYPE_FUSION) and c:IsControler(tp)
end
function c36700119.checkop(e,tp,eg,ep,ev,re,r,rp)
for p=0,1 do
if eg:IsExists(c36700119.checkfilter,1,nil,p) then Duel.RegisterFlagEffect(p,36700119,RESET_PHASE+PHASE_END,0,1) end
end
end
function c36700119.chkfilter(c)
return c:IsSetCard(0xc22) and c:GetSequence()<5
end
function c36700119.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c36700119.chkfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c36700119.cfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_FUSION) and c:IsFaceupEx()
end
function c36700119.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if Duel.GetMatchingGroupCount(c36700119.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)>=1 then
e:SetCategory(CATEGORY_DISABLE+CATEGORY_CONTROL)
end
end
function c36700119.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
Duel.AdjustInstantly()
if Duel.GetMatchingGroupCount(c36700119.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)>=1
and tc:IsDisabled() and tc:IsControler(1-tp) and tc:IsControlerCanBeChanged()
and Duel.SelectYesNo(tp,aux.Stringid(36700119,0)) then
Duel.BreakEffect()
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
end
function c36700119.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,36700119)>0 and Duel.GetCurrentPhase()==PHASE_END
end
function c36700119.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() or c:IsSSetable() end
end
function c36700119.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsAbleToHand() and (not c:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
else
Duel.SSet(tp,c)
end
end
--arc-艾可萨光轮
function c36700120.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c36700120.condition)
e1:SetTarget(c36700120.target)
e1:SetOperation(c36700120.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,36700120)
e2:SetCondition(c36700120.thcon)
e2:SetTarget(c36700120.thtg)
e2:SetOperation(c36700120.thop)
c:RegisterEffect(e2)
if not c36700120.global_check then
c36700120.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(c36700120.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c36700120.checkfilter(c,tp)
return c:IsType(TYPE_FUSION) and c:IsControler(tp)
end
function c36700120.checkop(e,tp,eg,ep,ev,re,r,rp)
for p=0,1 do
if eg:IsExists(c36700120.checkfilter,1,nil,p) then Duel.RegisterFlagEffect(p,36700120,RESET_PHASE+PHASE_END,0,1) end
end
end
function c36700120.chkfilter(c)
return c:IsSetCard(0xc22) and c:GetSequence()<5
end
function c36700120.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c36700120.chkfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c36700120.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c36700120.cfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_FUSION) and c:IsFaceupEx()
end
function c36700120.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then
local dg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),TYPE_SPELL+TYPE_TRAP)
if #dg>0 and Duel.GetMatchingGroupCount(c36700120.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)>=1 and Duel.SelectYesNo(tp,aux.Stringid(36700120,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=dg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
end
end
function c36700120.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,36700120)>0 and Duel.GetCurrentPhase()==PHASE_END
end
function c36700120.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() or c:IsSSetable() end
end
function c36700120.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsAbleToHand() and (not c:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
else
Duel.SSet(tp,c)
end
end
--arc-究极屏障
function c36700121.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c36700121.condition)
e1:SetTarget(c36700121.target)
e1:SetOperation(c36700121.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,36700121)
e2:SetCondition(c36700121.thcon)
e2:SetTarget(c36700121.thtg)
e2:SetOperation(c36700121.thop)
c:RegisterEffect(e2)
if not c36700121.global_check then
c36700121.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(c36700121.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c36700121.checkfilter(c,tp)
return c:IsType(TYPE_FUSION) and c:IsControler(tp)
end
function c36700121.checkop(e,tp,eg,ep,ev,re,r,rp)
for p=0,1 do
if eg:IsExists(c36700121.checkfilter,1,nil,p) then Duel.RegisterFlagEffect(p,36700121,RESET_PHASE+PHASE_END,0,1) end
end
end
function c36700121.chkfilter(c)
return c:IsSetCard(0xc22) and c:GetSequence()<5
end
function c36700121.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c36700121.chkfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c36700121.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c36700121.cfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_FUSION) and c:IsFaceupEx()
end
function c36700121.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local ct=Duel.GetTurnPlayer()==1-tp and 2 or 1
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,ct)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e2)
local dg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if #dg>0 and Duel.GetMatchingGroupCount(c36700121.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)>=1 and Duel.SelectYesNo(tp,aux.Stringid(36700121,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=dg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT,LOCATION_REMOVED)
end
end
end
function c36700121.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,36700121)>0 and Duel.GetCurrentPhase()==PHASE_END
end
function c36700121.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() or c:IsSSetable() end
end
function c36700121.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsAbleToHand() and (not c:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
else
Duel.SSet(tp,c)
end
end
--亚刻最终升华光线
function c36700122.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,36700122)
e1:SetCondition(c36700122.condition)
e1:SetTarget(c36700122.target)
e1:SetOperation(c36700122.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,36700122)
e2:SetCondition(c36700122.spcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c36700122.sptg)
e2:SetOperation(c36700122.spop)
c:RegisterEffect(e2)
end
function c36700122.chkfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_FUSION) and c:IsFaceup()
end
function c36700122.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c36700122.chkfilter,tp,LOCATION_MZONE,0,1,nil) then return end
return ep==1-tp and Duel.IsChainDisablable(ev)
end
function c36700122.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c36700122.thfilter(c)
if not (c:IsSetCard(0xc22) and c:IsType(TYPE_SPELL+TYPE_TRAP)) then return false end
return c:IsAbleToHand() or c:IsSSetable()
end
function c36700122.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) then
if re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(c36700122.aclimit)
e1:SetLabelObject(re:GetHandler())
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
local b1=Duel.IsExistingMatchingCard(c36700122.thfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsPlayerCanDraw(tp,1)
local b3=true
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(36700122,0)},
{b2,aux.Stringid(36700122,1)},
{b3,aux.Stringid(36700122,2)})
if op~=3 then Duel.BreakEffect() end
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,c36700122.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc:IsAbleToHand() and (not tc:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SSet(tp,tc)
if tc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
elseif tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(e:GetHandler())
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)
tc:RegisterEffect(e1)
end
end
elseif op==2 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c36700122.aclimit(e,re,tp)
local c=re:GetHandler()
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c36700122.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c36700122.chkfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c36700122.spfilter(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0xc22) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c36700122.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c36700122.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c36700122.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c36700122.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if ft<=0 or #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
if #sg==0 then return end
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
end
--arc-你即是我 我即是你
function c36700124.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c36700124.fstg)
e1:SetOperation(c36700124.fsop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,36700124)
e2:SetCondition(c36700124.thcon)
e2:SetTarget(c36700124.thtg)
e2:SetOperation(c36700124.thop)
c:RegisterEffect(e2)
if not c36700124.global_check then
c36700124.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(c36700124.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c36700124.checkfilter(c,tp)
return c:IsType(TYPE_FUSION) and c:IsControler(tp)
end
function c36700124.checkop(e,tp,eg,ep,ev,re,r,rp)
for p=0,1 do
if eg:IsExists(c36700124.checkfilter,1,nil,p) then Duel.RegisterFlagEffect(p,36700124,RESET_PHASE+PHASE_END,0,1) end
end
end
function c36700124.fsfilter1(c,e)
return (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsType(TYPE_MONSTER)
and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function c36700124.fsfilter2(c,e,tp,m,chkf)
if not (c:IsType(TYPE_FUSION) and aux.IsMaterialListSetCard(c,0xc22)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) then return false end
aux.FCheckAdditional=c36700124.fscheck
local res=c:CheckFusionMaterial(m,nil,chkf,true)
aux.FCheckAdditional=nil
return res
end
function c36700124.fscheck(tp,sg,fc)
return sg:IsExists(Card.IsFusionSetCard,1,nil,0xc22)
end
function c36700124.fscfilter(c)
return c:IsLocation(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED) or (c:IsLocation(LOCATION_MZONE) and c:IsFacedown())
end
function c36700124.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp|0x200
local mg=Duel.GetMatchingGroup(c36700124.fsfilter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
return Duel.IsExistingMatchingCard(c36700124.fsfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,chkf) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c36700124.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp|0x200
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c36700124.fsfilter1),tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
local sg=Duel.GetMatchingGroup(c36700124.fsfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,chkf)
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
aux.FCheckAdditional=c36700124.fscheck
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf,true)
aux.FCheckAdditional=nil
local cf=mat:Filter(c36700124.fscfilter,nil)
if cf:GetCount()>0 then
Duel.ConfirmCards(1-tp,cf)
end
local ng=mat:Filter(Card.IsCode,nil,36700102,36700109)
aux.PlaceCardsOnDeckBottom(tp,mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
if ng:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c36700124.efilter)
e1:SetOwnerPlayer(tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
end
end
end
function c36700124.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c36700124.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,36700124)>0 and Duel.GetCurrentPhase()==PHASE_END
end
function c36700124.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() or c:IsSSetable() end
end
function c36700124.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local b1=c:IsAbleToHand()
local b2=c:IsSSetable()
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(36700124,1)},
{b2,aux.Stringid(36700124,2)})
if op==1 then
Duel.SendtoHand(c,nil,REASON_EFFECT)
else
Duel.SSet(tp,c)
end
end
--arc-目镜剑
function c36700125.initial_effect(c)
--equip limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_EQUIP_LIMIT)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetValue(c36700125.eqlimit)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c36700125.target)
e1:SetOperation(c36700125.operation)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_START)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c36700125.adcon)
e2:SetOperation(c36700125.adop)
c:RegisterEffect(e2)
--attack all
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_ATTACK_ALL)
e3:SetCondition(c36700125.atkcon)
e3:SetValue(1)
c:RegisterEffect(e3)
--cannot be target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetCondition(c36700125.atkcon)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
--search
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1,36700125)
e5:SetTarget(c36700125.sctg)
e5:SetOperation(c36700125.scop)
c:RegisterEffect(e5)
--to hand
local e6=Effect.CreateEffect(c)
e6:SetHintTiming(TIMING_END_PHASE)
e6:SetCategory(CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_GRAVE)
e6:SetCountLimit(1,36700126)
e6:SetCondition(c36700125.thcon)
e6:SetTarget(c36700125.thtg)
e6:SetOperation(c36700125.thop)
c:RegisterEffect(e6)
if not c36700125.global_check then
c36700125.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(c36700125.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c36700125.checkfilter(c,tp)
return c:IsType(TYPE_FUSION) and c:IsControler(tp)
end
function c36700125.checkop(e,tp,eg,ep,ev,re,r,rp)
for p=0,1 do
if eg:IsExists(c36700125.checkfilter,1,nil,p) then Duel.RegisterFlagEffect(p,36700125,RESET_PHASE+PHASE_END,0,1) end
end
end
function c36700125.eqlimit(e,c)
return c:IsSetCard(0xc22) and c:IsLevelAbove(5)
end
function c36700125.filter(c)
return c:IsFaceup() and c:IsSetCard(0xc22) and c:IsLevelAbove(5)
end
function c36700125.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c36700125.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c36700125.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c36700125.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c36700125.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
function c36700125.adcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
local bc=ec:GetBattleTarget()
return ec and bc and bc:IsFaceup() and bc:IsControler(1-tp) and c36700125.atkcon(e)
end
function c36700125.adop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
local bc=ec:GetBattleTarget()
if ec and bc and ec:IsFaceup() and bc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(bc:GetDefense())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_DAMAGE)
ec:RegisterEffect(e1)
end
end
function c36700125.atkcon(e)
return Duel.IsExistingMatchingCard(aux.TRUE,e:GetHandlerPlayer(),LOCATION_FZONE,0,1,nil)
end
function c36700125.thfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c36700125.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36700125.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c36700125.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c36700125.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
if tc:IsType(TYPE_FIELD) and not tc:IsForbidden() and tc:CheckUniqueOnField(tp) and Duel.SelectYesNo(tp,aux.Stringid(36700125,0)) then
Duel.BreakEffect()
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
end
end
function c36700125.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,36700125)>0 and Duel.GetCurrentPhase()==PHASE_END
end
function c36700125.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() or c:IsSSetable() end
end
function c36700125.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsAbleToHand() and (not c:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
else
Duel.SSet(tp,c)
end
end
--arc妙技
function c36700127.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,36700127)
e1:SetCost(c36700127.cost)
e1:SetTarget(c36700127.target)
e1:SetOperation(c36700127.activate)
c:RegisterEffect(e1)
--fusion summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,36700128)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c36700127.fstg)
e2:SetOperation(c36700127.fsop)
c:RegisterEffect(e2)
--check
Duel.AddCustomActivityCounter(36700127,ACTIVITY_CHAIN,aux.FilterBoolFunction(aux.NOT(Effect.IsActiveType),TYPE_MONSTER))
end
function c36700127.cost(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 c36700127.thfilter(c,sel)
return (sel~=2 and c:IsSetCard(0xc22) and c:IsType(TYPE_MONSTER) or sel~=1 and c:IsCode(36700113)) and c:IsAbleToHand()
end
function c36700127.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c36700127.thfilter,tp,LOCATION_DECK,0,nil,3)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,c36700127.thfilter,1,2) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c36700127.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c36700127.thfilter,tp,LOCATION_DECK,0,nil,3)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,c36700127.thfilter,1,2)
if #tg==0 then return end
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
if Duel.GetCustomActivityCount(36700127,1-tp,ACTIVITY_CHAIN)~=0 or Duel.GetLP(tp)<=4000 then
local b1=Duel.IsPlayerCanDraw(tp,2)
local b2=Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil)
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(36700127,0)},
{b2,aux.Stringid(36700127,1)},
{true,aux.Stringid(36700127,2)})
if op==1 then
Duel.Draw(tp,2,REASON_EFFECT)
elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.GetControl(g:GetFirst(),tp)
end
end
end
end
function c36700127.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c36700127.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c36700127.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c36700127.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c36700127.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c36700127.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c36700127.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c36700127.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c36700127.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
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.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--三重装甲分身
function c36700129.initial_effect(c)
--change code
aux.EnableChangeCode(c,36700113,LOCATION_SZONE+LOCATION_DECK)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--field effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0)
e1:SetTarget(c36700129.ffilter)
e1:SetValue(36700109)
c:RegisterEffect(e1)
--Draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,36700129)
e2:SetTarget(c36700129.fstg)
e2:SetOperation(c36700129.fsop)
c:RegisterEffect(e2)
--special summon & disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(1152)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,36700130)
e3:SetCondition(c36700129.spcon)
e3:SetTarget(c36700129.sptg)
e3:SetOperation(c36700129.spop)
c:RegisterEffect(e3)
end
function c36700129.ffilter(e,c)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xc22)
end
function c36700129.filter1(c,e)
return c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c36700129.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsLevelAbove(6) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c36700129.filter3(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c36700129.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c36700129.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c36700129.filter3,tp,LOCATION_GRAVE,0,nil,e)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c36700129.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(c36700129.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_HAND+LOCATION_GRAVE)
end
function c36700129.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
if Duel.GetCurrentPhase()&(PHASE_DAMAGE+PHASE_DAMAGE_CAL)~=0 then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(c36700129.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c36700129.filter3,tp,LOCATION_GRAVE,0,nil,e)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c36700129.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(c36700129.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
function c36700129.chkfilter(c,tp)
return c:IsPreviousSetCard(0xc22) and not c:IsType(TYPE_FUSION) and c:IsPreviousControler(tp)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
end
function c36700129.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c36700129.chkfilter,1,nil,tp)
end
function c36700129.spfilter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsLevelAbove(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx()
end
function c36700129.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(0x30) and chkc:IsControler(tp) and c36700129.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(c36700129.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c36700129.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c36700129.spop(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
--skip-伴博志
function c36700131.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:SetCountLimit(1,36700131+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c36700131.hspcon)
e1:SetValue(c36700131.hspval)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetDescription(1152)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE)
e2:SetCountLimit(1,36700131)
e2:SetCondition(c36700131.spcon)
e2:SetCost(c36700131.spcost)
e2:SetTarget(c36700131.sptg)
e2:SetOperation(c36700131.spop)
c:RegisterEffect(e2)
--fusion
local e3=Effect.CreateEffect(c)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetDescription(1169)
e3:SetCategory(CATEGORY_FUSION_SUMMON+CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,36700132)
e3:SetCondition(c36700131.spcon)
e3:SetTarget(c36700131.fstg)
e3:SetOperation(c36700131.fsop)
c:RegisterEffect(e3)
end
function c36700131.cfilter(c)
return c:IsSetCard(0xc22) and c:IsFaceup()
end
function c36700131.getzone(tp)
local zone=0
local g=Duel.GetMatchingGroup(c36700131.cfilter,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local seq=tc:GetSequence()
if seq==5 or seq==6 then
zone=zone|(1<<aux.MZoneSequence(seq))
else
if seq>0 then zone=zone|(1<<(seq-1)) end
if seq<4 then zone=zone|(1<<(seq+1)) end
end
end
return zone
end
function c36700131.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=c36700131.getzone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c36700131.hspval(e,c)
local tp=c:GetControler()
return 0,c36700131.getzone(tp)
end
function c36700131.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c36700131.costfilter(c)
return c:IsCode(36700113) and c:IsAbleToGraveAsCost()
end
function c36700131.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36700131.costfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c36700131.costfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c36700131.spfilter(c,e,tp)
return c:IsSetCard(0xc22) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c36700131.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c36700131.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c36700131.tgfilter(c,race,lv)
return c:IsType(TYPE_MONSTER) and c:IsRace(race) and c:IsLevel(lv) and c:IsAbleToGrave()
end
function c36700131.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 then return end
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c36700131.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND+LOCATION_DECK)
if sc and Duel.SpecialSummon(sc,0,tp,tp,true,false,POS_FACEUP)~=0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(36700131,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local race=Duel.AnnounceRace(tp,1,RACE_ALL)
Duel.Hint(HINT_SELECTMSG,tp,HINGMSG_LVRANK)
local lv=Duel.AnnounceLevel(tp)
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:FilterSelect(1-tp,c36700131.tgfilter,1,1,nil,race,lv)
if #sg>0 then
Duel.SendtoGrave(sg,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sg:GetFirst():RegisterEffect(e1)
end
end
end
function c36700131.filter0(c,tp)
return (c:IsFaceup() or c:IsControler(tp)) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c36700131.filter1(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c36700131.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xc22) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c36700131.chkfilter(c)
return c:IsCode(36700102,36700113) and c:IsFaceup()
end
function c36700131.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c36700131.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
if Duel.IsExistingMatchingCard(c36700131.chkfilter,tp,LOCATION_ONFIELD,0,1,nil) then
local mg2=Duel.GetMatchingGroup(c36700131.filter0,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
mg1:Merge(mg2)
end
local res=Duel.IsExistingMatchingCard(c36700131.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(c36700131.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_GRAVE)
end
function c36700131.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetMatchingGroup(c36700131.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
if Duel.IsExistingMatchingCard(c36700131.chkfilter,tp,LOCATION_ONFIELD,0,1,nil) then
local mg2=Duel.GetMatchingGroup(c36700131.filter0,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
mg1:Merge(mg2)
end
local sg1=Duel.GetMatchingGroup(c36700131.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c36700131.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
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,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--斩鬼流星剑
function c36700133.initial_effect(c)
--spsummon-other
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE+CATEGORY_REMOVE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,36700133)
e1:SetTarget(c36700133.target)
e1:SetOperation(c36700133.activate)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,36700133)
e2:SetCondition(c36700133.discon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c36700133.distg)
e2:SetOperation(c36700133.disop)
c:RegisterEffect(e2)
end
function c36700133.spfilter(c,e,tp)
return c:IsSetCard(0xc22) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c36700133.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c36700133.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c36700133.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c36700133.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_GRAVE,nil,TYPE_MONSTER)
if Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsSetCard),tp,LOCATION_MZONE,0,1,nil,0xc23) and Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,LOCATION_MZONE,0,1,nil) and g:IsExists(Card.IsAbleToRemove,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(36700133,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=Duel.SelectMatchingCard(tp,Card.IsReleasableByEffect,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(rg)
if Duel.Release(rg,REASON_EFFECT)~=0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,#g*500,REASON_EFFECT)
end
end
end
function c36700133.chkfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_FUSION) and c:IsFaceup()
end
function c36700133.discon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c36700133.chkfilter,tp,LOCATION_MZONE,0,1,nil) then return end
return ep==1-tp and Duel.IsChainDisablable(ev)
end
function c36700133.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,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 c36700133.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) then
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
if re:IsActiveType(TYPE_MONSTER) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(c36700133.aclimit)
e1:SetLabelObject(re:GetHandler())
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
end
function c36700133.aclimit(e,re,tp)
local c=re:GetHandler()
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
--围绕地球的圆弧
function c36700134.initial_effect(c)
c:SetUniqueOnField(1,0,36700134)
c:EnableCounterPermit(0xc23)
c:SetCounterLimit(0xc23,26)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--counter
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetRange(LOCATION_SZONE)
e1:SetOperation(c36700134.ctop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,36700134)
e2:SetCondition(c36700134.spcon)
e2:SetCost(c36700134.spcost)
e2:SetTarget(c36700134.sptg)
e2:SetOperation(c36700134.spop)
c:RegisterEffect(e2)
--check
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e3:SetRange(LOCATION_SZONE)
e3:SetOperation(c36700134.regop)
c:RegisterEffect(e3)
end
function c36700134.ctfilter(c)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousLevelOnField()>=5
end
function c36700134.ctop(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(c36700134.ctfilter,nil)
if ct>0 then
e:GetHandler():AddCounter(0xc23,ct,true)
end
end
function c36700134.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0xc23)==26
end
function c36700134.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() end
local ct=c:GetFlagEffectLabel(36700134)
if not ct then ct=0 end
e:SetLabel(ct)
Duel.SendtoGrave(c,REASON_COST)
end
function c36700134.spfilter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xc22) and c:CheckFusionMaterial()
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c36700134.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL)
and Duel.IsExistingMatchingCard(c36700134.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c36700134.spop(e,tp,eg,ep,ev,re,r,rp)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c36700134.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if not tc then return end
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)~=0 then
tc:CompleteProcedure()
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if #g>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
local ct=e:GetLabel()
Duel.Damage(1-tp,tc:GetAttack()*ct,REASON_EFFECT)
end
end
end
function c36700134.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetFlagEffectLabel(36700134)
if not ct then
c:RegisterFlagEffect(36700134,RESET_EVENT+RESETS_STANDARD,0,1,1)
else
c:SetFlagEffectLabel(36700134,ct+1)
end
end
--skip对兽·暗黑宇宙战士 苏仪德 星人态
function c36700135.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,3,5,c36700135.lcheck)
c:EnableReviveLimit()
--remove
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0xfe,0xff)
e1:SetValue(LOCATION_REMOVED)
e1:SetTarget(c36700135.rmtg)
c:RegisterEffect(e1)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(c36700135.value)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(c36700135.atktg)
c:RegisterEffect(e3)
--cannot release
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_RELEASE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(1,1)
e4:SetTarget(c36700135.rltg)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e5:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,LOCATION_MZONE)
e5:SetTarget(c36700135.atktg)
e5:SetValue(c36700135.fuslimit)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e6:SetValue(1)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e7)
local e8=e6:Clone()
e8:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e8)
--special summon
local e9=Effect.CreateEffect(c)
e9:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER+CATEGORY_ATKCHANGE)
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e9:SetCode(EVENT_LEAVE_FIELD)
e9:SetProperty(EFFECT_FLAG_DELAY)
e9:SetCountLimit(1,36700135)
e9:SetCondition(c36700135.spcon)
e9:SetTarget(c36700135.sptg)
e9:SetOperation(c36700135.spop)
c:RegisterEffect(e9)
end
function c36700135.mfilter(c)
return c:IsLinkSetCard(0xc22) and c:IsLinkType(TYPE_LINK)
end
function c36700135.lcheck(g)
return g:IsExists(c36700135.mfilter,1,nil)
end
function c36700135.rmtg(e,c)
return c:GetOwner()~=e:GetHandlerPlayer()
end
function c36700135.value(e,c)
return Duel.GetFieldGroupCount(0,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED)*(-200)
end
function c36700135.atktg(e,c)
return c:IsAttack(0)
end
function c36700135.rltg(e,c)
local p=1-e:GetHandlerPlayer()
return c:IsAttack(0) and c:IsFaceup() and c:IsControler(p)
end
function c36700135.fuslimit(e,c,st)
return st==SUMMON_TYPE_FUSION
end
function c36700135.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c36700135.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceupEx,Card.IsType),tp,0,0x14,1,nil,TYPE_MONSTER) and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c36700135.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
if Duel.Recover(tp,ct*500,REASON_EFFECT)>0 and c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local tc=Duel.SelectMatchingCard(tp,aux.AND(Card.IsFaceupEx,Card.IsType),tp,0,0x14,1,1,nil,0x1):GetFirst()
if not tc then return end
Duel.HintSelection(Group.FromCards(tc))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local code=tc:GetOriginalCodeRule()
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD)
end
end
--skip对兽·宇宙兽 特莱盖洛斯
function c36700136.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,3,5,c36700136.lcheck)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(36700136,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,36700136)
e1:SetCost(c36700136.descost)
e1:SetTarget(c36700136.destg)
e1:SetOperation(c36700136.desop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c36700136.atkcon)
e2:SetLabel(2)
e2:SetTarget(c36700136.atktg)
e2:SetValue(c36700136.atkval)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(1192)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c36700136.atkcon)
e3:SetLabel(3)
e3:SetTarget(c36700136.rmtg)
e3:SetOperation(c36700136.rmop)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
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)
e4:SetCondition(c36700136.negcon)
e4:SetTarget(aux.nbtg)
e4:SetOperation(c36700136.negop)
c:RegisterEffect(e4)
--equip
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(36700136,1))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,36700137)
e5:SetTarget(c36700136.cptg)
e5:SetOperation(c36700136.cpop)
c:RegisterEffect(e5)
end
function c36700136.mfilter(c)
return c:IsLinkSetCard(0xc22) and c:IsLinkType(TYPE_LINK)
end
function c36700136.lcheck(g)
return g:IsExists(c36700136.mfilter,1,nil)
end
function c36700136.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return lg:IsExists(Card.IsReleasable,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=lg:FilterSelect(tp,Card.IsReleasable,1,2,nil)
Duel.HintSelection(g)
e:SetLabel(Duel.Release(g,REASON_COST))
end
function c36700136.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c36700136.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c36700136.lkfilter(c)
return c:IsLinkState() and c:IsSetCard(0xc22) and c:IsFaceup()
end
function c36700136.atkcon(e)
return Duel.GetMatchingGroupCount(c36700136.lkfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)>e:GetLabel()
end
function c36700136.atktg(e,c)
local lg=e:GetHandler():GetLinkedGroup()
return lg:IsContains(c) or c==e:GetHandler()
end
function c36700136.atkval(e,c)
return Duel.GetMatchingGroupCount(c36700136.lkfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)*800
end
function c36700136.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c36700136.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c36700136.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
and Duel.GetMatchingGroupCount(c36700136.lkfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)>=4
end
function c36700136.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function c36700136.cpfilter(c,g)
return c:IsType(TYPE_EFFECT) and c:IsFaceup() and g:IsContains(c)
end
function c36700136.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lg=e:GetHandler():GetLinkedGroup()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c36700136.cpfilter(chkc,lg) end
if chk==0 then return Duel.IsExistingTarget(c36700136.cpfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c36700136.cpfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,lg)
end
function c36700136.copyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local code=tc:GetOriginalCodeRule()
local cid=0
if not tc:IsType(TYPE_TRAPMONSTER) then
cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(36700136,2))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetLabelObject(e1)
e1:SetLabel(cid)
e1:SetOperation(c36700136.rstop)
c:RegisterEffect(e1)
end
end
function c36700136.rstop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid=e:GetLabel()
if cid~=0 then
c:ResetEffect(cid,RESET_COPY)
c:ResetEffect(RESET_DISABLE,RESET_EVENT)
end
local e1=e:GetLabelObject()
e1:Reset()
Duel.HintSelection(Group.FromCards(c))
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
--skip对兽·宇宙兽 摩诺格洛斯
function c36700138.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c36700138.lcheck)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,36700138)
e1:SetCondition(c36700138.descon)
e1:SetTarget(c36700138.destg)
e1:SetOperation(c36700138.desop)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c36700138.atkcon)
e2:SetOperation(c36700138.atkop)
c:RegisterEffect(e2)
--atk limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(c36700138.atklimit)
c:RegisterEffect(e3)
--cannot attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
c:RegisterEffect(e4)
end
function c36700138.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xc22)
end
function c36700138.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c36700138.desfilter(c,val)
return c:IsFaceup() and (c:IsAttackBelow(val) or c:IsDefenseBelow(val))
end
function c36700138.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=Duel.GetMatchingGroup(c36700138.desfilter,tp,0,LOCATION_MZONE,nil,e:GetHandler():GetAttack())
if chk==0 then return #sg>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,#sg,0,0)
end
function c36700138.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local sg=Duel.GetMatchingGroup(c36700138.desfilter,tp,0,LOCATION_MZONE,nil,c:GetAttack())
if #sg==0 then return end
Duel.Destroy(sg,REASON_EFFECT)
end
function c36700138.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:GetAttack()>0
and Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsSetCard),tp,LOCATION_MZONE,0,1,c,0xc22)
end
function c36700138.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if c:IsRelateToBattle() and c:IsFaceup() and bc:IsRelateToBattle() and bc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(bc:GetAttack())
c:RegisterEffect(e1)
end
end
function c36700138.atklimit(e,c)
return c~=e:GetHandler()
end
--skip对兽·宇宙兽 迪格洛斯
function c36700139.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,3,c36700139.lcheck)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
--e1:SetDescription(aux.Stringid(36700139,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,36700139)
e1:SetCost(c36700139.descost)
e1:SetTarget(c36700139.destg)
e1:SetOperation(c36700139.desop)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c36700139.atktg)
e2:SetValue(1000)
c:RegisterEffect(e2)
--cannot be target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c36700139.atktg)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--mill
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,36700140)
e4:SetCondition(c36700139.spcon)
e4:SetTarget(c36700139.sptg)
e4:SetOperation(c36700139.spop)
c:RegisterEffect(e4)
end
function c36700139.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xc22)
end
function c36700139.rlfilter(c,tp)
return c:IsReleasable() and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,c)
end
function c36700139.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return lg:IsExists(c36700139.rlfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=lg:FilterSelect(tp,c36700139.rlfilter,1,1,nil,tp)
Duel.HintSelection(g)
e:SetLabel(Duel.Release(g,REASON_COST))
end
function c36700139.desfilter(c)
return c:IsFaceup()
end
function c36700139.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c36700139.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c36700139.atktg(e,c)
local lg=e:GetHandler():GetLinkedGroup()
return lg:IsContains(c) or c==e:GetHandler()
end
function c36700139.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and r==REASON_LINK and c:IsLocation(LOCATION_GRAVE)
end
function c36700139.spfilter(c,e,tp)
return c:IsSetCard(0xc22) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c36700139.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetMZoneCount(tp)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c36700139.spfilter(chkc,e,tp) end
if chk==0 then return ft>0
and Duel.IsExistingTarget(c36700139.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
if ft>2 then ft=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c36700139.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,0,0)
end
function c36700139.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetMZoneCount(tp)
if ft==0 then return end
local g=Duel.GetTargetsRelateToChain()
if #g==0 then return end
if #g>ft or (#g>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=g:Select(tp,1,1,nil)
end
for tc in aux.Next(g) do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
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_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
--skip对兽·梦幻兽 基尔巴格
function c36700141.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,3,c36700141.lcheck)
c:EnableReviveLimit()
--negate attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c36700141.negcon)
e1:SetOperation(c36700141.negop)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c36700141.efilter)
c:RegisterEffect(e2)
--cannot activate effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1)
e3:SetCondition(c36700141.actcon)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function c36700141.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xc22)
end
function c36700141.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp
end
function c36700141.negop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.SelectYesNo(tp,aux.Stringid(36700141,0)) then return end
Duel.NegateAttack()
local op=aux.SelectFromOptions(tp,
{true,aux.Stringid(36700141,1)},
{true,aux.Stringid(36700141,2)})
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
else
local bc=Duel.GetAttacker()
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-bc:GetAttack())
end
end
function c36700141.efilter(e,te)
if te:GetOwnerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end
if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g or not g:IsContains(e:GetHandler())
end
function c36700141.actcon(e)
local ph=Duel.GetCurrentPhase()
local tp=e:GetHandlerPlayer()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
--死斗-星河而来的死敌
function c36700142.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(1152)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1,36700142)
e1:SetCondition(c36700142.spcon)
e1:SetTarget(c36700142.sptg)
e1:SetOperation(c36700142.spop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,36700143)
e2:SetTarget(c36700142.tgtg)
e2:SetOperation(c36700142.tgop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(1153)
e3:SetCategory(CATEGORY_LEAVE_GRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetTarget(c36700142.settg)
e3:SetOperation(c36700142.setop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetRange(LOCATION_SZONE)
e4:SetOperation(c36700142.regop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_CHAIN_NEGATED)
e5:SetOperation(c36700142.regop2)
c:RegisterEffect(e5)
end
function c36700142.chkfilter(c,tp)
return c:IsControler(tp) and c:IsType(TYPE_FUSION+TYPE_LINK)
end
function c36700142.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c36700142.chkfilter,1,nil,tp)
end
function c36700142.spfilter(c,e,tp)
return c:IsSetCard(0xc22) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx()
end
function c36700142.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c36700142.spfilter,tp,0x30,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x30)
end
function c36700142.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c36700142.spfilter,tp,0x30,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c36700142.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c36700142.tgop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(c36700142.actop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
Duel.BreakEffect()
Duel.SendtoGrave(tc,REASON_EFFECT)
end
function c36700142.actop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(0xc22) then
Duel.SetChainLimit(c36700142.chainlm)
end
end
function c36700142.chainlm(e,rp,tp)
return tp==rp
end
function c36700142.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if re:GetHandler():IsSetCard(0xc22) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
local flag=c:GetFlagEffectLabel(36700142)
if flag then
c:SetFlagEffectLabel(36700142,flag+1)
else
c:RegisterFlagEffect(36700142,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
end
end
end
function c36700142.regop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if re:GetHandler():IsSetCard(0xc22) and re:IsActiveType(TYPE_SPELL) and rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
local flag=c:GetFlagEffectLabel(36700142)
if flag and flag>0 then
c:SetFlagEffectLabel(36700142,flag-1)
end
end
end
function c36700142.setfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c36700142.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetFlagEffectLabel(36700142)
if chk==0 then return ct and ct>0 and Duel.IsExistingMatchingCard(c36700142.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
end
function c36700142.gselect(g,ft)
local fc=g:FilterCount(Card.IsType,nil,TYPE_FIELD)
return fc<=1 and aux.dncheck(g) and #g-fc<=ft
end
function c36700142.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c36700142.setfilter),tp,LOCATION_GRAVE,0,nil)
local ct=e:GetHandler():GetFlagEffectLabel(36700142) or 0
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if #g==0 or ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tg=g:SelectSubGroup(tp,c36700142.gselect,false,1,math.min(ct,ft+1),ft)
if Duel.SSet(tp,tg)==0 then return end
for tc in aux.Next(tg) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e1)
end
end
--skip-比 运输车
function c36700144.initial_effect(c)
--fusion
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,36700106,c36700144.mfilter,1,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_MZONE+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL):SetValue(SUMMON_TYPE_FUSION)
--special summon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetValue(aux.fuslimit)
c:RegisterEffect(e0)
--equip
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,36700144)
e1:SetCondition(c36700144.eqcon)
e1:SetTarget(c36700144.eqtg)
e1:SetOperation(c36700144.eqop)
c:RegisterEffect(e1)
--spsummon-other
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c36700144.sptg)
e2:SetOperation(c36700144.spop)
c:RegisterEffect(e2)
c36700144.material_setcode=0xc22
end
function c36700144.mfilter(c)
return c:IsFusionSetCard(0xc22) and c:GetBaseDefense()==1000
end
function c36700144.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_EXTRA)
end
function c36700144.eqfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c36700144.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c36700144.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c36700144.sfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function c36700144.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,c36700144.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c36700144.eqlimit)
tc:RegisterEffect(e1)
--poschange
if not (Duel.IsExistingMatchingCard(c36700144.sfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(36700144,0))) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c36700144.sfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
local tc=g:GetFirst()
if tc:IsPosition(POS_FACEDOWN_DEFENSE) and tc:IsControler(1-tp) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
function c36700144.eqlimit(e,c)
return e:GetOwner()==c
end
function c36700144.spfilter(c,e,tp)
return c:IsSetCard(0xc22) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx()
end
function c36700144.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c36700144.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_SZONE)
end
function c36700144.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c36700144.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,nil,e,tp):GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
--亚刻·星河装甲
function c36700145.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddMaterialCodeList(c,36700109)
aux.AddFusionProcFunFunRep(c,c36700145.mfilter1,c36700145.mfilter2,1,63,true)
aux.AddContactFusionProcedure(c,c36700145.sprfilter,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,aux.tdcfop(c))
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c36700145.splimit)
c:RegisterEffect(e0)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetHintTiming(TIMING_END_PHASE)
e1:SetDescription(aux.Stringid(36700145,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,36700145)
e1:SetTarget(c36700145.destg)
e1:SetOperation(c36700145.desop)
c:RegisterEffect(e1)
--Disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c36700145.operation)
c:RegisterEffect(e2)
--Negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(36700145,1))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c36700145.negcon)
e3:SetCost(c36700145.negcost)
e3:SetTarget(c36700145.negtg)
e3:SetOperation(c36700145.negop)
c:RegisterEffect(e3)
c36700145.material_setcode=0xc22
end
function c36700145.mfilter1(c)
return c:IsFusionCode(36700109) or c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:GetBaseDefense()==1000
end
function c36700145.mfilter2(c)
return c:IsFusionSetCard(0xc22) and c:IsFusionType(TYPE_FUSION)
end
function c36700145.sprfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost() and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
function c36700145.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0xc22)
end
function c36700145.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsSetCard),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0xc22) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c36700145.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(aux.AND(Card.IsFaceup,Card.IsSetCard),tp,LOCATION_MZONE,LOCATION_MZONE,nil,0xc22)
if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
function c36700145.operation(e,tp,eg,ep,ev,re,r,rp)
if #eg==0 then return end
local g=eg:Filter(Card.IsPreviousControler,nil,1-tp)
if #g==0 then return end
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(c36700145.distg1)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c36700145.discon)
e2:SetOperation(c36700145.disop)
e2:SetLabelObject(tc)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c36700145.distg2)
e3:SetLabelObject(tc)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
end
function c36700145.distg1(e,c)
local tc=e:GetLabelObject()
if c:IsType(TYPE_SPELL+TYPE_TRAP) then
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
else
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0)
end
end
function c36700145.distg2(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c36700145.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c36700145.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c36700145.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp and Duel.IsChainNegatable(ev) and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c36700145.negfilter(c)
return c:IsSetCard(0xc22) and c:IsFaceupEx() and c:IsAbleToGraveAsCost()
end
function c36700145.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36700145.negfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c36700145.negfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c36700145.negtg(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 c36700145.negop(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 c36700146.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddMaterialCodeList(c,36700109)
aux.AddFusionProcFunFunRep(c,c36700146.mfilter1,c36700146.mfilter2,1,63,true)
aux.AddContactFusionProcedure(c,c36700146.sprfilter,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,aux.tdcfop(c))
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c36700146.splimit)
c:RegisterEffect(e0)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c36700146.val)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsOriginalSetCard,0xc22))
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e4)
--effect gain
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_BE_MATERIAL)
e5:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e5:SetCondition(c36700146.efcon)
e5:SetOperation(c36700146.efop)
c:RegisterEffect(e5)
--to hand
local e6=Effect.CreateEffect(c)
e6:SetHintTiming(TIMING_DAMAGE_STEP)
e6:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE+CATEGORY_DAMAGE)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1,36700146)
e6:SetCondition(c36700146.thcon)
--e6:SetTarget(c36700146.thtg)
e6:SetOperation(c36700146.thop)
c:RegisterEffect(e6)
c36700146.material_setcode=0xc22
end
function c36700146.mfilter1(c)
return c:IsFusionCode(36700109) or c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:GetBaseDefense()==1000
end
function c36700146.mfilter2(c)
return c:IsAttackBelow(2000)
end
function c36700146.sprfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost() and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
function c36700146.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0xc22)
end
function c36700146.atkfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_MONSTER) and c:IsFaceupEx()
end
function c36700146.val(e,c)
return Duel.GetMatchingGroupCount(c36700146.atkfilter,c:GetControler(),0x30,0,nil)*500
end
function c36700146.efcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_FUSION)~=0
end
function c36700146.efop(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard()
if not rc:IsType(TYPE_EFFECT) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
local e2=Effect.CreateEffect(rc)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsOriginalSetCard,0xc22))
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
rc:RegisterEffect(e3,true)
local e4=e2:Clone()
e4:SetCode(EFFECT_PIERCE)
rc:RegisterEffect(e4,true)
end
function c36700146.thcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local c=e:GetHandler()
return ph==PHASE_DAMAGE and (c==Duel.GetAttacker() or c==Duel.GetAttackTarget())
and not Duel.IsDamageCalculated()
end
function c36700146.thfilter(c,loc)
return c:IsLocation(loc) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c36700146.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cg=c:GetColumnGroup()
local g=cg:Filter(Card.IsControler,nil,1-tp)
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if #g==0 then return end
local check=false
if g:FilterCount(Card.IsAbleToHand,nil)==#g and (g:FilterCount(Card.IsAbleToRemove,nil)~=#g or Duel.SelectOption(tp,1190,1192)==0) then
Duel.SendtoHand(g,nil,REASON_EFFECT)
if g:FilterCount(c36700146.thfilter,nil,LOCATION_HAND)~=0 then check=true end
else
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
if g:FilterCount(c36700146.thfilter,nil,LOCATION_REMOVED)~=0 then check=true end
end
if not check then
Duel.Damage(1-tp,c:GetBaseAttack(),REASON_EFFECT)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
--亚刻·土星装甲
function c36700148.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddMaterialCodeList(c,36700109)
aux.AddFusionProcFunFunRep(c,c36700148.mfilter1,c36700148.mfilter2,1,63,true)
aux.AddContactFusionProcedure(c,c36700148.sprfilter,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,aux.tdcfop(c))
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c36700148.splimit)
c:RegisterEffect(e0)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(1192)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,36700148)
e1:SetTarget(c36700148.rmtg)
e1:SetOperation(c36700148.rmop)
c:RegisterEffect(e1)
--activate cost
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_ACTIVATE_COST)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetCondition(c36700148.costcon)
e2:SetCost(c36700148.costchk)
e2:SetOperation(c36700148.costop)
c:RegisterEffect(e2)
--accumulate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_FLAG_EFFECT+36700148)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c36700148.costcon)
e3:SetTargetRange(0,1)
c:RegisterEffect(e3)
--effect gain
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e4:SetCondition(c36700148.efcon)
e4:SetOperation(c36700148.efop)
c:RegisterEffect(e4)
--NegateEffect
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(36700148,0))
e5:SetHintTiming(0,TIMING_MAIN_END)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,36700149)
e5:SetCondition(c36700148.atkcon)
e5:SetTarget(c36700148.atktg)
e5:SetOperation(c36700148.atkop)
c:RegisterEffect(e5)
c36700148.material_setcode=0xc22
end
function c36700148.mfilter1(c)
return c:IsFusionCode(36700109) or c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:GetBaseDefense()==1000
end
function c36700148.mfilter2(c)
return c:IsAttackBelow(2000) and c:IsDefenseBelow(2000)
end
function c36700148.sprfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost() and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
function c36700148.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0xc22)
end
function c36700148.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c36700148.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(0x20) then
Duel.BreakEffect()
local code=tc:GetCode()
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,LOCATION_DECK,nil,code)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
g=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
Duel.ConfirmCards(tp,g)
g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
Duel.ShuffleDeck(1-tp)
end
end
function c36700148.costcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c36700148.costchk(e,te_or_c,tp)
local ct=Duel.GetFlagEffect(tp,36700148)
return Duel.CheckLPCost(tp,ct*500)
end
function c36700148.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,500)
end
function c36700148.efcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_FUSION)~=0
end
function c36700148.efop(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard()
if not rc:IsType(TYPE_EFFECT) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
--activate cost
local e2=Effect.CreateEffect(rc)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_ACTIVATE_COST)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetCondition(c36700148.costcon)
e2:SetCost(c36700148.costchk)
e2:SetOperation(c36700148.costop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
--accumulate
local e3=Effect.CreateEffect(rc)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_FLAG_EFFECT+36700148)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c36700148.costcon)
e3:SetTargetRange(0,1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true)
end
function c36700148.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c36700148.atkfilter(c)
return c:IsFaceup() and not c:IsSetCard(0xc22)
end
function c36700148.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36700148.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function c36700148.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c36700148.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e5=Effect.CreateEffect(e:GetHandler())
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_DISABLE)
e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e5)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
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_CANNOT_ATTACK)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
--亚刻·皓月装甲
function c36700150.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddMaterialCodeList(c,36700109)
aux.AddFusionProcFunFunRep(c,c36700150.mfilter1,c36700150.mfilter2,1,63,true)
aux.AddContactFusionProcedure(c,c36700150.sprfilter,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,aux.tdcfop(c))
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c36700150.splimit)
c:RegisterEffect(e0)
--search
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,36700150)
e1:SetTarget(c36700150.settg)
e1:SetOperation(c36700150.setop)
c:RegisterEffect(e1)
--change effect type
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(36700150)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(c36700150.efcon)
e3:SetOperation(c36700150.efop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(1152)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,36700151)
e4:SetCost(c36700150.spcost)
e4:SetTarget(c36700150.sptg)
e4:SetOperation(c36700150.spop)
c:RegisterEffect(e4)
--material check
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_MATERIAL_CHECK)
e5:SetValue(c36700150.valcheck)
c:RegisterEffect(e5)
if not c36700150.global_check then
c36700150.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
--ge1:SetCondition(c36700150.checkcon)
ge1:SetOperation(c36700150.checkop)
Duel.RegisterEffect(ge1,0)
end
c36700150.material_setcode=0xc22
end
function c36700150.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetCondition(c36700150.accon)
e1:SetValue(c36700150.aclimit)
e1:SetLabelObject(tc)
e1:SetOwnerPlayer(rp)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,rp)
end
function c36700150.accon(e)
return Duel.IsPlayerAffectedByEffect(e:GetOwnerPlayer(),36700150)
end
function c36700150.aclimit(e,re,tp)
local c=re:GetHandler()
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c36700150.mfilter1(c)
return c:IsFusionCode(36700109) or c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:GetBaseDefense()==1000
end
function c36700150.mfilter2(c)
return c:IsAttackAbove(1000)
end
function c36700150.sprfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost() and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
function c36700150.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0xc22)
end
function c36700150.setfilter(c)
return c:IsSetCard(0xc22) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c36700150.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c36700150.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function c36700150.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c36700150.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
if tc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
elseif tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(e:GetHandler())
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)
tc:RegisterEffect(e1)
end
end
end
function c36700150.efcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_FUSION)~=0
end
function c36700150.efop(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard()
if not rc:IsType(TYPE_EFFECT) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
--activate cost
local e2=Effect.CreateEffect(rc)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(36700150)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
function c36700150.valcheck(e,c)
local mg=c:GetMaterial()
if mg:IsExists(Card.IsSetCard,1,nil,0xc22) then
c:RegisterFlagEffect(36700150,RESET_EVENT+0x4fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(36700150,1))
end
end
function c36700150.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and c:GetFlagEffect(36700150)>0 end
Duel.Release(c,REASON_COST)
end
function c36700150.spfilter(c,e,tp,rc)
return c:IsSetCard(0xc22) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
and c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,rc)>0
end
function c36700150.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36700150.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c36700150.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c36700150.spfilter,tp,LOCATION_DECK,0,nil,e,tp,e:GetHandler())
if Duel.GetMZoneCount(tp)>0 and #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
end
end
--共战 双重螺旋光刃
function c36700152.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddMaterialCodeList(c,36700109)
aux.AddFusionProcFunFunRep(c,c36700152.mfilter1,c36700152.mfilter2,1,63,true)
aux.AddContactFusionProcedure(c,c36700152.sprfilter,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,aux.tdcfop(c))
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c36700152.splimit)
c:RegisterEffect(e0)
--remove when chaining
local e1=Effect.CreateEffect(c)
e1:SetDescription(1192)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,36700152)
e1:SetCondition(c36700152.rmcon)
e1:SetTarget(c36700152.rmtg)
e1:SetOperation(c36700152.rmop)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(c36700152.efcon)
e2:SetOperation(c36700152.efop)
c:RegisterEffect(e2)
--atk change
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(36700152,0))
e3:SetHintTiming(TIMING_MAIN_END)
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,36700152)
e3:SetCondition(c36700152.atkcon)
e3:SetTarget(c36700152.atktg)
e3:SetOperation(c36700152.atkop)
c:RegisterEffect(e3)
c36700152.material_setcode=0xc22
end
function c36700152.mfilter1(c)
return c:IsFusionCode(36700109) or c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:GetBaseDefense()==1000
end
function c36700152.mfilter2(c)
return c:IsAttackBelow(2000) and c:IsDefenseBelow(2000)
end
function c36700152.sprfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost() and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
function c36700152.rmcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function c36700152.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_DECK,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_DECK)
end
function c36700152.rmop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then return end
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.DisableShuffleCheck()
local c=e:GetHandler()
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function c36700152.efcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_FUSION)~=0
end
function c36700152.efop(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard()
if not rc:IsType(TYPE_EFFECT) then
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_ADD_TYPE)
e0:SetValue(TYPE_EFFECT)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e0,true)
end
--remove
local e1=Effect.CreateEffect(rc)
e1:SetDescription(1192)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,36700152)
e1:SetCondition(c36700152.rmcon)
e1:SetTarget(c36700152.rmtg)
e1:SetOperation(c36700152.rmop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function c36700152.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c36700152.atkfilter(c)
return c:IsFaceup() and not c:IsSetCard(0xc22) and c:GetAttack()>0
end
function c36700152.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36700152.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function c36700152.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tg=Group.CreateGroup()
for tc in aux.Next(g) do
if c36700152.atkfilter(tc) then
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+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
if not tc:IsAttack(0) then tg:AddCard(tc) end
end
end
local rg=tg:Filter(Card.IsControler,nil,1-tp)
if #g-#tg>0 and #rg>0 then
Duel.BreakEffect()
Duel.SendtoHand(rg,nil,REASON_RULE)
end
end
--怪獸防災科学調査所
function c36700153.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc22))
e1:SetValue(c36700153.indct)
c:RegisterEffect(e1)
--atk
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetCondition(c36700153.atkcon)
e2:SetValue(1000)
c:RegisterEffect(e2)
--Avoid battle damage
local e3=e1:Clone()
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetValue(1)
c:RegisterEffect(e3)
--act limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(0,1)
e4:SetCondition(c36700153.actcon)
e4:SetValue(1)
c:RegisterEffect(e4)
--pierce
local e5=e1:Clone()
e5:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e5)
--todeck and draw
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetRange(LOCATION_FZONE)
e6:SetCountLimit(1,36700153)
e6:SetTarget(c36700153.drtg)
e6:SetOperation(c36700153.drop)
c:RegisterEffect(e6)
end
function c36700153.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function c36700153.atkcon(e)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
function c36700153.actcon(e)
local a=Duel.GetBattleMonster(e:GetHandlerPlayer())
return a and a:IsFaceup() and a:IsSetCard(0xc22)
end
function c36700153.tdfilter(c)
return c:IsSetCard(0xc22) and c:IsAbleToDeck() and c:IsFaceupEx()
end
function c36700153.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c36700153.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c36700153.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c36700153.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c36700153.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetTargetsRelateToChain()
if #tg==0 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
if og:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)>0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
......@@ -2,99 +2,99 @@
local m=4879086
local cm=_G["c"..m]
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_RELEASE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon1)
e2:SetTarget(cm.target1)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_NEGATE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_GRAVE)
e4:SetCondition(cm.discon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(cm.distg)
e4:SetOperation(cm.disop)
c:RegisterEffect(e4)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_RELEASE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon1)
e2:SetTarget(cm.target1)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetTarget(cm.tdtg)
e3:SetOperation(cm.tdop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_NEGATE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_GRAVE)
e4:SetCondition(cm.discon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(cm.distg)
e4:SetOperation(cm.disop)
c:RegisterEffect(e4)
end
function cm.ngcfilter(c,tp)
return c:IsControler(tp) and c:IsOnField() and c:IsSetCard(0xae5f) and c:IsType(TYPE_RITUAL)
return c:IsControler(tp) and c:IsOnField() and c:IsSetCard(0xae5f) and c:IsType(TYPE_RITUAL)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and Duel.IsChainNegatable(ev) and tg:IsExists(cm.ngcfilter,1,nil,tp)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and Duel.IsChainNegatable(ev) and tg:IsExists(cm.ngcfilter,1,nil,tp)
end
function cm.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 chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
function cm.thcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.target1(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)
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 cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<5 then return false end
local g=Duel.GetDecktopGroup(tp,3)
local result=g:FilterCount(Card.IsAbleToHand,nil)>0
return result
end
Duel.SetTargetPlayer(tp)
if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<5 then return false end
local g=Duel.GetDecktopGroup(tp,5)
local result=g:FilterCount(Card.IsAbleToHand,nil)>5
return result
end
Duel.SetTargetPlayer(tp)
end
function cm.tdfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0xae5f)
return c:IsAbleToHand() and c:IsSetCard(0xae5f)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.ConfirmDecktop(p,3)
local g=Duel.GetDecktopGroup(p,3)
if not g or #g<3 then return end
g=g:Filter(cm.tdfilter,nil)
local ct=3
if #g>0 and Duel.SelectYesNo(p,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
local sg=g:Select(p,1,1,nil)
Duel.DisableShuffleCheck()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-p,sg)
Duel.ShuffleHand(p)
ct=ct-1
end
Duel.SortDecktop(p,p,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(p,1)
Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM)
end
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.ConfirmDecktop(p,5)
local g=Duel.GetDecktopGroup(p,5)
if not g or #g<5 then return end
g=g:Filter(cm.tdfilter,nil)
local ct=5
if #g>0 and Duel.SelectYesNo(p,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
local sg=g:Select(p,1,1,nil)
Duel.DisableShuffleCheck()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-p,sg)
Duel.ShuffleHand(p)
ct=ct-1
end
Duel.SortDecktop(p,p,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(p,1)
Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM)
end
end
\ No newline at end of file
......@@ -64,7 +64,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
elseif op==2
elseif op==2 then
Duel.RegisterFlagEffect(tp,id+20000000,RESET_PHASE+PHASE_END,0,1)
-- 特殊召唤效果
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -30,6 +30,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=re:GetHandler()
if Duel.NegateActivation(ev) and tc:IsRelateToEffect(re) and Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)~=0
and tc:IsLocation(LOCATION_REMOVED) and not tc:IsReason(REASON_REDIRECT) then
......
......@@ -33,6 +33,7 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.NegateSummon(eg)
if Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)~=0 then
-- 结束阶段检索
......
......@@ -6,7 +6,7 @@ function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--control
local e3=Effect.CreateEffect(c)
......
......@@ -7,9 +7,7 @@ function c98941056.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DRAW_PHASE,TIMING_DRAW_PHASE+TIMING_END_PHASE)
e1:SetCost(s.cost1)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
e1:SetCountLimit(1,id)
e1:SetTarget(s.tg1)
c:RegisterEffect(e1)
local e0=e1:Clone()
e0:SetDescription(aux.Stringid(id,0))
......@@ -17,9 +15,20 @@ function c98941056.initial_effect(c)
e0:SetCondition(s.descon)
e0:SetCost(s.cost2)
c:RegisterEffect(e0)
--change effect
--Fusion
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98941056,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id)
e2:SetTarget(s.target)
e2:SetOperation(s.activate)
c:RegisterEffect(e2)
--change effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98941056,2))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
......@@ -35,10 +44,9 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function s.actarget2(e,te,tp)
local tc=te:GetHandler()
e:SetLabelObject(te)
return tc:IsSetCard(0x171) and te:IsHasType(EFFECT_TYPE_QUICK_O) and tc:IsLocation(LOCATION_HAND) and tc:IsType(TYPE_SPELL)
function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,EFFECT_FLAG_OATH,1)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
......@@ -80,7 +88,6 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98941056.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsOnField() then return end
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c98941056.filter3,nil,e)
local mg2=Duel.GetMatchingGroup(c98941056.filter1,tp,0,LOCATION_MZONE,nil,e)
......
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