Commit 40448b99 authored by Nemo Ma's avatar Nemo Ma

Update 240114

parent 25ca3577
...@@ -1569,6 +1569,8 @@ ...@@ -1569,6 +1569,8 @@
151194046 0 151194046 0
192746535 0 192746535 0
60967917 0 60967917 0
70002010 0
70002012 0
#Semi-Wild 1003 #Semi-Wild 1003
31409200 0 31409200 0
31409201 0 31409201 0
...@@ -1993,6 +1995,9 @@ ...@@ -1993,6 +1995,9 @@
60362066 0 60362066 0
74920585 0 74920585 0
77103950 1 77103950 1
#240114
130006040 0
130006045 0
#231231 #231231
14010109 0 14010109 0
22174899 0 22174899 0
...@@ -2106,7 +2111,6 @@ ...@@ -2106,7 +2111,6 @@
10113025 0 10113025 0
10173032 0 10173032 0
11451518 0 11451518 0
12812006 0
15000096 0 15000096 0
15004459 0 15004459 0
26692740 0 26692740 0
......
No preview for this file type
expansions/pics/11635001.jpg

47.6 KB | W: | H:

expansions/pics/11635001.jpg

77.9 KB | W: | H:

expansions/pics/11635001.jpg
expansions/pics/11635001.jpg
expansions/pics/11635001.jpg
expansions/pics/11635001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11635002.jpg

47.9 KB | W: | H:

expansions/pics/11635002.jpg

77.4 KB | W: | H:

expansions/pics/11635002.jpg
expansions/pics/11635002.jpg
expansions/pics/11635002.jpg
expansions/pics/11635002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11635003.jpg

48.4 KB | W: | H:

expansions/pics/11635003.jpg

76.3 KB | W: | H:

expansions/pics/11635003.jpg
expansions/pics/11635003.jpg
expansions/pics/11635003.jpg
expansions/pics/11635003.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11635004.jpg

48 KB | W: | H:

expansions/pics/11635004.jpg

80.3 KB | W: | H:

expansions/pics/11635004.jpg
expansions/pics/11635004.jpg
expansions/pics/11635004.jpg
expansions/pics/11635004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11635005.jpg

52.2 KB | W: | H:

expansions/pics/11635005.jpg

79.8 KB | W: | H:

expansions/pics/11635005.jpg
expansions/pics/11635005.jpg
expansions/pics/11635005.jpg
expansions/pics/11635005.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11635006.jpg

48.7 KB | W: | H:

expansions/pics/11635006.jpg

77.7 KB | W: | H:

expansions/pics/11635006.jpg
expansions/pics/11635006.jpg
expansions/pics/11635006.jpg
expansions/pics/11635006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50213130.jpg

39.5 KB | W: | H:

expansions/pics/50213130.jpg

39.5 KB | W: | H:

expansions/pics/50213130.jpg
expansions/pics/50213130.jpg
expansions/pics/50213130.jpg
expansions/pics/50213130.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50213155.jpg

37 KB | W: | H:

expansions/pics/50213155.jpg

37 KB | W: | H:

expansions/pics/50213155.jpg
expansions/pics/50213155.jpg
expansions/pics/50213155.jpg
expansions/pics/50213155.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50213240.jpg

32.9 KB | W: | H:

expansions/pics/50213240.jpg

33.3 KB | W: | H:

expansions/pics/50213240.jpg
expansions/pics/50213240.jpg
expansions/pics/50213240.jpg
expansions/pics/50213240.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65140018.jpg

49.8 KB | W: | H:

expansions/pics/65140018.jpg

17.5 KB | W: | H:

expansions/pics/65140018.jpg
expansions/pics/65140018.jpg
expansions/pics/65140018.jpg
expansions/pics/65140018.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65140030.jpg

51.8 KB | W: | H:

expansions/pics/65140030.jpg

18.1 KB | W: | H:

expansions/pics/65140030.jpg
expansions/pics/65140030.jpg
expansions/pics/65140030.jpg
expansions/pics/65140030.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65140036.jpg

51.3 KB | W: | H:

expansions/pics/65140036.jpg

17.9 KB | W: | H:

