Commit f865138a authored by Huangnan's avatar Huangnan

fix

parent 029b94e9
Pipeline #41938 failed with stages
in 2 minutes and 35 seconds
--罗浮仙舟的接渡使 停云
function c11602170.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11602170)
e1:SetCost(c11602170.thcost)
e1:SetTarget(c11602170.thtg)
e1:SetOperation(c11602170.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11602170+1)
e2:SetCondition(c11602170.spcon)
e2:SetTarget(c11602170.sptg)
e2:SetOperation(c11602170.spop)
c:RegisterEffect(e2)
end
function c11602170.spfilter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0x9548) and c:IsFaceup()
end
function c11602170.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11602170.spfilter,1,nil,tp)
end
function c11602170.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_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11602170.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c11602170.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c11602170.thfilter(c)
return c:IsSetCard(0x9548) and c:IsType(0x2) and c:IsAbleToHand()
end
function c11602170.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c11602170.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11602170.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c11602170.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
\ No newline at end of file
--曜青仙舟的剑客 素裳
function c11602175.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,11602175)
e1:SetTarget(c11602175.thtg)
e1:SetOperation(c11602175.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11602175+1)
e2:SetCost(c11602175.spcost)
e2:SetTarget(c11602175.sptg)
e2:SetOperation(c11602175.spop)
c:RegisterEffect(e2)
end
function c11602175.cfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0x3548) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5)
end
function c11602175.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(c11602175.cfilter,tp,LOCATION_MZONE,0,1,nil,ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c11602175.cfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST)
end
function c11602175.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11602175.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c11602175.filter(c)
return c:IsSetCard(0x9548) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c11602175.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11602175.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11602175.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11602175.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--罗浮仙舟的卜者 青雀
function c11602180.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,11602180)
e1:SetTarget(c11602180.tg)
e1:SetOperation(c11602180.op)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e11)
--
local custom_code=aux.RegisterMergedDelayedEvent_ToSingleCard(c,11602180,EVENT_TO_GRAVE)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(custom_code)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11602180+1)
e2:SetTarget(c11602180.target)
e2:SetOperation(c11602180.operation)
c:RegisterEffect(e2)
end
function c11602180.cfilter(c,e,tp)
return c:IsPreviousLocation(LOCATION_MZONE)
and c:IsControler(tp) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
and c:IsAbleToRemove() and (not e or c:IsRelateToEffect(e))
end
function c11602180.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=eg:Filter(c11602180.cfilter,nil,nil,tp)
if chk==0 then return c:IsAbleToRemove()
and #g>0 end
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_GRAVE)
end
function c11602180.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=eg:Filter(c11602180.cfilter,nil,e,tp)
local tc=g:GetFirst()
if not tc then return end
if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
tc=g:Select(tp,1,1,nil):GetFirst()
end
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
if c:IsLocation(0x20) then
c:RegisterFlagEffect(11602180,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
if tc:IsLocation(0x20) then
tc:RegisterFlagEffect(11602180,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c11602180.spcon)
e1:SetOperation(c11602180.spop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c11602180.spfilter(c,e,tp)
return c:GetFlagEffect(11602180)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11602180.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(c11602180.spfilter,tp,LOCATION_REMOVED,0,2,nil,e,tp)
end
function c11602180.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,11602180)
local g=Duel.GetMatchingGroup(c11602180.spfilter,tp,LOCATION_REMOVED,0,nil,e,tp)
if g:GetCount()==2 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c11602180.disfilter(c)
return c:IsDiscardable(REASON_EFFECT) and c:IsType(TYPE_MONSTER)
end
function c11602180.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11602180.disfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,1)
end
function c11602180.op(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardHand(tp,c11602180.disfilter,1,1,REASON_EFFECT+REASON_DISCARD)
local g1=Duel.GetOperatedGroup()
Duel.DiscardHand(1-tp,c11602180.disfilter,1,1,REASON_EFFECT+REASON_DISCARD)
local g2=Duel.GetOperatedGroup()
if #g1<1 or #g2<1 then return end
Duel.BreakEffect()
local tc1=g1:GetFirst()
local tc2=g2:GetFirst()
if tc1:IsAttribute(tc2:GetAttribute()) then
Duel.Draw(tp,2,REASON_EFFECT)
Duel.Draw(1-tp,2,REASON_EFFECT)
else
local b1=(tc1:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0)
local b2=(tc2:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(1-tp)>0)
if b1 and b2 then
Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc2,0,tp,1-tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--罗浮仙舟的异乡客 桂乃芬
function c11602185.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,11602185)
e1:SetCost(c11602185.cost)
e1:SetOperation(c11602185.op)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11602185+1)
e2:SetCondition(c11602185.spcon)
e2:SetTarget(c11602185.sptg)
e2:SetOperation(c11602185.spop)
c:RegisterEffect(e2)
end
function c11602185.spcfilter(c)
return c:IsCode(11602175) and c:IsFaceup()
end
function c11602185.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c11602185.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c11602185.eqfilter(c,tp)
return c:IsSetCard(0x9548) and c:CheckUniqueOnField(tp,LOCATION_SZONE) and not c:IsForbidden()
end
function c11602185.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)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c11602185.eqfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function c11602185.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 g=Duel.GetMatchingGroup(c11602185.spcfilter,tp,LOCATION_MZONE,0,nil)
local eqg=Duel.GetMatchingGroup(c11602185.eqfilter,tp,LOCATION_DECK,0,nil,tp)
if #g<1 or #eqg<1 or Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eqc=eqg:Select(tp,1,1,nil):GetFirst()
if not Duel.Equip(tp,eqc,tc) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(tc)
e1:SetValue(c11602185.eqlimit)
eqc:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
eqc:RegisterEffect(e2)
end
end
function c11602185.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c11602185.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c11602185.op(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(-1000)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--罗浮仙舟的主司 驭空
function c11602190.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_END_PHASE)
e1:SetCountLimit(1,11602190)
e1:SetCondition(c11602190.spcon)
e1:SetTarget(c11602190.sptg)
e1:SetOperation(c11602190.spop)
c:RegisterEffect(e1)
--to deck
local custom_code=aux.RegisterMergedDelayedEvent_ToSingleCard(c,11602190,EVENT_LEAVE_FIELD)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(custom_code)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,11602190+1)
e2:SetTarget(c11602190.tdtg)
e2:SetOperation(c11602190.tdop)
c:RegisterEffect(e2)
end
function c11602190.cfilter(c,e)
return c:IsFaceupEx() and c:IsType(TYPE_LINK) and c:IsAbleToExtra() and c:IsSetCard(0x9548)
and c:IsCanBeEffectTarget(e)
and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end
function c11602190.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) end
if chk==0 then return eg:IsExists(c11602190.cfilter,1,nil,e)
and e:GetHandler():IsAbleToHand() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=eg:FilterSelect(tp,c11602190.cfilter,1,1,nil,e)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c11602190.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 then
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,0x40)
end
end
end
function c11602190.spcfilter(c)
return c:IsSetCard(0x9548) and c:IsFaceup()
end
function c11602190.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c11602190.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c11602190.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11602190.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 g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(11602190,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c11602190.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c11602190.splimit(e,c)
return not c:IsSetCard(0x3548) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--罗浮仙舟的判官 雪衣
function c11602195.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,11602195)
e1:SetCondition(c11602195.spcon)
e1:SetTarget(c11602195.sptg)
e1:SetOperation(c11602195.spop)
c:RegisterEffect(e1)
if not c11602195.global_check then
c11602195.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD)
ge1:SetOperation(c11602195.chk)
Duel.RegisterEffect(ge1,0)
end
--cannot
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UNRELEASABLE_SUM)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetValue(1)
e3:SetTarget(c11602195.antg)
c:RegisterEffect(e3)
local e33=e3:Clone()
e33:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e33)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e4:SetValue(c11602195.fuslimit)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e6)
local e7=e3:Clone()
e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e7)
end
function c11602195.chkfilter(c)
return c:GetPreviousControler()~=c:GetReasonPlayer()
end
function c11602195.chk(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if c11602195.chkfilter(tc) then
Duel.RegisterFlagEffect(tp,11602195,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(1-tp,11602195,RESET_PHASE+PHASE_END,0,1)
end
tc=eg:GetNext()
end
end
function c11602195.antg(e,c)
return c:IsDisabled()
end
function c11602195.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
function c11602195.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,11602195)>=3
end
function c11602195.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)
and Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_MZONE)
end
function c11602195.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.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,3,nil)
local tc=g:GetFirst()
while tc do
if tc:IsCanBeDisabledByEffect(e,false) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
tc=g:GetNext()
end
end
end
\ No newline at end of file
--罗浮仙舟的判官 寒鸦
function c11602200.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_END_PHASE)
e1:SetCountLimit(1,11602200)
e1:SetCost(c11602200.thcost)
e1:SetTarget(c11602200.thtg)
e1:SetOperation(c11602200.thop)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11602200+1)
e2:SetCondition(c11602200.condition)
e2:SetTarget(c11602200.target)
e2:SetOperation(c11602200.operation)
c:RegisterEffect(e2)
end
function c11602200.cfilter(c,tp)
return c:IsPreviousControler(tp)
end
function c11602200.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11602200.cfilter,1,nil,tp)
end
function c11602200.target(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 c11602200.operation(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
function c11602200.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c11602200.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
end
function c11602200.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11602200,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLED)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e1:SetTarget(c11602200.drtg)
e1:SetOperation(c11602200.drop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c11602200.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c11602200.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--罗浮仙舟的龙尊 白露
function c11602205.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,11602205)
e1:SetTarget(c11602205.target)
e1:SetOperation(c11602205.activate)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11602205+1)
e2:SetTarget(c11602205.sptg)
e2:SetOperation(c11602205.spop)
c:RegisterEffect(e2)
end
function c11602205.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=eg:GetFirst()
if chk==0 then return c:IsAbleToRemove() and eg:GetCount()==1
and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) and tc:IsPreviousControler(tp)
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0 end
tc:CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg,1,0,0)
end
function c11602205.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,0x40)>0 and c:IsLocation(0x20) then
local tc=eg:GetFirst()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c11602205.filter(c,e,tp)
return c:IsSetCard(0x9548) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11602205.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c11602205.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingTarget(c11602205.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c11602205.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0)
end
function c11602205.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then
local g=Group.FromCards(c,tc)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--罗浮仙舟的判官 藿藿
function c11602210.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11602170)
e1:SetCondition(c11602210.con)
e1:SetCost(c11602210.cost)
e1:SetTarget(c11602210.tg)
e1:SetOperation(c11602210.op)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCountLimit(1,11602170+1)
e2:SetCondition(c11602210.spcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c11602210.sptg)
e2:SetOperation(c11602210.spop)
c:RegisterEffect(e2)
end
function c11602210.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function c11602210.spfilter(c,e,tp)
return c:IsSetCard(0x9548) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11602210.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)
and Duel.IsExistingMatchingCard(c11602210.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
end
function c11602210.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Recover(tp,ev,REASON_EFFECT)>0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c11602210.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c11602210.con(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==tp
and rc:IsAllTypes(TYPE_SPELL) or rc:IsAllTypes(TYPE_TRAP) or rc:IsType(TYPE_QUICKPLAY)
and rc:IsSetCard(0x9548)
end
function c11602210.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c11602210.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ftg=re:GetTarget()
if chkc then return ftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chk==0 then
e:SetCostCheck(false)
return not ftg or ftg(e,tp,eg,ep,ev,re,r,rp,chk)
end
if re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
end
if ftg then
e:SetCostCheck(false)
ftg(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel.ClearOperationInfo(0)
end
function c11602210.op(e,tp,eg,ep,ev,re,r,rp)
local fop=re:GetOperation()
fop(e,tp,eg,ep,ev,re,r,rp)
end
\ No newline at end of file
--星核猎手 刃
function c11602215.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,11602215)
e1:SetCondition(c11602215.spcon)
e1:SetCost(c11602215.spcost)
e1:SetTarget(c11602215.sptg)
e1:SetOperation(c11602215.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11602215,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11602215+1)
e2:SetCondition(c11602215.condition)
e2:SetTarget(c11602215.target)
e2:SetOperation(c11602215.operation)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11602215,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,11602215+2)
e3:SetCondition(c11602215.condition2)
e3:SetTarget(c11602215.target2)
e3:SetOperation(c11602215.operation2)
c:RegisterEffect(e3)
if not c11602215.global_check then
c11602215.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DAMAGE)
ge1:SetOperation(c11602215.chk)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PAY_LPCOST)
ge2:SetOperation(c11602215.chk2)
Duel.RegisterEffect(ge2,0)
end
end
function c11602215.chk(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(ep,11602215,RESET_PHASE+PHASE_END,0,1)
end
function c11602215.chk2(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(ep,11602215+1,RESET_PHASE+PHASE_END,0,1)
end
function c11602215.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)~=4000
end
function c11602215.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c11602215.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.SetLP(tp,4000)
end
end
end
function c11602215.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,11602215)+Duel.GetFlagEffect(tp,11602215+1)>=5
end
function c11602215.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c11602215.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
if Duel.Destroy(sg,REASON_EFFECT)>0 then
local g=Duel.GetOperatedGroup()
local rec=g:GetSum(Card.GetAttack)
if rec>0 then
Duel.BreakEffect()
Duel.Recover(tp,rec,0x40)
end
end
end
function c11602215.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,11602215)>0
end
function c11602215.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2000) end
Duel.PayLPCost(tp,2000)
end
function c11602215.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,e:GetHandler(),1,0,0)
end
function c11602215.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--曜青仙舟的医士 椒丘
function c11602220.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCountLimit(1,11602220)
e1:SetTarget(c11602220.eqtg)
e1:SetOperation(c11602220.eqop)
c:RegisterEffect(e1)
--atk and def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(500)
c:RegisterEffect(e2)
--atk down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(-500)
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_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c11602220.spcon)
e4:SetTarget(c11602220.sptg)
e4:SetOperation(c11602220.spop)
c:RegisterEffect(e4)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DRAW+CATEGORY_RELEASE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetRange(LOCATION_SZONE+LOCATION_MZONE)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1,11602220+1)
e5:SetCondition(c11602220.drcon)
e5:SetTarget(c11602220.drtg)
e5:SetOperation(c11602220.drop)
c:RegisterEffect(e5)
end
function c11602220.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousControler(1-tp) and c:GetReasonPlayer()==tp
end
function c11602220.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11602220.cfilter,1,nil,tp)
end
function c11602220.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and e:GetHandler():IsReleasableByEffect() end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c11602220.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Release(c,0x40)>0 then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
end
function c11602220.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetPreviousEquipTarget()
return ec and c:IsReason(REASON_LOST_TARGET)
end
function c11602220.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11602220.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c11602220.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x9548)
end
function c11602220.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11602220.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c11602220.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c11602220.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c11602220.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,c,tc) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(c11602220.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function c11602220.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
--罗浮仙舟的司鼎 灵砂
function c11602225.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11602225)
e1:SetTarget(c11602225.sptg)
e1:SetOperation(c11602225.spop)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11602225+1)
e2:SetCondition(c11602225.spcon2)
e2:SetTarget(c11602225.sptg2)
e2:SetOperation(c11602225.spop2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c11602225.spcon3)
c:RegisterEffect(e3)
end
function c11602225.cfilter3(c,tp)
return c:IsPreviousSetCard(0x9548) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c11602225.spcon3(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11602225.cfilter3,1,nil,tp)
end
function c11602225.cfilter(c,tp)
return c:IsSetCard(0x9548) and c:IsType(TYPE_MONSTER)
end
function c11602225.spcon2(e,tp,eg,ep,ev,re,r,rp)
if not (rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c11602225.cfilter,1,nil,tp)
end
function c11602225.spfilter2(c,e,tp)
return c:IsSetCard(0x9548) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c11602225.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemove() and Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c11602225.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c11602225.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,0x40)>0 and c:IsLocation(0x20) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c11602225.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c11602225.spfilter(c,e,tp)
return c:IsSetCard(0x9548) and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11602225.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not c:IsPublic()
and Duel.IsExistingMatchingCard(c11602225.spfilter,tp,LOCATION_HAND,0,1,c,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c11602225.spfilter,tp,LOCATION_HAND,0,1,1,c,e,tp)
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,g)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_HAND)
e2:SetOperation(c11602225.clearop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
e2:SetLabel(Duel.GetCurrentChain())
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
local e3=e1:Clone()
tc:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetLabelObject(e3)
tc:RegisterEffect(e4)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND)
end
function c11602225.clearop(e,tp,eg,ep,ev,re,r,rp)
if ev~=e:GetLabel() then return end
e:GetLabelObject():Reset()
e:Reset()
end
function c11602225.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local rec=c:GetAttack()+tc:GetAttack()
Duel.BreakEffect()
Duel.Recover(tp,rec,0x40)
end
end
\ No newline at end of file
--曜青仙舟的影卫 貊泽
function c11602230.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCountLimit(1,11602230)
e1:SetTarget(c11602230.eqtg)
e1:SetOperation(c11602230.eqop)
c:RegisterEffect(e1)
--atk and def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(800)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
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_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c11602230.spcon)
e4:SetTarget(c11602230.sptg)
e4:SetOperation(c11602230.spop)
c:RegisterEffect(e4)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetRange(LOCATION_SZONE+LOCATION_MZONE)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,11602230+1)
e5:SetCondition(c11602230.descon)
e5:SetTarget(c11602230.destg)
e5:SetOperation(c11602230.desop)
c:RegisterEffect(e5)
end
function c11602230.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousControler(1-tp) and c:GetReasonPlayer()==tp
end
function c11602230.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11602230.cfilter,1,nil,tp)
end
function c11602230.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
and e:GetHandler():IsReleasableByEffect() end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function c11602230.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Release(c,0x40)>0 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
end
end
function c11602230.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetPreviousEquipTarget()
return ec and c:IsReason(REASON_LOST_TARGET)
end
function c11602230.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11602230.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c11602230.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x9548)
end
function c11602230.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11602230.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c11602230.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c11602230.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c11602230.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,c,tc) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(c11602230.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function c11602230.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
--曜青仙舟的将军 飞霄
function c11602235.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,3,99,c11602235.lcheck)
c:EnableReviveLimit()
--look
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
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,11602235)
e1:SetCondition(c11602235.descon)
e1:SetTarget(c11602235.destg)
e1:SetOperation(c11602235.desop)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c11602235.tg)
e2:SetOperation(c11602235.op)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,11602235+1)
e3:SetTarget(c11602235.antg)
e3:SetOperation(c11602235.anop)
c:RegisterEffect(e3)
end
function c11602235.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x9548)
end
function c11602235.antg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_MONSTER,OPCODE_ISTYPE}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function c11602235.anop(e,tp,eg,ep,ev,re,r,rp,chk)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
--spsummon
local e1=Effect.CreateEffect(c)
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_GRAVE)
e1:SetLabel(ac)
e1:SetCondition(c11602235.spcon)
e1:SetTarget(c11602235.sptg)
e1:SetOperation(c11602235.spop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function c11602235.spcfilter(c,tp,code)
return c:IsFaceup() and c:IsCode(code) and c:IsSummonPlayer(1-tp)
end
function c11602235.spcon(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
return eg:IsExists(c11602235.spcfilter,1,nil,tp,code)
end
function c11602235.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11602235.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c11602235.cfilter(c,tp,re)
if not (c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp) then return end
if c:IsReason(REASON_EFFECT) then
rc=re:GetHandler()
return rc:IsRelateToEffect(re) and rc:IsLocation(LOCATION_MZONE) and rc:IsFaceup()
elseif c:IsReason(REASON_BATTLE) then
rc=c:GetReasonCard()
return rc:IsRelateToBattle() and rc:IsFaceup()
end
end
function c11602235.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c11602235.cfilter,nil,tp,re)
if chk==0 then return #g>0 end
Duel.SetTargetCard(g)
end
function c11602235.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=Duel.GetFirstTarget()
if rc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1)
c:CreateRelation(rc,RESET_EVENT+RESETS_STANDARD)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_MUST_ATTACK)
e2:SetCondition(c11602235.atkcon2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_MUST_ATTACK_MONSTER)
e3:SetValue(c11602235.atklimit)
rc:RegisterEffect(e3)
end
end
function c11602235.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetOwner():IsRelateToCard(e:GetHandler())
end
function c11602235.atklimit(e,c)
return c==e:GetOwner()
end
function c11602235.descon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function c11602235.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function c11602235.desop(e,tp,eg,ep,ev,re,r,rp)
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
end
\ No newline at end of file
--罗浮仙舟的将军 景元
function c11602240.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,3,99,c11602240.lcheck)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,11602240)
e1:SetCondition(c11602240.thcon)
e1:SetTarget(c11602240.thtg)
e1:SetOperation(c11602240.thop)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c11602240.rmcon)
e2:SetTarget(c11602240.rmtg)
e2:SetOperation(c11602240.rmop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,11602240+1)
e3:SetTarget(c11602240.sptg)
e3:SetOperation(c11602240.spop)
c:RegisterEffect(e3)
end
function c11602240.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateMonsterFilter(chkc) end
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11602240.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c11602240.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c11602240.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local sc=g:GetFirst()
if Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
sc:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_TARGET)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
end
end
end
end
function c11602240.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x9548)
end
function c11602240.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c11602240.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11602240.cfilter,1,nil,tp)
end
function c11602240.rmfilter(c)
return c:IsSetCard(0x9548) and c:IsAbleToRemove()
end
function c11602240.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c11602240.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11602240.rmfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c11602240.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,LOCATION_GRAVE)
end
function c11602240.spfilter(c,e,tp)
return c:IsSetCard(0x9548) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11602240.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,0x40)>0 and tc:IsLocation(0x20) then
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11602240.spfilter),tp,0x12,0,1,1,nil,e,tp)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(11602240,0)) then
Duel.BreakEffect()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c11602240.thcon(e,tp,eg,ep,ev,re,r,rp)
local te,p=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te and te:GetHandlerPlayer()==tp and ep~=tp
end
function c11602240.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local dg=Group.CreateGroup()
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp then
local tc=te:GetHandler()
if tc:IsRelateToEffect(te) then
dg:AddCard(tc)
end
end
end
Duel.SetTargetCard(dg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,dg,dg:GetCount(),0,0)
end
function c11602240.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetValue(c11602240.efilter)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
local dg=Group.CreateGroup()
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp then
local tc=te:GetHandler()
if tc:IsRelateToEffect(e) and tc:IsRelateToEffect(te) then
dg:AddCard(tc)
end
end
end
Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT,tp,true)
end
function c11602240.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
\ No newline at end of file
--罗浮仙舟的太卜 符玄
function c11602245.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,99,c11602245.lcheck)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,11602245)
e1:SetTarget(c11602245.tg)
e1:SetOperation(c11602245.op)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_DAMAGE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCondition(c11602245.reccon)
e2:SetTarget(c11602245.rectg)
e2:SetOperation(c11602245.recop)
c:RegisterEffect(e2)
end
function c11602245.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x9548)
end
function c11602245.reccon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function c11602245.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
end
function c11602245.recop(e,tp,eg,ep,ev,re,r,rp)
local rec=0
if ev<4000 then
rec=Duel.Recover(tp,4000-ev,REASON_EFFECT)
elseif ev>=4000 then
rec=Duel.Recover(tp,ev,REASON_EFFECT)
end
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(rec)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c11602245.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
Duel.SetTargetParam(Duel.AnnounceType(tp))
end
function c11602245.op(e,tp,eg,ep,ev,re,r,rp)
local op=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local type=(1<<op)
--negate
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCountLimit(1)
e2:SetLabel(type)
e2:SetCondition(c11602245.negcon)
e2:SetOperation(c11602245.negop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c11602245.negcon(e,tp,eg,ep,ev,re,r,rp)
local type=e:GetLabel()
return rp==1-tp and re:IsActiveType(type)
end
function c11602245.cffilter(c)
return c:IsLocation(LOCATION_HAND) or c:IsFacedown()
end
function c11602245.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,11602245)
if Duel.NegateEffect(ev,true) then
Duel.BreakEffect()
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD+LOCATION_HAND):Filter(c11602245.cffilter,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,0x40)
Duel.ShuffleHand(1-tp)
end
end
end
\ No newline at end of file
--罗浮仙舟的骁卫 彦卿
function c11602250.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c11602250.lcheck)
c:EnableReviveLimit()
--set s/t
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,11602250)
e1:SetTarget(c11602250.settg)
e1:SetOperation(c11602250.setop)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCountLimit(1,11602250+1)
e2:SetTarget(c11602250.eqtg)
e2:SetOperation(c11602250.eqop)
c:RegisterEffect(e2)
end
function c11602250.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x9548)
end
function c11602250.eqfilter(c)
return c:IsSetCard(0x9548) and c:IsType(0x1)
end
function c11602250.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c11602250.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
end
function c11602250.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c11602250.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c11602250.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(1000)
tc:RegisterEffect(e2)
local code=tc:GetOriginalCodeRule()
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1)
end
end
function c11602250.eqlimit(e,c)
return e:GetOwner()==c
end
function c11602250.filter(c)
return c:IsSetCard(0x9548) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c11602250.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11602250.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c11602250.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local dc=Duel.SelectMatchingCard(tp,c11602250.filter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if dc and Duel.SSet(tp,dc)>0 then
if dc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11602250,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e1)
end
if dc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11602250,0))
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)
dc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--朱明仙舟的猎剑士 云璃
function c11602255.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c11602255.lcheck)
c:EnableReviveLimit()
--to hand or grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,11602255)
e1:SetTarget(c11602255.target)
e1:SetOperation(c11602255.operation)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
--must attack
local e22=Effect.CreateEffect(c)
e22:SetType(EFFECT_TYPE_FIELD)
e22:SetCode(EFFECT_MUST_ATTACK)
e22:SetRange(LOCATION_MZONE)
e22:SetTargetRange(0,LOCATION_MZONE)
c:RegisterEffect(e22)
local e23=e22:Clone()
e23:SetCode(EFFECT_MUST_ATTACK_MONSTER)
e23:SetValue(c11602255.atklimit)
c:RegisterEffect(e23)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,11602255)
e3:SetCondition(c11602255.descon)
e3:SetTarget(c11602255.destg)
e3:SetOperation(c11602255.desop)
c:RegisterEffect(e3)
end
function c11602255.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x9548)
end
function c11602255.cfilter(c,tp,rp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and rp==1-tp and c:IsReason(REASON_EFFECT)
end
function c11602255.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11602255.cfilter,1,nil,tp,rp)
end
function c11602255.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c11602255.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c11602255.atklimit(e,c)
return c==e:GetHandler()
end
function c11602255.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x9548) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c11602255.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11602255.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c11602255.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c11602255.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
\ No newline at end of file
--罗浮仙舟的无名客 丹恒/饮月
function c11602260.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,99,c11602260.lcheck)
c:EnableReviveLimit()
--des
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,11602260)
e1:SetTarget(c11602260.destg)
e1:SetOperation(c11602260.desop)
c:RegisterEffect(e1)
--return
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e2:SetCondition(c11602260.drcon)
e2:SetTarget(c11602260.drtg)
e2:SetOperation(c11602260.drop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,11602260+1)
e3:SetCondition(c11602260.spcon)
e3:SetTarget(c11602260.sptg)
e3:SetOperation(c11602260.spop)
c:RegisterEffect(e3)
end
function c11602260.lcheck(g,lc)
return g:IsExists(Card.IsLinkCode,1,nil,11602010)
end
function c11602260.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c11602260.spfilter(c,e,tp)
return c:IsCode(11602010) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11602260.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c11602260.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c11602260.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,c11602260.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c11602260.drcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at and at:IsControler(tp)
end
function c11602260.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c11602260.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c11602260.tgfilter(c)
return not c:IsCode(11602260) and c:IsAbleToGrave()
end
function c11602260.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11602260.tgfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function c11602260.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_ONFIELD,nil)
if ct<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c11602260.tgfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,ct,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,0x40)>0 then
local rg=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,0x10)
if #rg<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,#rg,#rg,nil)
Duel.Destroy(dg,0x40)
end
end
\ No newline at end of file
--罗浮仙舟的剑首 静流
function c11602265.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,99,c11602265.lcheck)
c:EnableReviveLimit()
--must attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MUST_ATTACK)
c:RegisterEffect(e1)
--actlimit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_FIELD)
e11:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e11:SetCode(EFFECT_CANNOT_ACTIVATE)
e11:SetRange(LOCATION_MZONE)
e11:SetTargetRange(0,1)
e11:SetValue(1)
e11:SetCondition(c11602265.actcon)
c:RegisterEffect(e11)
--damage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11602265)
e2:SetTarget(c11602265.damtg)
e2:SetOperation(c11602265.damop)
c:RegisterEffect(e2)
local e22=Effect.CreateEffect(c)
e22:SetCategory(CATEGORY_DAMAGE+CATEGORY_ATKCHANGE)
e22:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e22:SetProperty(EFFECT_FLAG_DELAY)
e22:SetCode(EVENT_ATTACK_ANNOUNCE)
e22:SetCountLimit(1,11602265)
e22:SetTarget(c11602265.damtg)
e22:SetOperation(c11602265.damop)
c:RegisterEffect(e22)
--damage
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(aux.bdocon)
e3:SetOperation(c11602265.op)
c:RegisterEffect(e3)
end
function c11602265.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x9548)
end
function c11602265.op(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
local code=tc:GetCode()
--act limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetLabel(code)
e2:SetValue(c11602265.limval)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
Duel.RegisterEffect(e2,tp)
end
function c11602265.limval(e,re,rp)
local code=e:GetLabel()
local rc=re:GetHandler()
return rc:IsCode(code)
end
function c11602265.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
if chk==0 then return ct>0 end
local dam=ct*200
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,dam)
end
function c11602265.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
local dam=ct*500
local int=Duel.Damage(tp,dam,REASON_EFFECT)
if int>0 and c:IsRelateToEffect(e) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(int)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function c11602265.actcon(e)
return Duel.IsBattlePhase()
end
\ No newline at end of file
--罗浮仙舟的忘归人 停云
function c11602270.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,99,c11602270.lcheck)
c:EnableReviveLimit()
--cannot
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UNRELEASABLE_SUM)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(1)
e3:SetTarget(c11602270.antg)
c:RegisterEffect(e3)
local e33=e3:Clone()
e33:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e33)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e4:SetValue(c11602270.fuslimit)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e6)
local e7=e3:Clone()
e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e7)
--Activate
local e8=Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_ATKCHANGE)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e8:SetRange(LOCATION_MZONE)
e8:SetCode(EVENT_LEAVE_FIELD)
e8:SetProperty(EFFECT_FLAG_DELAY)
e8:SetCondition(c11602270.condition)
e8:SetTarget(c11602270.target)
e8:SetOperation(c11602270.activate)
c:RegisterEffect(e8)
--spsummon
local e9=Effect.CreateEffect(c)
e9:SetCategory(CATEGORY_TOHAND)
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e9:SetProperty(EFFECT_FLAG_DELAY)
e9:SetCode(EVENT_LEAVE_FIELD)
e9:SetCountLimit(1,11602270)
e9:SetCondition(c11602270.thcon)
e9:SetTarget(c11602270.thtg)
e9:SetOperation(c11602270.thop)
c:RegisterEffect(e9)
end
function c11602270.antg(e,c)
return c:IsDisabled() or c:IsAttack(0)
end
function c11602270.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
function c11602270.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c11602270.thfilter(c)
return c:IsCode(11602170) and c:IsAbleToHand() and c:IsFaceupEx()
end
function c11602270.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11602270.thfilter,tp,0x30,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x30)
end
function c11602270.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11602270.thfilter),tp,0x30,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c11602270.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x9548)
end
function c11602270.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c11602270.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11602270.cfilter,1,nil,tp)
end
function c11602270.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.nzatk(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(aux.nzatk,tp,0,LOCATION_MZONE,1,nil) end
end
function c11602270.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,aux.nzatk,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
if 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)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--罗浮仙舟的侠客 三月七
function c11602275.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c11602275.mfilter,1)
c:EnableReviveLimit()
--tohand
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e0:SetProperty(EFFECT_FLAG_DELAY)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCountLimit(1,11602275)
e0:SetCondition(c11602275.thcon)
e0:SetTarget(c11602275.thtg)
e0:SetOperation(c11602275.thop)
c:RegisterEffect(e0)
--equip
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,11602275+1)
e1:SetTarget(c11602275.eqtg)
e1:SetOperation(c11602275.eqop)
c:RegisterEffect(e1)
--atk and def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(300)
c:RegisterEffect(e2)
--effect indestructable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(1)
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_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c11602275.spcon)
e4:SetTarget(c11602275.sptg)
e4:SetOperation(c11602275.spop)
c:RegisterEffect(e4)
end
function c11602275.mfilter(c)
return c:IsLinkSetCard(0x9548) and not c:IsLinkType(TYPE_LINK) or c:IsLinkCode(11602005)
end
function c11602275.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetPreviousEquipTarget()
return ec and c:IsReason(REASON_LOST_TARGET)
end
function c11602275.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11602275.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c11602275.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x9548)
end
function c11602275.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11602275.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c11602275.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c11602275.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c11602275.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,c,tc) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(c11602275.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function c11602275.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c11602275.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c11602275.thfilter(c)
return c:IsSetCard(0x9548) and c:IsAbleToHand()
end
function c11602275.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11602275.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function c11602275.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11602275.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(0x2) then
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0):Select(tp,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
\ No newline at end of file
--丰饶战争
function c11602280.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11602280,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c11602280.condition)
e1:SetTarget(c11602280.target)
e1:SetOperation(c11602280.activate)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCountLimit(1,11602280)
e2:SetTarget(c11602280.sptg)
e2:SetOperation(c11602280.spop)
c:RegisterEffect(e2)
--
--[[local custom_code=aux.RegisterMergedDelayedEvent_ToSingleCard(c,11602280,EVENT_DESTROYED)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11602280,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(custom_code)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCondition(c11602280.rmcon)
e3:SetTarget(c11602280.rmtg)
e3:SetOperation(c11602280.rmop)
c:RegisterEffect(e3)]]
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_DESTROYED)
e4:SetRange(LOCATION_SZONE)
e4:SetOperation(c11602280.caop)
c:RegisterEffect(e4)
end
function c11602280.caop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
local des=eg:GetFirst()
local rc=des:GetReasonCard()
local re2=des:GetReasonEffect()
local rc2=re2:GetHandler()
local rg=Group.CreateGroup()
while des do
if des:IsReason(REASON_BATTLE) then
if rc and rc:IsControler(tp) and rc:IsType(TYPE_MONSTER) and des:IsControler(1-tp) then
rg:AddCard(des)
end
else
if rc2 and rc2:IsControler(tp) and rc2:IsType(TYPE_MONSTER) and des:IsControler(1-tp) then
rg:AddCard(des)
end
end
des=eg:GetNext()
end
if rg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(11602280,1)) then
Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)
end
end
function c11602280.rmfilter(c,tp)
return c:IsPreviousControler(1-tp) and c:IsLocation(LOCATION_GRAVE)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetReasonPlayer()==tp
end
function c11602280.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11602280.rmfilter,1,nil,tp)
end
function c11602280.tgfilter(c,e,tp)
return c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE) and c:IsAbleToRemove()
end
function c11602280.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local mg=eg:Filter(c11602280.rmfilter,nil,tp):Filter(c11602280.tgfilter,nil,e,tp)
if chkc then return mg:IsContains(chkc) end
if chk==0 then return mg:GetCount()>0 end
local g=mg
if mg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
g=mg:Select(tp,1,1,nil)
end
Duel.SetTargetCard(g)
end
function c11602280.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and aux.NecroValleyFilter()(tc) then
Duel.Remove(tc,POS_FACEDOWN,0x40)
end
end
function c11602280.filter(c,e,tp)
return (c:IsSetCard(0x9548) and c:IsControler(tp) or c:IsControler(1-tp))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11602280.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11602280.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c11602280.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11602280.filter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c11602280.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end
function c11602280.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11602280.cfilter,1,nil,tp)
end
function c11602280.opfilter(c)
return c:IsSetCard(0x9548)
and (c:IsType(0x6) and c:IsSSetable() or c:IsType(0x1) and c:IsAbleToHand())
end
function c11602280.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11602280.opfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c11602280.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c11602280.opfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if tc:IsType(0x1) then
Duel.SendtoHand()
Duel.ConfirmCards(1-tp,tc)
else
Duel.SSet(tp,tc)
end
end
end
\ No newline at end of file
--囚人返魂
function c11602285.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,11602285)
e1:SetCondition(c11602285.rmcon)
e1:SetTarget(c11602285.rmtg)
e1:SetOperation(c11602285.rmop)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e11:SetCondition(c11602285.rmcon2)
c:RegisterEffect(e11)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11602285+1)
e2:SetCondition(c11602285.con)
e2:SetTarget(c11602285.tg)
e2:SetOperation(c11602285.op)
c:RegisterEffect(e2)
if not c11602285.global_check then
c11602285.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD)
ge1:SetOperation(c11602285.chk)
Duel.RegisterEffect(ge1,0)
end
end
function c11602285.chkfilter(c,tp)
return c:GetPreviousControler()~=c:GetReasonPlayer() and c:IsReason(REASON_EFFECT)
and c:IsPreviousControler(tp)
end
function c11602285.chk(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c11602285.chkfilter,1,nil,tp) then
Duel.RegisterFlagEffect(tp,11602285,0,0,1)
end
if eg:IsExists(c11602285.chkfilter,1,nil,1-tp) then
Duel.RegisterFlagEffect(1-tp,11602285,0,0,1)
end
end
function c11602285.filter(c,tp)
return c:IsSummonLocation(LOCATION_GRAVE) and c:IsSummonPlayer(tp) and c:GetOriginalType()&TYPE_MONSTER~=0
end
function c11602285.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11602285.filter,1,nil,tp)
end
function c11602285.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c11602285.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11602285,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function c11602285.rmcon(e,tp,eg,ep,ev,re,r,rp)
if not (rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD)
end
function c11602285.rmcon2(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
if a:IsControler(1-tp) then a=Duel.GetAttackTarget() end
return a
end
function c11602285.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFlagEffect(tp,11602285)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,0x1c,ct+1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,0x1c)
end
function c11602285.rmop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFlagEffect(tp,11602285)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToRemove),tp,0,0x1c,ct+1,ct+1,nil)
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--仙骇有终
function c11602290.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11602290)
e1:SetTarget(c11602290.target)
e1:SetOperation(c11602290.activate)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11602290+1)
e2:SetCondition(c11602290.thcon)
e2:SetTarget(c11602290.thtg)
e2:SetOperation(c11602290.thop)
c:RegisterEffect(e2)
end
function c11602290.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousLocation(tp)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end
function c11602290.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11602290.cfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c11602290.thfilter(c)
return c:IsSetCard(0x9548) and c:IsAbleToHand()
end
function c11602290.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemove()
and Duel.IsExistingMatchingCard(c11602290.thfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c11602290.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() and Duel.Remove(c,POS_FACEUP,0x40)>0 and c:IsLocation(0x20) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11602290.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.HintSelection(g)
if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
local code=g:GetFirst():GetCode()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,code))
e1:SetValue(c11602290.efilter)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
end
function c11602290.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c11602290.tsfilter(c,e,tp)
if not (c:IsSetCard(0x9548) and c:IsType(TYPE_MONSTER)) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c11602290.filter(c)
return c:IsSetCard(0x9548) and c:IsAbleToDeck() and c:IsFaceupEx()
end
function c11602290.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c11602290.tsfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.IsPlayerCanDraw(tp,2) and Duel.IsExistingMatchingCard(c11602290.filter,tp,0x20,0,1,nil)
if chk==0 then return b1 or b2 end
end
function c11602290.activate(e,tp,eg,ep,ev,re,r,rp)
local op=0
local b1=Duel.IsExistingMatchingCard(c11602290.tsfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.IsPlayerCanDraw(tp,2) and Duel.IsExistingMatchingCard(c11602290.filter,tp,0x20,0,1,nil)
if b1 then
if not b2 or Duel.SelectYesNo(tp,aux.Stringid(11602290,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c11602290.tsfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
op=1
end
end
b2=Duel.IsPlayerCanDraw(tp,2) and Duel.IsExistingMatchingCard(c11602290.filter,tp,0x20,0,1,nil)
if b2 and (op==0 or Duel.GetFieldGroupCount(tp,0,0x4)>0 and Duel.SelectYesNo(tp,aux.Stringid(11602290,2))) then
if op~=0 then
Duel.BreakEffect()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,c11602290.filter,tp,0x20,0,1,5,nil)
if #tg<1 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
end
end
\ No newline at end of file
--平魄云潇
function c11602295.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,11602295)
e1:SetTarget(c11602295.target)
e1:SetOperation(c11602295.activate)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11602295+1)
e2:SetCondition(c11602295.descon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c11602295.destg)
e2:SetOperation(c11602295.desop)
c:RegisterEffect(e2)
if not c11602295.global_check then
c11602295.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD)
ge1:SetOperation(c11602295.chk)
Duel.RegisterEffect(ge1,0)
end
end
function c11602295.chkfilter(c,tp)
return c:GetPreviousControler()~=c:GetReasonPlayer() and c:IsReason(REASON_EFFECT)
and c:IsPreviousControler(tp)
end
function c11602295.chk(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c11602295.chkfilter,1,nil,tp) then
Duel.RegisterFlagEffect(tp,11602295,0,0,1)
end
if eg:IsExists(c11602295.chkfilter,1,nil,1-tp) then
Duel.RegisterFlagEffect(1-tp,11602295,0,0,1)
end
end
function c11602295.descon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
if a:IsControler(1-tp) then a=Duel.GetAttackTarget() end
return a
end
function c11602295.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFlagEffect(tp,11602295)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,0xc,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,0xc)
end
function c11602295.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFlagEffect(tp,11602295)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,0xc,1,ct+1,nil)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c11602295.cfilter(c,tp)
return c:IsFaceup() and c:IsAttackAbove(3000) and c:IsSummonPlayer(1-tp)
end
function c11602295.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c11602295.cfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
local g=eg:Filter(c11602295.cfilter,nil,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_MZONE)
end
function c11602295.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e):Filter(Card.IsFaceup,nil)
local ag=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if #g<1 or #ag<0 then return end
local tc=g:GetFirst()
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tc=g:Select(tp,1,1,nil):GetFirst()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local ac=ag:Select(tp,1,1,nil):GetFirst()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_UPDATE_ATTACK)
e0:SetValue(tc:GetAttack())
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
ac:RegisterEffect(e0)
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1)
tc:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EFFECT_UNRELEASABLE_NONSUM)
tc:RegisterEffect(e11)
if not c:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e4:SetRange(LOCATION_MZONE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e4:SetValue(1)
tc:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e5:SetValue(c11602295.fuslimit)
tc:RegisterEffect(e5)
local e6=e4:Clone()
e6:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e6)
local e7=e4:Clone()
e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e7)
end
function c11602295.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
\ No newline at end of file
--巡争逐星
function c11602300.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11602300)
e1:SetTarget(c11602300.target)
e1:SetOperation(c11602300.activate)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11602300+1)
e2:SetCondition(c11602300.thcon)
e2:SetTarget(c11602300.thtg)
e2:SetOperation(c11602300.thop)
c:RegisterEffect(e2)
if not c11602300.global_check then
c11602300.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD)
ge1:SetOperation(c11602300.chk)
Duel.RegisterEffect(ge1,0)
end
end
function c11602300.chkfilter(c,tp)
return c:GetPreviousControler()~=c:GetReasonPlayer() and c:IsReason(REASON_EFFECT)
and c:IsPreviousControler(tp)
end
function c11602300.chk(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c11602300.chkfilter,1,nil,tp) then
Duel.RegisterFlagEffect(tp,11602300,0,0,1)
end
if eg:IsExists(c11602300.chkfilter,1,nil,1-tp) then
Duel.RegisterFlagEffect(1-tp,11602300,0,0,1)
end
end
function c11602300.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFlagEffect(tp,11602285)
if chk==0 then return Duel.IsPlayerCanDraw(tp,ct-1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct-1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct-1)
end
function c11602300.spfilter(c,e,tp)
return c:IsCode(11601401) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c11602300.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local ct=Duel.Draw(p,d,REASON_EFFECT)
if ct>=3 then
local g=Duel.GetMatchingGroup(c11602300.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(11602300,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
end
end
elseif ct>=5 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(c11602300.actop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
elseif ct>=7 then
--atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetValue(ct*500)
Duel.RegisterEffect(e3,tp)
end
end
function c11602300.actop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp then
Duel.SetChainLimit(c11602300.chainlm)
end
end
function c11602300.chainlm(e,rp,tp)
return tp==rp
end
function c11602300.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c11602300.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11602300.cfilter,1,nil,tp)
end
function c11602300.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 c11602300.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
\ No newline at end of file
--飓风海劫“回声”海豚号
local s,id,o=GetID()
function s.initial_effect(c)
--RetCard
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--CheckCard
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id+1)
e3:SetCondition(s.scon)
e3:SetTarget(s.stg)
e3:SetOperation(s.sop)
c:RegisterEffect(e3)
end
function s.thfilter(c,tid)
return c:IsRace(RACE_AQUA) and c:IsType(TYPE_MONSTER)
and c:IsAbleToHand() and c:GetTurnID()==tid
end
function s.spfi1ter(c,e,tp)
return c:IsSetCard(0x540b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,0x04)>0
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,0x10,0,1,nil,Duel.GetTurnCount()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x10)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,0x10,0,1,1,nil,Duel.GetTurnCount())
if #g>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if Duel.SendtoHand(tc,nil,0x40)>0 and s.spfi1ter(tc,e,tp) then
if c:IsRelateToEffect(e) and c:IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.SendtoHand(c,nil,0x40)
end
end
end
end
end
function s.scon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousPosition(POS_FACEUP)
end
function s.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,0x0e)>0 end
end
function s.sop(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,0x0e,nil)
if #dg>0 then Duel.ConfirmCards(tp,dg) end
local g=Duel.GetFieldGroup(tp,0,0x0e)
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) and g:IsExists(Card.IsType,1,nil,TYPE_SPELL) and g:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Draw(tp,1,0x40)
end
end
Duel.ShuffleHand(1-tp)
end
\ No newline at end of file
--飓风海劫“饵钓”和睦号
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
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_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--ToHand(0x0c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--Tohand(0x01)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id+1)
e3:SetCondition(s.scon)
e3:SetTarget(s.stg)
e3:SetOperation(s.sop)
c:RegisterEffect(e3)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,0x04)>0 and Duel.GetFlagEffect(tp,id)==0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,EFFECT_FLAG_OATH,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.tckfil(c,tp)
return c:IsControler(1-tp)
and not c:IsReason(REASON_DRAW)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.tckfil,1,nil,tp)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0x0c,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,0x0c,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(3,tp,505)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0x0c,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,0x40)
end
end
function s.thfi2ter(c,e,tp,check)
return c:IsSetCard(0x540b) and c:IsType(TYPE_MONSTER) and not c:IsAttribute(ATTRIBUTE_FIRE)
and (c:IsAbleToHand() or (check and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function s.scon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousPosition(POS_FACEUP)
end
function s.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local c,check=e:GetHandler(),Duel.GetFieldGroupCount(tp,0x04,0)==0
if c:IsLocation(0x02) and c:GetFlagEffect(id)==0 then
c:RegisterFlagEffect(id,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,4))
end
return Duel.IsExistingMatchingCard(s.thfi2ter,tp,0x01,0,1,nil,e,tp,check)
and Duel.GetFlagEffect(tp,id)==0
end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,EFFECT_FLAG_OATH,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x01)
end
function s.sop(e,tp,eg,ep,ev,re,r,rp)
local check=Duel.GetFieldGroupCount(tp,0x04,0)==0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfi2ter,tp,0x01,0,1,1,nil,e,tp,check)
if g:GetCount()>0 then
local tc=g:GetFirst()
if check and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not tc:IsAbleToHand() or Duel.SelectYesNo(tp,aux.Stringid(id,3))) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
if tc:IsLocation(0x02) then
Duel.ConfirmCards(1-tp,g)
end
end
end
end
\ No newline at end of file
--颶風海劫“溶藥”樸茨茅斯冒險號
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--ToHand(0x0c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.con1)
e2:SetTarget(s.rhtg)
e2:SetOperation(s.rhop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetHintTiming(TIMING_END_PHASE,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(s.con2)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_AQUA)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,0x04,0,1,nil)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x540b) 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,0x04)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,0x04)>0 and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,0x04)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(3,tp,509)
local gh=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(gh,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function s.cfi2ter(c)
return c:IsFaceup() and c:IsSetCard(0x540b)
end
function s.con1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.cfi2ter,tp,0x04,0,1,e:GetHandler())
end
function s.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfi2ter,tp,0x04,0,1,e:GetHandler())
end
function s.rhtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0x04,0x04,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0x04,0x04,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.rhop(e,tp,eg,ep,ev,re,r,rp)
local tc,Check=Duel.GetFirstTarget(),false
if tc:IsRelateToEffect(e) then
if tc:IsControler(tp) then Check=true end
if Duel.SendtoHand(tc,nil,0x40)>0 and Check then
local g=Duel.GetFieldGroup(tp,0,0x0c)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(3,tp,502)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,0x40)
end
end
end
end
\ No newline at end of file
--飓风海劫“幻魔”幻想号
local s,id,o=GetID()
function s.initial_effect(c)
--SetOrRemove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(s.cost)
e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop)
c:RegisterEffect(e1)
--SpSum(0x10)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.con1)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(s.con2)
c:RegisterEffect(e3)
if not s.SetCheck then
local ek=Effect.CreateEffect(c)
ek:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ek:SetCode(EVENT_CHAINING)
ek:SetOperation(s.ciop)
Duel.RegisterEffect(ek,tp)
end
end
function s.rcCheck(c)
return c:IsLocation(0x08)
and not (c:IsHasEffect(EFFECT_REMAIN_FIELD)
or c:IsType(TYPE_CONTINUOUS) or c:IsType(TYPE_EQUIP))
end
function s.ciop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc and s.rcCheck(rc) then
rc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,nil,1,0)
end
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.filter(c,cid)
return (c:IsCanTurnSet() or c:IsAbleToRemove(tp,POS_FACEDOWN))
and c:GetFlagEffect(cid)==0
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(0x0c) and s.filter(chkc,id) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,0x0c,1,nil,id) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,s.filter,tp,0,0x0c,1,1,nil,id)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.SetChecking(c)
return c:IsFaceup() and c:IsCanTurnSet()
and (c:IsLocation(0x04) or c:GetOriginalType()&TYPE_MONSTER==0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:GetFlagEffect(id)==0 then
if s.SetChecking(tc) then
if tc:IsLocation(0x04) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
else
Duel.ChangePosition(tc,POS_FACEDOWN)
end
else
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
end
end
function s.cfi2ter(c)
return c:IsFaceup() and c:IsSetCard(0x540b)
end
function s.con1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.cfi2ter,tp,0x04,0,1,nil)
end
function s.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfi2ter,tp,0x04,0,1,nil)
end
function s.desfilter(c,e)
return c:IsRace(RACE_AQUA) and c:IsFaceup() and c:IsDestructable(e)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,0x04,0,1,nil,e)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
local g=Duel.GetFieldGroup(tp,0x04,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(3,tp,502)
local g=Duel.GetMatchingGroup(s.desfilter,tp,0x04,0,nil,e)
if g:GetCount()>0 then
local tg=g:Select(tp,1,1,nil)
local tc=tg:GetFirst()
Duel.HintSelection(tg)
if Duel.Destroy(tc,0x40)>0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--飓风海劫“金帛”冈依沙瓦号
local s,id,o=GetID()
function s.initial_effect(c)
--SearchCard
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_HAND)
e0:SetCountLimit(1,id)
e0:SetCost(s.thcost)
e0:SetTarget(s.thtg)
e0:SetOperation(s.thop)
c:RegisterEffect(e0)
--RetCard
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id+1)
e1:SetTarget(s.ptg)
e1:SetOperation(s.pop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Desed
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCountLimit(1,id+2)
e3:SetCondition(s.tecon)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.thfilter(c)
return c:IsSetCard(0x540b) and c:IsLevelBelow(4) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,0x01,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x01)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfilter,tp,0x01,0,nil)
if #g>0 then
Duel.Hint(3,tp,506)
local tc=g:Select(tp,1,1,nil)
Duel.SendtoHand(tc,nil,0x40)
Duel.ConfirmCards(1-tp,tc)
end
end
function s.pfilter(c,tp)
return c:IsCode(11902370) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function s.ptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.pfilter,tp,0x11,0,1,nil,tp) end
end
function s.pop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(3,tp,527)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.pfilter),tp,0x11,0,1,1,nil,tp):GetFirst()
if tc then
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
function s.tecon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:IsPreviousLocation(0x0c)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--颶風與沈眠之海
local s,id,o=GetID()
function s.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,id+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--AtkDefUp
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(0x04,0x04)
e2:SetTarget(s.tg)
e2:SetValue(500)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--SpSum(0x10)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1,id)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x540b) and c:IsAbleToHand()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfilter,tp,0x01,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,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 s.tg(e,c)
return c:IsRace(RACE_AQUA)
end
function s.filter(c,e,tp,tid)
return c:IsSetCard(0x540b) and c:IsLevelBelow(6)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(0x02) or c:GetTurnID()~=tid)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(s.filter,tp,0x12,0,1,nil,e,tp,Duel.GetTurnCount()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x12)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(3,tp,509)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,0x12,0,1,1,nil,e,tp,Duel.GetTurnCount())
local tc=g:GetFirst()
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end
\ No newline at end of file
--颶風海劫“隱世”維達號
local s,id,o=GetID()
function s.initial_effect(c)
--SpSum(0x01)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(0x06)
e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--TdOrSum(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetCondition(s.toscon)
e2:SetTarget(s.tostg)
e2:SetOperation(s.tosop)
c:RegisterEffect(e2)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x540b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not c:IsAttribute(ATTRIBUTE_DARK)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(s.spfilter,tp,0x01,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,0x04)>0
or (c:IsLocation(0x04) and Duel.GetMZoneCount(tp,c)>0)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x01)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,0x04)>0 then
Duel.Hint(3,tp,509)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,0x01,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local fg=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0x04,0,nil)
if #fg>0 then
Duel.Hint(3,tp,506)
local sg=fg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoHand(sg,nil,0x40)
end
end
end
end
function s.thfi2ter(c,tp)
return c:IsPreviousLocation(0x04) and c:IsPreviousControler(tp)
end
function s.toscon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.thfi2ter,1,nil,tp)
end
function s.tostg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() or c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if c:IsAbleToDeck() then
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
if c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
end
function s.spfi2ter(c,e,tp)
return c:IsSetCard(0x540b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.tosop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local b1=c:IsAbleToDeck()
local b2=c:IsCanBeSpecialSummoned(e,0,tp,false,false)
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))
elseif b1 then op=0
elseif b2 then op=1
else return end
if op==0 then
local g=Duel.GetMatchingGroup(s.spfi2ter,tp,0x02,0,nil,e,tp)
if Duel.SendtoDeck(c,nil,1,0x40)>0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
Duel.Hint(3,tp,509)
local tc=g:Select(tp,1,1,nil)
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end
else Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
end
end
\ No newline at end of file
--颶風海劫“偉大的”王富貴
local s,id,o=GetID()
function s.initial_effect(c)
--SearchCard
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e4=e1:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--Indes
local e2=Effect.CreateEffect(c)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0x0c,0)
e2:SetTarget(s.target)
e2:SetValue(1)
c:RegisterEffect(e2)
--ToHand(0x0c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,id+1)
e3:SetCondition(s.thcon)
e3:SetTarget(s.thtg2)
e3:SetOperation(s.thop2)
c:RegisterEffect(e3)
end
--SearchCard
function s.thfilter(c)
return c:IsSetCard(0x540b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,0x01,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x01)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(3,tp,506)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,0x01,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
local hg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0x02,0,nil)
if #hg>0 then
Duel.Hint(3,tp,507)
local sg=hg:Select(tp,1,1,nil)
Duel.SendtoDeck(sg,nil,2,0x40)
end
end
end
--Indes
function s.target(e,c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
--ToHand
function s.thfi2ter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousPosition(POS_FACEUP)
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(s.thfi2ter,tp,0x0c,0x0c,1,nil) end
Duel.Hint(3,tp,505)
local g=Duel.SelectTarget(tp,s.thfi2ter,tp,0x0c,0x0c,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,0x40) end
end
\ No newline at end of file
--颶風海劫“庇佑”金鹿號
local s,id,o=GetID()
function s.initial_effect(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.discon)
e1:SetTarget(s.distg)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
--Cannot Be Target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0x0c,0)
e2:SetTarget(s.etlimit)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--Destroy(0x04)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,id+1)
e3:SetCondition(s.descon)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
end
--Negate
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainNegatable(ev)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(s.thfi1ter,tp,0x0c,0,e:GetHandler())>0 end
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
function s.thfi1ter(c)
return c:IsSetCard(0x540b) and c:IsFaceup()
end
function s.Check(c,tp)
return c:IsLocation(0x02) and c:IsSetCard(0x540b)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfi1ter,tp,0x0c,0,aux.ExceptThisCard(e))
if #g>0 then
Duel.Hint(3,tp,505)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local tc=sg:GetFirst()
if Duel.SendtoHand(tc,nil,0x40)>0 and s.Check(tc,tp) then
Duel.NegateActivation(ev)
end
end
end
--Cannot Be Target
function s.etlimit(e,c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
--Destroy
function s.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousPosition(POS_FACEUP)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0x04,0x04,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0x04,0x04,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end
end
\ No newline at end of file
--深淵魔影
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Remove()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetRange(LOCATION_SZONE)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
c:RegisterEffect(e1)
end
function s.thfi1ter(c)
return c:IsSetCard(0x540b) and c:IsFaceup()
and c:IsAbleToHand()
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,0x1c,1,nil,tp,POS_FACEDOWN)
and Duel.IsExistingMatchingCard(s.thfi1ter,tp,0x04,0,1,nil) end
Duel.Hint(3,tp,503)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,0x1c,1,1,nil,tp,POS_FACEDOWN)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(s.thfi1ter,tp,0x04,0,nil)
if #g>0 and tc:IsRelateToEffect(e) then
Duel.Hint(3,tp,505)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local sc=sg:GetFirst()
if Duel.SendtoHand(sc,nil,0x40)>0 and sc:IsLocation(0x02) then
Duel.Remove(tc,POS_FACEDOWN,0x40)
end
end
end
\ No newline at end of file
--天墜星隕
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.discon)
e1:SetTarget(s.distg)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainNegatable(ev)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(Card.IsAbleToHand,tp,0x04,0x04,nil)>0 end
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
function s.Check(c,tp)
return c:IsLocation(0x02) and c:IsSetCard(0x540b)
and c:IsPreviousControler(tp)
end
function s.desfi1ter(c,pl,seq)
local sseq=c:GetSequence()
if c:IsControler(pl) then
return sseq==5 and seq==3 or sseq==6 and seq==1
end
if c:IsLocation(LOCATION_SZONE) then
return sseq<5 and sseq==seq
end
if sseq<5 then
return (seq==6 and sseq==3) or (seq==5 and sseq==1)
or sseq==seq+1 or sseq==seq-1
end
if sseq>=5 then
return sseq==5 and seq==1 or sseq==6 and seq==3
end
end
function s.desfi2ter(c,seq)
local sseq=c:GetSequence()
if c:IsLocation(LOCATION_MZONE) then
return sseq<5 and sseq==seq
end
if sseq<5 then
return sseq==seq+1 or sseq==seq-1
end
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0x04,0x04,nil)
if #g>0 then
Duel.Hint(3,tp,505)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local sc=sg:GetFirst()
if Duel.SendtoHand(sc,nil,0x40)>0 and s.Check(sc,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
local tc=re:GetHandler()
local dg=Group.CreateGroup()
if tc:IsRelateToEffect(re) then
dg:AddCard(tc)
if tc:IsLocation(0x0c) and not tc:IsLocation(LOCATION_FZONE) then
local pl=tp
if tc:GetControler()==tp then pl=1-pl end
if tc:IsLocation(0x04) and tc:GetSequence()<5 then
local cg=Duel.GetMatchingGroup(s.desfi1ter,pl,0x04,0x0c,tc,pl,tc:GetSequence())
dg:Merge(cg)
elseif tc:IsLocation(0x08) and tc:GetSequence()<5 then
local cg=Duel.GetMatchingGroup(s.desfi2ter,pl,0,0x0c,tc,tc:GetSequence())
dg:Merge(cg)
elseif tc:IsLocation(0x04) and tc:GetSequence()>4 then
local cg=tc:GetColumnGroup():Filter(Card.IsLocation,nil,0x04)
dg:Merge(cg)
end
end
end
if Duel.NegateActivation(ev) and #dg>0 then
Duel.Destroy(dg,0x40)
end
end
end
end
\ No newline at end of file
--颶風海劫與岡依沙瓦的相遇
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--SpSum(0x12)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetCondition(s.con)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x540b) and c:IsAbleToGrave()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,0x01,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(3,tp,504)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_FZONE,0)==0
end
function s.filter(c,e,tp,tid)
return c:IsCode(11902360) 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.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(s.filter,tp,0x12,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x12)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(3,tp,509)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,0x12,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end
\ No newline at end of file
--颶風海劫“幽靈”瑪麗·西萊特斯號
local s,id,o=GetID()
function s.initial_effect(c)
--SpSum(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_HAND)
c:RegisterEffect(e3)
--SpSum(0x02)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.scon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.thfilter(c)
return c:IsSetCard(0x540b) and c:IsFaceup()
and c:IsAbleToHand() and not c:IsLevel(6)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(0x04) and s.filter(chkc) end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.thfilter,tp,0x04,0,1,nil)
and Duel.GetFlagEffect(tp,id)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,0x04,0,1,1,nil)
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,EFFECT_FLAG_OATH,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,0x40)>0 then
--Atk/Def Up
local val=tc:GetBaseAttack()
if val>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(val)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
end
end
end
function s.scon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousPosition(POS_FACEUP)
end
function s.spfi1ter(c,e,tp)
return c:IsSetCard(0x540b) 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
local c=e:GetHandler()
if c:IsLocation(0x02) and c:GetFlagEffect(id)==0 then
c:RegisterFlagEffect(id,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
return Duel.GetLocationCount(tp,0x04)>0 and Duel.GetFlagEffect(tp,id)==0
and Duel.IsExistingMatchingCard(s.spfi1ter,tp,0x02,0,1,e:GetHandler(),e,tp)
end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,EFFECT_FLAG_OATH,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x02)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,0x04)>0 then
Duel.Hint(3,tp,509)
local g=Duel.SelectMatchingCard(tp,s.spfi1ter,tp,0x02,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--颶風海劫與“復仇”的會面
local s,id,o=GetID()
function s.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,id+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--SpSum(0x02)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.thfi0ter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x540b) and c:IsAbleToHand()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfi0ter,tp,0x31,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
if tc:IsLocation(0x02) then
Duel.ConfirmCards(1-tp,sg)
local hg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0x02,0,nil)
if #hg>0 then
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Hint(3,tp,507)
local dc=hg:Select(tp,1,1,nil)
Duel.SendtoDeck(dc,nil,1,0x40)
end
end
end
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x540b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsExistingMatchingCard(Card.IsAttribute,tp,0x04,0,1,nil,c:GetAttribute())
end
function s.fi6ter(c)
return c:IsSetCard(0x540b) and c:IsFaceup()
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,0x02,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.fi6ter,tp,0x04,0,1,nil)
and Duel.GetLocationCount(tp,0x04)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x02)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,0x04)>0 then
Duel.Hint(3,tp,509)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,0x02,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--颶風海劫“狂暴”加里冒險號
local s,id,o=GetID()
function s.initial_effect(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(0x06)
e1:SetCountLimit(1,id)
e1:SetCondition(s.discon)
e1:SetCost(s.discost)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
--SpSum(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(0x12)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id+1)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainDisablable(ev) then return false end
local te,p=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te and te:GetHandler():IsSetCard(0x540b) and te:IsActiveType(TYPE_MONSTER) and p==tp and rp==1-tp
and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() end
if c:IsLocation(0x0c) then e:SetLabel(1)
else e:SetLabel(0) end
Duel.Release(c,REASON_COST)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if e:GetLabel()>0 and re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,EFFECT_FLAG_OATH,1)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and e:GetLabel()>0
and re:GetHandler():IsRelateToEffect(re)
then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function s.thfilter(c,fz)
return c:IsSetCard(0x540b) and c:IsFaceup()
and c:IsAbleToHand() and (fz>0 or c:GetSequence()<5)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c,fz=e:GetHandler(),Duel.GetLocationCount(tp,0x04)
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(s.thfilter,tp,0x04,0,1,nil,fz)
and Duel.GetFlagEffect(tp,id)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,0x04,0,1,1,nil,fz)
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,EFFECT_FLAG_OATH,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c,tc=e:GetHandler(),Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
if tc:IsLocation(0x02) and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,0x04)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--传国玉玺
function c1200100.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200100,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE+LOCATION_REMOVED)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetHintTiming(0xFFFFFFF,0xFFFFFFF)
e1:SetTarget(c1200100.target)
e1:SetOperation(c1200100.activate)
c:RegisterEffect(e1)
end
function c1200100.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsFaceup() or c:GetLocation()==LOCATION_HAND end
end
function c1200100.filter(c,tc)
return c==tc
end
function c1200100.aclimit(e,re,tp)
return (not re:GetHandler():IsCode(1200100)) or re:GetActivateLocation()==LOCATION_HAND
end
function c1200100.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1200100,0))
local tc=e:GetHandler()
local ag=Duel.SelectMatchingCard(tp,c1200100.filter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE+LOCATION_REMOVED,0,1,1,nil,tc)
if ag:GetCount()>0 then
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c1200100.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.SendtoHand(ag,1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,ag)
end
end
\ No newline at end of file
--地之精粹
function c1200105.initial_effect(c)
--act limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200105,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_STANDBY_PHASE+TIMING_END_PHASE,TIMING_STANDBY_PHASE+TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c1200105.cost)
e1:SetOperation(c1200105.operation)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200105,1))
e2:SetCountLimit(1,1200105)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c1200105.thcost)
e2:SetTarget(c1200105.thtg)
e2:SetOperation(c1200105.thop)
c:RegisterEffect(e2)
end
function c1200105.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c1200105.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200105,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetTargetRange(1,1)
e1:SetValue(c1200105.aclimit)
Duel.RegisterEffect(e1,tp)
end
function c1200105.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_HAND and re:IsActiveType(TYPE_MONSTER) and tp==1-Duel.GetTurnPlayer()
end
function c1200105.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1200105,2))
local ag=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil)
if ag:GetCount()==1 then
Duel.SendtoHand(ag,1-tp,REASON_COST)
Duel.ConfirmCards(tp,ag)
Duel.ShuffleHand(tp)
Duel.ShuffleHand(1-tp)
end
end
function c1200105.thfilter(c)
return c:IsSetCard(0x211) and not c:IsCode(1200105) and c:IsAbleToHand()
end
function c1200105.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c1200105.thfilter,tp,LOCATION_DECK,0,1,nil) and c:IsAbleToHand(1-Duel.GetTurnPlayer()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function c1200105.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1200105.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,1-Duel.GetTurnPlayer(),REASON_EFFECT)
Duel.ConfirmCards(Duel.GetTurnPlayer(),g)
end
if c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(1200105,3)) then
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
--原定自肃
--local e1=Effect.CreateEffect(c)
--e1:SetType(EFFECT_TYPE_FIELD)
--e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
--e1:SetCode(EFFECT_CANNOT_ACTIVATE)
--e1:SetTargetRange(1,0)
--e1:SetValue(c1200105.aclimit2)
--e1:SetReset(RESET_PHASE+PHASE_END)
--Duel.RegisterEffect(e1,tp)
end
function c1200105.aclimit2(e,re,tp)
return re:GetHandler():IsSetCard(0x211)
end
\ No newline at end of file
--水之精粹
function c1200110.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200105,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_STANDBY_PHASE+TIMING_END_PHASE,TIMING_STANDBY_PHASE+TIMING_END_PHASE)
e1:SetOperation(c1200110.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200110,0))
e2:SetHintTiming(TIMING_STANDBY_PHASE+TIMING_END_PHASE,0)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c1200110.handcon)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200110,1))
e3:SetCountLimit(1,1200110)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c1200110.thcost)
e3:SetTarget(c1200110.thtg)
e3:SetOperation(c1200110.thop)
c:RegisterEffect(e3)
end
function c1200110.actfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsFaceup()
end
function c1200110.handcon(e)
return not Duel.IsExistingMatchingCard(c1200110.actfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c1200110.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200110,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(1,1)
e1:SetValue(c1200110.aclimit)
Duel.RegisterEffect(e1,tp)
end
function c1200110.aclimit(e,re,tp)
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return false end
if tp==Duel.GetTurnPlayer() then return false end
local c=re:GetHandler()
return not c:IsLocation(LOCATION_SZONE)
end
function c1200110.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1200110,2))
local ag=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil)
if ag:GetCount()==1 then
Duel.SendtoHand(ag,1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,ag)
Duel.ShuffleHand(tp)
Duel.ShuffleHand(1-tp)
end
end
function c1200110.thfilter(c)
return c:IsSetCard(0x211) and not c:IsCode(1200110) and c:IsAbleToHand()
end
function c1200110.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c1200110.thfilter,tp,LOCATION_DECK,0,1,nil) and c:IsAbleToHand(1-Duel.GetTurnPlayer()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function c1200110.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1200110.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,1-Duel.GetTurnPlayer(),REASON_EFFECT)
Duel.ConfirmCards(Duel.GetTurnPlayer(),g)
end
if c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(1200110,3)) then
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
--原定自肃
--local e1=Effect.CreateEffect(c)
--e1:SetType(EFFECT_TYPE_FIELD)
--e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
--e1:SetCode(EFFECT_CANNOT_ACTIVATE)
--e1:SetTargetRange(1,0)
--e1:SetValue(c1200110.aclimit2)
--e1:SetReset(RESET_PHASE+PHASE_END)
--Duel.RegisterEffect(e1,tp)
end
function c1200110.aclimit2(e,re,tp)
return re:GetHandler():IsSetCard(0x211)
end
\ No newline at end of file
--火之精粹
function c1200115.initial_effect(c)
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200115,0))
e1:SetCountLimit(1,1200115)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_STANDBY_PHASE+TIMING_END_PHASE,TIMING_STANDBY_PHASE+TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c1200115.cost)
e1:SetOperation(c1200115.operation)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200115,1))
e2:SetCountLimit(1,1200115)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c1200115.thcost)
e2:SetTarget(c1200115.thtg)
e2:SetOperation(c1200115.thop)
c:RegisterEffect(e2)
end
function c1200115.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c1200115.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200115,0))
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ACTIVATE_COST)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,1)
e1:SetCost(c1200115.costchk)
e1:SetTarget(c1200115.costtg)
e1:SetOperation(c1200115.costop)
Duel.RegisterEffect(e1,tp)
end
function c1200115.costchk(e,te_or_c,tp)
return Duel.CheckLPCost(tp,500)
end
function c1200115.costtg(e,te,tp)
return te:GetHandlerPlayer()==1-Duel.GetTurnPlayer()
end
function c1200115.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,500)
end
function c1200115.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1200115,2))
local ag=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil)
if ag:GetCount()==1 then
Duel.SendtoHand(ag,1-tp,REASON_COST)
Duel.ConfirmCards(tp,ag)
Duel.ShuffleHand(tp)
Duel.ShuffleHand(1-tp)
end
end
function c1200115.thfilter(c)
return c:IsSetCard(0x211) and not c:IsCode(1200115) and c:IsAbleToHand()
end
function c1200115.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c1200115.thfilter,tp,LOCATION_DECK,0,1,nil) and c:IsAbleToHand(1-Duel.GetTurnPlayer()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function c1200115.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1200115.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,1-Duel.GetTurnPlayer(),REASON_EFFECT)
Duel.ConfirmCards(Duel.GetTurnPlayer(),g)
end
if c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(1200115,3)) then
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
--原定自肃
--local e1=Effect.CreateEffect(c)
--e1:SetType(EFFECT_TYPE_FIELD)
--e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
--e1:SetCode(EFFECT_CANNOT_ACTIVATE)
--e1:SetTargetRange(1,0)
--e1:SetValue(c1200115.aclimit2)
--e1:SetReset(RESET_PHASE+PHASE_END)
--Duel.RegisterEffect(e1,tp)
end
function c1200115.aclimit2(e,re,tp)
return re:GetHandler():IsSetCard(0x211)
end
\ No newline at end of file
--气之精粹
function c1200120.initial_effect(c)
--immune
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200120,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_STANDBY_PHASE+TIMING_END_PHASE,TIMING_STANDBY_PHASE+TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c1200120.cost)
e1:SetOperation(c1200120.operation)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1200120,1))
e2:SetCountLimit(1,1200120)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c1200120.thcost)
e2:SetTarget(c1200120.thtg)
e2:SetOperation(c1200120.thop)
c:RegisterEffect(e2)
end
function c1200120.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c1200120.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200120,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetTarget(c1200120.etarget)
e1:SetValue(c1200120.efilter)
Duel.RegisterEffect(e1,tp)
end
function c1200120.etarget(e,c)
return c:GetControler()==Duel.GetTurnPlayer()
end
function c1200120.efilter(e,re)
return not re:IsActivated() and re:GetOwner()~=e:GetHandler()
end
function c1200120.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1200120,2))
local ag=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil)
if ag:GetCount()==1 then
Duel.SendtoHand(ag,1-tp,REASON_COST)
Duel.ConfirmCards(tp,ag)
Duel.ShuffleHand(tp)
Duel.ShuffleHand(1-tp)
end
end
function c1200120.thfilter(c)
return c:IsSetCard(0x211) and not c:IsCode(1200120) and c:IsAbleToHand()
end
function c1200120.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c1200120.thfilter,tp,LOCATION_DECK,0,1,nil) and c:IsAbleToHand(1-Duel.GetTurnPlayer()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function c1200120.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1200120.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,1-Duel.GetTurnPlayer(),REASON_EFFECT)
Duel.ConfirmCards(Duel.GetTurnPlayer(),g)
end
if c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(1200120,3)) then
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
--原定自肃
--local e1=Effect.CreateEffect(c)
--e1:SetType(EFFECT_TYPE_FIELD)
--e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
--e1:SetCode(EFFECT_CANNOT_ACTIVATE)
--e1:SetTargetRange(1,0)
--e1:SetValue(c1200120.aclimit2)
--e1:SetReset(RESET_PHASE+PHASE_END)
--Duel.RegisterEffect(e1,tp)
end
function c1200120.aclimit2(e,re,tp)
return re:GetHandler():IsSetCard(0x211)
end
\ No newline at end of file
--酒之精粹
function c1200125.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200125,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
--e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(c1200125.operation)
c:RegisterEffect(e1)
--to hand 原定2效果
--local e2=Effect.CreateEffect(c)
--e2:SetDescription(aux.Stringid(1200125,1))
--e2:SetCountLimit(1,1200125)
--e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
--e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
--e2:SetType(EFFECT_TYPE_QUICK_O)
--e2:SetCode(EVENT_FREE_CHAIN)
--e2:SetRange(LOCATION_GRAVE)
--e2:SetCost(c1200125.thcost)
--e2:SetTarget(c1200125.thtg)
--e2:SetOperation(c1200125.thop)
--c:RegisterEffect(e2)
end
function c1200125.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--change effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1200125,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
--e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(c1200125.con)
e1:SetOperation(c1200125.op)
Duel.RegisterEffect(e1,tp)
end
function c1200125.con(e,tp,eg,ep,ev,re,r,rp)
return ep==Duel.GetTurnPlayer()
end
function c1200125.op(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c1200125.repop)
end
function c1200125.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,1200125)
local c=e:GetHandler()
--if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT,tp,true)
--end
end
function c1200125.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1200125,2))
local ag=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil)
if ag:GetCount()==1 then
Duel.SendtoHand(ag,1-tp,REASON_COST)
Duel.ConfirmCards(tp,ag)
Duel.ShuffleHand(tp)
Duel.ShuffleHand(1-tp)
end
end
function c1200125.thfilter(c)
return c:IsSetCard(0x211) and not c:IsCode(1200125) and c:IsAbleToHand()
end
function c1200125.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c1200125.thfilter,tp,LOCATION_DECK,0,1,nil) and c:IsAbleToHand(1-Duel.GetTurnPlayer()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function c1200125.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1200125.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,1-Duel.GetTurnPlayer(),REASON_EFFECT)
Duel.ConfirmCards(Duel.GetTurnPlayer(),g)
end
if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
--精粹吞噬者
local s,id,o=GetID()
function s.initial_effect(c)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_QUICK_F)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.discon)
e1:SetCost(s.discost)
e1:SetTarget(s.distg)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(s.recon)
e2:SetCost(s.recost)
e2:SetTarget(s.rectg)
e2:SetOperation(s.recop)
c:RegisterEffect(e2)
--fusion summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetHintTiming(TIMING_END_PHASE+TIMING_STANDBY_PHASE,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE+TIMING_STANDBY_PHASE)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id)
e3:SetTarget(s.fustg)
e3:SetOperation(s.fusop)
c:RegisterEffect(e3)
--to deck
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,4))
e4:SetCategory(CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e4:SetCountLimit(1,id+o)
e4:SetTarget(s.tdtg)
e4:SetOperation(s.tdop)
c:RegisterEffect(e4)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_CONTINUOUS)--EFFECT_TYPE_FIELD
ge1:SetCode(EVENT_CHAIN_SOLVED)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not rc:IsSetCard(0x211) or rc:IsCode(id) then return end
if rc:GetFlagEffect(id)==0 then
--rc:RegisterFlagEffect(id,RESET_PHASE+PHASE_END,0,1)
rc:RegisterFlagEffect(id,RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
end
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:GetHandler():IsSetCard(0x211) and Duel.IsChainDisablable(ev)
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function s.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)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,100)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(1-tp,100,REASON_EFFECT)
Duel.NegateEffect(ev)
end
function s.recon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==tp and re:GetHandler():IsSetCard(0x211)
end
function s.recost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,100)
end
function s.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(1-tp,100,REASON_EFFECT)
end
function s.tgfilter(c,e,tp)
return c:GetFlagEffect(id)>0 and
c:IsSetCard(0x211) and not c:IsCode(1200130) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode(),c)
end
function s.spfilter(c,e,tp,code,tc)
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and aux.IsCodeListed(c,code)
and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function s.fustg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.fusop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and not tc:IsImmuneToEffect(e) then
local code=tc:GetCode()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
if not tc:IsLocation(LOCATION_REMOVED) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,code,nil)
local sc=sg:GetFirst()
if sc then
Duel.BreakEffect()
Duel.SpecialSummon(sc,0,tp,tp,true,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
function s.exfilter(c,code)
return c:IsType(TYPE_FUSION) and aux.IsCodeListed(c,code) and c:IsAbleToDeck()
end
function s.tdfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x211) and c:IsAbleToDeck()
and Duel.IsExistingMatchingCard(s.exfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,c:GetCode())
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.tdfilter(chkc,tp) end
if chk==0 then return e:GetHandler():IsAbleToDeck()
and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_REMOVED,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local c=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil,tp):GetFirst()
local g=Duel.GetMatchingGroup(s.exfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,c:GetCode())
g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(s.exfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,tc:GetCode())
g:AddCard(tc)
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
--Tannerkivi 土石
function c1200135.initial_effect(c)
aux.AddCodeList(c,1200105)
aux.AddCodeList(c,1200130)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e1)
--race
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
--e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(c1200135.raop)
c:RegisterEffect(e2)
local e5=e2:Clone()
e5:SetCode(EVENT_FLIP)
c:RegisterEffect(e5)
--change position
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1200135,0))
e3:SetCountLimit(1,1200135)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
--e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e3:SetHintTiming(TIMING_END_PHASE,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE+TIMING_STANDBY_PHASE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c1200135.postg)
e3:SetOperation(c1200135.posop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1200135,1))
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_POSITION)
e4:SetType(EFFECT_TYPE_QUICK_F)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c1200135.descon)
e4:SetCost(c1200135.descost)
e4:SetTarget(c1200135.destg)
e4:SetOperation(c1200135.desop)
c:RegisterEffect(e4)
end
function c1200135.raop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_EARTH)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c1200135.posfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanTurnSet()
end
function c1200135.postg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c1200135.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
end
function c1200135.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c1200135.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sg=g:Select(tp,1,g:GetCount(),nil)
if sg:GetCount()>0 then
sg:AddCard(c)
Duel.HintSelection(sg)
Duel.ChangePosition(sg,POS_FACEDOWN_DEFENSE)
end
end
end
function c1200135.descon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return ep==1-Duel.GetTurnPlayer() and
loc==LOCATION_HAND and re:IsActiveType(TYPE_MONSTER) and e:GetHandler():IsFacedown()
end
function c1200135.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE)
end
function c1200135.desfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c1200135.spfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH)
end
function c1200135.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1200135.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local dg=Duel.GetMatchingGroup(c1200135.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
end
function c1200135.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c1200135.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sg=g:Select(tp,1,g:GetCount(),nil)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
Duel.ChangePosition(sg,POS_FACEDOWN_DEFENSE)
end
end
local dg=Duel.GetMatchingGroup(c1200135.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if dg:GetCount()>0 then
Duel.Destroy(dg,REASON_EFFECT)
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
--阳炎的审判
function c16402080.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,16402080+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c16402080.atktg)
e1:SetOperation(c16402080.atkop)
c:RegisterEffect(e1)
end
function c16402080.spfilter(c,e,tp)
return c:IsCode(16400660) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetMZoneCount(tp)>0
end
function c16402080.filter(c)
return c:IsCode(16400510) and aux.nzatk(c)
end
function c16402080.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16402080.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16402080.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c16402080.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c16402080.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c16402080.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16402080.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.BreakEffect()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SET_ATTACK_FINAL)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
e0:SetValue(0)
tc:RegisterEffect(e0)
end
end
end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment