Commit 15509e83 authored by POLYMER's avatar POLYMER

update 251013

parent 4d7f375f
No preview for this file type
expansions/pics/93050042.jpg

75.3 KB | W: | H:

expansions/pics/93050042.jpg

36.2 KB | W: | H:

expansions/pics/93050042.jpg
expansions/pics/93050042.jpg
expansions/pics/93050042.jpg
expansions/pics/93050042.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -13,50 +13,62 @@ function c10201003.initial_effect(c)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_FAIRY)
c:RegisterEffect(e2)
local e7=e2:Clone()
e7:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e7:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e7)
local e2g=e2:Clone()
e2g:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE)
e2g:SetCondition(c10201003.gravecon)
c:RegisterEffect(e2g)
local e7g=e7:Clone()
e7g:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE)
e7g:SetCondition(c10201003.gravecon)
c:RegisterEffect(e7g)
--summon limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_FZONE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
e3:SetTarget(c10201003.sumlimit)
local e3=e2:Clone()
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CHANGE_GRAVE_RACE)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(1,1)
e5:SetCondition(c10201003.gravecon)
e5:SetValue(RACE_FAIRY)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CHANGE_GRAVE_ATTRIBUTE)
e6:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e6)
end
function c10201003.sumlimit(e,c,tp,sumtp)
return bit.band(sumtp,SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and (c:GetRace()~=RACE_FAIRY and c:GetAttribute()~=ATTRIBUTE_DARK)
local e3g=e3:Clone()
e3g:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE)
e3g:SetCondition(c10201003.gravecon)
c:RegisterEffect(e3g)
-- 基本分回复效果
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10201003,0))
e4:SetCategory(CATEGORY_RECOVER)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1)
e4:SetTarget(c10201003.rectg)
e4:SetOperation(c10201003.recop)
c:RegisterEffect(e4)
end
-- 1
function c10201003.gravecon(e)
local tp=e:GetHandlerPlayer()
return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY)
and not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_NECRO_VALLEY)
end
-- 2
function c10201003.recfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_DARK)
end
function c10201003.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
local hg=Duel.GetMatchingGroup(c10201003.recfilter,tp,LOCATION_HAND,0,nil)
local fg=Duel.GetMatchingGroup(c10201003.recfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return #hg>0 or #fg>0 end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
function c10201003.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local hg=Duel.SelectMatchingCard(tp,c10201003.recfilter,tp,LOCATION_HAND,0,0,99,nil)
Duel.ConfirmCards(1-tp,hg)
local fg=Duel.GetMatchingGroup(c10201003.recfilter,tp,LOCATION_MZONE,0,nil)
local total=#hg+#fg
if total>0 then
Duel.Recover(tp,total*1000,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c10201003.shufflehandop)
Duel.RegisterEffect(e1,tp)
end
end
function c10201003.shufflehandop(e,tp,eg,ep,ev,re,r,rp)
Duel.ShuffleHand(tp)
end
--虹龍·朔
function c11185205.initial_effect(c)
c:EnableCounterPermit(0x452)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_REMOVED)
e1:SetCountLimit(1,11185205)
e1:SetCost(c11185205.spcost)
e1:SetTarget(c11185205.sptg)
e1:SetOperation(c11185205.spop)
c:RegisterEffect(e1)
--tofield
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11185205+1)
e2:SetCost(c11185205.tfcost)
e2:SetTarget(c11185205.tftg)
e2:SetOperation(c11185205.tfop)
c:RegisterEffect(e2)
end
function c11185205.cfilter(c)
return c:IsSetCard(0x453) and not c:IsPublic()
end
function c11185205.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11185205.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c11185205.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
if e:GetHandler()==g:GetFirst() then
e:SetLabel(1)
end
end
function c11185205.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c11185205.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x453) and c:IsAbleToHand()
end
function c11185205.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) then
if Duel.SelectYesNo(tp,aux.Stringid(11185205,1)) then c:AddCounter(0x452,1) end
local ck=e:GetLabel()
local g=Duel.GetMatchingGroup(c11185205.thfilter,tp,LOCATION_DECK,0,nil)
if ck~=1 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(11185205,0)) then
e:SetLabel(0)
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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c11185205.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c11185205.splimit(e,c)
return not (c:IsRace(RACE_WYRM) or c:IsType(TYPE_TUNER))
end
function c11185205.tfcfilter(c)
return not c:IsPublic()
end
function c11185205.tfcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c11185205.tfcfilter,tp,LOCATION_EXTRA,0,nil)
if chk==0 then return #g>0 end
Duel.ConfirmCards(1-tp,g)
end
function c11185205.tffilter(c)
return c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c11185205.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c11185205.tffilter,tp,LOCATION_EXTRA,0,1,nil) end
end
function c11185205.tfop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c11185205.tffilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--虹龍·護
function c11185210.initial_effect(c)
c:EnableCounterPermit(0x452)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_REMOVED)
e1:SetCountLimit(1,11185210)
e1:SetCost(c11185210.spcost)
e1:SetTarget(c11185210.sptg)
e1:SetOperation(c11185210.spop)
c:RegisterEffect(e1)
--tofield
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11185210+1)
e2:SetTarget(c11185210.rmtg)
e2:SetOperation(c11185210.rmop)
c:RegisterEffect(e2)
end
function c11185210.cfilter(c)
return c:IsSetCard(0x453) and not c:IsPublic()
end
function c11185210.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11185210.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c11185210.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
if e:GetHandler()==g:GetFirst() then
e:SetLabel(1)
end
end
function c11185210.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c11185210.thfilter(c)
return c:IsType(0x6) and c:IsSetCard(0x453) and c:IsAbleToHand()
end
function c11185210.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) then
if Duel.SelectYesNo(tp,aux.Stringid(11185210,1)) then c:AddCounter(0x452,1) end
local ck=e:GetLabel()
local g=Duel.GetMatchingGroup(c11185210.thfilter,tp,LOCATION_DECK,0,nil)
if ck~=1 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(11185210,0)) then
e:SetLabel(0)
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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c11185210.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c11185210.splimit(e,c)
return not (c:IsRace(RACE_WYRM) or c:IsType(TYPE_TUNER))
end
function c11185210.rmfilter(c)
return c:IsSetCard(0x453) and c:IsType(0x6) and c:IsAbleToRemove()
end
function c11185210.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11185210.rmfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c11185210.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c11185210.rmfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--虹龍·擺
function c11185215.initial_effect(c)
c:EnableCounterPermit(0x452)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_REMOVED)
e1:SetCountLimit(1,11185215)
e1:SetCost(c11185215.spcost)
e1:SetTarget(c11185215.sptg)
e1:SetOperation(c11185215.spop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11185215+1)
e2:SetTarget(c11185215.sptg2)
e2:SetOperation(c11185215.spop2)
c:RegisterEffect(e2)
end
function c11185215.cfilter(c)
return c:IsSetCard(0x453) and not c:IsPublic()
end
function c11185215.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11185215.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c11185215.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
if e:GetHandler()==g:GetFirst() then
e:SetLabel(1)
end
end
function c11185215.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c11185215.rmfilter(c)
return c:IsType(0x1) and c:IsSetCard(0x453) and c:IsAbleToRemove()
end
function c11185215.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) then
if Duel.SelectYesNo(tp,aux.Stringid(11185215,1)) then c:AddCounter(0x452,1) end
local ck=e:GetLabel()
local g=Duel.GetMatchingGroup(c11185215.rmfilter,tp,LOCATION_DECK,0,nil)
if ck~=1 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(11185215,0)) then
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,0x5,0x40)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c11185215.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c11185215.splimit(e,c)
return not (c:IsRace(RACE_WYRM) or c:IsType(TYPE_TUNER))
end
function c11185215.spfilter(c,e,tp)
return c:IsSetCard(0x453) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx()
end
function c11185215.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11185215.spfilter,tp,0x30,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x30)
end
function c11185215.spop2(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(c11185215.spfilter),tp,0x30,0,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
\ No newline at end of file
--虹龍·鋼
function c11185220.initial_effect(c)
c:EnableCounterPermit(0x452)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_REMOVED)
e1:SetCountLimit(1,11185220)
e1:SetCost(c11185220.spcost)
e1:SetTarget(c11185220.sptg)
e1:SetOperation(c11185220.spop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11185220+1)
e2:SetTarget(c11185220.thtg)
e2:SetOperation(c11185220.thop)
c:RegisterEffect(e2)
end
function c11185220.cfilter(c)
return c:IsSetCard(0x453) and not c:IsPublic()
end
function c11185220.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11185220.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c11185220.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
if e:GetHandler()==g:GetFirst() then
e:SetLabel(1)
end
end
function c11185220.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c11185220.spfilter(c,e,tp)
return c:IsSetCard(0x453) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11185220.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) then
if Duel.SelectYesNo(tp,aux.Stringid(11185220,1)) then c:AddCounter(0x452,1) end
local ck=e:GetLabel()
local g=Duel.GetMatchingGroup(c11185220.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if ck~=1 and g:GetCount()>0 and Duel.GetMZoneCount(tp)>0
and Duel.SelectYesNo(tp,aux.Stringid(11185220,0)) then
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c11185220.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c11185220.splimit(e,c)
return not (c:IsRace(RACE_WYRM) or c:IsType(TYPE_TUNER))
end
function c11185220.thfilter(c)
return c:IsSetCard(0x453) and c:IsAbleToHand() and c:IsFaceupEx()
end
function c11185220.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11185220.thfilter,tp,0x20,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x20)
end
function c11185220.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11185220.thfilter,tp,0x20,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,0x40)
end
end
\ No newline at end of file
--虹龍·辉龙
function c11185225.initial_effect(c)
c:EnableCounterPermit(0x452)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x453),1,1)
--disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11185225,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,11185225)
e1:SetCondition(c11185225.discon)
e1:SetCost(c11185225.discost)
e1:SetTarget(c11185225.distg)
e1:SetOperation(c11185225.disop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11185225,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCountLimit(1,11185225+1)
e2:SetTarget(c11185225.destg)
e2:SetOperation(c11185225.desop)
c:RegisterEffect(e2)
end
function c11185225.discon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp
end
function c11185225.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x452,3,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x452,3,REASON_COST)
end
function c11185225.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c11185225.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c11185225.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c11185225.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)>0 then
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(11185225,2)) then e:GetHandler():AddCounter(0x452,1) end
end
end
end
\ No newline at end of file
--虹龍·源龙
function c11185230.initial_effect(c)
c:EnableCounterPermit(0x452)
c:SetUniqueOnField(1,0,50223345)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x453),1,1)
--damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetOperation(c11185230.damop)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EVENT_MSET)
c:RegisterEffect(e11)
local e12=e1:Clone()
e12:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e12)
local e13=e1:Clone()
e13:SetCondition(c11185230.damcon2)
e13:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e13)
--damage
local e14=Effect.CreateEffect(c)
e14:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e14:SetCode(EVENT_CHAINING)
e14:SetRange(LOCATION_MZONE)
e14:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e14:SetOperation(c11185230.regop)
c:RegisterEffect(e14)
local e15=Effect.CreateEffect(c)
e15:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e15:SetCode(EVENT_CHAIN_SOLVED)
e15:SetRange(LOCATION_MZONE)
e15:SetCondition(c11185230.damcon)
e15:SetOperation(c11185230.damop)
c:RegisterEffect(e15)
--
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(3)
e4:SetCondition(c11185230.ctcon)
e4:SetTarget(c11185230.cttg)
e4:SetOperation(c11185230.ctop)
c:RegisterEffect(e4)
end
function c11185230.ctcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c11185230.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x452)
end
function c11185230.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
c:AddCounter(0x452,1)
end
end
function c11185230.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(11185230,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1)
end
function c11185230.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(11185230)~=0
end
function c11185230.damcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(aux.TRUE,1,c)
end
function c11185230.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,11185230)
Duel.Recover(tp,100,REASON_EFFECT)
Duel.Damage(1-tp,100,REASON_EFFECT)
end
\ No newline at end of file
--虹龍·海龙
function c11185235.initial_effect(c)
c:EnableCounterPermit(0x452)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x453),1,1)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11185235,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,11185235)
e1:SetTarget(c11185235.sptg)
e1:SetOperation(c11185235.spop)
c:RegisterEffect(e1)
--move
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11185235,2))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11185235+1)
e2:SetTarget(c11185235.ptg)
e2:SetOperation(c11185235.pop)
c:RegisterEffect(e2)
end
function c11185235.spfilter(c,e,tp)
return c:IsSetCard(0x453) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11185235.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11185235.spfilter,tp,0x32,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x32)
end
function c11185235.thfilter(c)
return c:IsSetCard(0x453) and c:IsAbleToHand() and c:IsFaceupEx()
end
function c11185235.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(c11185235.spfilter),tp,0x32,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local b1=Duel.IsCanRemoveCounter(tp,1,0,0x452,2,REASON_EFFECT)
local b2=Duel.IsExistingMatchingCard(c11185235.thfilter,tp,0x30,0,1,nil)
if b1 and b2 and Duel.SelectYesNo(tp,aux.Stringid(11185235,0)) then
if not Duel.RemoveCounter(tp,1,0,0x452,2,REASON_COST) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c11185235.thfilter,tp,0x30,0,1,1,nil)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
Duel.SendtoHand(sg,nil,0x40)
end
end
end
end
end
function c11185235.pfilter(c)
if not c:IsSetCard(0x453) then return end
local seq=c:GetSequence()
local tp=c:GetControler()
return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1))
or (seq==5 and Duel.CheckLocation(tp,LOCATION_MZONE,1))
or (seq==6 and Duel.CheckLocation(tp,LOCATION_MZONE,3))
end
function c11185235.ptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c11185235.pfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c11185235.pop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sc=Duel.SelectMatchingCard(tp,c11185235.pfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if sc then
local seq=sc:GetSequence()
if seq>4 then
if seq==5 and Duel.CheckLocation(tp,LOCATION_MZONE,1) then Duel.MoveSequence(sc,1) return end
if seq==6 and Duel.CheckLocation(tp,LOCATION_MZONE,3) then Duel.MoveSequence(sc,3) return end
end
local flag=0
if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=flag|(1<<(seq-1)) end
if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=flag|(1<<(seq+1)) end
if flag==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,~flag)
local nseq=math.log(s,2)
Duel.MoveSequence(sc,nseq)
end
end
\ No newline at end of file
--虹龍·星龙
function c11185240.initial_effect(c)
c:EnableCounterPermit(0x452)
c:SetUniqueOnField(1,0,50223345)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x453),1,1)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c11185240.atkval)
c:RegisterEffect(e1)
--multi attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(c11185240.atkval2)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1)
e4:SetCondition(c11185240.ctcon)
e4:SetTarget(c11185240.cttg)
e4:SetOperation(c11185240.ctop)
c:RegisterEffect(e4)
end
function c11185240.ctfilter(c,tp)
return c:IsType(TYPE_LINK) and c:IsSummonType(SUMMON_TYPE_LINK) and c:IsSummonPlayer(tp)
end
function c11185240.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11185240.ctfilter,1,e:GetHandler(),tp)
end
function c11185240.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x452)
end
function c11185240.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
c:AddCounter(0x452,1)
end
end
function c11185240.atkval(e,c)
return Duel.GetCounter(c:GetControler(),1,0,0x452)*500
end
function c11185240.atkval2(e,c)
return math.floor(Duel.GetCounter(c:GetControler(),1,0,0x452)/3)
end
\ No newline at end of file
--虹龍·双头龙
function c11185245.initial_effect(c)
c:EnableCounterPermit(0x452)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x453,0x452),1,1)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11185245,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,11185245)
e1:SetCost(c11185245.cost)
e1:SetTarget(c11185245.settg)
e1:SetOperation(c11185245.setop)
c:RegisterEffect(e1)
--todeck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11185245,2))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11185245+1)
e2:SetTarget(c11185245.tdtg)
e2:SetOperation(c11185245.tdop)
c:RegisterEffect(e2)
end
function c11185245.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x452,1,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x452,1,REASON_COST)
end
function c11185245.setfilter(c)
return c:IsSetCard(0x453) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c11185245.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c11185245.setfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11185245,1))
end
function c11185245.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c11185245.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
function c11185245.tdfilter(c)
return c:IsSetCard(0x453) and c:IsFaceupEx() and c:IsAbleToDeck()
end
function c11185245.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11185245.tdfilter,tp,0x3a,0,1,nil) end
local g=Duel.GetMatchingGroup(c11185245.tdfilter,tp,0x3a,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11185245,2))
end
function c11185245.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,c11185245.tdfilter,tp,0x3a,0,1,5,nil)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)>0 then
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(11185245,0)) then e:GetHandler():AddCounter(0x452,1) end
end
end
end
\ No newline at end of file
--虹龍圣域
function c11185255.initial_effect(c)
c:EnableCounterPermit(0x452)
--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(11185255,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1,11185255)
e1:SetTarget(c11185255.thtg)
e1:SetOperation(c11185255.thop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_FZONE)
e2:SetTarget(c11185255.rmtarget)
e2:SetTargetRange(LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,11185255+1)
e3:SetTarget(c11185255.destg)
e3:SetValue(c11185255.value)
e3:SetOperation(c11185255.desop)
c:RegisterEffect(e3)
end
function c11185255.rmfilter(c)
return c:IsSetCard(0x453) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c11185255.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11185255.rmfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c11185255.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c11185255.rmfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.Remove(g,0x5,REASON_EFFECT)>0 then
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(11185255,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g:Select(tp,1,1,nil)
if #sg>0 then
Duel.BreakEffect()
Duel.HintSelection(sg)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
end
end
function c11185255.rmtarget(e,c)
return c:IsSetCard(0x453)
end
function c11185255.dfilter(c,tp)
return c:IsLocation(LOCATION_ONFIELD) and c:IsFaceup() and c:IsSetCard(0x453) and c:IsControler(tp)
and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c11185255.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local count=eg:FilterCount(c11185255.dfilter,nil,tp)
return count>0 and Duel.IsCanRemoveCounter(tp,1,0,0x452,2,REASON_COST)
end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c11185255.value(e,c)
return c:IsLocation(LOCATION_ONFIELD) and c:IsFaceup() and c:IsSetCard(0x453)
and c:IsControler(e:GetHandlerPlayer())
end
function c11185255.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.RemoveCounter(tp,1,0,0x452,2,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetOperation(c11185255.op)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e1)
end
function c11185255.op(e)
Duel.Hint(HINT_CARD,0,11185255)
local tp=e:GetHandlerPlayer()
if Duel.SelectYesNo(tp,aux.Stringid(11185255,1)) then e:GetHandler():AddCounter(0x452,1) end
end
\ No newline at end of file
--虹龍之谷
function c11185265.initial_effect(c)
--Activate(summon)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON)
e1:SetCondition(aux.NegateSummonCondition)
e1:SetCost(c11185265.cost)
e1:SetTarget(c11185265.target1)
e1:SetOperation(c11185265.activate1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e3)
--Activate(effect)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_ACTIVATE)
e4:SetCode(EVENT_CHAINING)
e4:SetCondition(c11185265.condition2)
e4:SetCost(c11185265.cost)
e4:SetTarget(c11185265.target2)
e4:SetOperation(c11185265.activate2)
c:RegisterEffect(e4)
--salvage
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e5:SetHintTiming(TIMING_END_PHASE)
e5:SetCost(c11185265.spcost)
e5:SetTarget(c11185265.sptg)
e5:SetOperation(c11185265.spop)
c:RegisterEffect(e5)
end
function c11185265.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0x453) end
local sg=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0x453)
Duel.Release(sg,REASON_COST)
end
function c11185265.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c11185265.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function c11185265.condition2(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function c11185265.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c11185265.activate2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c11185265.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c11185265.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x452,3,REASON_EFFECT) end
end
function c11185265.spfilter(c,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsSetCard(0x453) and c:IsFaceupEx()
and (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(0x1)
or c:IsType(0x6) and c:IsAbleToHand())
end
function c11185265.spop(e,tp,eg,ep,ev,re,r,rp,chk)
if not Duel.IsCanRemoveCounter(tp,1,0,0x452,3,REASON_EFFECT) then return end
if Duel.RemoveCounter(tp,1,0,0x452,3,REASON_EFFECT) then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c11185265.spfilter),tp,0x30,0,nil,e,tp)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(11185265,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
if tc then
Duel.BreakEffect()
if tc:IsType(0x6) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
elseif tc:IsType(0x1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
end
\ No newline at end of file
--虹龍·墨龙
function c11185275.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.TargetBoolFunction(Card.IsSetCard,0x453),1)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetRange(LOCATION_EXTRA)
e1:SetValue(c11185275.synlimit)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11185275)
e2:SetCondition(c11185275.discon)
e2:SetCost(c11185275.discost)
e2:SetTarget(c11185275.distg)
e2:SetOperation(c11185275.disop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,11185275+1)
e3:SetCondition(c11185275.lzcon)
e3:SetTarget(c11185275.lztg)
e3:SetOperation(c11185275.lzop)
c:RegisterEffect(e3)
end
c11185275.material_type=TYPE_SYNCHRO
function c11185275.synlimit(e,se,sp,st)
return st&SUMMON_TYPE_SYNCHRO==SUMMON_TYPE_SYNCHRO and not se
end
function c11185275.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c11185275.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x452,1,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x452,1,REASON_COST)
end
function c11185275.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c11185275.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
function c11185275.lzcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c11185275.lztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
local dis=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0xffe0)
Duel.SetTargetParam(dis)
Duel.Hint(HINT_ZONE,tp,dis)
end
function c11185275.lzop(e,tp,eg,ep,ev,re,r,rp)
local zone=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tp==1 then
zone=((zone&0xffff)<<16)|((zone>>16)&0xffff)
end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetValue(zone)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
\ No newline at end of file
--虹龍·涛龙
function c11185285.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--synchro summon
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),nil,nil,aux.FilterBoolFunction(Card.IsSetCard,0x453),1,99)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,11185285)
e1:SetTarget(c11185285.thtg)
e1:SetOperation(c11185285.thop)
c:RegisterEffect(e1)
--topzone
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11185285+1)
e2:SetCondition(c11185285.pencon)
e2:SetTarget(c11185285.pentg)
e2:SetOperation(c11185285.penop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,11185285+2)
e3:SetCondition(c11185285.sccon)
e3:SetCost(c11185285.sccost)
e3:SetTarget(c11185285.sctg)
e3:SetOperation(c11185285.scop)
c:RegisterEffect(e3)
end
function c11185285.thfilter(c)
return c:IsSetCard(0x453) and c:IsAbleToHand() and c:IsFaceupEx()
end
function c11185285.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(0x30) and chkc:IsControler(tp) and c11185285.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11185285.thfilter,tp,0x30,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c11185285.thfilter,tp,0x30,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c11185285.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c11185285.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c11185285.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c11185285.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c11185285.sccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c11185285.cfilter(c)
return not c:IsPublic()
end
function c11185285.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11185285.cfilter,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.GetMatchingGroup(c11185285.cfilter,tp,LOCATION_EXTRA,0,nil)
Duel.ConfirmCards(1-tp,g)
end
function c11185285.penfilter(c)
return c:IsSetCard(0x453) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c11185285.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11185285.penfilter,tp,LOCATION_EXTRA,0,1,nil)
and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
end
function c11185285.scop(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c11185285.penfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if #g>0 then
local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--虹龍·月龙
function c11185290.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,10,c11185290.ovfilter,aux.Stringid(11185290,0),10,c11185290.xyzop)
c:EnableReviveLimit()
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11185290,1))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,11185290)
e1:SetCost(c11185290.discost)
e1:SetTarget(c11185290.distg)
e1:SetOperation(c11185290.disop)
c:RegisterEffect(e1)
--lock
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11185290,2))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11185290+1)
e2:SetCost(c11185290.cost)
e2:SetTarget(c11185290.lztg)
e2:SetOperation(c11185290.lzop)
c:RegisterEffect(e2)
end
function c11185290.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x453) and c:IsType(TYPE_XYZ)
end
function c11185290.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,11185290)==0 end
Duel.RegisterFlagEffect(tp,11185290,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c11185290.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x452,1,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x452,1,REASON_COST)
end
function c11185290.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,LOCATION_ONFIELD)
end
function c11185290.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tc=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
if tc and 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
end
function c11185290.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetOverlayCount()
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,ct,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,ct,ct,REASON_COST)
end
function c11185290.lztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
local dis=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0xffe0)
Duel.SetTargetParam(dis)
Duel.Hint(HINT_ZONE,tp,dis)
end
function c11185290.lzop(e,tp,eg,ep,ev,re,r,rp)
local zone=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tp==1 then
zone=((zone&0xffff)<<16)|((zone>>16)&0xffff)
end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetValue(zone)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
\ No newline at end of file
--虹龍·鳞龙
function c11185295.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x453),1,2)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c11185295.atkval)
c:RegisterEffect(e1)
--topzone
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11185295)
e2:SetCondition(c11185295.pencon)
e2:SetTarget(c11185295.pentg)
e2:SetOperation(c11185295.penop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,11185295+1)
e3:SetCost(c11185295.descost)
e3:SetTarget(c11185295.destg)
e3:SetOperation(c11185295.desop)
c:RegisterEffect(e3)
end
function c11185295.atkval(e)
local tp=e:GetHandlerPlayer()
local g=Duel.GetMatchingGroup(aux.AND(Card.IsRace,Card.IsFaceupEx),tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,RACE_WYRM)
return #g*-100
end
function c11185295.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c11185295.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c11185295.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c11185295.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c11185295.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 c11185295.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 c11185300.initial_effect(c)
c:EnableCounterPermit(0x452)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--synchro summon
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),nil,nil,aux.FilterBoolFunction(Card.IsSetCard,0x453),1,99)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,11185300)
e1:SetTarget(c11185300.thtg)
e1:SetOperation(c11185300.thop)
c:RegisterEffect(e1)
--topzone
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11185300+1)
e2:SetCondition(c11185300.pencon)
e2:SetTarget(c11185300.pentg)
e2:SetOperation(c11185300.penop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,11185300+2)
e3:SetCondition(c11185300.con)
e3:SetTarget(c11185300.tg)
e3:SetOperation(c11185300.op)
c:RegisterEffect(e3)
end
function c11185300.thfilter(c)
return c:IsSetCard(0x453) and c:IsType(0x1) and c:IsAbleToHand() and c:IsFaceupEx()
end
function c11185300.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(0x30) and chkc:IsControler(tp) and c11185300.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11185300.thfilter,tp,0x30,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c11185300.thfilter,tp,0x30,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c11185300.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c11185300.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c11185300.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c11185300.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c11185300.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c11185300.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x452)
end
function c11185300.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
c:AddCounter(0x452,1)
end
end
\ No newline at end of file
--虹龍·朔月
function c11185305.initial_effect(c)
c:EnableCounterPermit(0x452)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x453),1,1)
--synchro success
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,11185305)
e1:SetCondition(c11185305.addcc1)
e1:SetOperation(c11185305.addc1)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11185305+1)
e2:SetCost(c11185305.cost)
e2:SetTarget(c11185305.settg)
e2:SetOperation(c11185305.setop)
c:RegisterEffect(e2)
end
function c11185305.addcc1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c11185305.addc1(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x452,1)
end
function c11185305.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x452,1,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x452,1,REASON_COST)
end
function c11185305.setfilter(c)
return c:IsCode(11185255) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c11185305.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c11185305.setfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11185305,1))
end
function c11185305.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c11185305.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
\ No newline at end of file
--虹龍的敕令
function c11185310.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11185310,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11185310)
e1:SetTarget(c11185310.target)
e1:SetOperation(c11185310.activate)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11185310,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,11185310+1)
e2:SetCost(c11185310.discost)
e2:SetTarget(c11185310.distg)
e2:SetOperation(c11185310.disop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11185310,2))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,11185310+2)
e3:SetTarget(c11185310.atktg)
e3:SetOperation(c11185310.atkop)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(11185310,3))
e4:SetType(EFFECT_TYPE_ACTIVATE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1,11185310+3)
e4:SetTarget(c11185310.tg)
e4:SetOperation(c11185310.op)
c:RegisterEffect(e4)
end
function c11185310.selfilter(c,e,tp)
return c:IsSetCard(0x453) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11185310.target(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())
and Duel.IsExistingMatchingCard(c11185310.selfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c11185310.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)~=0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c11185310.selfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c11185310.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x452,3,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x452,3,REASON_COST)
end
function c11185310.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,LOCATION_ONFIELD)
end
function c11185310.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tc=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
if tc and 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
end
function c11185310.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x453)
end
function c11185310.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11185310.atkfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetCounter(tp,1,0,0x452)>0 end
end
function c11185310.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c11185310.atkfilter,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(Duel.GetCounter(tp,1,0,0x452)*300)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c11185310.indfilter(c)
return c:GetFlagEffect(11185310)==0 and c:IsSetCard(0x453) and c:IsFaceup()
end
function c11185310.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11185310.indfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
end
function c11185310.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c11185310.indfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e))
if #g<1 then return end
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
e3:SetValue(1)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_INACTIVATE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
e4:SetValue(c11185310.efilter)
e4:SetLabelObject(tc)
Duel.RegisterEffect(e4,tp)
tc:RegisterFlagEffect(11185310,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,0)
end
end
function c11185310.efilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
return te:GetHandler()==e:GetLabelObject()
end
\ No newline at end of file
--虹龍·神龙
function c11185315.initial_effect(c)
c:EnableCounterPermit(0x452)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x453),5,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_MATERIAL)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.fuslimit)
c:RegisterEffect(e0)
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11185315,0))
e1:SetCategory(CATEGORY_CONTROL+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,11185315)
e1:SetCost(c11185315.ctcost)
e1:SetTarget(c11185315.cttg)
e1:SetOperation(c11185315.ctop)
c:RegisterEffect(e1)
--lock
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11185315,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11185315+1)
e2:SetTarget(c11185315.lztg)
e2:SetOperation(c11185315.lzop)
c:RegisterEffect(e2)
--counter
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1,11185315+2)
e3:SetCondition(c11185315.ctrcon)
e3:SetTarget(c11185315.ctrtg)
e3:SetOperation(c11185315.ctrop)
c:RegisterEffect(e3)
end
function c11185315.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x452,1,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x452,1,REASON_COST)
end
function c11185315.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c11185315.ctop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
if Duel.GetControl(g,tp,PHASE_END,1)>0 then
if Duel.IsCanRemoveCounter(tp,1,0,0x452,1,REASON_EFFECT)
and Duel.SelectYesNo(tp,aux.Stringid(11185315,2)) then
Duel.BreakEffect()
if Duel.RemoveCounter(tp,1,0,0x452,1,REASON_EFFECT) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(c11185315.spfilter),tp,0x30,0,nil,e,tp)
if g2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(11185315,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g2:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
end
end
function c11185315.spfilter(c,e,tp)
return c:IsSetCard(0x453) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11185315.lztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_ONFIELD,PLAYER_NONE,0)>0 end
local dis=Duel.SelectDisableField(tp,1,0,LOCATION_ONFIELD,0xe0)
Duel.SetTargetParam(dis)
Duel.Hint(HINT_ZONE,tp,dis)
end
function c11185315.lzop(e,tp,eg,ep,ev,re,r,rp)
local zone=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tp==1 then
zone=((zone&0xffff)<<16)|((zone>>16)&0xffff)
end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetValue(zone)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function c11185315.ctrcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c11185315.ctrtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x452)
end
function c11185315.ctrop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and c:AddCounter(0x452,1) then
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,0,nil,0x452,1)
Duel.BreakEffect()
for tc in aux.Next(g) do
if tc:IsCanAddCounter(0x452,1) then
tc:AddCounter(0x452,1)
end
end
end
end
\ No newline at end of file
--虹龍·天龙
function c11185320.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--synchro summon
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),nil,nil,aux.FilterBoolFunction(Card.IsSetCard,0x453),1,99)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(c11185320.atkval)
c:RegisterEffect(e1)
--topzone
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11185320)
e2:SetCondition(c11185320.pencon)
e2:SetTarget(c11185320.pentg)
e2:SetOperation(c11185320.penop)
c:RegisterEffect(e2)
--cannot be target/effect indestructable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(1)
c:RegisterEffect(e3)
local e33=e3:Clone()
e33:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e33:SetValue(aux.tgoval)
c:RegisterEffect(e33)
--atk up
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e4:SetCondition(c11185320.atkcon)
e4:SetCost(c11185320.atkcost)
e4:SetOperation(c11185320.atkop)
c:RegisterEffect(e4)
end
function c11185320.atkval(e)
local tp=e:GetHandlerPlayer()
local g=Duel.GetMatchingGroup(aux.AND(Card.IsRace,Card.IsFaceupEx),tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,RACE_WYRM)
return #g*100
end
function c11185320.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c11185320.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c11185320.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c11185320.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc
end
function c11185320.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(11185320)==0 end
c:RegisterFlagEffect(11185320,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c11185320.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if c:IsRelateToBattle() and c:IsFaceup() and bc:IsRelateToBattle() and bc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(bc:GetAttack()+100)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--征伐的死君
function c11771440.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,c11771440.mfilter1,aux.NonTuner(c11771440.mfilter2),1)
c:EnableReviveLimit()
--indestructible
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(1)
e1:SetTarget(c11771440.indfilter)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e11)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11771440)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(c11771440.tgcost)
e2:SetTarget(c11771440.tgtg)
e2:SetOperation(c11771440.tgop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,11771440+1)
e3:SetCondition(c11771440.spcon)
e3:SetTarget(c11771440.sptg)
e3:SetOperation(c11771440.spop)
c:RegisterEffect(e3)
end
function c11771440.mfilter1(c)
return c:GetOriginalRace()&(RACE_ZOMBIE)>0
end
function c11771440.mfilter2(c)
return c:GetOriginalRace()&(RACE_ZOMBIE)>0 and c:IsSynchroType(TYPE_SYNCHRO)
end
function c11771440.indfilter(e,c)
return c:GetOriginalRace()&(RACE_ZOMBIE)>0
end
function c11771440.rfilter(c,tp)
return c:IsRace(RACE_ZOMBIE) and (c:IsControler(tp) or c:IsFaceup())
end
function c11771440.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c11771440.rfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c11771440.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c11771440.tgfilter(c)
return c:GetOriginalRace()&(RACE_ZOMBIE)==0 and c:IsAbleToGrave()
end
function c11771440.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c11771440.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function c11771440.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c11771440.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c11771440.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c11771440.rmfilter(c)
return c:IsAbleToRemove() and c:GetOriginalRace()&(RACE_ZOMBIE)>0
end
function c11771440.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)
and Duel.IsExistingMatchingCard(c11771440.rmfilter,tp,LOCATION_GRAVE,0,3,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,3,tp,LOCATION_GRAVE)
end
function c11771440.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11771440.rmfilter),tp,LOCATION_GRAVE,0,3,3,aux.ExceptThisCard(e))
if #g==3 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)==3 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--死君的引见人 塞勒菲斯
function c11771445.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,c11771445.mfilter1,aux.NonTuner(c11771445.mfilter1),1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11771445,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,11771445)
e1:SetCondition(c11771445.spcon)
e1:SetTarget(c11771445.sptg)
e1:SetOperation(c11771445.spop)
c:RegisterEffect(e1)
--Negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11771445+1)
e2:SetCondition(c11771445.condition)
e2:SetCost(c11771445.cost)
e2:SetTarget(c11771445.target)
e2:SetOperation(c11771445.activate)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,11771445+2)
e3:SetCondition(c11771445.spscon)
e3:SetTarget(c11771445.spstg)
e3:SetOperation(c11771445.spsop)
c:RegisterEffect(e3)
end
function c11771445.mfilter1(c)
return c:GetOriginalRace()&(RACE_ZOMBIE)>0
end
function c11771445.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c11771445.spfilter(c,e,tp)
return c:GetOriginalRace()&(RACE_ZOMBIE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsFaceupEx()
end
function c11771445.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11771445.spfilter,tp,0x30,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x30)
end
function c11771445.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(c11771445.spfilter),tp,0x30,0,1,1,nil,e,tp)
if #g<1 then return end
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
and not tc:IsType(TYPE_TUNER) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
function c11771445.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and Duel.IsChainDisablable(ev)
end
function c11771445.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 c11771445.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c11771445.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c11771445.spscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE)
end
function c11771445.spstg(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 c11771445.filter(c)
return c:IsFaceup() and c:IsRace(RACE_DINOSAUR)
end
function c11771445.spsop(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) then
if Duel.IsExistingMatchingCard(aux.AND(Card.IsCode,Card.IsFaceup),tp,LOCATION_ONFIELD,0,1,nil,11771440)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(11771445,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
end
\ No newline at end of file
--死魂驭者 赛斯
function c11771450.initial_effect(c)
c:SetSPSummonOnce(11771450)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c11771450.matfilter,1,1)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11771450,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,11771450)
e1:SetCondition(c11771450.thcon1)
e1:SetTarget(c11771450.thtg1)
e1:SetOperation(c11771450.thop1)
c:RegisterEffect(e1)
end
function c11771450.matfilter(c)
return c:GetOriginalRace()&(RACE_ZOMBIE)>0 and not c:IsType(TYPE_TUNER)
end
function c11771450.thcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c11771450.thfilter1(c)
return c:IsCode(11771455) and c:IsAbleToHand()
end
function c11771450.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11771450.thfilter1,tp,0x11,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x11)
end
function c11771450.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11771450.thfilter1),tp,0x11,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 c11771455.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11771455,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11771455)
e1:SetTarget(c11771455.target)
e1:SetOperation(c11771455.activate)
c:RegisterEffect(e1)
--activate2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11771455,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,11771455+1)
e2:SetTarget(c11771455.target2)
e2:SetOperation(c11771455.activate2)
c:RegisterEffect(e2)
--activate3
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11771455,2))
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,11771455+2)
e3:SetTarget(c11771455.target3)
e3:SetOperation(c11771455.activate3)
c:RegisterEffect(e3)
end
function c11771455.filter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToGrave()
end
function c11771455.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2)
and Duel.IsExistingMatchingCard(c11771455.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c11771455.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c11771455.filter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then
Duel.Draw(tp,2,REASON_EFFECT)
end
end
function c11771455.desfilter(c,tp)
return c:IsDestructable() and c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and Duel.GetMZoneCount(tp,c)>0
end
function c11771455.spfilter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceup()
end
function c11771455.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11771455.spfilter,tp,0x30,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c11771455.desfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x30)
end
function c11771455.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=Duel.SelectMatchingCard(tp,c11771455.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
if tg:GetCount()>0 then
if Duel.Destroy(tg,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,aux.NecroValleyFilter(c11771455.spfilter),tp,0x30,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function c11771455.rmfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemove()
end
function c11771455.tgfilter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToGrave()
end
function c11771455.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11771455.rmfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(c11771455.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tpp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c11771455.activate3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c11771455.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and tc:IsLocation(0x20) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c11771455.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoGrave(g2,0x40)
end
end
end
\ No newline at end of file
......@@ -22,7 +22,7 @@ Duel.LoadScript("c16670000.lua")
function cm.initial_effect(c)
aux.AddCodeList(c, yr)
aux.AddEquipSpellEffect(c, true, true, Card.IsFaceup, nil)
local e6=Effect.CreateEffect(c)
local e6 = Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_EQUIP)
e6:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e6)
......@@ -211,11 +211,20 @@ function cm.operation(e, tp, eg, ep, ev, re, r, rp)
local tg = ie:GetTarget()
-- Debug.Message(tg)
-- Debug.Message(aux.GetValueType(tg))
if tg and tg(ie, tp, eg, ep, ev, re, r, rp, 0) then
local op = ie:GetOperation()
if op then
tg(ie, tp, eg, ep, ev, re, r, rp, 1)
op(ie, tp, eg, ep, ev, re, r, rp)
if ie and tg and type(tg) == "function" then
local c1, c2 = pcall(function()
tg(ie, tp, eg, ep, ev, re, r, rp, 0)
end)
if c1 and c2 then
local op = ie:GetOperation()
if op then
pcall(function()
tg(ie, tp, eg, ep, ev, re, r, rp, 1)
end)
if c2 then
op(ie, tp, eg, ep, ev, re, r, rp)
end
end
end
end
end
......
--奇锋厄川·邓艾
local cm,m,o=GetID()
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DECKDES+CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
if not cm.check then
cm.check=1
local exe=Effect.CreateEffect(c)
exe:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
exe:SetCode(EVENT_PREDRAW)
exe:SetCountLimit(1)
exe:SetOperation(cm.retop)
Duel.RegisterEffect(exe,tp)
end
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.dcon)
e2:SetTarget(cm.dtg)
e2:SetOperation(cm.dop)
c:RegisterEffect(e2)
end
--random
function getrand()
local result=0
local g=Duel.GetDecktopGroup(0,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
math.randomseed(result)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_HAND,0,nil)
if chk==0 then return #g~=0 end
Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(#Duel.GetOperatedGroup())
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.filter(c)
return (c:IsType(TYPE_MONSTER) and not c:IsSummonable(false,nil)) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:GetActivateEffect():IsActivatable(tp))
end
function cm.dfil(c)
return c:IsType(TYPE_MONSTER) and c:GetBaseAttack()~=0
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local i=math.random(12,13)
Duel.Hint(24,0,aux.Stringid(m,i))
local item=math.min(e:GetLabel(),3)
if not item or item==0 then return end
local choice={true,true,true}
local ex=0
local close=0
for i=1,item do
if close==1 then return end
local op=aux.SelectFromOptions(tp,
{choice[1],aux.Stringid(m,2)},
{choice[2],aux.Stringid(m,3)},
{choice[3],aux.Stringid(m,4)},
{true,aux.Stringid(m,5)})
if op==1 then
local g=Duel.GetDecktopGroup(tp,1+ex)
local g2=Duel.GetDecktopGroup(1-tp,1+ex)
g:Merge(g2)
Duel.SendtoGrave(g,REASON_EFFECT)
elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1+ex,nil)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
local sg=Duel.GetOperatedGroup():Filter(cm.dfil,nil)
if sg then
local damage=sg:GetSum(Card.GetBaseAttack)/2
Duel.Damage(1-tp,damage,REASON_EFFECT)
end
end
elseif op==3 then
local closeloc=0
local checkloc={true,true,true,true}
for i=1,1+ex do
if closeloc==1 then return end
local b1=checkloc[1] and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_HAND,1,nil)
local b2=checkloc[2] and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
local b3=checkloc[3] and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_DECK,1,nil)
local b4=checkloc[4] and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_GRAVE,1,nil)
local lop=aux.SelectFromOptions(tp,
{b1,aux.Stringid(m,6)},
{b2,aux.Stringid(m,7)},
{b3,aux.Stringid(m,8)},
{b4,aux.Stringid(m,9)},
{true,aux.Stringid(m,5)})
local loc=0
if lop==1 then
loc=LOCATION_HAND
elseif lop==2 then
loc=LOCATION_ONFIELD
elseif lop==3 then
loc=LOCATION_DECK
elseif lop==4 then
loc=LOCATION_GRAVE
elseif lop==5 then
closeloc=1
end
if closeloc==1 then return end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,loc,nil):RandomSelect(tp,1)
Duel.SendtoHand(g,tp,REASON_EFFECT)
if loc==LOCATION_HAND then Duel.ShuffleHand(1-tp) end
checkloc[lop]=false
end
elseif op==4 then
close=1
end
ex=ex+1
choice[op]=false
end
if item==3 then Duel.ResetFlagEffect(tp,m) end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local exe=Effect.CreateEffect(e:GetHandler())
exe:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
exe:SetCode(EVENT_ADJUST)
exe:SetLabel(Duel.GetLP(1-e:GetHandlerPlayer()))
exe:SetOperation(cm.lbtop)
exe:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(exe,tp)
end
function cm.lbtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLP(1-e:GetHandlerPlayer())~=e:GetLabel() then
Duel.RegisterFlagEffect(tp,m+10000000,RESET_PHASE+PHASE_END,0,1)
e:Reset()
end
end
function cm.dcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetFlagEffect(tp,m+10000000)~=0
end
function cm.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m+20000000)==0 end
Duel.RegisterFlagEffect(tp,m+20000000,0,0,1)
end
function cm.dop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local i=math.random(14,15)
Duel.Hint(24,0,aux.Stringid(m,i))
if Duel.Draw(tp,2,REASON_EFFECT)~=0 then
--damage reduce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_REPLACE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(cm.damval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetOperation(cm.ndop)
Duel.RegisterEffect(e3,tp)
local ee1=Effect.CreateEffect(c)
ee1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ee1:SetCode(EVENT_PHASE+PHASE_STANDBY)
ee1:SetCountLimit(1)
ee1:SetOperation(cm.llop)
Duel.RegisterEffect(ee1,tp)
end
end
function cm.ndop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(e:GetHandlerPlayer(),m+30000000)~=0 then
Duel.Hint(HINT_CARD,0,m)
Duel.ResetFlagEffect(e:GetHandlerPlayer(),m+30000000)
Duel.Draw(e:GetHandlerPlayer(),1,REASON_EFFECT)
local i=math.random(14,15)
Duel.Hint(24,0,aux.Stringid(m,i))
end
end
function cm.damval(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then
Duel.RegisterFlagEffect(e:GetHandlerPlayer(),m+30000000,0,0,1)
return 0
end
return val
end
function cm.llop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local i=math.random(14,15)
Duel.Hint(24,0,aux.Stringid(m,i))
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.ConfirmCards(1-tp,g)
local sg=g:Filter(cm.sgfil,nil)
if #sg~=0 and Duel.SendtoGrave(sg,REASON_EFFECT)~=0 then
Duel.SetLP(tp,Duel.GetLP(tp)-2000*#Duel.GetOperatedGroup())
else
Duel.ResetFlagEffect(tp,m+20000000)
end
end
function cm.sgfil(c)
return (c:IsType(TYPE_MONSTER) and c:IsSummonable(false,nil)) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:GetActivateEffect():IsActivatable(tp))
end
--奇锋厄川·邓艾
local cm,m,o=GetID()
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DECKDES+CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
if not cm.check then
cm.check=1
local exe=Effect.CreateEffect(c)
exe:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
exe:SetCode(EVENT_PREDRAW)
exe:SetCountLimit(1)
exe:SetOperation(cm.retop)
Duel.RegisterEffect(exe,tp)
end
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.dcon)
e2:SetTarget(cm.dtg)
e2:SetOperation(cm.dop)
c:RegisterEffect(e2)
end
--random
function getrand()
local result=0
local g=Duel.GetDecktopGroup(0,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
math.randomseed(result)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_HAND,0,nil)
if chk==0 then return #g~=0 end
Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(#Duel.GetOperatedGroup())
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.filter(c)
return (c:IsType(TYPE_MONSTER) and not c:IsSummonable(false,nil)) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:GetActivateEffect():IsActivatable(tp))
end
function cm.dfil(c)
return c:IsType(TYPE_MONSTER) and c:GetBaseAttack()~=0
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local i=math.random(12,13)
Duel.Hint(24,0,aux.Stringid(60001310,i))
local item=math.min(e:GetLabel(),3)
if not item or item==0 then return end
local choice={true,true,true}
local ex=0
local close=0
for i=1,item do
if close==1 then return end
local op=aux.SelectFromOptions(tp,
{choice[1],aux.Stringid(m,2)},
{choice[2],aux.Stringid(m,3)},
{choice[3],aux.Stringid(m,4)},
{true,aux.Stringid(m,5)})
if op==1 then
local g=Duel.GetDecktopGroup(tp,1+ex)
local g2=Duel.GetDecktopGroup(1-tp,1+ex)
g:Merge(g2)
Duel.SendtoGrave(g,REASON_EFFECT)
elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1+ex,nil)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
local sg=Duel.GetOperatedGroup():Filter(cm.dfil,nil)
if sg then
local damage=sg:GetSum(Card.GetBaseAttack)/2
Duel.Damage(1-tp,damage,REASON_EFFECT)
end
end
elseif op==3 then
local closeloc=0
local checkloc={true,true,true,true}
for i=1,1+ex do
if closeloc==1 then return end
local b1=checkloc[1] and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_HAND,1,nil)
local b2=checkloc[2] and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
local b3=checkloc[3] and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_DECK,1,nil)
local b4=checkloc[4] and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_GRAVE,1,nil)
local lop=aux.SelectFromOptions(tp,
{b1,aux.Stringid(m,6)},
{b2,aux.Stringid(m,7)},
{b3,aux.Stringid(m,8)},
{b4,aux.Stringid(m,9)},
{true,aux.Stringid(m,5)})
local loc=0
if lop==1 then
loc=LOCATION_HAND
elseif lop==2 then
loc=LOCATION_ONFIELD
elseif lop==3 then
loc=LOCATION_DECK
elseif lop==4 then
loc=LOCATION_GRAVE
elseif lop==5 then
closeloc=1
end
if closeloc==1 then return end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,loc,nil):RandomSelect(tp,1)
Duel.SendtoHand(g,tp,REASON_EFFECT)
if loc==LOCATION_HAND then Duel.ShuffleHand(1-tp) end
checkloc[lop]=false
end
elseif op==4 then
close=1
end
ex=ex+1
choice[op]=false
end
if item==3 then Duel.ResetFlagEffect(tp,m) end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local exe=Effect.CreateEffect(e:GetHandler())
exe:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
exe:SetCode(EVENT_ADJUST)
exe:SetLabel(Duel.GetLP(1-e:GetHandlerPlayer()))
exe:SetOperation(cm.lbtop)
exe:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(exe,tp)
end
function cm.lbtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLP(1-e:GetHandlerPlayer())~=e:GetLabel() then
Duel.RegisterFlagEffect(tp,m+10000000,RESET_PHASE+PHASE_END,0,1)
e:Reset()
end
end
function cm.dcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetFlagEffect(tp,m+10000000)~=0
end
function cm.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m+20000000)==0 end
Duel.RegisterFlagEffect(tp,m+20000000,0,0,1)
end
function cm.dop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local i=math.random(14,15)
Duel.Hint(24,0,aux.Stringid(60001310,i))
if Duel.Draw(tp,2,REASON_EFFECT)~=0 then
--damage reduce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_REPLACE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(cm.damval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetOperation(cm.ndop)
Duel.RegisterEffect(e3,tp)
local ee1=Effect.CreateEffect(c)
ee1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ee1:SetCode(EVENT_PHASE+PHASE_STANDBY)
ee1:SetCountLimit(1)
ee1:SetOperation(cm.llop)
Duel.RegisterEffect(ee1,tp)
end
end
function cm.ndop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(e:GetHandlerPlayer(),m+30000000)~=0 then
Duel.Hint(HINT_CARD,0,m)
Duel.ResetFlagEffect(e:GetHandlerPlayer(),m+30000000)
Duel.Draw(e:GetHandlerPlayer(),1,REASON_EFFECT)
local i=math.random(14,15)
Duel.Hint(24,0,aux.Stringid(60001310,i))
end
end
function cm.damval(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then
Duel.RegisterFlagEffect(e:GetHandlerPlayer(),m+30000000,0,0,1)
return 0
end
return val
end
function cm.llop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local i=math.random(14,15)
Duel.Hint(24,0,aux.Stringid(60001310,i))
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.ConfirmCards(1-tp,g)
local sg=g:Filter(cm.sgfil,nil)
if #sg~=0 and Duel.SendtoGrave(sg,REASON_EFFECT)~=0 then
Duel.SetLP(tp,Duel.GetLP(tp)-2000*#Duel.GetOperatedGroup())
else
Duel.ResetFlagEffect(tp,m+20000000)
end
end
function cm.sgfil(c)
return (c:IsType(TYPE_MONSTER) and c:IsSummonable(false,nil)) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:GetActivateEffect():IsActivatable(tp))
end
......@@ -67,7 +67,7 @@ function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.IsPlayerAffectedByEffect(tp,60010225) then loc=LOCATION_HAND+LOCATION_ONFIELD end
if chk==0 then return Duel.IsExistingMatchingCard(cm.drfilter,tp,loc,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.drfilter,tp,loc,0,1,99,nil)
local g=Duel.SelectMatchingCard(tp,cm.drfilter,tp,loc,0,1,2,nil)
e:SetLabel(Duel.SendtoGrave(g,REASON_COST))
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -74,6 +74,10 @@ function cm.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)
Duel.SetChainLimit(cm.chainlm)
end
function cm.chainlm(e,rp,tp)
return rp~=tp
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -26,6 +26,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m+10000000)
e2:SetTarget(cm.sptg2)
e2:SetOperation(cm.spop2)
c:RegisterEffect(e2)
......
......@@ -6,13 +6,11 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetProperty(0)
e2:SetCondition(cm.hcon)
e2:SetTarget(cm.htg)
e2:SetOperation(cm.hop)
......@@ -56,7 +54,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsCode(m-1) or (c:IsLevelBelow(4) and c:IsCanHaveCounter(0x62a) and Duel.IsCanAddCounter(tp,0x62a,1,c) and c:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(cm.efil,tp,LOCATION_MZONE,0,1,nil)))
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsCode(m-1)
or (c:IsLevelBelow(4) and c:IsCanHaveCounter(0x62a) and Duel.IsCanAddCounter(tp,0x62a,1,c) and c:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(cm.efil,tp,LOCATION_MZONE,0,1,nil)))
end
function cm.efil(c)
return c:IsCode(m-1) and c:IsFaceup()
......
......@@ -89,8 +89,11 @@ function cm.atg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.aop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m+30000000)>3 then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
if Duel.Draw(p,d,REASON_EFFECT)~=0 then
Duel.RegisterFlagEffect(tp,m+30000000,RESET_PHASE+PHASE_END,0,1)
end
end
......
......@@ -91,6 +91,10 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_SZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetChainLimit(cm.chainlm)
end
function cm.chainlm(e,rp,tp)
return rp~=tp
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -67,6 +67,10 @@ function cm.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)
Duel.SetChainLimit(cm.chainlm)
end
function cm.chainlm(e,rp,tp)
return rp~=tp
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -96,6 +100,6 @@ end
function cm.rop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,nil,REASON_EFFECT)
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -6,13 +6,11 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetProperty(0)
e2:SetCondition(cm.hcon)
e2:SetTarget(cm.htg)
e2:SetOperation(cm.hop)
......@@ -91,12 +89,19 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil,e)
if chkc then return false end
if chk==0 then return g1:GetCount()>0 and g2:GetCount()>0 end
local tg=cm.SelectSub(g1,g2,tp)
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,0,0)
--local tg=cm.SelectSub(g1,g2,tp)
--Duel.SetTargetCard(tg)
--Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetTargetsRelateToChain()
--local sg=Duel.GetTargetsRelateToChain()
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(cm.sfilter,tp,LOCATION_GRAVE,0,nil,e)
local g2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil,e)
local sg=cm.SelectSub(g1,g2,tp)
if #sg==0 then return end
if sg:GetCount()>0 and Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
local g=Duel.GetOperatedGroup()
......
......@@ -268,6 +268,10 @@ function cm.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)
Duel.SetChainLimit(cm.chainlm)
end
function cm.chainlm(e,rp,tp)
return rp~=tp
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -103,6 +103,10 @@ function cm.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)
Duel.SetChainLimit(cm.chainlm)
end
function cm.chainlm(e,rp,tp)
return rp~=tp
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -81,6 +81,6 @@ function cm.atg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.aop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT,nil) then Duel.Draw(tp,2,REASON_EFFECT) end
if Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT,nil) then Duel.Draw(tp,1,REASON_EFFECT) end
end
......@@ -75,6 +75,10 @@ function cm.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)
Duel.SetChainLimit(cm.chainlm)
end
function cm.chainlm(e,rp,tp)
return rp~=tp
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -49,12 +49,14 @@ function cm.immcon(e)
return Duel.GetFieldGroupCount(tp,LOCATION_SZONE,0)~=0
end
function cm.immdtg(e,c)
return c:IsFaceup() and c:GetCounter(0x62a)~=0
return c:IsFaceup() and c:GetCounter(0x62a)>=10
end
function cm.efilter(e,te)
return e:GetHandlerPlayer()~=te:GetOwnerPlayer() and te:IsActivated()
end
function cm.tfil(c)
return c:IsFaceup() and c:GetCounter(0x62a)>=10
end
function cm.immval(e,te_or_c)
local res=aux.GetValueType(te_or_c)~="Effect" or (te_or_c:IsActivated() and te_or_c:GetOwner()~=e:GetHandler())
if res then
......@@ -70,7 +72,12 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetFlagEffect(tp,m+40000000)
Duel.Hint(HINT_CARD,0,m)
local g=Duel.GetFieldGroup(tp,LOCATION_SZONE,0)
Duel.Destroy(g,REASON_EFFECT)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
local tg=Duel.GetMatchingGroup(cm.tfil,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(tg) do
tc:RemoveCounter(tp,0x62a,10,REASON_EFFECT)
end
end
end
end
......@@ -92,11 +99,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(sg) do
if tc:GetCounter(0x62a)~=0 then num=num+tc:GetCounter(0x62a) end
end
if Duel.Release(sg,REASON_EFFECT) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
if sg:GetCount()==0 and Duel.Release(sg,REASON_EFFECT)~=0 then
e:GetHandler():AddCounter(0x62a,num)
end
if sg:GetCount()==0 and Duel.Release(sg,REASON_EFFECT)~=0 then
e:GetHandler():AddCounter(0x62a,num)
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.
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