Commit e0585d40 authored by POLYMER's avatar POLYMER

fix

parent ac278793
No preview for this file type
......@@ -40,7 +40,8 @@ function cm.initial_effect(c)
end
function c43990080.descon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsRace(RACE_ILLUSION)
local race=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_RACE)
return re:IsActiveType(TYPE_MONSTER) and race&RACE_ILLUSION>0
end
function c43990080.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
......
......@@ -38,7 +38,8 @@ function cm.initial_effect(c)
end
function c43990081.descon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsRace(RACE_ILLUSION)
local race=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_RACE)
return re:IsActiveType(TYPE_MONSTER) and race&RACE_ILLUSION>0
end
function c43990081.filter1(c,e)
return not c:IsImmuneToEffect(e)
......
......@@ -41,7 +41,8 @@ function cm.initial_effect(c)
end
function c43990082.descon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsRace(RACE_ILLUSION)
local race=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_RACE)
return re:IsActiveType(TYPE_MONSTER) and race&RACE_ILLUSION>0
end
function c43990082.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
......@@ -26,7 +26,8 @@ function cm.initial_effect(c)
end
function c43990084.descon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsRace(RACE_ILLUSION)
local race=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_RACE)
return re:IsActiveType(TYPE_MONSTER) and race&RACE_ILLUSION>0
end
function c43990084.ffilter(c,fc)
return c:IsRace(RACE_ILLUSION)
......
......@@ -67,7 +67,8 @@ function c43990089.drop(e,tp,eg,ep,ev,re,r,rp)
if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end
end
function c43990089.fscon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsRace(RACE_ILLUSION)
local race=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_RACE)
return re:IsActiveType(TYPE_MONSTER) and race&RACE_ILLUSION>0
end
function c43990089.filter1(c,e)
return not c:IsImmuneToEffect(e)
......
......@@ -29,7 +29,8 @@ function cm.initial_effect(c)
end
function c43990091.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsRace(RACE_ILLUSION)
local race=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_RACE)
return re:IsActiveType(TYPE_MONSTER) and race&RACE_ILLUSION>0
end
function c43990091.negfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and aux.NegateAnyFilter(c)
......
......@@ -66,7 +66,8 @@ end
-- 效果②条件:幻想魔效果发动
function c43990105.damcon2(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsRace(RACE_ILLUSION) and rc:IsAttackAbove(1)
local race=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_RACE)
return re:IsActiveType(TYPE_MONSTER) and race&RACE_ILLUSION>0 and rc:IsAttackAbove(1)
end
-- 效果②目标设定
......
--珊海环的封缄英杰 索尼娅
function c67200302.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon and to deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200302,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200302)
e1:SetCondition(c67200302.spcon)
e1:SetTarget(c67200302.sptg)
e1:SetOperation(c67200302.spop)
c:RegisterEffect(e1)
--Release monster
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200302,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c67200302.ctcon)
e2:SetCost(c67200302.ctcost)
e2:SetTarget(c67200302.cttg)
e2:SetOperation(c67200302.ctop)
c:RegisterEffect(e2)
end
--
function c67200302.spfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and (c:IsSetCard(0x675) or c:IsSetCard(0x3674)) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c67200302.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200302.spfilter,1,nil,tp)
end
function c67200302.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200302.setfilter(c)
return (c:IsSetCard(0x675) or c:IsSetCard(0x3674)) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c67200302.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and and Duel.IsExistingMatchingCard(c67200302.setfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(67200302,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c67200302.setfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
end
--
function c67200302.ctcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER)
end
function c67200302.ctcost(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 c67200302.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c67200302.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--珊海环的海贼 阿里兹
function c67200500.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200500,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c67200500.eqtg)
e1:SetOperation(c67200500.eqop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200500,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,67200500)
e3:SetCondition(c67200500.spcon)
e3:SetTarget(c67200500.sptg)
e3:SetOperation(c67200500.spop)
c:RegisterEffect(e3)
end
function c67200500.filter(c,ec)
return c:IsCode(67200501) and c:CheckEquipTarget(ec)
end
function c67200500.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c67200500.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c67200500.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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c67200500.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c)
if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),c)
end
end
function c67200500.cfilter(c)
return c:GetSequence()<5
end
function c67200500.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c67200500.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function c67200500.spfilter(c,e,tp)
return c:IsSetCard(0x675) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200500.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200500.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c67200500.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c67200500.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
Duel.BreakEffect()
--
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0):Select(tp,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
Duel.SpecialSummonComplete()
end
--强化之珊海环
function c67200501.initial_effect(c)
c:SetUniqueOnField(1,0,67200501)
--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(c67200501.target)
e1:SetOperation(c67200501.operation)
c:RegisterEffect(e1)
--equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c67200501.eqlimit)
c:RegisterEffect(e2)
--Atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(800)
c:RegisterEffect(e3)
--re equip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(67200501,0))
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
--e4:SetCountLimit(1,67200501)
e4:SetCondition(c67200501.reqcon)
e4:SetTarget(c67200501.reqtg)
e4:SetOperation(c67200501.reqop)
c:RegisterEffect(e4)
end
function c67200501.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x675)
end
function c67200501.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c67200501.eqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c67200501.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c67200501.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c67200501.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c67200501.eqfilter(tc) then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--
function c67200501.eqlimit(e,c)
return c:IsSetCard(0x675)
end
--
function c67200501.reqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_LOST_TARGET)
and not e:GetHandler():GetPreviousEquipTarget():IsLocation(LOCATION_ONFIELD+LOCATION_OVERLAY)
end
function c67200501.reqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x675)
end
function c67200501.reqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c67200501.reqfilter(chkc) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c67200501.reqfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:CheckUniqueOnField(tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c67200501.reqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function c67200501.reqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsRelateToEffect(e) and c:CheckUniqueOnField(tp) then
Duel.Equip(tp,c,tc)
end
end
--海贼的珊海环舰
function c67200502.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200502+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c67200502.activate)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200502,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,67200503)
e3:SetCondition(c67200502.ctcon)
e3:SetTarget(c67200502.cttg)
e3:SetOperation(c67200502.ctop)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c67200502.ctcon2)
c:RegisterEffect(e2)
end
function c67200502.thfilter(c)
return c:IsCode(67200500) and c:IsAbleToHand()
end
function c67200502.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c67200502.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200502,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--
function c67200502.cfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and c:IsPreviousSetCard(0x675) and rp==1-tp and c:IsReason(REASON_EFFECT)
end
function c67200502.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200502.cfilter,1,nil,tp,rp)
end
function c67200502.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200502.cfilter,1,nil,tp,rp) and Duel.IsPlayerAffectedByEffect(tp,67200590)
end
function c67200502.ctfilter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function c67200502.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c67200502.ctfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c67200502.ctfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,67200502,0x3675,TYPE_TUNER,0,2400,6,RACE_MACHINE,ATTRIBUTE_WATER) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c67200502.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67200502.ctop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetControl(tc,tp)~=0 and c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,67200502,0x3675,TYPE_TUNER,0,2400,6,RACE_MACHINE,ATTRIBUTE_WATER) then
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TUNER)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c67200502.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
function c67200502.splimit(e,c)
return not c:IsSetCard(0x675) and c:IsLocation(LOCATION_EXTRA)
end
--珊海环的幽灵舰长
function c67200504.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,c67200504.matfilter1,nil,nil,aux.FilterBoolFunction(Card.IsSetCard,0x675),1,1)
c:EnableReviveLimit()
--to deck and draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200504,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,67200504)
e1:SetTarget(c67200504.drtg)
e1:SetOperation(c67200504.drop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200504,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c67200504.spcon)
e2:SetTarget(c67200504.sptg)
e2:SetOperation(c67200504.spop)
c:RegisterEffect(e2)
end
function c67200504.matfilter1(c)
return c:IsSynchroType(TYPE_TUNER) or c:IsSetCard(0x675)
end
--
function c67200504.filter(c)
return c:IsAbleToDeck()
end
function c67200504.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200504.filter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.GetMatchingGroup(c67200504.filter,tp,LOCATION_GRAVE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c67200504.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(c67200504.filter,tp,LOCATION_GRAVE,0,nil)
if aux.NecroValleyNegateCheck(tg) then return end
if tg:GetCount()>0 then
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--
function c67200504.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_GRAVE,0,1,e:GetHandler())
end
function c67200504.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67200504.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and 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
end
--珊海环的术士 索尼娅
function c67200505.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200505,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,67200505)
e1:SetTarget(c67200505.eqtg)
e1:SetOperation(c67200505.eqop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200505,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c67200505.descon)
e3:SetTarget(c67200505.destg)
e3:SetOperation(c67200505.desop)
c:RegisterEffect(e3)
end
function c67200505.filter(c,ec)
return c:IsCode(67200506) and c:CheckEquipTarget(ec)
end
function c67200505.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c67200505.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c67200505.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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c67200505.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c)
if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),c)
end
end
--
function c67200505.filter1(c)
return c:IsFaceup()
end
function c67200505.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x675)
end
function c67200505.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c67200505.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c67200505.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c67200505.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c67200505.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 c67200506.initial_effect(c)
c:SetUniqueOnField(1,0,67200506)
--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(c67200506.target)
e1:SetOperation(c67200506.operation)
c:RegisterEffect(e1)
--equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c67200506.eqlimit)
c:RegisterEffect(e2)
--spell/trap Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200506,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,67200506)
e3:SetCondition(c67200506.descon)
e3:SetTarget(c67200506.destg)
e3:SetOperation(c67200506.desop)
c:RegisterEffect(e3)
--re equip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(67200506,1))
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
--e4:SetCountLimit(1,67200506)
e4:SetCondition(c67200506.reqcon)
e4:SetTarget(c67200506.reqtg)
e4:SetOperation(c67200506.reqop)
c:RegisterEffect(e4)
end
function c67200506.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x675)
end
function c67200506.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c67200506.eqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c67200506.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c67200506.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c67200506.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c67200506.eqfilter(tc) then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--
function c67200506.eqlimit(e,c)
return c:IsSetCard(0x675)
end
--
function c67200506.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function c67200506.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c67200506.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c67200506.desfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c67200506.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c67200506.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c67200506.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 c67200506.reqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_LOST_TARGET)
and not e:GetHandler():GetPreviousEquipTarget():IsLocation(LOCATION_ONFIELD+LOCATION_OVERLAY)
end
function c67200506.reqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x675)
end
function c67200506.reqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c67200506.reqfilter(chkc) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c67200506.reqfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:CheckUniqueOnField(tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c67200506.reqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function c67200506.reqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsRelateToEffect(e) and c:CheckUniqueOnField(tp) then
Duel.Equip(tp,c,tc)
end
end
--索尼娅的珊海环舰
function c67200507.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200507+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c67200507.activate)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200507,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,67200508)
e3:SetCondition(c67200507.ctcon)
e3:SetTarget(c67200507.cttg)
e3:SetOperation(c67200507.ctop)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c67200507.ctcon2)
c:RegisterEffect(e2)
end
function c67200507.thfilter(c)
return c:IsCode(67200505) and c:IsAbleToHand()
end
function c67200507.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c67200507.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200507,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--
function c67200507.cfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and c:IsPreviousSetCard(0x675) and rp==1-tp and c:IsReason(REASON_EFFECT)
end
function c67200507.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200507.cfilter,1,nil,tp,rp)
end
function c67200507.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200507.cfilter,1,nil,tp,rp) and Duel.IsPlayerAffectedByEffect(tp,67200590)
end
function c67200507.ctfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c67200507.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and c67200507.ctfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c67200507.ctfilter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsPlayerCanSpecialSummonMonster(tp,67200507,0x3675,TYPE_TUNER,2400,0,6,RACE_MACHINE,ATTRIBUTE_FIRE) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c67200507.ctfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67200507.ctop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,tp,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,67200507,0x3675,TYPE_TUNER,2400,0,6,RACE_MACHINE,ATTRIBUTE_FIRE) then
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TUNER)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c67200507.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
function c67200507.splimit(e,c)
return not c:IsSetCard(0x675) and c:IsLocation(LOCATION_EXTRA)
end
--珊海环的大魔导士
function c67200509.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,c67200509.matfilter1,nil,nil,aux.FilterBoolFunction(Card.IsSetCard,0x675),1,1)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200509,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c67200509.discon)
e1:SetTarget(c67200509.distg)
e1:SetOperation(c67200509.disop)
c:RegisterEffect(e1)
end
--
function c67200509.matfilter1(c)
return c:IsSynchroType(TYPE_TUNER) or c:IsSetCard(0x675)
end
--
function c67200509.discon(e,tp,eg,ep,ev,re,r,rp)
if ep==tp then return false end
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c67200509.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg
if chk==0 then return tc end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,1,0,0)
end
function c67200509.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(eg,tp,REASON_EFFECT)
end
--珊海环的天使 艾妮耶斯
function c67200510.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200510,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,67200510)
e1:SetTarget(c67200510.eqtg)
e1:SetOperation(c67200510.eqop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200510,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c67200510.thcon)
e3:SetTarget(c67200510.thtg)
e3:SetOperation(c67200510.thop)
c:RegisterEffect(e3)
end
function c67200510.filter(c,ec)
return c:IsCode(67200511) and c:CheckEquipTarget(ec)
end
function c67200510.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c67200510.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c67200510.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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c67200510.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c)
if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),c)
end
end
--
function c67200510.cfilter(c)
return c:GetSequence()<5
end
function c67200510.thcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c67200510.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function c67200510.thfilter(c,e,tp)
return c:IsSetCard(0x675) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c67200510.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200510.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
if g:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
end
function c67200510.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c67200510.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local gg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if gg:GetCount()>0 then
Duel.SendtoDeck(gg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
--祝祷之珊海环
function c67200511.initial_effect(c)
c:SetUniqueOnField(1,0,67200511)
--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(c67200511.target)
e1:SetOperation(c67200511.operation)
c:RegisterEffect(e1)
--equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c67200511.eqlimit)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x675))
e3:SetCondition(c67200511.effcon)
e3:SetValue(1)
c:RegisterEffect(e3)
--re equip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(67200511,0))
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c67200511.reqcon)
e4:SetTarget(c67200511.reqtg)
e4:SetOperation(c67200511.reqop)
c:RegisterEffect(e4)
end
--
function c67200511.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x675)
end
function c67200511.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c67200511.eqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c67200511.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c67200511.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c67200511.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c67200511.eqfilter(tc) then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--
function c67200511.eqlimit(e,c)
return c:IsSetCard(0x675)
end
--
function c67200511.effcon(e)
return e:GetHandler():GetEquipTarget()
end
--
function c67200511.reqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_LOST_TARGET)
and not e:GetHandler():GetPreviousEquipTarget():IsLocation(LOCATION_ONFIELD+LOCATION_OVERLAY)
end
function c67200511.reqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x675)
end
function c67200511.reqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c67200511.reqfilter(chkc) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c67200511.reqfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:CheckUniqueOnField(tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c67200511.reqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function c67200511.reqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsRelateToEffect(e) and c:CheckUniqueOnField(tp) then
Duel.Equip(tp,c,tc)
end
end
--艾妮耶斯的珊海环舰
function c67200512.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200512+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c67200512.activate)
c:RegisterEffect(e1)
--plunder hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200512,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,67200513)
e3:SetCondition(c67200512.ctcon)
e3:SetTarget(c67200512.cttg)
e3:SetOperation(c67200512.ctop)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c67200512.ctcon2)
c:RegisterEffect(e2)
end
function c67200512.thfilter(c)
return c:IsCode(67200510) and c:IsAbleToHand()
end
function c67200512.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c67200512.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200512,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--
function c67200512.cfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and c:IsPreviousSetCard(0x675) and rp==1-tp and c:IsReason(REASON_EFFECT)
end
function c67200512.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200512.cfilter,1,nil,tp,rp)
end
function c67200512.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200512.cfilter,1,nil,tp,rp) and Duel.IsPlayerAffectedByEffect(tp,67200590)
end
function c67200512.ctfilter(c)
return c:IsAbleToHand()
end
function c67200512.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c67200527.ctfilter,tp,0,LOCATION_HAND,1,nil) and Duel.IsPlayerCanSpecialSummonMonster(tp,67200512,0x3675,TYPE_TUNER,0,2400,6,RACE_MACHINE,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67200512.ctop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
local tc=tg:GetFirst()
if Duel.SendtoHand(tc,tp,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,67200512,0x3675,TYPE_TUNER,0,2400,6,RACE_MACHINE,ATTRIBUTE_LIGHT) then
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TUNER)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c67200512.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
Duel.ShuffleHand(1-tp)
end
function c67200512.splimit(e,c)
return not c:IsSetCard(0x675) and c:IsLocation(LOCATION_EXTRA)
end
--珊海环的灭妖者 伊利奥纳
function c67200514.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,c67200514.matfilter1,nil,nil,aux.FilterBoolFunction(Card.IsSetCard,0x675),1,1)
c:EnableReviveLimit()
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
--e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,67200514)
e1:SetCondition(c67200514.eqcon)
e1:SetTarget(c67200514.eqtg)
e1:SetOperation(c67200514.eqop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetOperation(c67200514.disop)
e2:SetRange(LOCATION_MZONE)
c:RegisterEffect(e2)
end
function c67200514.matfilter1(c)
return c:IsSynchroType(TYPE_TUNER) or c:IsSetCard(0x675)
end
--
function c67200514.eqcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c67200514.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,nil)
end
function c67200514.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() then return end
local tc=eg:GetFirst()
if tc then
tc:CancelToGrave()
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_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c67200514.eqlimit)
tc:RegisterEffect(e1)
end
end
function c67200514.eqlimit(e,c)
return e:GetOwner()==c
end
--
function c67200514.disop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetEquipGroup()
if ep~=tp and g:GetCount()>0 and g:IsExists(Card.IsCode,1,nil,re:GetHandler():GetCode()) then
Duel.NegateEffect(ev)
end
end
--珊海环的魔人 拉斐拉
function c67200515.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200515,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c67200515.eqtg)
e1:SetOperation(c67200515.eqop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon and to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200515,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e3:SetCountLimit(1,67200515)
e3:SetCondition(c67200515.spcon)
e3:SetTarget(c67200515.sptg)
e3:SetOperation(c67200515.spop)
c:RegisterEffect(e3)
end
--
function c67200515.filter(c,ec)
return c:IsCode(67200516) and c:CheckEquipTarget(ec)
end
function c67200515.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c67200515.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c67200515.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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c67200515.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c)
if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),c)
end
end
--
function c67200515.spfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsSetCard(0x675) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c67200515.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200515.spfilter,1,nil,tp)
end
function c67200515.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200515.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.SendtoHand(eg,nil,REASON_EFFECT)
end
end
--漩界之珊海环
function c67200516.initial_effect(c)
c:SetUniqueOnField(1,0,67200516)
--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(c67200516.target)
e1:SetOperation(c67200516.operation)
c:RegisterEffect(e1)
--equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c67200516.eqlimit)
c:RegisterEffect(e2)
--cannot activate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(1,1)
e3:SetCondition(c67200516.actcon)
e3:SetValue(c67200516.aclimit)
c:RegisterEffect(e3)
--re equip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(67200516,0))
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c67200516.reqcon)
e4:SetTarget(c67200516.reqtg)
e4:SetOperation(c67200516.reqop)
c:RegisterEffect(e4)
end
--
function c67200516.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x675)
end
function c67200516.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c67200516.eqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c67200516.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c67200516.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c67200516.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c67200516.eqfilter(tc) then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--
function c67200516.eqlimit(e,c)
return c:IsSetCard(0x675)
end
--
function c67200516.actcon(e)
return e:GetHandler():GetEquipTarget()
end
function c67200516.aclimit(e,re,tp)
local tc=re:GetHandler()
return tc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER) and e:GetHandler():GetColumnGroup():IsContains(tc)
end
--
function c67200516.reqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_LOST_TARGET)
and not e:GetHandler():GetPreviousEquipTarget():IsLocation(LOCATION_ONFIELD+LOCATION_OVERLAY)
end
function c67200516.reqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x675)
end
function c67200516.reqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c67200516.reqfilter(chkc) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c67200516.reqfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:CheckUniqueOnField(tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c67200516.reqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function c67200516.reqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsRelateToEffect(e) and c:CheckUniqueOnField(tp) then
Duel.Equip(tp,c,tc)
end
end
--拉斐拉的珊海环舰
function c67200517.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200517+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c67200517.activate)
c:RegisterEffect(e1)
--plunder hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200517,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,67200518)
e3:SetCondition(c67200517.ctcon)
e3:SetTarget(c67200517.cttg)
e3:SetOperation(c67200517.ctop)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c67200517.ctcon2)
c:RegisterEffect(e2)
end
function c67200517.thfilter(c)
return c:IsCode(67200515) and c:IsAbleToHand()
end
function c67200517.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c67200517.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200517,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--
function c67200517.cfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and c:IsPreviousSetCard(0x675) and rp==1-tp and c:IsReason(REASON_EFFECT)
end
function c67200517.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200517.cfilter,1,nil,tp,rp)
end
function c67200517.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200517.cfilter,1,nil,tp,rp) and Duel.IsPlayerAffectedByEffect(tp,67200531)
end
function c67200517.ctfilter(c)
return c:IsAbleToHand()
end
function c67200517.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c67200517.ctfilter,tp,0,LOCATION_DECK,1,nil) and Duel.IsPlayerCanSpecialSummonMonster(tp,67200517,0x3675,TYPE_TUNER,2400,0,6,RACE_MACHINE,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67200517.ctop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
local tc=tg:GetFirst()
if Duel.SendtoHand(tc,tp,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,67200517,0x3675,TYPE_TUNER,2400,0,6,RACE_MACHINE,ATTRIBUTE_WIND) then
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TUNER)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c67200517.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
end
function c67200517.splimit(e,c)
return not c:IsSetCard(0x675) and c:IsLocation(LOCATION_EXTRA)
end
--珊海环的真珠龙 哈里奥斯
function c67200519.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,c67200519.matfilter1,nil,nil,aux.FilterBoolFunction(Card.IsSetCard,0x675),1,1)
c:EnableReviveLimit()
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200519,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200519)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_TOGRAVE)
e1:SetTarget(c67200519.target)
e1:SetOperation(c67200519.activate)
c:RegisterEffect(e1)
--cannot activate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(c67200519.actlimit)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EFFECT_DISABLE_EFFECT)
c:RegisterEffect(e4)
end
function c67200519.matfilter1(c)
return c:IsSynchroType(TYPE_TUNER) or c:IsSetCard(0x675)
end
--
function c67200519.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end
function c67200519.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c67200519.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsExistingTarget(c67200519.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c67200519.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c67200519.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)
end
end
--
function c67200519.actlimit(e,c)
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:GetSummonLocation()==LOCATION_GRAVE
end
--珊海环的眷主 阿尔维德
function c67200520.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200520,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c67200520.eqtg)
e1:SetOperation(c67200520.eqop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon and to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200520,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,67200520)
e3:SetCondition(c67200520.spcon)
e3:SetTarget(c67200520.sptg)
e3:SetOperation(c67200520.spop)
c:RegisterEffect(e3)
end
--
function c67200520.filter(c,ec)
return c:IsCode(67200521) and c:CheckEquipTarget(ec)
end
function c67200520.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c67200520.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c67200520.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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c67200520.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c)
if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),c)
end
end
--
function c67200520.spfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsSetCard(0x675) and c:IsType(TYPE_MONSTER)
end
function c67200520.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200520.spfilter,1,nil,tp)
end
function c67200520.tgfilter(c)
return c:IsSetCard(0x675) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c67200520.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.IsExistingMatchingCard(c67200520.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200520.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c67200520.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local tgc=g:GetFirst()
if tgc and Duel.SendtoGrave(tgc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--眷属之珊海环
function c67200521.initial_effect(c)
c:SetUniqueOnField(1,0,67200521)
--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(c67200521.target)
e1:SetOperation(c67200521.operation)
c:RegisterEffect(e1)
--equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c67200521.eqlimit)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCountLimit(1,67200521)
e3:SetTarget(c67200521.cttg)
e3:SetOperation(c67200521.ctop)
c:RegisterEffect(e3)
--re equip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(67200521,0))
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c67200521.reqcon)
e4:SetTarget(c67200521.reqtg)
e4:SetOperation(c67200521.reqop)
c:RegisterEffect(e4)
end
--
function c67200521.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x675)
end
function c67200521.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c67200521.eqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c67200521.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c67200521.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c67200521.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c67200521.eqfilter(tc) then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--
function c67200521.eqlimit(e,c)
return c:IsSetCard(0x675)
end
--
function c67200521.filter(c)
local tp=c:GetControler()
return c:IsAbleToChangeControler() and c:IsSetCard(0x675) and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
end
function c67200521.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200521.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c67200521.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,0,0,0)
end
function c67200521.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(c67200521.filter,tp,LOCATION_MZONE,0,1,nil)
or not Duel.IsExistingMatchingCard(c67200521.filter,tp,0,LOCATION_MZONE,1,nil)
then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g1=Duel.SelectMatchingCard(tp,c67200521.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g1)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONTROL)
local g2=Duel.SelectMatchingCard(1-tp,c67200521.filter,1-tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g2)
local c1=g1:GetFirst()
local c2=g2:GetFirst()
Duel.SwapControl(c1,c2,0,0)
end
--
function c67200521.reqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_LOST_TARGET)
and not e:GetHandler():GetPreviousEquipTarget():IsLocation(LOCATION_ONFIELD+LOCATION_OVERLAY)
end
function c67200521.reqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x675)
end
function c67200521.reqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c67200521.reqfilter(chkc) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c67200521.reqfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:CheckUniqueOnField(tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c67200521.reqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function c67200521.reqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsRelateToEffect(e) and c:CheckUniqueOnField(tp) then
Duel.Equip(tp,c,tc)
end
end
--阿尔维德的珊海环舰
function c67200522.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200522+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c67200522.activate)
c:RegisterEffect(e1)
--plunder hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200522,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,67200523)
e3:SetCondition(c67200522.ctcon)
e3:SetTarget(c67200522.cttg)
e3:SetOperation(c67200522.ctop)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c67200522.ctcon2)
c:RegisterEffect(e2)
end
function c67200522.thfilter(c)
return c:IsCode(67200520) and c:IsAbleToHand()
end
function c67200522.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c67200522.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200522,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--
function c67200522.cfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and c:IsPreviousSetCard(0x675) and rp==1-tp and c:IsReason(REASON_EFFECT)
end
function c67200522.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200522.cfilter,1,nil,tp,rp)
end
function c67200522.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200522.cfilter,1,nil,tp,rp) and Duel.IsPlayerAffectedByEffect(tp,67200590)
end
function c67200522.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end
function c67200522.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c67200522.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp)>1 and Duel.IsPlayerCanSpecialSummonMonster(tp,67200522,0x3675,TYPE_TUNER,0,2400,6,RACE_MACHINE,ATTRIBUTE_DARK) and Duel.IsExistingTarget(c67200522.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c67200522.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67200522.ctop(e,tp,eg,ep,ev,re,r,rp)
--if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,67200522,0x3675,TYPE_TUNER,0,2400,6,RACE_MACHINE,ATTRIBUTE_DARK) then
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TUNER)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c67200522.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
function c67200522.splimit(e,c)
return not c:IsSetCard(0x675) and c:IsLocation(LOCATION_EXTRA)
end
--珊海环的思念体
function c67200524.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,c67200524.matfilter1,nil,nil,aux.FilterBoolFunction(Card.IsSetCard,0x675),1,1)
c:EnableReviveLimit()
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200524,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,67200524)
e3:SetCondition(c67200524.thcon)
e3:SetTarget(c67200524.thtg)
e3:SetOperation(c67200524.thop)
c:RegisterEffect(e3)
end
function c67200524.matfilter1(c)
return c:IsSynchroType(TYPE_TUNER) or c:IsSetCard(0x675)
end
--
function c67200524.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end
function c67200524.thfilter(c,e,tp)
return c:IsFaceup() and c:IsAbleToHand()
end
function c67200524.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200524.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c67200524.thfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c67200524.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c67200524.thfilter,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
--珊海环的领主 博鲁哈
function c67200525.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200525,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c67200525.eqtg)
e1:SetOperation(c67200525.eqop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon and to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200525,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,67200525)
e3:SetCondition(c67200525.spcon)
e3:SetTarget(c67200525.sptg)
e3:SetOperation(c67200525.spop)
c:RegisterEffect(e3)
end
--
function c67200525.filter(c,ec)
return c:IsCode(67200526) and c:CheckEquipTarget(ec)
end
function c67200525.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c67200525.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c67200525.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 g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c67200525.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c)
if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),c)
end
end
--
function c67200525.spfilter(c,e,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSetCard(0x675) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c67200525.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200525.spfilter,1,nil,e,tp)
end
function c67200525.spfilter1(c,e,tp)
return not c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c67200525.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>eg:GetCount() and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not eg:IsExists(c67200525.spfilter1,1,nil,e,tp) and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
local gg=Group.CreateGroup()
gg:AddCard(c)
gg:AddCard(eg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,gg,0,0)
end
function c67200525.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local gg=Group.CreateGroup()
gg:AddCard(c)
gg:AddCard(eg)
if c:IsRelateToEffect(e) and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.SpecialSummon(gg,0,tp,tp,false,false,POS_FACEUP)
end
end
--丰饶之珊海环
function c67200526.initial_effect(c)
c:SetUniqueOnField(1,0,67200526)
--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(c67200526.target)
e1:SetOperation(c67200526.operation)
c:RegisterEffect(e1)
--equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c67200526.eqlimit)
c:RegisterEffect(e2)
--to hand(equip)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200526,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,67200526)
e3:SetCondition(c67200526.thcon)
e3:SetTarget(c67200526.thtg)
e3:SetOperation(c67200526.thop)
c:RegisterEffect(e3)
--re equip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(67200526,0))
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c67200526.reqcon)
e4:SetTarget(c67200526.reqtg)
e4:SetOperation(c67200526.reqop)
c:RegisterEffect(e4)
end
--
function c67200526.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x675)
end
function c67200526.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c67200526.eqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c67200526.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c67200526.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c67200526.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c67200526.eqfilter(tc) then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--
function c67200526.eqlimit(e,c)
return c:IsSetCard(0x675)
end
--
function c67200526.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function c67200526.thfilter(c)
return c:IsSetCard(0x675) and c:IsAbleToHand()
end
function c67200526.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200526.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c67200526.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c67200526.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--
function c67200526.reqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_LOST_TARGET)
and not e:GetHandler():GetPreviousEquipTarget():IsLocation(LOCATION_ONFIELD+LOCATION_OVERLAY)
end
function c67200526.reqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x675)
end
function c67200526.reqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c67200526.reqfilter(chkc) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c67200526.reqfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:CheckUniqueOnField(tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c67200526.reqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function c67200526.reqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsRelateToEffect(e) and c:CheckUniqueOnField(tp) then
Duel.Equip(tp,c,tc)
end
end
--博鲁哈的珊海环舰
function c67200527.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200527+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c67200527.activate)
c:RegisterEffect(e1)
--plunder extra deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200527,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,67200528)
e3:SetCondition(c67200527.ctcon)
e3:SetTarget(c67200527.cttg)
e3:SetOperation(c67200527.ctop)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c67200527.ctcon2)
c:RegisterEffect(e2)
end
function c67200527.thfilter(c)
return c:IsCode(67200525) and c:IsAbleToHand()
end
function c67200527.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c67200527.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200527,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--
function c67200527.cfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and c:IsPreviousSetCard(0x675) and rp==1-tp and c:IsReason(REASON_EFFECT)
end
function c67200527.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200527.cfilter,1,nil,tp,rp)
end
function c67200527.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200527.cfilter,1,nil,tp,rp) and Duel.IsPlayerAffectedByEffect(tp,67200590)
end
function c67200527.ctfilter(c)
return c:IsAbleToExtra()
end
function c67200527.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp)>0 and Duel.IsExistingMatchingCard(c67200527.ctfilter,tp,0,LOCATION_EXTRA,1,nil) and Duel.IsPlayerCanSpecialSummonMonster(tp,67200527,0x3675,TYPE_TUNER,2400,0,6,RACE_MACHINE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67200527.ctop(e,tp,eg,ep,ev,re,r,rp)
--if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=g:FilterSelect(tp,Card.IsAbleToExtra,1,1,nil)
local tc=tg:GetFirst()
if Duel.SendtoDeck(tc,tp,2,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,67200527,0x3675,TYPE_TUNER,2400,0,6,RACE_MACHINE,ATTRIBUTE_EARTH) then
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TUNER)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c67200527.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
end
function c67200527.splimit(e,c)
return not c:IsSetCard(0x675) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--珊海环的海洋候 维帕珥
function c67200529.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,c67200529.matfilter1,nil,nil,aux.FilterBoolFunction(Card.IsSetCard,0x675),1,1)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200529,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_F)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c67200529.nethcon)
e1:SetTarget(c67200529.nethtg)
e1:SetOperation(c67200529.nethop)
c:RegisterEffect(e1)
end
function c67200529.matfilter1(c)
return c:IsSynchroType(TYPE_TUNER) or c:IsSetCard(0x675)
end
--
function c67200529.nethcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()>=3
end
function c67200529.nethtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ng=Group.CreateGroup()
local dg=Group.CreateGroup()
for i=1,ev do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
if te:IsHasType(EFFECT_TYPE_ACTIVATE) or te:IsActiveType(TYPE_MONSTER) then
local tc=te:GetHandler()
ng:AddCard(tc)
if tc:IsRelateToEffect(te) then
dg:AddCard(tc)
end
end
end
Duel.SetTargetCard(dg)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,dg,dg:GetCount(),0,0)
end
function c67200529.nethop(e,tp,eg,ep,ev,re,r,rp)
local dg=Group.CreateGroup()
for i=1,ev do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
local tc=te:GetHandler()
if (te:IsHasType(EFFECT_TYPE_ACTIVATE) or te:IsActiveType(TYPE_MONSTER))
and Duel.NegateActivation(i) and tc:IsRelateToEffect(e) and tc:IsRelateToEffect(te) then
tc:CancelToGrave()
dg:AddCard(tc)
end
end
Duel.SendtoHand(dg,tp,REASON_EFFECT)
end
--珊海环门
function c67200530.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200530+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c67200530.cost)
e1:SetTarget(c67200530.target)
e1:SetOperation(c67200530.activate)
c:RegisterEffect(e1)
end
function c67200530.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c67200530.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_EQUIP) and c:IsSetCard(0x675) and c:IsAbleToGraveAsCost()
end
function c67200530.spfilter(c,e,tp,lv)
return c:IsSetCard(0x675) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200530.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
local cg=Duel.GetMatchingGroup(c67200530.cfilter,tp,LOCATION_DECK,0,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and cg:GetCount()>0
and Duel.IsExistingMatchingCard(c67200530.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,cg:GetClassCount(Card.GetCode))
end
local cg=Duel.GetMatchingGroup(c67200530.cfilter,tp,LOCATION_DECK,0,nil)
local ct=cg:GetClassCount(Card.GetCode)
local tg=Duel.GetMatchingGroup(c67200530.spfilter,tp,LOCATION_DECK,0,nil,e,tp,ct)
local lvt={}
local tc=tg:GetFirst()
while tc do
local tlv=0
tlv=tlv+tc:GetLevel()
lvt[tlv]=tlv
tc=tg:GetNext()
end
local pc=1
for i=1,12 do
if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end
end
lvt[pc]=nil
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200530,2))
local lv=Duel.AnnounceNumber(tp,table.unpack(lvt))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
aux.GCheckAdditional=aux.dncheck
local rg=cg:SelectSubGroup(tp,aux.TRUE,false,lv,lv)
aux.GCheckAdditional=nil
Duel.SendtoGrave(rg,REASON_COST)
e:SetLabel(lv)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c67200530.spfilter2(c,e,tp,lv)
return c:IsSetCard(0x675) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200530.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c67200530.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
tc:RegisterFlagEffect(67200530,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(c67200530.descon)
e1:SetOperation(c67200530.desop)
Duel.RegisterEffect(e1,tp)
end
Duel.SpecialSummonComplete()
end
function c67200530.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(67200530)~=0 then
return true
else
e:Reset()
return false
end
end
function c67200530.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
--珊海环王 高特里奥
function c67200531.initial_effect(c)
--link summon
--aux.AddLinkProcedure(c,c67200531.lfilter,6,6,c67200531.lcheck)
c:EnableReviveLimit()
--summon word
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c67200531.txtcon)
e0:SetOperation(c67200531.txtop)
c:RegisterEffect(e0)
--extra link
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c67200531.lkcon)
e1:SetOperation(c67200531.lkop)
e1:SetValue(SUMMON_TYPE_LINK)
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:SetCondition(c67200531.imcon)
e2:SetValue(c67200531.efilter)
c:RegisterEffect(e2)
--change effect type
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetCode(67200531)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(1,0)
c:RegisterEffect(e6)
end
--
--summon TXT
function c67200531.txtcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK)
end
function c67200531.txtop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(24,0,aux.Stringid(67200531,7))
Duel.Hint(24,0,aux.Stringid(67200531,8))
end
--link summon
function c67200531.lkfilter(c,lc,tp)
local flag=c:IsFaceup() and c:IsCanBeLinkMaterial(lc)
if c:IsType(TYPE_MONSTER) then
return flag
else
return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_EQUIP) and c:IsSetCard(0x675)
end
end
function c67200531.lvfilter(c)
if c:IsType(TYPE_LINK) and c:GetLink()>1 then
return 1+0x10000*c:GetLink()
else
return 1
end
end
function c67200531.lcheck(tp,sg,lc,minc,ct)
return ct>=minc and sg:CheckWithSumEqual(c67200531.lvfilter,lc:GetLink(),ct,ct) and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0
end
function c67200531.lkchenk(c,tp,sg,mg,lc,ct,minc,maxc)
sg:AddCard(c)
ct=ct+1
local res=c67200531.lcheck(tp,sg,lc,minc,ct) or (ct<maxc and mg:IsExists(c67200531.lkchenk,1,sg,tp,sg,mg,lc,ct,minc,maxc))
sg:RemoveCard(c)
ct=ct-1
return res
end
function c67200531.lkcon(e,c)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c67200531.lkfilter,tp,LOCATION_ONFIELD,0,nil,c,tp)
local sg=Group.CreateGroup()
for i,pe in ipairs({Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_LMATERIAL)}) do
local pc=pe:GetHandler()
if not mg:IsContains(pc) then return false end
sg:AddCard(pc)
end
local ct=sg:GetCount()
local minc=5
local maxc=6
if ct>maxc then return false end
return c67200531.lcheck(tp,sg,c,minc,ct) or mg:IsExists(c67200531.lkchenk,1,nil,tp,sg,mg,c,ct,minc,maxc)
end
function c67200531.lkop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c67200531.lkfilter,tp,LOCATION_ONFIELD,0,nil,c,tp)
local sg=Group.CreateGroup()
for i,pe in ipairs({Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_LMATERIAL)}) do
sg:AddCard(pe:GetHandler())
end
local ct=sg:GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
sg:Select(tp,ct,ct,nil)
local minc=5
local maxc=6
for i=ct,maxc-1 do
local cg=mg:Filter(c67200531.lkchenk,sg,tp,sg,mg,c,i,minc,maxc)
if cg:GetCount()==0 then break end
local minct=1
if c67200531.lcheck(tp,sg,c,minc,i) then
if not Duel.SelectYesNo(tp,210) then break end
minct=0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local g=cg:Select(tp,minct,1,nil)
if g:GetCount()==0 then break end
sg:Merge(g)
end
c:SetMaterial(sg)
Duel.SendtoGrave(sg,REASON_MATERIAL+REASON_LINK)
end
--
function c67200531.imcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c67200531.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
--挣脱的珊海环舰
function c67200532.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c67200532.matfilter,1,1)
c:EnableReviveLimit()
end
function c67200532.matfilter(c)
return c:IsLinkSetCard(0x3675) and not c:IsLinkType(TYPE_LINK)
end
\ No newline at end of file
--珊海环的黄金之乡
function c67200533.initial_effect(c)
--change effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200533,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,67200533+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c67200533.chcon)
e1:SetTarget(c67200533.chtg)
e1:SetOperation(c67200533.chop)
c:RegisterEffect(e1)
end
function c67200533.chcon(e,tp,eg,ep,ev,re,r,rp)
local ex4=re:IsHasCategory(CATEGORY_DRAW)
local ex5=re:IsHasCategory(CATEGORY_SEARCH)
local ex6=re:IsHasCategory(CATEGORY_DECKDES)
return ex4 or ex5 or ex6
end
function c67200533.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c67200533.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c67200533.repop)
end
function c67200533.repop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,2,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_HAND)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_DRAW)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
Duel.RegisterEffect(e2,tp)
end
end
\ No newline at end of file
......@@ -218,6 +218,9 @@
#西瓜 112
!setname 0x621 因幡帝
#血迷 112
!setname 0x581 夜魅
#Justfish 140
!setname 0x1406 影魔
......@@ -974,11 +977,8 @@
!counter 0x1673 血指示物
!setname 0x674 封缄
!setname 0x3674 封缄英杰
!setname 0x675 珊海环
!setname 0x3675 珊海环舰
!setname 0x676 巧壳
!setname 0x677 征冥天
!setname 0x3675 珊海环舰
!setname 0x3678 白地龙骑士团
!setname 0x5678 枪塔
!setname 0x6678 深凌之楔魔
......
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