expansions/pics/65140036.jpg
expansions/pics/65140036.jpg
expansions/pics/65140036.jpg
expansions/pics/65140036.jpg
  • 2-up
  • Swipe
  • Onion skin
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_FIRE),3) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_FIRE),2)
local e_name=Effect.CreateEffect(c) local e_name=Effect.CreateEffect(c)
e_name:SetDescription(aux.Stringid(id,0)) e_name:SetDescription(aux.Stringid(id,0))
e_name:SetCategory(CATEGORY_SPECIAL_SUMMON) e_name:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
local m=11634044
local cm=_G["c"..m]
cm.name="永火欺诈"
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(m)
e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(1,0)
c:RegisterEffect(e1)
if not cm.check then
cm.check=true
local e_enum=Effect.CreateEffect(c)
e_enum:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e_enum:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e_enum:SetOperation(cm.enumop)
e_enum:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
Duel.RegisterEffect(e_enum,0)
local e_handcheck=Effect.CreateEffect(c)
e_handcheck:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e_handcheck:SetCode(EVENT_ADJUST)
e_handcheck:SetOperation(cm.handcheckop)
Duel.RegisterEffect(e_handcheck,0)
local e_movecheck=Effect.CreateEffect(c)
e_movecheck:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e_movecheck:SetCode(EVENT_MOVE)
e_movecheck:SetOperation(cm.movecheckop)
Duel.RegisterEffect(e_movecheck,0)
--cm._ConfirmCards=Duel.ConfirmCards
--Duel.ConfirmCards=function(p,tg)
-- cm._ConfirmCards(p,tg)
-- local g=
--end
end
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e2:SetTarget(cm.target)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
end
function cm.handsetcon(e)
return Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),m) and e:GetHandler():GetFlagEffect(m)>0
end
function cm.enumop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_DECK,LOCATION_HAND+LOCATION_DECK)
g:ForEach(
function (c)
if c:IsType(TYPE_MONSTER) then
local e=Effect.CreateEffect(c)
e:SetType(EFFECT_TYPE_SINGLE)
e:SetCode(EFFECT_MONSTER_SSET)
e:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
e:SetCondition(cm.handsetcon)
e:SetLabel(m)
c:RegisterEffect(e)
c:RegisterFlagEffect(m,nil,EFFECT_FLAG_SET_AVAILABLE,0)
end
end
)
end
function cm.handcheckop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(0,LOCATION_HAND,LOCATION_HAND)
g:ForEach(
function (c)
if c:IsType(TYPE_MONSTER) then
local eset={c:IsHasEffect(EFFECT_MONSTER_SSET)}
local flag=false
for _,te in ipairs(eset) do
if not te:GetLabel() or te:GetLabel()~=m then
flag=true
end
end
if flag then
c:ResetFlagEffect(m)
end
end
end
)
end
function cm.movecheckfilter(c)
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) and c:GetFlagEffect(m)~=0
end
function cm.winfilter(c)
local con_grave=c:IsLocation(LOCATION_GRAVE)
local con_re_ex=(c:IsLocation(LOCATION_REMOVED) or c:IsLocation(LOCATION_EXTRA)) and c:IsFaceup()
return con_grave or con_re_ex
end
function cm.movecheckop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.movecheckfilter,nil):Filter(cm.winfilter,nil)
local lose_p0=false
local lose_p1=false
g:ForEach(
function (c)
if c:GetPreviousControler()==0 then lose_p0=true end
if c:GetPreviousControler()==1 then lose_p1=true end
end
)
if lose_p0 and not lose_p1 then
Duel.ConfirmCards(1,g)
Duel.Win(1,aux.Stringid(m,1))
elseif not lose_p0 and lose_p1 then
Duel.ConfirmCards(0,g)
Duel.Win(0,aux.Stringid(m,1))
elseif lose_p0 and lose_p1 then
Duel.ConfirmCards(0,g)
Duel.Win(PLAYER_NONE,aux.Stringid(m,1))
end
end
function cm.filter(c)
return c:IsSetCard(0xb) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
...@@ -132,7 +132,7 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp) ...@@ -132,7 +132,7 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x0,TYPE_MONSTER+TYPE_EFFECT+TYPE_SPIRIT,900,1300,1,RACE_FIEND,ATTRIBUTE_WIND) end if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x0,TYPE_MONSTER+TYPE_EFFECT+TYPE_SPIRIT,900,1300,1,RACE_FIEND,ATTRIBUTE_WIND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp) function cm.op2(e,tp,eg,ep,ev,re,r,rp)
...@@ -145,11 +145,12 @@ function cm.adfilter(c) ...@@ -145,11 +145,12 @@ function cm.adfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPIRIT) return c:IsFaceup() and c:IsType(TYPE_SPIRIT)
end end
function cm.filter(c,tp,tc) function cm.filter(c,tp,tc)
if c:IsPreviousLocation(LOCATION_FZONE) then return false end
local seq=tc:GetSequence() local seq=tc:GetSequence()
local seq1=c:GetPreviousSequence() local seq1=c:GetPreviousSequence()
local seq2=4-aux.MZoneSequence(seq1) local seq2=4-aux.MZoneSequence(seq1)
return math.abs(seq-seq2)<=1 and seq<5 and seq1<5 and c:GetControler()==1-tp and c:IsPreviousLocation(LOCATION_ONFIELD) return math.abs(seq-seq2)<=1 and c:GetControler()==1-tp and c:IsPreviousLocation(LOCATION_ONFIELD)
--aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp --aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp
end end
function cm.con3(e,tp,eg,ep,ev,re,r,rp) function cm.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -40,9 +40,9 @@ function cm.initial_effect(c) ...@@ -40,9 +40,9 @@ function cm.initial_effect(c)
e3:SetCondition(cm.con3) e3:SetCondition(cm.con3)
e3:SetOperation(cm.op3) e3:SetOperation(cm.op3)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e31=e3:Clone() --local e31=e3:Clone()
e31:SetCode(EVENT_SSET) --e31:SetCode(EVENT_SSET)
c:RegisterEffect(e31) --c:RegisterEffect(e31)
local e32=e3:Clone() local e32=e3:Clone()
e32:SetCode(EVENT_SPSUMMON_SUCCESS) e32:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e32) c:RegisterEffect(e32)
...@@ -124,7 +124,7 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp) ...@@ -124,7 +124,7 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x0,TYPE_MONSTER+TYPE_EFFECT+TYPE_SPIRIT,100,100,1,RACE_FIEND,ATTRIBUTE_WIND) end if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x0,TYPE_MONSTER+TYPE_EFFECT+TYPE_SPIRIT,100,100,1,RACE_FIEND,ATTRIBUTE_WIND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp) function cm.op2(e,tp,eg,ep,ev,re,r,rp)
...@@ -137,7 +137,7 @@ function cm.adfilter(c) ...@@ -137,7 +137,7 @@ function cm.adfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPIRIT) return c:IsFaceup() and c:IsType(TYPE_SPIRIT)
end end
function cm.filter(c,tp,tc) function cm.filter(c,tp,tc)
if c:IsLocation(LOCATION_ONFIELD) and c:GetControler()==1-tp then if c:IsLocation(LOCATION_MZONE) and c:GetControler()==1-tp and not c:IsLocation(LOCATION_FZONE) then
local seq=aux.GetColumn(c,tp) local seq=aux.GetColumn(c,tp)
local seq1=aux.GetColumn(tc,tp) local seq1=aux.GetColumn(tc,tp)
return math.abs(seq-seq1)<=1 return math.abs(seq-seq1)<=1
...@@ -148,7 +148,7 @@ function cm.filter(c,tp,tc) ...@@ -148,7 +148,7 @@ function cm.filter(c,tp,tc)
--local seq1=c:GetSequence() --local seq1=c:GetSequence()
--local seq2=4-aux.MZoneSequence(seq1) --local seq2=4-aux.MZoneSequence(seq1)
-- return math.abs(seq-seq2)<=1 and seq<5 and seq1<5 and c:GetControler()==1-tp and c:IsLocation(LOCATION_ONFIELD) -- return math.abs(seq-seq2)<=1 and seq<5 and seq1<5 and c:GetControler()==1-tp and c:IsLocation(LOCATION_ONFIELD)
--aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp --aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp
end end
function cm.con3(e,tp,eg,ep,ev,re,r,rp) function cm.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -190,25 +190,25 @@ function cm.op4(e,tp,eg,ep,ev,re,r,rp) ...@@ -190,25 +190,25 @@ function cm.op4(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext() tc=g:GetNext()
end end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Debug.Message('999') local sg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
local sg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_SZONE,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local ssg=sg:Select(tp,1,1,nil) local ssg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(ssg,0,tp,tp,false,false,POS_FACEUP) local tcc=ssg:GetFirst()
end Duel.SpecialSummon(tcc,0,tp,tp,false,false,POS_FACEUP)
end end
end
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c.SetCard_shixianggui and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 return c.SetCard_shixianggui and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.atkfilter(c) function cm.atkfilter(c)
return c.SetCard_shixianggui return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c.SetCard_shixianggui
end end
function cm.atkval(e,c) function cm.atkval(e,c)
local ct=Duel.GetMatchingGroupCount(cm.atkfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,nil) local ct=Duel.GetMatchingGroupCount(cm.atkfilter,e:GetHandlerPlayer(),0,LOCATION_GRAVE+LOCATION_ONFIELD,nil)
return ct*-300 return -ct*300
end end
-- --
function cm.con5(e,tp,eg,ep,ev,re,r,rp) function cm.con5(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -116,7 +116,7 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp) ...@@ -116,7 +116,7 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x0,TYPE_MONSTER+TYPE_EFFECT+TYPE_SPIRIT,1100,1500,1,RACE_FIEND,ATTRIBUTE_WIND) end if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x0,TYPE_MONSTER+TYPE_EFFECT+TYPE_SPIRIT,1100,1500,1,RACE_FIEND,ATTRIBUTE_WIND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp) function cm.op2(e,tp,eg,ep,ev,re,r,rp)
...@@ -132,12 +132,12 @@ function cm.filter(c,tp,tc) ...@@ -132,12 +132,12 @@ function cm.filter(c,tp,tc)
--local seq=tc:GetSequence() --local seq=tc:GetSequence()
--local seq1=c:GetSequence() --local seq1=c:GetSequence()
--local seq2=4-aux.MZoneSequence(seq1) --local seq2=4-aux.MZoneSequence(seq1)
if c:IsLocation(LOCATION_ONFIELD) and c:GetControler()==1-tp then if c:IsLocation(LOCATION_ONFIELD) and c:GetControler()==1-tp and not c:IsLocation(LOCATION_FZONE) then
local seq=aux.GetColumn(c,tp) local seq=aux.GetColumn(c,tp)
local seq1=aux.GetColumn(tc,tp) local seq1=aux.GetColumn(tc,tp)
--return math.abs(seq-seq2)<=1 and seq<5 and seq1<5 and c:GetControler()==1-tp and c:IsLocation(LOCATION_ONFIELD) --return math.abs(seq-seq2)<=1 and seq<5 and seq1<5 and c:GetControler()==1-tp and c:IsLocation(LOCATION_ONFIELD)
return math.abs(seq-seq1)<=1 return math.abs(seq-seq1)<=1
--aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp --aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp
else else
return false return false
end end
......
...@@ -132,7 +132,7 @@ function cm.adfilter(c) ...@@ -132,7 +132,7 @@ function cm.adfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPIRIT) return c:IsFaceup() and c:IsType(TYPE_SPIRIT)
end end
function cm.filter(c,tp,tc) function cm.filter(c,tp,tc)
if c:IsLocation(LOCATION_ONFIELD) and c:GetControler()==1-tp then if c:IsLocation(LOCATION_SZONE) and c:GetControler()==1-tp and not c:IsLocation(LOCATION_FZONE) then
local seq=aux.GetColumn(c,tp) local seq=aux.GetColumn(c,tp)
local seq1=aux.GetColumn(tc,tp) local seq1=aux.GetColumn(tc,tp)
return math.abs(seq-seq1)<=1 return math.abs(seq-seq1)<=1
...@@ -143,7 +143,7 @@ function cm.filter(c,tp,tc) ...@@ -143,7 +143,7 @@ function cm.filter(c,tp,tc)
--local seq1=c:GetSequence() --local seq1=c:GetSequence()
--local seq2=4-aux.MZoneSequence(seq1) --local seq2=4-aux.MZoneSequence(seq1)
--return math.abs(seq-seq2)<=1 and seq<5 and seq1<5 and c:GetControler()==1-tp and c:IsLocation(LOCATION_ONFIELD) --return math.abs(seq-seq2)<=1 and seq<5 and seq1<5 and c:GetControler()==1-tp and c:IsLocation(LOCATION_ONFIELD)
--aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp --aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp
end end
function cm.con3(e,tp,eg,ep,ev,re,r,rp) function cm.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -30,10 +30,10 @@ function cm.initial_effect(c) ...@@ -30,10 +30,10 @@ function cm.initial_effect(c)
--02 --02
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3)) e2:SetDescription(aux.Stringid(m,3))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1,m+10)
e2:SetTarget(cm.tg2) e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2) e2:SetOperation(cm.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -235,8 +235,8 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -235,8 +235,8 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RESOLVECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RESOLVECARD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.cfilter),tp,LOCATION_GRAVE,0,1,ct,nil,tp,e) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.cfilter),tp,LOCATION_GRAVE,0,1,ct,nil,tp,e)
if #g>0 then if #g>0 then
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (Duel.GetLocationCount(tp,LOCATION_SZONE)==0 or e:GetHandler():IsForbidden() or Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,2))==0) then -- if tc and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (Duel.GetLocationCount(tp,LOCATION_SZONE)==0 or e:GetHandler():IsForbidden() or Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))==0) then --
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
else else
while tc do while tc do
...@@ -255,60 +255,52 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -255,60 +255,52 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
elseif sel==1 then elseif sel==1 then
local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc1=g1:GetFirst() local tc1=g1:GetFirst()
local atkct=0
while tc1 do while tc1 do
local preatk=tc1:GetAttack()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0) e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e1,true) tc1:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_TRIGGER) e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetValue(0)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e2,true) tc1:RegisterEffect(e2,true)
if preatk~=0 and tc1:IsAttack(0) then atkct=atkct+1 end
tc1=g1:GetNext() tc1=g1:GetNext()
end end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(atkct*500)
e:GetHandler():RegisterEffect(e1)
end end
end end
-- --
function cm.filter2(c) function cm.cfilter2(c,code)
return c:IsFaceup() and c:IsLevelBelow(1) and c.SetCard_shixianggui return c:IsCode(code) and (c:IsFaceup() or not c:IsOnField())
end
function cm.thfilter2(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c.SetCard_shixianggui and c:IsAbleToHand()
and not Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,c:GetCode())
end end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil,tp) end
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.IsExistingTarget(cm.filter2,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSITION)
local g=Duel.SelectTarget(tp,cm.filter2,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp) function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if tc:IsRelateToEffect(e) then local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK,0,1,1,nil,tp)
local e1=Effect.CreateEffect(e:GetHandler()) if g:GetCount()>0 then
e1:SetType(EFFECT_TYPE_SINGLE) Duel.SendtoHand(g,nil,REASON_EFFECT)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT_CB) Duel.ConfirmCards(1-tp,g)
e1:SetCondition(cm.repcon)
e1:SetOperation(cm.repop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end end
end end
function cm.repcon(e)
local c=e:GetHandler()
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE)
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
--03 --03
function cm.con3(e,tp,eg,ep,ev,re,r,rp) function cm.con3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)~=0 return e:GetHandler():GetFlagEffect(m)~=0
...@@ -346,7 +338,7 @@ end ...@@ -346,7 +338,7 @@ end
function cm.sop(e,tp,eg,ep,ev,re,r,rp) function cm.sop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
if not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end if not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE) local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.SelectMatchingCard(tp,cm.sfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.sfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
......
...@@ -18,56 +18,64 @@ function cm.initial_effect(c) ...@@ -18,56 +18,64 @@ function cm.initial_effect(c)
e2:SetCondition(cm.ctcon) e2:SetCondition(cm.ctcon)
e2:SetOperation(cm.ctop) e2:SetOperation(cm.ctop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --destroy replace
local e4=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_SZONE)
e4:SetRange(LOCATION_SZONE) e3:SetCountLimit(1)
e4:SetCost(cm.plcost) e3:SetTarget(cm.reptg)
e4:SetTarget(cm.pltg) e3:SetValue(cm.repval)
e4:SetOperation(cm.plop) e3:SetOperation(cm.repop)
c:RegisterEffect(e4) c:RegisterEffect(e3)
end end
cm.SetCard_shixianggui=true cm.SetCard_shixianggui=true
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp) function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and bit.band(r,REASON_EFFECT)~=0 and Duel.GetLP(1-tp)>0 and re:IsActiveType(TYPE_MONSTER)--and re:GetHandler().SetCard_shixianggui return ep~=tp and bit.band(r,REASON_EFFECT)~=0 and Duel.GetLP(1-tp)>0 and re:IsActiveType(TYPE_MONSTER)
end end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp) function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:GetHandler():AddCounter(0x1163,1) e:GetHandler():AddCounter(0x1163,1)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
local ct=e:GetHandler():GetCounter(0x1163) local ct=e:GetHandler():GetCounter(0x1163)
if ct>0 then if ct>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-ct*50) Duel.SetLP(1-tp,Duel.GetLP(1-tp)-(ct*50))
local dg=Group.CreateGroup()
local g=Duel.GetMatchingGroup(Card.IsFaceup,1-tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
for tc in aux.Next(g) do
local preatk=tc:GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(ct*-50)
tc:RegisterEffect(e1)
if preatk~=0 and tc:IsAttack(0) then dg:AddCard(tc) end
end
Duel.Destroy(dg,REASON_EFFECT)
end end
end end
function cm.plcost(e,tp,eg,ep,ev,re,r,rp,chk) --
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end function cm.repfilter(c,tp)
e:SetLabel(e:GetHandler():GetCounter(0x1163)) return c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD) and c:IsControler(tp) and c.SetCard_shixianggui
Duel.SendtoGrave(e:GetHandler(),REASON_COST) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end end
function cm.pltg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then local c=e:GetHandler()
local ct=e:GetHandler():GetCounter(0x1163) if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp)
return ct>0 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and (Duel.IsCanRemoveCounter(tp,1,0,0x1163,4,REASON_EFFECT) or c:IsAbleToGrave()) end
end return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end end
function cm.plop(e,tp,eg,ep,ev,re,r,rp) function cm.repval(e,c)
local dg=Group.CreateGroup() return cm.repfilter(c,e:GetHandlerPlayer())
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ft=e:GetLabel() if c:IsAbleToGrave() and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) Duel.SendtoGrave(c,REASON_EFFECT+REASON_REPLACE)
local tc=g:GetFirst() else
for tc in aux.Next(g) do Duel.RemoveCounter(tp,1,0,0x1163,4,REASON_EFFECT)
local e1=Effect.CreateEffect(c) end
e1:SetType(EFFECT_TYPE_SINGLE) end
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(ft*-50)
tc:RegisterEffect(e1)
local preatk=tc:GetAttack()
if preatk~=0 and tc:IsAttack(0) then dg:AddCard(tc) end
end
Duel.Destroy(dg,REASON_EFFECT)
end
\ No newline at end of file
...@@ -10,7 +10,20 @@ function cm.initial_effect(c) ...@@ -10,7 +10,20 @@ function cm.initial_effect(c)
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=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
--e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCost(cm.tdcost)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
end end
cm.SetCard_shixianggui=true cm.SetCard_shixianggui=true
function cm.cfilter(c) function cm.cfilter(c)
...@@ -32,3 +45,31 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,3 +45,31 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
--
function cm.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST)
end
function cm.filter(c)
return c.SetCard_shixianggui and c:IsAbleToDeck() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,5,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,5,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter),tp,LOCATION_REMOVED+LOCATION_GRAVE,0,nil)
if g:GetCount()<5 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,5,5,nil)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then Duel.ShuffleDeck(tp) end
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==5 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
...@@ -19,18 +19,17 @@ function cm.initial_effect(c) ...@@ -19,18 +19,17 @@ function cm.initial_effect(c)
e3:SetOperation(cm.op) e3:SetOperation(cm.op)
c:RegisterEffect(e3) c:RegisterEffect(e3)
-- --
local e2=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1)) e4:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetType(EFFECT_TYPE_QUICK_O) e4:SetCode(EVENT_MOVE)
e2:SetCode(EVENT_FREE_CHAIN) e4:SetRange(LOCATION_GRAVE)
e2:SetRange(LOCATION_SZONE) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,m+1) e4:SetCountLimit(1,m+1)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e4:SetCondition(cm.thcon)
e2:SetCost(cm.tdcost) e4:SetTarget(cm.thtg)
e2:SetTarget(cm.tdtg) e4:SetOperation(cm.thop)
e2:SetOperation(cm.tdop) c:RegisterEffect(e4)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter) Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end end
function cm.counterfilter(c) function cm.counterfilter(c)
...@@ -73,30 +72,19 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,30 +72,19 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(tp,Duel.GetLP(tp)-ct) Duel.SetLP(tp,Duel.GetLP(tp)-ct)
end end
-- --
function cm.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cfilter(c,tp)
local c=e:GetHandler() return c:IsFaceup() and c.SetCard_shixianggui and c:IsControler(tp) and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 and c:IsPreviousLocation(LOCATION_MZONE)
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST)
end end
function cm.filter(c) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return c.SetCard_shixianggui and c:IsAbleToDeck() return eg:IsExists(cm.cfilter,1,nil,tp)
end end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return e:GetHandler():IsSSetable() end
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,5,nil) end Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,5,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter),tp,LOCATION_REMOVED+LOCATION_GRAVE,0,nil) local c=e:GetHandler()
if g:GetCount()<5 then return end if c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.SSet(tp,c)
local sg=g:Select(tp,5,5,nil)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then Duel.ShuffleDeck(tp) end
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==5 then
Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
...@@ -56,7 +56,7 @@ function c50213130.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c50213130.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end end
function c50213130.spfilter(c,tp) function c50213130.spfilter(c,tp)
return c:IsSetCard(0xcbf) and c:IsFaceup() and c:IsAbleToHand() and c:IsLevel(4) return c:IsSetCard(0xcbf) and c:IsFaceup() and c:IsAbleToHand() and c:IsLevelBelow(6)
and Duel.GetMZoneCount(tp,c)>0 and Duel.GetMZoneCount(tp,c)>0
end end
function c50213130.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c50213130.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -109,6 +109,13 @@ function c50213130.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -109,6 +109,13 @@ function c50213130.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(1500)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=g:GetNext() tc=g:GetNext()
end end
end end
\ No newline at end of file
...@@ -63,7 +63,7 @@ function c50213155.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -63,7 +63,7 @@ function c50213155.spop(e,tp,eg,ep,ev,re,r,rp,c)
end end
function c50213155.retreg(e,tp,eg,ep,ev,re,r,rp) function c50213155.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
c:RegisterFlagEffect(50213155,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(50213155,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,2)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
...@@ -72,11 +72,11 @@ function c50213155.retreg(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,11 +72,11 @@ function c50213155.retreg(e,tp,eg,ep,ev,re,r,rp)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(c50213155.retcon) e1:SetCondition(c50213155.retcon)
e1:SetOperation(c50213155.retop) e1:SetOperation(c50213155.retop)
e1:SetReset(RESET_PHASE+PHASE_END,1) e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c50213155.retcon(e,tp,eg,ep,ev,re,r,rp) function c50213155.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()==e:GetLabel() and e:GetOwner():GetFlagEffect(50213155)~=0 return Duel.GetTurnCount()==e:GetLabel()+1 and e:GetOwner():GetFlagEffect(50213155)~=0
end end
function c50213155.retop(e,tp,eg,ep,ev,re,r,rp) function c50213155.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetOwner() local c=e:GetOwner()
......
--Kamipro 北斗星君的鼓舞 --Kamipro 北斗星君的鼓舞
function c50213240.initial_effect(c) function c50213240.initial_effect(c)
local e0=aux.AddThisCardInGraveAlreadyCheck(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
...@@ -8,15 +9,17 @@ function c50213240.initial_effect(c) ...@@ -8,15 +9,17 @@ function c50213240.initial_effect(c)
e1:SetTarget(c50213240.cttg) e1:SetTarget(c50213240.cttg)
e1:SetOperation(c50213240.ctop) e1:SetOperation(c50213240.ctop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--draw --material
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,50213240) e2:SetCountLimit(1,50213240)
e2:SetCondition(aux.exccon) e2:SetLabelObject(e0)
e2:SetTarget(c50213240.tdtg) e2:SetCondition(c50213240.matcon)
e2:SetOperation(c50213240.tdop) e2:SetTarget(c50213240.mattg)
e2:SetOperation(c50213240.matop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c50213240.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) function c50213240.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -37,16 +40,33 @@ function c50213240.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,16 +40,33 @@ function c50213240.ctop(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext() tc=g:GetNext()
end end
end end
function c50213240.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50213240.spfilter(c,e,tp,se)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsPlayerCanDraw(tp,1) end return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsControler(tp) and c:IsSetCard(0xcbf)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) and c:IsCanBeEffectTarget(e) and (se==nil or c:GetReasonEffect()~=se)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c50213240.tdop(e,tp,eg,ep,ev,re,r,rp) function c50213240.matcon(e,tp,eg,ep,ev,re,r,rp)
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(c50213240.spfilter,1,nil,e,tp,se)
end
function c50213240.xfilter(c,tp,eg)
return eg:IsContains(c) and c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xcbf) and c:IsControler(tp)
end
function c50213240.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c50213240.xfilter(chkc,tp,eg) end
if chk==0 then return Duel.IsExistingTarget(c50213240.xfilter,tp,LOCATION_MZONE,0,1,nil,tp,eg)
and e:GetHandler():IsCanOverlay() end
if eg:GetCount()==1 then
Duel.SetTargetCard(eg)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c50213240.xfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,eg)
end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c50213240.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then local tc=Duel.GetFirstTarget()
Duel.ShuffleDeck(tp) if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.BreakEffect() Duel.Overlay(tc,Group.FromCards(c))
Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
\ No newline at end of file
--Kamipro 美狄亚
function c50214105.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c50214105.xcheck,4,2,c50214105.ovfilter,aux.Stringid(50214105,0),2,c50214105.xyzop)
c:EnableReviveLimit()
--attribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(ATTRIBUTE_ALL-ATTRIBUTE_DIVINE-ATTRIBUTE_LIGHT)
e1:SetCondition(c50214105.attcon)
c:RegisterEffect(e1)
--move field
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,50214105)
e2:SetCondition(c50214105.mfcon)
e2:SetTarget(c50214105.mftg)
e2:SetOperation(c50214105.mfop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,50214106)
e3:SetCost(c50214105.dmcost)
e3:SetTarget(c50214105.dmtg)
e3:SetOperation(c50214105.dmop)
c:RegisterEffect(e3)
end
function c50214105.xcheck(c)
return c:IsSetCard(0xcbf)
end
function c50214105.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf) and c:GetCounter(0xcbf)>=5
end
function c50214105.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,50214105)==0 end
Duel.RegisterFlagEffect(tp,50214105,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c50214105.attcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipCount()>0
end
function c50214105.mfcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c50214105.pfilter(c,tp)
return not c:IsForbidden() and c:IsType(TYPE_FIELD) and c:IsCode(50213235) and c:CheckUniqueOnField(tp)
end
function c50214105.mftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50214105.pfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
end
function c50214105.mfop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c50214105.pfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
end
function c50214105.dmcost(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 c50214105.dmfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf)
end
function c50214105.dmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50214105.dmfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetTargetPlayer(1-tp)
local dam=Duel.GetMatchingGroupCount(c50214105.dmfilter,tp,LOCATION_ONFIELD,0,nil)*300
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c50214105.dmop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local dam=Duel.GetMatchingGroupCount(c50214105.dmfilter,tp,LOCATION_ONFIELD,0,nil)*300
Duel.Damage(p,dam,REASON_EFFECT)
end
\ No newline at end of file
--Kamipro 霍恩海姆
function c50214110.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c50214110.xcheck,4,2,c50214110.ovfilter,aux.Stringid(50214110,0),2,c50214110.xyzop)
c:EnableReviveLimit()
--attribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(ATTRIBUTE_ALL-ATTRIBUTE_DIVINE-ATTRIBUTE_DARK)
e1:SetCondition(c50214110.attcon)
c:RegisterEffect(e1)
--xyz summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,50214110)
e2:SetCondition(c50214110.spcon)
e2:SetTarget(c50214110.sptg)
e2:SetOperation(c50214110.spop)
c:RegisterEffect(e2)
--direct attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,50214111)
e3:SetCondition(c50214110.atkcon)
e3:SetCost(c50214110.atkcost)
e3:SetTarget(c50214110.atktg)
e3:SetOperation(c50214110.atkop)
c:RegisterEffect(e3)
end
function c50214110.xcheck(c)
return c:IsSetCard(0xcbf)
end
function c50214110.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcbf) and c:GetCounter(0xcbf)>=5
end
function c50214110.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,50214110)==0 end
Duel.RegisterFlagEffect(tp,50214110,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c50214110.attcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipCount()>0
end
function c50214110.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c50214110.spfilter(c,e,tp)
return c:IsSetCard(0xcbf) and c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c50214110.fselect(g,tp)
return g:GetClassCount(Card.GetLocation)==g:GetCount() and g:GetClassCount(Card.GetLevel)==1
and Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,g,2,2)
end
function c50214110.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c50214110.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and g:CheckSubGroup(c50214110.fselect,2,2,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c50214110.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c50214110.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=1
or g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c50214110.fselect,false,2,2,tp)
if sg and sg:GetCount()==2 then
local tc1=sg:GetFirst()
local tc2=sg:GetNext()
Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e1)
local e2=e1:Clone()
tc2:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e3)
local e4=e3:Clone()
tc2:RegisterEffect(e4)
Duel.SpecialSummonComplete()
Duel.AdjustAll()
if sg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local xyzg=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil,sg,2,2)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,sg)
end
end
end
function c50214110.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function c50214110.atkcost(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 c50214110.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local con=c:GetFlagEffect(50214110)==0
if chk==0 then return con end
end
function c50214110.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
c:RegisterFlagEffect(50214110,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,0,0)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--Kamipro 「约束的守护者」欧克
function c50214115.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,3,nil,nil)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetCondition(c50214115.imcon)
e1:SetValue(c50214115.efilter)
c:RegisterEffect(e1)
--gain ATK
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c50214115.atkval)
c:RegisterEffect(e2)
--extra remove
local e31=Effect.CreateEffect(c)
e31:SetDescription(aux.Stringid(50214115,2))
e31:SetCategory(CATEGORY_REMOVE)
e31:SetType(EFFECT_TYPE_IGNITION)
e31:SetRange(LOCATION_MZONE)
e31:SetCountLimit(1,50214115)
e31:SetCost(c50214115.ercost)
e31:SetTarget(c50214115.ertg)
e31:SetOperation(c50214115.erop)
c:RegisterEffect(e31)
--to deck
local e32=Effect.CreateEffect(c)
e32:SetDescription(aux.Stringid(50214115,3))
e32:SetCategory(CATEGORY_TODECK)
e32:SetType(EFFECT_TYPE_IGNITION)
e32:SetRange(LOCATION_MZONE)
e32:SetCountLimit(1,50214116)
e32:SetCost(c50214115.tdcost)
e32:SetTarget(c50214115.tdtg)
e32:SetOperation(c50214115.tdop)
c:RegisterEffect(e32)
--handes
local e33=Effect.CreateEffect(c)
e33:SetDescription(aux.Stringid(50214115,4))
e33:SetCategory(CATEGORY_HANDES)
e33:SetType(EFFECT_TYPE_IGNITION)
e33:SetRange(LOCATION_MZONE)
e33:SetCountLimit(1,50214117)
e33:SetCost(c50214115.hdcost)
e33:SetTarget(c50214115.hdtg)
e33:SetOperation(c50214115.hdop)
c:RegisterEffect(e33)
--half
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c50214115.hfcon)
e4:SetOperation(c50214115.hfop)
c:RegisterEffect(e4)
end
function c50214115.imcon(e)
return e:GetHandler():GetOverlayCount()>0
end
function c50214115.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c50214115.atkval(e,c)
local g=Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandlerPlayer(),0,LOCATION_MZONE,nil)
return g:GetClassCount(Card.GetAttribute)*300
end
function c50214115.rfilter1(c)
return c:IsSetCard(0xcbf) and c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_WATER) and c:IsAbleToRemoveAsCost()
end
function c50214115.ercost(e,tp,eg,ep,ev,re,r,rp,chk)
local og=e:GetHandler():GetOverlayGroup():Filter(Card.IsAttribute,nil,ATTRIBUTE_FIRE+ATTRIBUTE_WATER)
local b1=og:GetCount()>0
local b2=Duel.IsExistingMatchingCard(c50214115.rfilter1,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(50214115,0)},{b2,aux.Stringid(50214115,1)})
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local g=og:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c50214115.rfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
end
function c50214115.ertg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA)
end
function c50214115.erop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if #g==0 then return end
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil)
Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT)
Duel.ShuffleExtra(1-tp)
end
function c50214115.rfilter2(c)
return c:IsSetCard(0xcbf) and c:IsAttribute(ATTRIBUTE_WIND+ATTRIBUTE_EARTH) and c:IsAbleToRemoveAsCost()
end
function c50214115.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
local og=e:GetHandler():GetOverlayGroup():Filter(Card.IsAttribute,nil,ATTRIBUTE_WIND+ATTRIBUTE_EARTH)
local b1=og:GetCount()>0
local b2=Duel.IsExistingMatchingCard(c50214115.rfilter2,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(50214115,0)},{b2,aux.Stringid(50214115,1)})
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local g=og:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c50214115.rfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
end
function c50214115.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c50214115.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
function c50214115.rfilter3(c)
return c:IsSetCard(0xcbf) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
end
function c50214115.hdcost(e,tp,eg,ep,ev,re,r,rp,chk)
local og=e:GetHandler():GetOverlayGroup():Filter(Card.IsAttribute,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
local b1=og:GetCount()>0
local b2=Duel.IsExistingMatchingCard(c50214115.rfilter3,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(50214115,0)},{b2,aux.Stringid(50214115,1)})
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local g=og:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c50214115.rfilter3,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
end
function c50214115.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1)
end
function c50214115.hdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
local sg=g:RandomSelect(1-tp,1)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
end
function c50214115.hfcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousControler(tp) and rp==1-tp
end
function c50214115.hfop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(1-tp,math.ceil(Duel.GetLP(1-tp)/2))
end
\ No newline at end of file
--Kamipro 「神幻一体」迪亚波罗
function c50214120.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,3,nil,nil)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetCondition(c50214120.imcon)
e1:SetValue(c50214120.efilter)
c:RegisterEffect(e1)
--gain ATK
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c50214120.atkval)
c:RegisterEffect(e2)
--extra remove
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(3,50214120)
e3:SetCost(c50214120.eqcost)
e3:SetTarget(c50214120.eqtg)
e3:SetOperation(c50214120.eqop)
c:RegisterEffect(e3)
--material
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(c50214120.mttg)
e4:SetOperation(c50214120.mtop)
c:RegisterEffect(e4)
end
function c50214120.imcon(e)
return e:GetHandler():GetOverlayCount()>0
end
function c50214120.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c50214120.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_MONSTER)
return g:GetClassCount(Card.GetAttribute)*300
end
function c50214120.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
local b2=Duel.IsCanRemoveCounter(tp,1,1,0xcbf,5,REASON_COST)
if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(50214120,0)},{b2,aux.Stringid(50214120,1)})
if op==1 then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
elseif op==2 then
Duel.RemoveCounter(tp,1,1,0xcbf,5,REASON_COST)
end
end
function c50214120.eqfilter(c,ec,tp)
return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) and c:CheckUniqueOnField(tp,LOCATION_SZONE) and not c:IsForbidden()
end
function c50214120.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c50214120.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler(),tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c50214120.eqop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local c=e:GetHandler()
if ft<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c50214120.eqfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c,tp)
local tc=g:GetFirst()
if tc then
Duel.Equip(tp,tc,c,true,false)
end
end
function c50214120.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,0x30,0x30,1,nil) end
end
function c50214120.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,Card.IsCanOverlay,tp,0x30,0x30,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
\ No newline at end of file
--升阶魔法-Kamipro 欧克的指引
function c50214125.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,50214125)
e1:SetCost(c50214125.cost)
e1:SetTarget(c50214125.target)
e1:SetOperation(c50214125.activate)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,50214125)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c50214125.rmtg)
e2:SetOperation(c50214125.rmop)
c:RegisterEffect(e2)
end
function c50214125.cgfilter(c)
return c:IsSetCard(0xcbf) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c50214125.cefilter(c,tc,ct,e,tp)
if not c:IsType(TYPE_XYZ) then return false end
local r=c:GetRank()-tc:GetRank()
return c:IsSetCard(0xcbf)
and tc:IsCanBeXyzMaterial(c) and r>0 and ct>=r
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function c50214125.cfilter(c,e,tp)
local ct=Duel.GetMatchingGroupCount(c50214125.cgfilter,tp,LOCATION_GRAVE,0,nil)
return c:IsType(TYPE_XYZ) and c:IsSetCard(0xcbf) and c:IsFaceup()
and c:IsCanBeEffectTarget(e)
and Duel.IsExistingMatchingCard(c50214125.cefilter,tp,LOCATION_EXTRA,0,1,nil,c,ct,e,tp)
end
function c50214125.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function c50214125.tgefilter(c,tc,e,tp,rank)
if not c:IsType(TYPE_XYZ) then return false end
local r=c:GetRank()-tc:GetRank()
return c:IsSetCard(0xcbf)
and tc:IsCanBeXyzMaterial(c) and r==rank
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function c50214125.tgfilter(c,e,tp,rank)
return c:IsType(TYPE_XYZ) and c:IsSetCard(0xcbf)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c50214125.tgefilter,tp,LOCATION_EXTRA,0,1,nil,c,e,tp,rank)
end
function c50214125.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c50214125.cfilter(chkc,e,tp) end
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingTarget(c50214125.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp)
end
e:SetLabel(0)
local avail={}
local availbool={}
local ct=Duel.GetMatchingGroupCount(c50214125.cgfilter,tp,LOCATION_GRAVE,0,nil)
local gfield=Duel.GetMatchingGroup(c50214125.cfilter,tp,LOCATION_MZONE,0,nil,e,tp)
for tc in aux.Next(gfield) do
local gextra=Duel.GetMatchingGroup(c50214125.cefilter,tp,LOCATION_EXTRA,0,nil,tc,ct,e,tp)
for ex in aux.Next(gextra) do
local r=ex:GetRank()-tc:GetRank()
if not availbool[r] then
availbool[r]=true
table.insert(avail,r)
end
end
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(50214125,0))
local num=Duel.AnnounceNumber(tp,table.unpack(avail))
e:SetLabel(num)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local cost=Duel.SelectMatchingCard(tp,c50214125.cgfilter,tp,LOCATION_GRAVE,0,num,num,nil)
Duel.Remove(cost,POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c50214125.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,num)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c50214125.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) and tc:IsFaceup()
and tc:IsRelateToEffect(e) and tc:IsControler(tp) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c50214125.tgefilter,tp,LOCATION_EXTRA,0,1,1,nil,tc,e,tp,e:GetLabel())
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
function c50214125.rmfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup() and c:IsAbleToRemove()
end
function c50214125.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c50214125.rmfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c50214125.rmfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c50214125.rmfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c50214125.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
...@@ -35,9 +35,9 @@ function c65130201.rfilter(c,tp) ...@@ -35,9 +35,9 @@ function c65130201.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_EARTH) return Duel.GetMZoneCount(tp,c)>0 and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_EARTH)
end end
function c65130201.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c65130201.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c65130201.rfilter,1,nil,tp) end if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,c65130201.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c65130201.rfilter,1,1,nil,tp) local g=Duel.SelectReleaseGroup(REASON_COST,tp,c65130201.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c65130201.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c65130201.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -59,7 +59,7 @@ function c65130201.spfilter(c,e,tp) ...@@ -59,7 +59,7 @@ function c65130201.spfilter(c,e,tp)
return c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c65130201.retg1(e,tp,eg,ep,ev,re,r,rp,chk) function c65130201.retg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c65130201.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and e:GetHandler():IsAbleToRemove() end if chk==0 then return Duel.IsExistingTarget(c65130201.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and e:GetHandler():IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,0,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,0,1,0,0)
end end
function c65130201.reop1(e,tp,eg,ep,ev,re,r,rp) function c65130201.reop1(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -111,7 +111,7 @@ function s.changeop(e,tp,eg,ep,ev,re,r,rp) ...@@ -111,7 +111,7 @@ function s.changeop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsType(TYPE_XYZ)then if tc:IsType(TYPE_XYZ)then
Lk=9 Lk=9
end end
if KOISHI_CHECK and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then if KOISHI_CHECK and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then
tc:SetCardData(CARDDATA_CODE,id+1+Lk) tc:SetCardData(CARDDATA_CODE,id+1+Lk)
end end
if not tc:IsType(TYPE_EFFECT) then if not tc:IsType(TYPE_EFFECT) then
...@@ -138,7 +138,7 @@ function s.unchangeop(e,tp,eg,ep,ev,re,r,rp) ...@@ -138,7 +138,7 @@ function s.unchangeop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(code) e1:SetValue(code)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if KOISHI_CHECK then if KOISHI_CHECK then
c:SetCardData(CARDDATA_CODE,code) c:SetCardData(CARDDATA_CODE,code)
end end
c:ResetEffect(id,RESET_COPY) c:ResetEffect(id,RESET_COPY)
Duel.RaiseEvent(c,EVENT_CUSTOM+id+1,re,r,rp,ep,ev) Duel.RaiseEvent(c,EVENT_CUSTOM+id+1,re,r,rp,ep,ev)
......
...@@ -38,9 +38,9 @@ function s.rfilter(c,tp) ...@@ -38,9 +38,9 @@ function s.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsControler(tp) return Duel.GetMZoneCount(tp,c)>0 and c:IsControler(tp)
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.rfilter,1,nil,tp) end if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,s.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,s.rfilter,1,1,nil,tp) local g=Duel.SelectReleaseGroup(REASON_COST,tp,s.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -119,9 +119,9 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -119,9 +119,9 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and s.effcon(e,tp,eg,ep,ev,re,r,rp) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) return ep==1-tp and s.effcon(e,tp,eg,ep,ev,re,r,rp) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil,tp) end if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,nil,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil,tp) local g=Duel.SelectReleaseGroup(REASON_COST,tp,nil,1,1,nil,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -88,7 +88,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,7 +88,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 then if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 then
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp) local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect() Duel.BreakEffect()
......
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