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) ...@@ -13,50 +13,62 @@ function c10201003.initial_effect(c)
e2:SetCode(EFFECT_CHANGE_RACE) e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_FAIRY) e2:SetValue(RACE_FAIRY)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e7=e2:Clone()
e7:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e7:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e7)
local e2g=e2:Clone() local e2g=e2:Clone()
e2g:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE) e2g:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE)
e2g:SetCondition(c10201003.gravecon) e2g:SetCondition(c10201003.gravecon)
c:RegisterEffect(e2g) c:RegisterEffect(e2g)
local e7g=e7:Clone() local e3=e2:Clone()
e7g:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE) e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e7g:SetCondition(c10201003.gravecon) e3:SetValue(ATTRIBUTE_DARK)
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)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e3g=e3:Clone()
e4:SetCode(EFFECT_CANNOT_MSET) 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) 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)
end end
-- 1
function c10201003.gravecon(e) function c10201003.gravecon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY) return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY)
and not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_NECRO_VALLEY) and not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_NECRO_VALLEY)
end 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") ...@@ -22,7 +22,7 @@ Duel.LoadScript("c16670000.lua")
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c, yr) aux.AddCodeList(c, yr)
aux.AddEquipSpellEffect(c, true, true, Card.IsFaceup, nil) aux.AddEquipSpellEffect(c, true, true, Card.IsFaceup, nil)
local e6=Effect.CreateEffect(c) local e6 = Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_EQUIP) e6:SetType(EFFECT_TYPE_EQUIP)
e6:SetCode(EFFECT_PIERCE) e6:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e6) c:RegisterEffect(e6)
...@@ -211,16 +211,25 @@ function cm.operation(e, tp, eg, ep, ev, re, r, rp) ...@@ -211,16 +211,25 @@ function cm.operation(e, tp, eg, ep, ev, re, r, rp)
local tg = ie:GetTarget() local tg = ie:GetTarget()
-- Debug.Message(tg) -- Debug.Message(tg)
-- Debug.Message(aux.GetValueType(tg)) -- Debug.Message(aux.GetValueType(tg))
if tg and tg(ie, tp, eg, ep, ev, re, r, rp, 0) then 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() local op = ie:GetOperation()
if op then if op then
pcall(function()
tg(ie, tp, eg, ep, ev, re, r, rp, 1) tg(ie, tp, eg, ep, ev, re, r, rp, 1)
end)
if c2 then
op(ie, tp, eg, ep, ev, re, r, rp) op(ie, tp, eg, ep, ev, re, r, rp)
end end
end end
end end
end end
end end
end
end
-- local e1 = Effect.CreateEffect(c) -- local e1 = Effect.CreateEffect(c)
-- e1:SetType(EFFECT_TYPE_SINGLE) -- e1:SetType(EFFECT_TYPE_SINGLE)
-- e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) -- e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
......
--奇锋厄川·邓艾
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) ...@@ -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 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 if chk==0 then return Duel.IsExistingMatchingCard(cm.drfilter,tp,loc,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) 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)) e:SetLabel(Duel.SendtoGrave(g,REASON_COST))
end end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk) 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) ...@@ -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 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) 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 end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -26,6 +26,7 @@ function cm.initial_effect(c) ...@@ -26,6 +26,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m+10000000)
e2:SetTarget(cm.sptg2) e2:SetTarget(cm.sptg2)
e2:SetOperation(cm.spop2) e2:SetOperation(cm.spop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
......
...@@ -6,13 +6,11 @@ function cm.initial_effect(c) ...@@ -6,13 +6,11 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetProperty(0)
e2:SetCondition(cm.hcon) e2:SetCondition(cm.hcon)
e2:SetTarget(cm.htg) e2:SetTarget(cm.htg)
e2:SetOperation(cm.hop) e2:SetOperation(cm.hop)
...@@ -56,7 +54,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +54,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.filter(c,e,tp) 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 end
function cm.efil(c) function cm.efil(c)
return c:IsCode(m-1) and c:IsFaceup() 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) ...@@ -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) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function cm.aop(e,tp,eg,ep,ev,re,r,rp) 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) 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 end
......
...@@ -91,6 +91,10 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -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 e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_SZONE,0,1,nil) end and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_SZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) 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 end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -67,6 +67,10 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -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 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) 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 end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -96,6 +100,6 @@ end ...@@ -96,6 +100,6 @@ end
function cm.rop(e,tp,eg,ep,ev,re,r,rp) function cm.rop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Remove(tc,nil,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -6,13 +6,11 @@ function cm.initial_effect(c) ...@@ -6,13 +6,11 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetProperty(0)
e2:SetCondition(cm.hcon) e2:SetCondition(cm.hcon)
e2:SetTarget(cm.htg) e2:SetTarget(cm.htg)
e2:SetOperation(cm.hop) e2:SetOperation(cm.hop)
...@@ -91,12 +89,19 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -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) local g2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil,e)
if chkc then return false end if chkc then return false end
if chk==0 then return g1:GetCount()>0 and g2:GetCount()>0 end if chk==0 then return g1:GetCount()>0 and g2:GetCount()>0 end
local tg=cm.SelectSub(g1,g2,tp) --local tg=cm.SelectSub(g1,g2,tp)
Duel.SetTargetCard(tg) --Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,0,0) --Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,0,0)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) 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==0 then return end
if sg:GetCount()>0 and Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then if sg:GetCount()>0 and Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
local g=Duel.GetOperatedGroup() local g=Duel.GetOperatedGroup()
......
...@@ -268,6 +268,10 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -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 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) 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 end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -103,6 +103,10 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -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 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) 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 end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -81,6 +81,6 @@ function cm.atg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -81,6 +81,6 @@ function cm.atg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.aop(e,tp,eg,ep,ev,re,r,rp) function cm.aop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() 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 end
...@@ -75,6 +75,10 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -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 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) 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 end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -49,12 +49,14 @@ function cm.immcon(e) ...@@ -49,12 +49,14 @@ function cm.immcon(e)
return Duel.GetFieldGroupCount(tp,LOCATION_SZONE,0)~=0 return Duel.GetFieldGroupCount(tp,LOCATION_SZONE,0)~=0
end end
function cm.immdtg(e,c) function cm.immdtg(e,c)
return c:IsFaceup() and c:GetCounter(0x62a)~=0 return c:IsFaceup() and c:GetCounter(0x62a)>=10
end end
function cm.efilter(e,te) function cm.efilter(e,te)
return e:GetHandlerPlayer()~=te:GetOwnerPlayer() and te:IsActivated() return e:GetHandlerPlayer()~=te:GetOwnerPlayer() and te:IsActivated()
end end
function cm.tfil(c)
return c:IsFaceup() and c:GetCounter(0x62a)>=10
end
function cm.immval(e,te_or_c) 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()) local res=aux.GetValueType(te_or_c)~="Effect" or (te_or_c:IsActivated() and te_or_c:GetOwner()~=e:GetHandler())
if res then if res then
...@@ -70,7 +72,12 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,7 +72,12 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetFlagEffect(tp,m+40000000) Duel.ResetFlagEffect(tp,m+40000000)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
local g=Duel.GetFieldGroup(tp,LOCATION_SZONE,0) 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
end end
...@@ -92,12 +99,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,12 +99,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(sg) do for tc in aux.Next(sg) do
if tc:GetCounter(0x62a)~=0 then num=num+tc:GetCounter(0x62a) end if tc:GetCounter(0x62a)~=0 then num=num+tc:GetCounter(0x62a) end
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 if sg:GetCount()==0 and Duel.Release(sg,REASON_EFFECT)~=0 then
e:GetHandler():AddCounter(0x62a,num) e:GetHandler():AddCounter(0x62a,num)
end end
end
end end
......
...@@ -35,6 +35,9 @@ function cm.initial_effect(c) ...@@ -35,6 +35,9 @@ function cm.initial_effect(c)
e2:SetOperation(cm.aop) e2:SetOperation(cm.aop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.fil(c)
return c:IsCanHaveCounter(0x62a) and Duel.IsCanAddCounter(tp,0x62a,1,c) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:GetCounter(0x62a)<14
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsLocation(LOCATION_HAND) return not e:GetHandler():IsLocation(LOCATION_HAND)
end end
...@@ -45,7 +48,15 @@ end ...@@ -45,7 +48,15 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local num=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil) local num=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)
if num~=0 then Duel.Draw(tp,num,REASON_EFFECT) end if num>2 then
Duel.Draw(tp,2,REASON_EFFECT)
local g=Duel.GetMatchingGroup(cm.fil,tp,LOCATION_MZONE,0,e:GetHandler())
for tc in aux.Next(g) do
tc:AddCounter(0x62a,num-2)
end
elseif num>0 then
Duel.Draw(tp,num,REASON_EFFECT)
end
end end
function cm.filter(c) function cm.filter(c)
return (c:IsLevelAbove(6) or not c:IsLevelAbove(1)) and c:IsFaceup() return (c:IsLevelAbove(6) or not c:IsLevelAbove(1)) and c:IsFaceup()
......
--时间旅行者 克劳
local s,id,o=GetID()
function s.initial_effect(c)
local lmc=Duel.GetRegistryValue("Kro_Link_Marker_Count")
if lmc then
s.setlinkmarker(c,tonumber(lmc))
else
Duel.SetRegistryValue("Kro_Link_Marker_Count",1)
s.setlinkmarker(c,1)
end
c:EnableReviveLimit()
--
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH+EFFECT_COUNT_CODE_DUEL)
e0:SetCondition(s.spcon)
e0:SetTarget(s.sptg)
e0:SetOperation(s.spop)
c:RegisterEffect(e0)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--cannot link material
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetValue(1)
c:RegisterEffect(e2)
--limit summons
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCondition(s.lscon)
e3:SetOperation(s.lsop)
c:RegisterEffect(e3)
--immune
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetValue(s.efilter)
c:RegisterEffect(e5)
--atk/def
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_UPDATE_ATTACK)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetValue(s.adval)
c:RegisterEffect(e6)
--change
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22198672,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(s.chtg)
e3:SetOperation(s.chop)
c:RegisterEffect(e3)
end
function s.exmat(g,sc,tp)
return Duel.GetLocationCountFromEx(tp,tp,g,sc)>0
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON)
return rg:CheckSubGroup(s.exmat,1,13,c,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:SelectSubGroup(tp,s.exmat,true,1,13,c,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_SPSUMMON)
c:SetMaterial(g)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1)
end
function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function s.setlinkmarker(c,mc)
local sum=0
if mc>=8 then
sum=0x1ff
else
local markers = {0x080,0x100,0x020,0x004,0x002,0x001,0x008,0x040}
for i=1,mc do
sum=sum+markers[i]
end
end
c:SetCardData(CARDDATA_LEVEL,mc)
c:SetCardData(CARDDATA_LINK_MARKER,sum)
if mc==1 then c:SetCardData(CARDDATA_CODE,id) end
if mc==2 or mc==3 then c:SetCardData(CARDDATA_CODE,id+1) end
if mc==4 or mc==5 then c:SetCardData(CARDDATA_CODE,id+2) end
if mc==6 or mc==7 then c:SetCardData(CARDDATA_CODE,id+3) end
if mc>=8 then c:SetCardData(CARDDATA_CODE,id+4) end
return sum
end
function s.cfilter(c,cid)
return c:GetOriginalCode()==cid
end
function s.lscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)>0
end
function s.lsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=c:GetMaterial()
if mg then
Duel.Hint(HINT_CARD,0,id)
local lmc=tonumber(Duel.GetRegistryValue("Kro_Link_Marker_Count"))+#mg+8
Duel.SetRegistryValue("Kro_Link_Marker_Count",lmc)
local g=Duel.GetFieldGroup(0,0x7f,0x7f)
local xg=Duel.GetOverlayGroup(0,0x7f,0x7f)
g:Merge(xg)
g=g:Filter(s.cfilter,nil,id)
for tc in aux.Next(g) do
s.setlinkmarker(tc,lmc)
end
end
end
function s.adval(e,c)
return c:GetLink()*500
end
function s.efilter(e,te)
if te:IsActiveType(TYPE_SPELL+TYPE_TRAP)then return false end
local lmc=e:GetHandler():GetLink()
local tc=te:GetHandler()
return not(tc:GetLevel()>=lmc or tc:GetRank()>=lmc or tc:GetLink()>=lmc)
end
function s.eqfilter(c,tp,lg)
return (c:IsAbleToChangeControler() or c:IsControler(tp)) and lg:IsContains(c)
end
function s.chcheck(g)
if #g<2 then return true end
local tc1=g:GetFirst()
local tc2=g:GetNext()
return tc1:IsControler(tc2:GetControler()) or tc1:IsAbleToChangeControler() and tc2:IsAbleToChangeControler()
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup():Filter(Card.IsCanBeEffectTarget,nil,e)
if chkc then return false end
if chk==0 then return lg:CheckSubGroup(s.chcheck,2,2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=lg:SelectSubGroup(tp,s.chcheck,true,2,2)
Duel.SetTargetCard(g)
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetTargetsRelateToChain()
if #sg<2 then return end
local tc1=sg:GetFirst()
local tc2=sg:GetNext()
if tc1:IsControler(tc2:GetControler()) then
Duel.SwapSequence(tc1,tc2)
else
local seq1=tc1:GetSequence()
local seq2=tc2:GetSequence()
Duel.SwapControl(tc1,tc2)
if tc2:GetSequence()~=seq1 then Duel.MoveSequence(tc2,seq1) end
if tc1:GetSequence()~=seq2 then Duel.MoveSequence(tc1,seq2) end
end
end
\ No newline at end of file
...@@ -158,6 +158,7 @@ end ...@@ -158,6 +158,7 @@ end
function s.dstg(e,tp,eg,ep,ev,re,r,rp,chk) function s.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
if chk==0 then return #g>0 end if chk==0 then return #g>0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
...@@ -233,6 +234,7 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -233,6 +234,7 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local tg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) local tg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,tg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,tg,1,0,0)
end end
......
--禁忌的结界波
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.efilter(e,ct)
local p=e:GetHandlerPlayer()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return p==tp and te:IsCode(id)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetOperation(s.winop)
Duel.RegisterEffect(e3,tp)
end
function s.winop(e,tp,eg,ep,ev,re,r,rp)
Duel.Win(1-tp,WIN_REASON_CARD)
end
--急袭猛禽-观测林鸮
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddLinkProcedure(c,nil,2,2,s.lcheck)
aux.AddXyzProcedureLevelFree(c,aux.TRUE,s.xyzcheck,2,2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,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,id)
e1:SetCondition(s.setcon)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCost(s.cost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.lfilter(c)
return c:IsLinkSetCard(0xba)
end
function s.lcheck(g)
return g:IsExists(s.lfilter,1,nil)
end
function s.xyzcheck(g)
local tc = g:GetFirst()
return tc:IsSetCard(0xba)
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.setfilter(c)
return c:GetType()==TYPE_TRAP and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.spfilter(c,e,tp,mc)
return c:IsSetCard(0xba) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c) and (c:IsRank(3) or c:IsRank(5))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetTargetRange(1,0)
e3:SetValue(s.aclimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
end
function s.aclimit(e,re,tp)
local c=re:GetHandler()
return (not c:IsAttribute(ATTRIBUTE_DARK)) and c:IsType(TYPE_MONSTER)
end
--战华盟将-双壁
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_BEASTWARRIOR),2,2,s.lcheck)
c:EnableReviveLimit()
--Draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.drcon)
e1:SetTarget(s.drtg)
e1:SetOperation(s.drop)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(s.atktg)
e2:SetValue(500)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCountLimit(1,id+o)
e4:SetCost(s.spcost)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.matfilter(c)
return c:IsLinkAttribute(ATTRIBUTE_WATER) and c:IsLinkSetCard(0x137)
end
function s.lcheck(g,lc)
return g:IsExists(s.matfilter,1,nil)
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.tdfilter(c,e)
return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x137)
and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
end
function s.fselect(sg,tp)
local ct=0
if #sg>=3 then ct=#sg//3 end
return sg:GetCount()>=3 and Duel.IsPlayerCanDraw(tp,ct)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil,e)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and #g>=3 end
--[[local max=3
if Duel.IsPlayerCanDraw(tp,2) then max=6 end]]
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,s.fselect,false,3,63,tp)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,sg:GetCount()//3)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
if Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
local dr=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
local drc=math.floor(dr/3)
if drc>0 then
Duel.BreakEffect()
Duel.Draw(tp,drc,REASON_EFFECT)
end
end
--[[Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK)
if ct==0 then return end
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM)
end
Duel.BreakEffect()
Duel.Draw(tp,ct//3,REASON_EFFECT)]]
end
end
function s.atktg(e,c)
return c:IsSetCard(0x137)
end
function s.costfilter(c,tp)
return c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function s.spfilter(c,e,tp)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0x137) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end
if chk==0 then return --Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--战华之霸-孙符
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCost(s.spcost2)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
--atk
--[[local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id+o*2)
e4:SetCondition(s.atkcon)
e4:SetTarget(s.atktg)
e4:SetOperation(s.atkop)
c:RegisterEffect(e4)]]
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id+o*2)
e4:SetCondition(s.descon)
e4:SetTarget(s.destg)
e4:SetOperation(s.desop)
c:RegisterEffect(e4)
end
function s.chainfilter(re,tp,cid)
local ph=Duel.GetCurrentPhase()
return false --not (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)~=0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function s.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x137) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
--and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
end
function s.costfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGraveAsCost()
end
function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.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,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.atkfilter(c,tc)
return c:IsCanBeBattleTarget(tc)
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x137) and rp==tp and re:GetHandler()~=e:GetHandler()
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.atkfilter(chkc,e:GetHandler()) end
if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.atkfilter,tp,0,LOCATION_MZONE,1,1,nil,e:GetHandler())
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanBeBattleTarget(e:GetHandler()) and tc:IsControler(1-tp) then
Duel.CalculateDamage(e:GetHandler(),tc)
end
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x137) and rp==tp and re:GetHandler()~=e:GetHandler()
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)==1 then
local atk=math.abs(tc:GetAttack()-c:GetAttack())
if atk>0 and c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Damage(1-tp,atk,REASON_EFFECT,false)
end
end
end
...@@ -31,7 +31,7 @@ function c7449109.initial_effect(c) ...@@ -31,7 +31,7 @@ function c7449109.initial_effect(c)
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS) ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetCondition(c7449109.checkcon) --ge1:SetCondition(c7449109.checkcon)
ge1:SetOperation(c7449109.checkop) ge1:SetOperation(c7449109.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone() local ge2=ge1:Clone()
...@@ -48,10 +48,11 @@ function c7449109.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,10 +48,11 @@ function c7449109.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c7449109.eqop(e,tp,eg,ep,ev,re,r,rp) function c7449109.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tid=Duel.GetTurnCount()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,c7449109.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c,1):GetFirst() local tc=Duel.SelectMatchingCard(tp,c7449109.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c,1):GetFirst()
if tc and Duel.Equip(tp,tc,c) and Duel.GetFlagEffect(tp,7449109)~=0 then if tc and Duel.Equip(tp,tc,c) and Duel.GetFlagEffect(tp,7449106+tid*2)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Damage(1-tp,200,REASON_EFFECT) Duel.Damage(1-tp,200,REASON_EFFECT)
Duel.BreakEffect() Duel.BreakEffect()
...@@ -76,12 +77,27 @@ end ...@@ -76,12 +77,27 @@ end
function c7449109.ctfilter(c) function c7449109.ctfilter(c)
return c:IsCode(7449105) and c:IsFaceup() return c:IsCode(7449105) and c:IsFaceup()
end end
function c7449109.chkfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsCode(7449105)
end
function c7449109.checkcon(e,tp,eg,ep,ev,re,r,rp) function c7449109.checkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c7449109.ctfilter,1,nil) return eg:IsExists(c7449109.ctfilter,1,nil)
end end
function c7449109.checkop(e,tp,eg,ep,ev,re,r,rp) function c7449109.checkop(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(c7449109.ctfilter,nil) --local sg=eg:Filter(c7449109.ctfilter,nil)
for tc in aux.Next(sg) do local tid=Duel.GetTurnCount()
for p=0,1 do
local tc=eg:GetFirst()
while tc do
if c7449109.chkfilter(tc,p) then
--Debug.Message(tid)
--Debug.Message(7449108+tid*2)
Duel.RegisterFlagEffect(p,7449108+tid*2,RESET_PHASE+PHASE_END,0,2)
end
tc=eg:GetNext()
end
end
--[[for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_DRAW) e1:SetCode(EVENT_PHASE+PHASE_DRAW)
...@@ -91,7 +107,7 @@ function c7449109.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,7 +107,7 @@ function c7449109.checkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(c7449109.regop) e1:SetOperation(c7449109.regop)
e1:SetReset(RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tc:GetSummonPlayer()) Duel.RegisterEffect(e1,tc:GetSummonPlayer())
end end]]
end end
function c7449109.regcon(e,tp,eg,ep,ev,re,r,rp) function c7449109.regcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() return Duel.GetTurnCount()~=e:GetLabel()
......
--「融合」融合 --数码融合
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,24094653)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
...@@ -9,53 +8,37 @@ function s.initial_effect(c) ...@@ -9,53 +8,37 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not s.global then --to hand
s.global=true
--fusion substitute
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetDescription(aux.Stringid(id,1))
e2:SetCode(EFFECT_FUSION_SUBSTITUTE) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetTargetRange(LOCATION_HAND,LOCATION_HAND) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(s.efcon) e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(s.eftg) e2:SetCountLimit(1,id+1000)
Duel.RegisterEffect(e2,0) e2:SetCondition(aux.exccon)
end e2:SetTarget(s.thtg)
end e2:SetOperation(s.thop)
function s.efcon(e) c:RegisterEffect(e2)
return s.Boolean
end
function s.eftg(e,c)
return c:IsCode(24094653)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetLabel(0)
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_HAND,0,1,nil,24094653)
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_HAND,0,1,1,nil,24094653)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
e:SetLabel(1)
end
end end
function s.filter1(c) function s.filter1(c,e)
return (c:IsType(TYPE_MONSTER) or (c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE) and c:IsCode(24094653))) and c:IsCanBeFusionMaterial() return not c:IsImmuneToEffect(e)
end end
function s.filter2(c,e,tp,m,f,chkf) function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and (c:CheckFusionMaterial(m,nil,chkf)
or m:IsExists(s.sfilter,1,nil,c))
end
function s.sfilter(c,tc)
return aux.IsMaterialListCode(tc,c:GetCode())
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if e:GetLabel()==1 then s.Boolean=true end
local chkf=tp local chkf=tp
local mg1=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -66,15 +49,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -66,15 +49,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
s.Boolean=false
return res return res
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then s.Boolean=true end
local chkf=tp local chkf=tp
local mg1=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
...@@ -92,8 +73,24 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,8 +73,24 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) local mat1
local res=mat1:IsExists(Card.IsControler,1,nil,tp) and mat1:IsExists(Card.IsControler,1,nil,1-tp) local mgx=mg1:Filter(s.sfilter,nil,tc)
--融合素材是否有记述怪兽
if #mgx>0 then
--是否只能用记述怪兽单卡融合
if tc:CheckFusionMaterial(mg1,nil,chkf) then
--是否用记述怪兽单卡融合
if Duel.SelectYesNo(tp,aux.Stringid(93050042,2)) then
mat1=mgx:Select(tp,1,1,nil)
else
mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
end
else
mat1=mgx:Select(tp,1,1,nil)
end
else
mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
end
tc:SetMaterial(mat1) tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect() Duel.BreakEffect()
...@@ -105,5 +102,27 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -105,5 +102,27 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
tc:CompleteProcedure() tc:CompleteProcedure()
end end
s.Boolean=false end
function s.tdfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsAbleToDeck()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp)
and c:IsAbleToHand() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) and tc:IsType(TYPE_FUSION)
and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0
and tc:IsLocation(LOCATION_EXTRA)
and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end end
-- 怪兽卡:鸣神使者
local s, id = GetID()
function s.initial_effect(c)
-- 效果①:召唤·特殊召唤时发动
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
-- 定义鸣神字段常量
s.thunder_setcode = 0x396e
-- 效果①:目标设定
function s.spfilter(c,e,tp)
return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevel(3)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
-- 检查墓地是否有可特殊召唤的雷族怪兽
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
-- 检查手卡是否有鸣神卡
local b2=Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,s.thunder_setcode)
-- 检查卡组是否有鸣神怪兽
local b3=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.thunderfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
return b1 or (b2 and b3)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
-- 鸣神怪兽筛选器
function s.thunderfilter(c,e,tp)
return c:IsSetCard(s.thunder_setcode) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
-- 同调怪兽筛选器
function s.synchrofilter(c,sc,tuner)
return c:IsSetCard(s.thunder_setcode) and c:IsType(TYPE_SYNCHRO) and c:IsLevel(5)
end
-- 效果①:操作处理
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
-- 检查手卡是否有鸣神卡
local hand_g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND,0,nil,s.thunder_setcode)
local show_card=false
if #hand_g>0 then
-- 让玩家选择是否展示手卡
if Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
-- 选择要展示的手卡
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=hand_g:Select(tp,1,1,nil)
Duel.ConfirmCards(1-tp,sg)
show_card=true
Duel.ShuffleHand(tp)
end
end
local tc=nil
if show_card then
-- 从卡组特殊召唤鸣神怪兽
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.thunderfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
tc=g:GetFirst()
else
-- 从墓地特殊召唤雷族怪兽
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
tc=g:GetFirst()
end
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local synchro_g=Duel.GetMatchingGroup(s.synchrofilter,tp,LOCATION_EXTRA,0,nil,c,tc)
Duel.ShuffleDeck
(tp)
Duel.BreakEffect()
if #synchro_g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=synchro_g:Select(tp,1,1,nil)
local synchro_monster=sg:GetFirst()
if synchro_monster then
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
end
end
\ No newline at end of file
-- 怪兽卡:鸣神调律者
local s, id = GetID()
function s.initial_effect(c)
-- 效果①:作为同调素材送入墓地时检索
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCountLimit(1,id)
e1:SetCondition(s.thcon1)
e1:SetTarget(s.thtg1)
e1:SetOperation(s.thop1)
c:RegisterEffect(e1)
-- 效果②:从墓地返回卡组抽卡
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
end
-- 定义鸣神字段常量
s.thunder_setcode = 0x396e
-- 效果①:作为同调素材条件
function s.thcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
-- 效果①:目标设定
function s.thfilter(c)
return c:IsSetCard(s.thunder_setcode) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
-- 效果①:操作处理
function s.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
-- 效果②:目标设定
function s.tdfilter(c)
return c:IsSetCard(s.thunder_setcode) and c:IsType(TYPE_SYNCHRO) and not c:IsCode(id) and c:IsAbleToDeck()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) and chkc~=c end
if chk==0 then return c:IsAbleToDeck() and Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,2,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,2,2,c)
g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
-- 效果②:操作处理
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
local g=Group.FromCards(c,tc)
if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
-- 同步怪兽:鸣神大妖
local s, id = GetID()
function s.initial_effect(c)
-- 同步召唤设置
c:EnableReviveLimit()
-- aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,95075010),aux.FilterBoolFunction(Card.IsNotTuner),1,1)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,95075010),aux.NonTuner(nil),1,1)
-- 效果①:特殊召唤时盖放鸣神卡
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.setcon)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
-- 效果②:丢弃手卡获得抽卡和伤害效果
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+100)
e2:SetCost(s.discost)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
end
-- 效果①:特殊召唤成功条件
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
-- 效果①:目标设定
function s.setfilter(c)
return c:IsSetCard(0x396e) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
-- 效果①:操作处理
function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g:GetFirst())
end
end
-- 效果②:代价(丢弃1张手卡)
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
-- 效果②:目标设定
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,600)
end
-- 效果②:操作处理
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
-- 创建效果:每次自己的怪兽效果发动时抽卡并给与伤害
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCondition(s.drcon)
e1:SetOperation(s.drop)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(3)
Duel.RegisterEffect(e1,tp)
-- 记录效果发动次数
c:RegisterFlagEffect(id,RESET_PHASE+PHASE_END,0,1)
end
-- 效果②:抽卡条件
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsControler(tp) and e:GetHandler():GetFlagEffect(id)<3
end
-- 效果②:抽卡操作
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(id)>=3 then return end
-- 抽1张卡
if Duel.Draw(tp,1,REASON_EFFECT)~=0 then
-- 给与对方200伤害
Duel.Damage(1-tp,200,REASON_EFFECT)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
\ No newline at end of file
-- 怪兽卡:鸣神唤兽
local s, id = GetID()
function s.initial_effect(c)
-- 效果①:空场时可以从手卡特殊召唤
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
c:RegisterEffect(e1)
-- 效果②:解放自身从卡组特殊召唤
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCost(s.spcost2)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
end
-- 效果①:特殊召唤条件
function s.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
-- 效果②:代价(解放自身)
function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
-- 效果②:目标设定
function s.spfilter(c,e,tp)
return (c:IsCode(95075010) or c:IsSetCard(0x396e)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
-- 效果②:操作处理
function s.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,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
-- 卡片效果:净土镇魂
local s, id = GetID()
function s.initial_effect(c)
-- 魔法卡效果
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
-- 发动条件:场上存在「一心净土」
function s.filter(c)
return c:IsFaceup() and c:IsCode(95075070) -- 一心净土的卡号
end
function s.chainlm(e,rp,tp)
return not e:GetHandler():IsType(TYPE_MONSTER)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
-- 目标设定
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
end
-- 效果处理
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if #g>0 then
for tc in aux.Next(g) do
-- 禁止发动效果
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
-- 可选:添加视觉效果提示
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
--tc:RegisterEffect(e2)
end
end
end
\ No newline at end of file
-- 同步怪兽:鸣神狐仙
local s, id = GetID()
function s.initial_effect(c)
-- 同步召唤设置
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,95075010),aux.NonTuner(nil),1,1)
-- 效果①:特殊召唤时除外对方场上·墓地各1张卡
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.rmcon)
e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop)
c:RegisterEffect(e1)
-- 效果②:对方怪兽效果发动时解放自身无效效果
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.negcon)
e2:SetCost(s.negcost)
e2:SetTarget(s.negtg)
e2:SetOperation(s.negop)
c:RegisterEffect(e2)
end
-- 效果①:特殊召唤成功条件
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
-- 效果①:目标设定
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local b1=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil)
return b1 and b2
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,1-tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
-- 效果①:操作处理
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
-- 选择对方场上1张卡
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
-- 选择对方墓地1张卡
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
if #g1>0 and #g2>0 then
local g=Group.CreateGroup()
g:Merge(g1)
g:Merge(g2)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
-- 效果②:无效效果条件
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
end
-- 效果②:代价(解放自身)
function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
-- 效果②:目标设定
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
-- 效果②:操作处理
function s.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
-- 场地魔法卡:鸣神净土
local s, id = GetID()
function s.initial_effect(c)
-- 场地魔法卡
-- 效果①:发动时选择效果
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
-- e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.acttg)
e1:SetOperation(s.actop)
c:RegisterEffect(e1)
-- 效果②:鸣神怪兽攻击力·守备力上升
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x396e))
e2:SetValue(300)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
-- 效果③:鸣神同调怪兽特殊召唤时从墓地特殊召唤
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e4:SetCondition(s.spcon)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
-- 效果④:被破坏时代替除外
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_DESTROY_REPLACE)
e5:SetRange(LOCATION_FZONE)
e5:SetTarget(s.reptg)
e5:SetOperation(s.repop)
c:RegisterEffect(e5)
end
-- 定义字段和卡号常量
s.thunder_setcode = 0x396e-- 鸣神字段
s.fox_code = 95075010 -- 狐斋宫
-- 效果①:目标设定
function s.thfilter(c)
return (c:IsSetCard(s.thunder_setcode) or c:IsCode(s.fox_code)) and c:IsAbleToHand()
end
function s.spfilter(c,e,tp)
return (c:IsSetCard(s.thunder_setcode) or c:IsCode(s.fox_code)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4)
end
function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
return b1 or b2
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE)
end
-- 效果①:操作处理
function s.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
-- 选择效果
local op=0
local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))
elseif b1 then
op=0
elseif b2 then
op=1
else
return
end
if op==0 then
-- 效果1:从卡组把1只鸣神怪兽或狐斋宫加入手卡
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
-- 效果2:从墓地特殊召唤狐斋宫和1只鸣神怪兽
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp)
if #g2>0 then
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end
end
end
-- 效果③:条件判断
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.filter,1,nil,tp)
end
-- 筛选器:鸣神同调怪兽
function s.filter(c,tp)
return c:IsSetCard(s.thunder_setcode) and c:IsType(TYPE_SYNCHRO) and c:IsControler(tp)
end
-- 效果③:目标设定
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
-- 效果③:操作处理
function s.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,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
-- 效果④:代替破坏目标判断
function s.repfilter(c)
return c:IsSetCard(s.thunder_setcode) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT)
and Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_GRAVE,0,1,nil) end
if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_GRAVE,0,1,1,nil)
e:SetLabelObject(g:GetFirst())
return true
else
return false
end
end
-- 效果④:代替破坏操作处理
function s.repop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
\ No newline at end of file
-- 同步怪兽:鸣神雷兽
local s, id = GetID()
function s.initial_effect(c)
-- 同步召唤设置
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
-- 效果①:同调召唤时给予伤害
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.damcon)
e1:SetTarget(s.damtg)
e1:SetOperation(s.damop)
c:RegisterEffect(e1)
-- 效果②:在墓地时除外自身破坏对方场上发动的卡效果
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.negcon)
e2:SetCost(s.negcost)
e2:SetTarget(s.negtg)
e2:SetOperation(s.negop)
c:RegisterEffect(e2)
end
-- 效果①:同调召唤成功条件
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
-- 效果①:目标设定
function s.damfilter(c)
return c:IsSetCard(0x396e) and c:IsType(TYPE_MONSTER)
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(s.damfilter,tp,LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
return ct>0
end
local g=Duel.GetMatchingGroup(s.damfilter,tp,LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(ct*200)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*200)
end
-- 效果①:操作处理
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetMatchingGroup(s.damfilter,tp,LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if ct>0 then
Duel.Damage(p,ct*200,REASON_EFFECT)
end
end
-- 效果②:效果条件
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:GetHandler():IsOnField()
end
-- 效果②:代价(从墓地除外自身)
function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
-- 效果②:目标设定
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re and re:GetHandler():IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,re:GetHandler(),1,0,0)
end
-- 效果②:操作处理
function s.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc and rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT)
end
end
\ No newline at end of file
-- 同步怪兽:鸣神将军
local s, id = GetID()
function s.initial_effect(c)
-- 同步召唤设置
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,95075010),aux.NonTuner(nil),1,1)
-- 效果①:卡名当作雷电将军使用
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(95075030)
c:RegisterEffect(e1)
-- 效果②:同调召唤时解放鸣神怪兽封锁对方魔陷区
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,id)
e2:SetCondition(s.lockcon)
e2:SetCost(s.lockcost)
e2:SetTarget(s.locktg)
e2:SetOperation(s.lockop)
c:RegisterEffect(e2)
end
-- 效果②:同调召唤成功条件
function s.filter1(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.lockcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
-- 效果②:代价(解放自己场上1只表侧表示鸣神怪兽)
function s.costfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x396e) and c:IsReleasable()
end
function s.lockcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.Release(g,REASON_COST)
end
-- 效果②:目标设定
function s.locktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,0,LOCATION_ONFIELD,1,c) end
Duel.SetChainLimit(aux.FALSE)
end
-- 效果②:操作处理
function s.lockop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
-- 里侧表示的魔法·陷阱卡不能发动
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(s.aclimit1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
-- 表侧表示的魔法·陷阱卡效果无效化
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(0,LOCATION_SZONE)
e2:SetTarget(s.distg)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetOperation(s.disop)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
-- 里侧魔陷不能发动
function s.aclimit1(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsFacedown()
end
-- 表侧魔陷无效化
function s.distg(e,c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
if rp==1-tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsFaceup() then
Duel.NegateEffect(ev)
end
end
\ No newline at end of file
-- 同步怪兽:雷神制裁者
local s, id = GetID()
function s.initial_effect(c)
-- 同步召唤设置
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
-- 效果①:对方召唤·特殊召唤时解放怪兽无效对方卡片
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.discon)
e1:SetCost(s.discost)
e1:SetTarget(s.distg)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
-- 效果②:因对方效果离场时特殊召唤墓地雷族怪兽
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
-- 效果①:对方召唤·特殊召唤条件
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp)
end
-- 效果①:代价(解放这张卡以外的自己场上1只怪兽)
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsReleasableByEffect,1,c) end
local g=Duel.SelectReleaseGroup(tp,Card.IsReleasableByEffect,1,1,c)
Duel.Release(g,REASON_COST)
end
-- 效果①:目标设定
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
-- 效果①:操作处理
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
-- 效果无效化直到回合结束
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
-- 效果②:离场条件
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsReason(REASON_EFFECT) and rp==1-tp
end
-- 效果②:目标设定
function s.spfilter(c,e,tp)
return c:IsRace(RACE_THUNDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
-- 效果②:操作处理
function s.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(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
-- 怪兽卡:净土守护者
local s, id = GetID()
function s.initial_effect(c)
-- 效果①:以自己怪兽为对象的效果发动时解放自身无效并破坏
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.negcon)
e1:SetCost(s.negcost)
e1:SetTarget(s.negtg)
e1:SetOperation(s.negop)
c:RegisterEffect(e1)
-- 效果②:墓地特殊召唤(需要一心净土)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
-- 效果①:无效条件
function s.tfilter1(c,tp)
return c:IsOnField() and c:IsControler(tp)
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(s.tfilter1,1,nil,tp) and Duel.IsChainNegatable(ev)
end
-- 效果①:代价(解放自身)
function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
-- 效果①:目标设定
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
-- 效果①:操作处理
function s.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
-- 效果②:特殊召唤条件(需要一心净土)
function s.filter(c)
return c:IsFaceup() and (c:IsCode(95075070) or c:IsCode(95075010))
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil)
end
-- 效果②:目标设定
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
-- 效果②:操作处理
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
-- 添加离场时除外的效果
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
\ No newline at end of file
-- 魔法卡:无想的一刀
local s, id = GetID()
function s.initial_effect(c)
-- 限制卡:决斗中只能发动1张
c:SetUniqueOnField(1,0,id)
-- 效果①:破坏对方场上所有卡
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
-- 发动条件:自己场上有雷电将军或雷电·影
function s.filter(c)
return c:IsFaceup() and (c:IsCode(95075030) or c:IsCode(95075110))
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil)
end
-- 目标设定
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
-- 效果处理
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
-- 永续陷阱卡:雷电结界
local s, id = GetID()
function s.initial_effect(c)
-- 在自己场上只能有1张表侧表示存在
c:SetUniqueOnField(1,0,id)
-- 永续陷阱卡
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
-- 效果①:相同纵列的其他卡的效果无效化
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTarget(s.distg)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_DISABLE_EFFECT)
c:RegisterEffect(e3)
-- 效果②:对方怪兽被破坏时给予伤害并可破坏卡片
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e4:SetCondition(s.damcon)
e4:SetTarget(s.damtg)
e4:SetOperation(s.damop)
c:RegisterEffect(e4)
end
-- 效果①:相同纵列判断
function s.distg(e,c)
local tp=e:GetHandlerPlayer()
local seq=c:GetSequence()
local cseq=e:GetHandler():GetSequence()
if c==e:GetHandler() then
return false
end
-- 魔法陷阱区域判断
if c:IsLocation(LOCATION_SZONE) then
-- 同一纵列的魔法陷阱卡
return seq==cseq
end
-- 怪兽区域判断
if c:IsLocation(LOCATION_MZONE) then
-- 同一纵列的怪兽卡
local loc_seq = c:GetSequence()
if c:IsControler(tp) then
-- 自己场上的怪兽
if loc_seq<5 and cseq<5 then
return loc_seq==cseq
end
else
-- 对方场上的怪兽
if loc_seq<5 and cseq<5 then
return 4-loc_seq==cseq
end
end
end
return false
end
-- 雷电将军筛选器
function s.raidenfilter(c)
return c:IsFaceup() and c:IsCode(95075030)
end
-- 效果②:条件判断(对方怪兽被破坏)
function s.cfilter(c,tp,e)
return c:IsPreviousControler(1-tp) and c:IsPreviousLocation(LOCATION_MZONE) and
(c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE)) and
not (c:IsReason(REASON_EFFECT) and c:GetReasonEffect() and c:GetReasonEffect():GetHandler()==e:GetHandler())
end
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp,e)
end
-- 效果②:目标设定
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(200)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,200)
end
-- 效果②:操作处理
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
-- 给予200伤害
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
-- 检查是否有雷电将军
local g=Duel.GetMatchingGroup(s.raidenfilter,tp,LOCATION_MZONE,0,nil)
local pg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if #g>0 and pg:GetCount()>0 then
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if #dg>0 then
Duel.BreakEffect()
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
-- 魔法卡:鸣神苏生
local s, id = GetID()
function s.initial_effect(c)
-- 卡名限制:1回合只能发动1张
c:SetUniqueOnField(1,0,id)
-- 效果①:从墓地特殊召唤鸣神怪兽
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
-- 鸣神字段常量
s.thunder_setcode = 0x396e
-- 效果①:目标设定
function s.spfilter(c,e,tp)
return c:IsSetCard(s.thunder_setcode) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
-- 效果①:操作处理
function s.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(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
-- 怪兽卡:鸣神追念者
local s, id = GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,95075010),aux.FilterBoolFunction(Card.IsCode,95075030),1,1)
-- 效果①:不会被效果破坏,不能成为效果对象
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e5)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetValue(95075030)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
-- 效果②:主要阶段在对方场上特殊召唤衍生物并注册永续效果
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetTarget(s.tktg)
e3:SetOperation(s.tkop)
c:RegisterEffect(e3)
-- 效果③:战斗阶段开始时提升攻击力
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(s.atkcon)
e4:SetOperation(s.atkop)
c:RegisterEffect(e4)
end
-- 效果②:目标设定
function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,95080100,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_THUNDER,ATTRIBUTE_DARK,POS_FACEUP,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end
-- 效果②:操作处理
function s.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,95075990,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_THUNDER,ATTRIBUTE_DARK,POS_FACEUP,1-tp) then
-- 特殊召唤衍生物
local token=Duel.CreateToken(tp,95075990)
if Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)~=0 then
-- 衍生物不能作为连接素材
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
-- 注册永续效果:对方回合结束时检查
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(s.excon)
e2:SetOperation(s.exop)
e2:SetReset(RESET_PHASE+PHASE_END,2)
e2:SetLabel(Duel.GetTurnCount())
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
Duel.RegisterEffect(e3,tp)
end
end
end
-- 衍生物筛选器
function s.tokenfilter(c)
return c:IsCode(95075990)
end
-- 效果②永续效果:检查条件
function s.excon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.IsExistingMatchingCard(s.tokenfilter,tp,0,LOCATION_MZONE,1,nil)
end
-- 效果②永续效果:操作处理
function s.exop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if #g>0 then
-- 里侧除外对方场上所有怪兽
local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
if ct>0 then
-- 给与除外数量×1000伤害
Duel.Damage(1-tp,ct*1000,REASON_EFFECT)
end
end
e:Reset()
end
-- 效果③:战斗阶段开始条件
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp or Duel.GetTurnPlayer()==1-tp
end
-- 效果③:操作处理
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
-- 计算场上和墓地的鸣神卡数量
local g1=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,0x396e)
local ct=g1:GetClassCount(Card.GetCode)
if ct>0 then
-- 攻击力变成鸣神卡数量×800
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(ct*600)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
-- 魔法卡:鸣神召唤
local s, id = GetID()
function s.initial_effect(c)
-- 效果①:丢弃手卡检索鸣神怪兽
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
-- 定义鸣神字段常量
s.thunder_setcode = 0x396e
-- 代价(丢弃1张手卡)
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
-- 目标设定
function s.thfilter(c)
return c:IsSetCard(s.thunder_setcode) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
-- 效果处理
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
-- 怪兽卡:鸣神化身
local s, id = GetID()
function s.initial_effect(c)
-- 效果①:卡名当作狐斋宫使用
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(95075010) -- 狐斋宫的卡号
c:RegisterEffect(e1)
-- 效果②:从卡组送墓鸣神怪兽特殊召唤
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,id)
e2:SetCost(s.spcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
-- 定义鸣神字段常量
s.thunder_setcode = 0x396e
-- 效果②:代价(从卡组把1只鸣神怪兽送去墓地)
function s.tgfilter(c)
return c:IsSetCard(s.thunder_setcode) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_COST)
end
end
-- 效果②:目标设定
function s.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 s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
...@@ -1213,6 +1213,7 @@ ...@@ -1213,6 +1213,7 @@
!setname 0x6224 封灵 !setname 0x6224 封灵
!setname 0x9224 宝可· !setname 0x9224 宝可·
!setname 0xa224 裂界 !setname 0xa224 裂界
!setname 0x5225 绝海滋养
#Qwe.3359™ #Qwe.3359™
!counter 0x6371 蓄电指示物 !counter 0x6371 蓄电指示物
...@@ -1296,6 +1297,7 @@ ...@@ -1296,6 +1297,7 @@
!setname 0x96b 剑客 !setname 0x96b 剑客
!setname 0x396b 神装 !setname 0x396b 神装
!setname 0x696b 神兵 !setname 0x696b 神兵
!setname 0x396e 鸣神
!counter 0x96e 剑气指示物 !counter 0x96e 剑气指示物
#血腥蔷薇 3143919737 573 0x520-0x52f #血腥蔷薇 3143919737 573 0x520-0x52f
...@@ -1511,6 +1513,7 @@ ...@@ -1511,6 +1513,7 @@
!setname 0x607 大原满 !setname 0x607 大原满
!setname 0x608 三村加奈子 !setname 0x608 三村加奈子
!setname 0x60f 大和亚季 !setname 0x60f 大和亚季
!setname 0x619 神崎兰子
#黑森谨 192 0xb50-0xb5f #黑森谨 192 0xb50-0xb5f
!setname 0xb50 判决牢狱 !setname 0xb50 判决牢狱
...@@ -1628,6 +1631,7 @@ ...@@ -1628,6 +1631,7 @@
!setname 0x6451 穹苍 !setname 0x6451 穹苍
!setname 0x452 星绘 !setname 0x452 星绘
!counter 0x452 源晶指示物 !counter 0x452 源晶指示物
!setname 0x453 虹胧
!setname 0x456 灵尊 !setname 0x456 灵尊
#William·C 2147384831 2025 0x540-0x54f #William·C 2147384831 2025 0x540-0x54f
......
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