Commit 3d2810a2 authored by Nemo Ma's avatar Nemo Ma

240128 std

84 new cards
parent b31a62d7
No preview for this file type
expansions/pics/39512960.jpg

59.5 KB | W: | H:

expansions/pics/39512960.jpg

90 KB | W: | H:

expansions/pics/39512960.jpg
expansions/pics/39512960.jpg
expansions/pics/39512960.jpg
expansions/pics/39512960.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65140080.jpg

43.9 KB | W: | H:

expansions/pics/65140080.jpg

49 KB | W: | H:

expansions/pics/65140080.jpg
expansions/pics/65140080.jpg
expansions/pics/65140080.jpg
expansions/pics/65140080.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910060.jpg

10.8 KB | W: | H:

expansions/pics/9910060.jpg

45.9 KB | W: | H:

expansions/pics/9910060.jpg
expansions/pics/9910060.jpg
expansions/pics/9910060.jpg
expansions/pics/9910060.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910452.jpg

45.4 KB | W: | H:

expansions/pics/9910452.jpg

45.5 KB | W: | H:

expansions/pics/9910452.jpg
expansions/pics/9910452.jpg
expansions/pics/9910452.jpg
expansions/pics/9910452.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -41,7 +41,6 @@ function c11621401.initial_effect(c) ...@@ -41,7 +41,6 @@ function c11621401.initial_effect(c)
e5:SetOperation(cm.setop) e5:SetOperation(cm.setop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
cm.SetCard_THY_PeachblossomCountry=true
function cm.efilter(e,te) function cm.efilter(e,te)
return te:IsActiveType(TYPE_TRAP) and te:GetOwnerPlayer()~=e:GetHandlerPlayer() return te:IsActiveType(TYPE_TRAP) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end end
...@@ -90,7 +89,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,7 +89,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
--02 --02
function cm.setfilter(c) function cm.setfilter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsSSetable() return c:IsSetCard(0x5220) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsSSetable()
end end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -47,16 +47,15 @@ function c11621402.initial_effect(c) ...@@ -47,16 +47,15 @@ function c11621402.initial_effect(c)
e6:SetOperation(cm.setop) e6:SetOperation(cm.setop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
cm.SetCard_THY_PeachblossomCountry=true
function cm.atkfilter(c) function cm.atkfilter(c)
return c:IsType(TYPE_TRAP) and c:IsFaceup() and c.SetCard_THY_PeachblossomCountry return c:IsType(TYPE_TRAP) and c:IsFaceup() and c:IsSetCard(0x5220)
end end
function cm.atkval(e,c) function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,c:GetControler(),LOCATION_ONFIELD,0,nil)*800 return Duel.GetMatchingGroupCount(cm.atkfilter,c:GetControler(),LOCATION_ONFIELD,0,nil)*800
end end
--01 --01
function cm.rfilter(c,tp) function cm.rfilter(c,tp)
return c:IsType(TYPE_TRAP) and c.SetCard_THY_PeachblossomCountry and (c:IsReleasable() or c:IsLocation(LOCATION_HAND)) return c:IsType(TYPE_TRAP) and c:IsSetCard(0x5220) and (c:IsReleasable() or c:IsLocation(LOCATION_HAND))
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil,tp) end
...@@ -87,7 +86,7 @@ function cm.sttg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -87,7 +86,7 @@ function cm.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return loc>=g and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then return loc>=g and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_ONFIELD,0,1,nil) end
end end
function cm.setfilter(c) function cm.setfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TRAP) and c:IsSSetable() and c.SetCard_THY_PeachblossomCountry return c:IsFaceup() and c:IsType(TYPE_TRAP) and c:IsSSetable() and c:IsSetCard(0x5220)
end end
function cm.stop(e,tp,eg,ep,ev,re,r,rp) function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.GetMatchingGroup(cm.setfilter,tp,LOCATION_ONFIELD,0,nil) local rg=Duel.GetMatchingGroup(cm.setfilter,tp,LOCATION_ONFIELD,0,nil)
......
...@@ -34,7 +34,7 @@ function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se) ...@@ -34,7 +34,7 @@ function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return (not c:IsRace(RACE_ZOMBIE)) and c:IsLocation(LOCATION_EXTRA) return (not c:IsRace(RACE_ZOMBIE)) and c:IsLocation(LOCATION_EXTRA)
end end
function cm.filter(c) function cm.filter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsAbleToHand() return c:IsSetCard(0x5220) and c:IsAbleToHand()
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -49,7 +49,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,7 +49,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,nil,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,nil,tp,LOCATION_DECK)
end end
function cm.filter(c) function cm.filter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsType(TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x5220) and c:IsType(TYPE_TRAP) and c:IsAbleToHand()
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -34,10 +34,9 @@ function c11621406.initial_effect(c) ...@@ -34,10 +34,9 @@ function c11621406.initial_effect(c)
e3:SetOperation(cm.atkop) e3:SetOperation(cm.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
cm.SetCard_THY_PeachblossomCountry=true
-- --
function cm.thfilter1(c) function cm.thfilter1(c)
return not c:IsCode(m) and c.SetCard_THY_PeachblossomCountry and c:IsAbleToHand()-- and c:IsType(TYPE_TRAP) return not c:IsCode(m) and c:IsSetCard(0x5220) and c:IsAbleToHand()-- and c:IsType(TYPE_TRAP)
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 g=Duel.GetMatchingGroup(cm.thfilter1,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(cm.thfilter1,tp,LOCATION_DECK,0,nil)
...@@ -50,12 +49,12 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,12 +49,12 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
-- --
function cm.indtg(e,c) function cm.indtg(e,c)
return c.SetCard_THY_PeachblossomCountry return c:IsSetCard(0x5220)
end end
-- --
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp) function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return rp==tp and rc.SetCard_THY_PeachblossomCountry and rc:IsType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) return rp==tp and rc:IsSetCard(0x5220) and rc:IsType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp) function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -66,7 +65,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +65,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-200) e1:SetValue(-300)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_UPDATE_DEFENSE)
......
...@@ -37,7 +37,6 @@ function c11621407.initial_effect(c) ...@@ -37,7 +37,6 @@ function c11621407.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
cm[c]=e3 cm[c]=e3
end end
cm.SetCard_THY_PeachblossomCountry=true
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(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 Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,TYPES_EFFECT_TRAP_MONSTER,1100,900,3,RACE_ZOMBIE,ATTRIBUTE_LIGHT) end and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,TYPES_EFFECT_TRAP_MONSTER,1100,900,3,RACE_ZOMBIE,ATTRIBUTE_LIGHT) end
...@@ -70,7 +69,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,7 +69,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
--02 --02
function cm.ntrfilter(c) function cm.ntrfilter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5220) and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end end
function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp) function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil)
...@@ -123,7 +122,7 @@ function cm.ntrop(e,tp,eg,ep,ev,re,r,rp) ...@@ -123,7 +122,7 @@ function cm.ntrop(e,tp,eg,ep,ev,re,r,rp)
end end
--03 --03
function cm.thfilter(c) function cm.thfilter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsType(TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x5220) and c:IsType(TYPE_TRAP) and c:IsAbleToHand()
end end
function cm.thtg(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.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -36,7 +36,6 @@ function c11621408.initial_effect(c) ...@@ -36,7 +36,6 @@ function c11621408.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
cm[c]=e3 cm[c]=e3
end end
cm.SetCard_THY_PeachblossomCountry=true
-- --
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(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
...@@ -57,7 +56,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +56,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
--02 --02
function cm.ntrfilter(c) function cm.ntrfilter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5220) and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end end
function cm.recon(e,tp,eg,ep,ev,re,r,rp) function cm.recon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil)
......
...@@ -36,7 +36,6 @@ function c11621409.initial_effect(c) ...@@ -36,7 +36,6 @@ function c11621409.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
cm[c]=e3 cm[c]=e3
end end
cm.SetCard_THY_PeachblossomCountry=true
-- --
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(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
...@@ -67,7 +66,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +66,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
--02 --02
function cm.ntrfilter(c) function cm.ntrfilter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5220) and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end end
function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp) function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil)
......
...@@ -37,7 +37,6 @@ function c11621410.initial_effect(c) ...@@ -37,7 +37,6 @@ function c11621410.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
cm[c]=e3 cm[c]=e3
end end
cm.SetCard_THY_PeachblossomCountry=true
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(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 Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,TYPES_EFFECT_TRAP_MONSTER,700,0,3,RACE_ZOMBIE,ATTRIBUTE_LIGHT) end and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,TYPES_EFFECT_TRAP_MONSTER,700,0,3,RACE_ZOMBIE,ATTRIBUTE_LIGHT) end
...@@ -65,7 +64,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +64,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
--02 --02
function cm.ntrfilter(c) function cm.ntrfilter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5220) and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end end
function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp) function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil)
......
...@@ -43,7 +43,6 @@ function c11621411.initial_effect(c) ...@@ -43,7 +43,6 @@ function c11621411.initial_effect(c)
e4:SetValue(cm.sumlimit) e4:SetValue(cm.sumlimit)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
cm.SetCard_THY_PeachblossomCountry=true
-- --
function cm.sumlimit(e,c) function cm.sumlimit(e,c)
return not c:IsRace(RACE_ZOMBIE) return not c:IsRace(RACE_ZOMBIE)
...@@ -107,7 +106,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -107,7 +106,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
--02 --02
function cm.ntrfilter(c) function cm.ntrfilter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5220) and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end end
function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp) function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil)
...@@ -188,7 +187,7 @@ function cm.crtg2(e,c) ...@@ -188,7 +187,7 @@ function cm.crtg2(e,c)
end end
--03 --03
function cm.thfilter(c) function cm.thfilter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsAbleToRemove() return c:IsSetCard(0x5220) and c:IsAbleToRemove()
end end
function cm.thtg(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.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
......
...@@ -36,7 +36,6 @@ function c11621412.initial_effect(c) ...@@ -36,7 +36,6 @@ function c11621412.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
cm[c]=e3 cm[c]=e3
end end
cm.SetCard_THY_PeachblossomCountry=true
-- --
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(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
...@@ -62,7 +61,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +61,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
--02 --02
function cm.ntrfilter(c) function cm.ntrfilter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5220) and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end end
function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp) function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil)
......
...@@ -14,9 +14,8 @@ function c11621413.initial_effect(c) ...@@ -14,9 +14,8 @@ function c11621413.initial_effect(c)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
cm.SetCard_THY_PeachblossomCountry=true
function cm.cfilter1(c) function cm.cfilter1(c)
return c.SetCard_THY_PeachblossomCountry and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5220) and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end end
function cm.cfilter2(c) function cm.cfilter2(c)
return c:IsCode(11621402) and c:IsFaceup() and c:IsControler(c:GetOwner()) return c:IsCode(11621402) and c:IsFaceup() and c:IsControler(c:GetOwner())
......
...@@ -37,7 +37,6 @@ function c11621414.initial_effect(c) ...@@ -37,7 +37,6 @@ function c11621414.initial_effect(c)
e3:SetOperation(cm.thop) e3:SetOperation(cm.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
cm.SetCard_THY_PeachblossomCountry=true
-- --
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(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
...@@ -45,7 +44,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,7 +44,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
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.filter(c,e,tp) function cm.filter(c,e,tp)
return c.SetCard_THY_PeachblossomCountry and c:IsCode(11621401) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) --c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5220) and c:IsCode(11621401) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) --c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
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 c=e:GetHandler() local c=e:GetHandler()
...@@ -68,13 +67,13 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,13 +67,13 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
--02 --02
function cm.ntrfilter(c) function cm.ntrfilter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5220) and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end end
function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp) function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function cm.spfilter(c,tp) function cm.spfilter(c,tp)
return c.SetCard_THY_PeachblossomCountry and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetOriginalCode(),0,TYPES_EFFECT_TRAP_MONSTER,c:GetBaseAttack(),c:GetBaseDefense(),c:GetOriginalLevel(),c:GetOriginalRace(),c:GetOriginalAttribute()) return c:IsSetCard(0x5220) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetOriginalCode(),0,TYPES_EFFECT_TRAP_MONSTER,c:GetBaseAttack(),c:GetBaseDefense(),c:GetOriginalLevel(),c:GetOriginalRace(),c:GetOriginalAttribute())
end end
function cm.ntrtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.ntrtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -101,7 +100,7 @@ function cm.mfilter(c,e,tp,eg,ep,ev,re,r,rp) ...@@ -101,7 +100,7 @@ function cm.mfilter(c,e,tp,eg,ep,ev,re,r,rp)
if not te then return false end if not te then return false end
local tg=te:GetTarget() local tg=te:GetTarget()
if tg and not tg(e,tp,eg,ep,ev,re,r,rp,0,nil,c) then return false end if tg and not tg(e,tp,eg,ep,ev,re,r,rp,0,nil,c) then return false end
return c.SetCard_THY_PeachblossomCountry and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and not c:IsCode(m) return c:IsSetCard(0x5220) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and not c:IsCode(m)
end end
-- --
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -35,7 +35,6 @@ function c11621415.initial_effect(c) ...@@ -35,7 +35,6 @@ function c11621415.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
cm[c]=e3 cm[c]=e3
end end
cm.SetCard_THY_PeachblossomCountry=true
-- --
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(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
...@@ -43,7 +42,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,7 +42,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
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.filter(c) function cm.filter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5220) and c:IsType(TYPE_MONSTER)
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 c=e:GetHandler() local c=e:GetHandler()
...@@ -94,13 +93,13 @@ function cm.repval(e,c) ...@@ -94,13 +93,13 @@ function cm.repval(e,c)
end end
--02 --02
function cm.ntrfilter(c) function cm.ntrfilter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5220) and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end end
function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp) function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function cm.spfilter(c,tp) function cm.spfilter(c,tp)
return c.SetCard_THY_PeachblossomCountry and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetOriginalCode(),0,TYPES_EFFECT_TRAP_MONSTER,c:GetBaseAttack(),c:GetBaseDefense(),c:GetOriginalLevel(),c:GetOriginalRace(),c:GetOriginalAttribute()) return c:IsSetCard(0x5220) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetOriginalCode(),0,TYPES_EFFECT_TRAP_MONSTER,c:GetBaseAttack(),c:GetBaseDefense(),c:GetOriginalLevel(),c:GetOriginalRace(),c:GetOriginalAttribute())
end end
function cm.ntrtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.ntrtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -124,7 +123,7 @@ function cm.ntrop(e,tp,eg,ep,ev,re,r,rp) ...@@ -124,7 +123,7 @@ function cm.ntrop(e,tp,eg,ep,ev,re,r,rp)
end end
--03 --03
function cm.thfilter(c) function cm.thfilter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsAbleToHand() and (c:IsFaceup() or c:IsLocation(LOCATION_REMOVED)) return c:IsSetCard(0x5220) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsAbleToHand() and (c:IsFaceup() or c:IsLocation(LOCATION_REMOVED))
end end
function cm.thtg(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.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
......
...@@ -36,14 +36,13 @@ function cm.initial_effect(c) ...@@ -36,14 +36,13 @@ function cm.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
cm[c]=e3 cm[c]=e3
end end
cm.SetCard_THY_PeachblossomCountry=true
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(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 Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,TYPES_EFFECT_TRAP_MONSTER,2000,0,3,RACE_ZOMBIE,ATTRIBUTE_LIGHT) end and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,TYPES_EFFECT_TRAP_MONSTER,2000,0,3,RACE_ZOMBIE,ATTRIBUTE_LIGHT) 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.filter(c) function cm.filter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5220) and c:IsType(TYPE_MONSTER)
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 c=e:GetHandler() local c=e:GetHandler()
...@@ -55,7 +54,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +54,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.thfilter(c,tp) function cm.thfilter(c,tp)
return c.SetCard_THY_PeachblossomCountry and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() and (not c:IsForbidden()) and (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 or c:IsType(TYPE_FIELD)) return c:IsSetCard(0x5220) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() and (not c:IsForbidden()) and (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 or c:IsType(TYPE_FIELD))
end end
function cm.thtg(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.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
...@@ -74,7 +73,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +73,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.rlsfilter(c) function cm.rlsfilter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5220) and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end end
function cm.rlscon(e,tp,eg,ep,ev,re,r,rp) function cm.rlscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.rlsfilter,tp,LOCATION_MZONE,0,1,nil) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.rlsfilter,tp,LOCATION_MZONE,0,1,nil)
......
...@@ -59,7 +59,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
--02 --02
function cm.ntrfilter(c) function cm.ntrfilter(c)
return c.SetCard_THY_PeachblossomCountry and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5220) and c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end end
function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp) function cm.ntrcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF and Duel.IsExistingMatchingCard(cm.ntrfilter,tp,LOCATION_MZONE,0,1,nil)
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631001 local m=11631001
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.yaojishi=true
function cm.initial_effect(c) function cm.initial_effect(c)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -46,7 +45,7 @@ end ...@@ -46,7 +45,7 @@ end
--search --search
function cm.filter(c) function cm.filter(c)
return c.zhiyaoshu and c:IsAbleToHand() return c:IsSetCard(0x3221) and c:IsAbleToHand()
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(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 if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
...@@ -71,7 +70,7 @@ function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -71,7 +70,7 @@ function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function cm.filter2(c) function cm.filter2(c)
return c.tezhiyao and c:IsAbleToHand() return c:IsSetCard(0x5221) and c:IsAbleToHand()
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.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) end
...@@ -99,5 +98,5 @@ end ...@@ -99,5 +98,5 @@ end
--act in hand --act in hand
function cm.actfilter(e,c) function cm.actfilter(e,c)
return c.tezhiyao and c:IsPublic() return c:IsSetCard(0x5221) and c:IsPublic()
end end
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631003 local m=11631003
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.zhiyaoshu=true
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -39,13 +38,13 @@ end ...@@ -39,13 +38,13 @@ end
--search --search
function cm.cfilter(c) function cm.cfilter(c)
return c.yaojishi and c:IsFaceup() return c:IsSetCard(0xc220) and c:IsFaceup()
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function cm.filter(c) function cm.filter(c)
return c.tezhiyao and c:IsAbleToHand() return c:IsSetCard(0x5221) and c:IsAbleToHand()
end end
function cm.tgfilter(c,tp) function cm.tgfilter(c,tp)
return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,c) return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,c)
...@@ -89,10 +88,10 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,10 +88,10 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and Duel.GetTurnPlayer()==1-tp and not cm.con(e,tp,eg,ep,ev,re,r,rp) return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and Duel.GetTurnPlayer()==1-tp and not cm.con(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.filter2(c) function cm.filter2(c)
return c.yaojishi and c:IsAbleToHand() return c:IsSetCard(0xc220) and c:IsAbleToHand()
end end
function cm.filter22(c) function cm.filter22(c)
return c.yaojishi return c:IsSetCard(0xc220)
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)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631005 local m=11631005
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.tezhiyao=true
function cm.initial_effect(c) function cm.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -31,7 +30,7 @@ end ...@@ -31,7 +30,7 @@ end
--activate --activate
function cm.cfilter(c) function cm.cfilter(c)
return c.yaojishi and c:IsFaceup() return c:IsSetCard(0xc220) and c:IsFaceup()
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631007 local m=11631007
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.yaojishi=true
function cm.initial_effect(c) function cm.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -41,7 +40,7 @@ end ...@@ -41,7 +40,7 @@ end
--spsummon --spsummon
function cm.spfilter(c) function cm.spfilter(c)
return c.yaojishi and c:IsFaceup() and not c:IsCode(m) return c:IsSetCard(0xc220) and c:IsFaceup() and not c:IsCode(m)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_MZONE,0,1,nil)
...@@ -60,7 +59,7 @@ end ...@@ -60,7 +59,7 @@ end
--draw --draw
function cm.tdfilter(c) function cm.tdfilter(c)
return (c.yaojishi or c.zhiyaoshu or c.tezhiyao) and c:IsAbleToDeck() return (c:IsSetCard(0xc220) or c:IsSetCard(0x3221) or c:IsSetCard(0x5221)) and c:IsAbleToDeck()
end end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.tdfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
...@@ -86,5 +85,5 @@ end ...@@ -86,5 +85,5 @@ end
--act in hand --act in hand
function cm.actfilter(e,c) function cm.actfilter(e,c)
return c.tezhiyao and c:IsPublic() return c:IsSetCard(0x5221) and c:IsPublic()
end end
\ No newline at end of file
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631009 local m=11631009
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.zhiyaoshu=true
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -33,13 +32,13 @@ end ...@@ -33,13 +32,13 @@ end
--search --search
function cm.cfilter(c) function cm.cfilter(c)
return c.yaojishi and c:IsFaceup() return c:IsSetCard(0xc220) and c:IsFaceup()
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function cm.filter(c) function cm.filter(c)
return c.tezhiyao and c:IsAbleToHand() return c:IsSetCard(0x5221) and c:IsAbleToHand()
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(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 if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
...@@ -81,10 +80,10 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,10 +80,10 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return not cm.con(e,tp,eg,ep,ev,re,r,rp) return not cm.con(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.filter2(c) function cm.filter2(c)
return c.yaojishi and c:IsAbleToHand() return c:IsSetCard(0xc220) and c:IsAbleToHand()
end end
function cm.filter22(c) function cm.filter22(c)
return c.yaojishi return c:IsSetCard(0xc220)
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)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631011 local m=11631011
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.tezhiyao=true
function cm.initial_effect(c) function cm.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -30,7 +29,7 @@ end ...@@ -30,7 +29,7 @@ end
--activate --activate
function cm.cfilter(c) function cm.cfilter(c)
return c.yaojishi and c:IsFaceup() return c:IsSetCard(0xc220) and c:IsFaceup()
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631013 local m=11631013
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.yaojishi=true
function cm.initial_effect(c) function cm.initial_effect(c)
--draw --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -40,7 +39,7 @@ end ...@@ -40,7 +39,7 @@ end
--draw --draw
function cm.filter(c) function cm.filter(c)
return c.tezhiyao and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() and not c:IsForbidden() return c:IsSetCard(0x5221) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() and not c:IsForbidden()
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
...@@ -60,7 +59,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +59,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end end
--change effect --change effect
function cm.chcon(e,tp,eg,ep,ev,re,r,rp) function cm.chcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler().tezhiyao and rp==1-tp return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(0x5221) and rp==1-tp
end end
function cm.chtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -75,5 +74,5 @@ function cm.repop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,5 +74,5 @@ function cm.repop(e,tp,eg,ep,ev,re,r,rp)
end end
--act in hand --act in hand
function cm.actfilter(e,c) function cm.actfilter(e,c)
return c.tezhiyao and c:IsPublic() return c:IsSetCard(0x5221) and c:IsPublic()
end end
\ No newline at end of file
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
local m=11631015 local m=11631015
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.zhiyaoshu=true
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -39,13 +37,13 @@ end ...@@ -39,13 +37,13 @@ end
--search --search
function cm.cfilter(c) function cm.cfilter(c)
return c.yaojishi and c:IsFaceup() return c:IsSetCard(0xc220) and c:IsFaceup()
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function cm.filter(c) function cm.filter(c)
return c.tezhiyao and c:IsAbleToHand() return c:IsSetCard(0x5221) and c:IsAbleToHand()
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetDecktopGroup(1-tp,2) local rg=Duel.GetDecktopGroup(1-tp,2)
...@@ -102,10 +100,10 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,10 +100,10 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and Duel.GetTurnPlayer()==1-tp and not cm.con(e,tp,eg,ep,ev,re,r,rp) return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and Duel.GetTurnPlayer()==1-tp and not cm.con(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.filter2(c) function cm.filter2(c)
return c.yaojishi and c:IsAbleToHand() return c:IsSetCard(0xc220) and c:IsAbleToHand()
end end
function cm.filter22(c) function cm.filter22(c)
return c.yaojishi return c:IsSetCard(0xc220)
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)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631017 local m=11631017
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.tezhiyao=true
function cm.initial_effect(c) function cm.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -30,7 +29,7 @@ end ...@@ -30,7 +29,7 @@ end
--activate --activate
function cm.cfilter(c) function cm.cfilter(c)
return c.yaojishi and c:IsFaceup() return c:IsSetCard(0xc220) and c:IsFaceup()
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631019 local m=11631019
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.tezhiyao=true
function cm.initial_effect(c) function cm.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -31,7 +30,7 @@ end ...@@ -31,7 +30,7 @@ end
--activate --activate
function cm.cfilter(c) function cm.cfilter(c)
return c.yaojishi and c:IsFaceup() return c:IsSetCard(0xc220) and c:IsFaceup()
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631021 local m=11631021
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.tezhiyao=true
function cm.initial_effect(c) function cm.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -31,7 +30,7 @@ end ...@@ -31,7 +30,7 @@ end
--activate --activate
function cm.cfilter(c) function cm.cfilter(c)
return c.yaojishi and c:IsFaceup() return c:IsSetCard(0xc220) and c:IsFaceup()
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631023 local m=11631023
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.yaojishi=true
function cm.initial_effect(c) function cm.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,cm.matfilter,aux.NonTuner(cm.matfilter2),1,1) aux.AddSynchroProcedure(c,cm.matfilter,aux.NonTuner(cm.matfilter2),1,1)
...@@ -65,7 +64,7 @@ function cm.matfilter(c) ...@@ -65,7 +64,7 @@ function cm.matfilter(c)
return c:IsCode(11631007) return c:IsCode(11631007)
end end
function cm.matfilter2(c) function cm.matfilter2(c)
return c.yaojishi return c:IsSetCard(0xc220)
end end
--show --show
...@@ -102,10 +101,10 @@ end ...@@ -102,10 +101,10 @@ end
--search/negate --search/negate
function cm.cfilter1(c) function cm.cfilter1(c)
return c.yaojishi and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsType(TYPE_TUNER) return c:IsSetCard(0xc220) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsType(TYPE_TUNER)
end end
function cm.cfilter2(c) function cm.cfilter2(c)
return c.yaojishi and c:IsAttribute(ATTRIBUTE_DARK) and not c:IsType(TYPE_TUNER) return c:IsSetCard(0xc220) and c:IsAttribute(ATTRIBUTE_DARK) and not c:IsType(TYPE_TUNER)
end end
function cm.matcheck1(c) function cm.matcheck1(c)
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:GetMaterial():IsExists(cm.cfilter1,1,nil) return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:GetMaterial():IsExists(cm.cfilter1,1,nil)
...@@ -119,7 +118,7 @@ function cm.con(e,tp,eg,ep,ev,re,r,rp) ...@@ -119,7 +118,7 @@ function cm.con(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and (cm.matcheck1(c) or Duel.IsChainNegatable(ev)) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and (cm.matcheck1(c) or Duel.IsChainNegatable(ev))
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsAbleToHand() and (c.tezhiyao or c.zhiyaoshu) return c:IsAbleToHand() and (c:IsSetCard(0x5221) or c:IsSetCard(0x3221))
end end
function cm.tgf(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgf(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -151,7 +150,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -151,7 +150,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
local tc=Duel.GetOperatedGroup():GetFirst() local tc=Duel.GetOperatedGroup():GetFirst()
if tc and tc:IsLocation(LOCATION_HAND) and tc.tezhiyao then if tc and tc:IsLocation(LOCATION_HAND) and tc:IsSetCard(0x5221) then
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1)) e1:SetDescription(aux.Stringid(m,1))
...@@ -175,7 +174,7 @@ end ...@@ -175,7 +174,7 @@ end
--add attack --add attack
function cm.atkop(e,tp,eg,ep,ev,re,r,rp) function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==tp and re:GetHandler().tezhiyao and c:GetFlagEffect(1)>0 then if re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==tp and re:GetHandler():IsSetCard(0x5221)and c:GetFlagEffect(1)>0 then
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -194,5 +193,5 @@ end ...@@ -194,5 +193,5 @@ end
--act in hand --act in hand
function cm.actfilter(e,c) function cm.actfilter(e,c)
return c.tezhiyao and c:IsPublic() return c:IsSetCard(0x5221) and c:IsPublic()
end end
...@@ -56,7 +56,7 @@ end ...@@ -56,7 +56,7 @@ end
--activate --activate
function cm.thfilter(c) function cm.thfilter(c)
return c:IsType(TYPE_MONSTER) and c.yaojishi and c:IsAbleToHand() return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xc220) and c:IsAbleToHand()
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
...@@ -78,16 +78,16 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,16 +78,16 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESET_CHAIN,0,1) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESET_CHAIN,0,1)
end end
function cm.eftg(e,c) function cm.eftg(e,c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c.tezhiyao and c:IsPublic() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x5221) and c:IsPublic()
end end
--destroy --destroy
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc.tezhiyao and rc:GetFlagEffect(m)==0 return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc:IsSetCard(0x5221) and rc:GetFlagEffect(m)==0
end end
function cm.con2(e,tp,eg,ep,ev,re,r,rp) function cm.con2(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc.tezhiyao and rc:GetFlagEffect(m)>0 return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc:IsSetCard(0x5221) and rc:GetFlagEffect(m)>0
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631027 local m=11631027
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.yaojishi=true
function cm.initial_effect(c) function cm.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -39,7 +38,7 @@ end ...@@ -39,7 +38,7 @@ end
--spsummon --spsummon
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c.yaojishi and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xc220) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) 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
...@@ -64,12 +63,12 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,12 +63,12 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se) function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c.yaojishi return not c:IsSetCard(0xc220)
end end
--public --public
function cm.pbfilter(c) function cm.pbfilter(c)
return c.tezhiyao and not c:IsPublic() return c:IsSetCard(0x5221) and not c:IsPublic()
end end
function cm.pbtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.pbtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.pbfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.pbfilter,tp,LOCATION_HAND,0,1,nil) end
...@@ -91,5 +90,5 @@ end ...@@ -91,5 +90,5 @@ end
--act in hand --act in hand
function cm.actfilter(e,c) function cm.actfilter(e,c)
return c.tezhiyao and c:IsPublic() return c:IsSetCard(0x5221) and c:IsPublic()
end end
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631028 local m=11631028
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.yaojishi=true
function cm.initial_effect(c) function cm.initial_effect(c)
--draw --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -38,7 +37,7 @@ function cm.initial_effect(c) ...@@ -38,7 +37,7 @@ function cm.initial_effect(c)
end end
--draw --draw
function cm.filter(c) function cm.filter(c)
return c.yaojishi and c:IsSummonable(true,nil) return c:IsSetCard(0xc220) and c:IsSummonable(true,nil)
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
...@@ -56,7 +55,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +55,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end end
--destroy replace --destroy replace
function cm.repfilter(c,tp) function cm.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and (c.zhiyaoshu or c.yaojishi ) and not c:IsReason(REASON_REPLACE) --and c:IsReason(REASON_DESTROY) return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and (c:IsSetCard(0x3221) or c:IsSetCard(0xc220) ) and not c:IsReason(REASON_REPLACE) --and c:IsReason(REASON_DESTROY)
end end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -72,5 +71,5 @@ function cm.repop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,5 +71,5 @@ function cm.repop(e,tp,eg,ep,ev,re,r,rp)
end end
--act in hand --act in hand
function cm.actfilter(e,c) function cm.actfilter(e,c)
return c.tezhiyao and c:IsPublic() return c:IsSetCard(0x5221) and c:IsPublic()
end end
\ No newline at end of file
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631030 local m=11631030
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.yaojishi=true
function cm.initial_effect(c) function cm.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,cm.matfilter,aux.NonTuner(cm.matfilter2),1,1) aux.AddSynchroProcedure(c,cm.matfilter,aux.NonTuner(cm.matfilter2),1,1)
...@@ -60,7 +59,7 @@ function cm.matfilter(c) ...@@ -60,7 +59,7 @@ function cm.matfilter(c)
return c:IsCode(11631007) return c:IsCode(11631007)
end end
function cm.matfilter2(c) function cm.matfilter2(c)
return c.yaojishi return c:IsSetCard(0xc220)
end end
--show --show
...@@ -124,7 +123,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -124,7 +123,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c.yaojishi and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xc220) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
...@@ -143,15 +142,15 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -143,15 +142,15 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.etarget(e,c) function cm.etarget(e,c)
return (c.zhiyaoshu or c.yaojishi) and c~=e:GetHandler() return (c:IsSetCard(0x3221) or c:IsSetCard(0xc220)) and c~=e:GetHandler()
end end
--search/negate --search/negate
function cm.cfilter1(c) function cm.cfilter1(c)
return c.yaojishi and c:IsAttribute(ATTRIBUTE_WATER) and not c:IsType(TYPE_TUNER) return c:IsSetCard(0xc220) and c:IsAttribute(ATTRIBUTE_WATER) and not c:IsType(TYPE_TUNER)
end end
function cm.cfilter2(c) function cm.cfilter2(c)
return c.yaojishi and c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsType(TYPE_TUNER) return c:IsSetCard(0xc220) and c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsType(TYPE_TUNER)
end end
function cm.matcheck1(c) function cm.matcheck1(c)
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:GetMaterial():IsExists(cm.cfilter1,1,nil) return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:GetMaterial():IsExists(cm.cfilter1,1,nil)
...@@ -165,7 +164,7 @@ function cm.con(e,tp,eg,ep,ev,re,r,rp) ...@@ -165,7 +164,7 @@ function cm.con(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and (cm.matcheck1(c) or Duel.IsChainNegatable(ev)) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and (cm.matcheck1(c) or Duel.IsChainNegatable(ev))
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsAbleToHand() and (c.tezhiyao or c.zhiyaoshu) return c:IsAbleToHand() and (c:IsSetCard(0x5221) or c:IsSetCard(0x3221))
end end
function cm.tgf(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgf(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -197,7 +196,8 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -197,7 +196,8 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
local tc=Duel.GetOperatedGroup():GetFirst() local tc=Duel.GetOperatedGroup():GetFirst()
if tc and tc:IsLocation(LOCATION_HAND) and tc.tezhiyao then if tc and tc:IsLocation(LOCATION_HAND) and tc:IsSetCard(0x5221)
then
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1)) e1:SetDescription(aux.Stringid(m,1))
...@@ -220,12 +220,12 @@ end ...@@ -220,12 +220,12 @@ end
--add attack --add attack
function cm.atkop(e,tp,eg,ep,ev,re,r,rp) function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==tp and re:GetHandler().tezhiyao and c:GetFlagEffect(1)>0 then if re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==tp and re:GetHandler():IsSetCard(0x5221)and c:GetFlagEffect(1)>0 then
Duel.Recover(tp,1000,REASON_EFFECT) Duel.Recover(tp,1000,REASON_EFFECT)
end end
end end
--act in hand --act in hand
function cm.actfilter(e,c) function cm.actfilter(e,c)
return c.tezhiyao and c:IsPublic() return c:IsSetCard(0x5221) and c:IsPublic()
end end
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631031 local m=11631031
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.tezhiyao=true
function cm.initial_effect(c) function cm.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -31,13 +30,13 @@ end ...@@ -31,13 +30,13 @@ end
--activate --activate
function cm.cfilter(c) function cm.cfilter(c)
return c.yaojishi and c:IsFaceup() return c:IsSetCard(0xc220) and c:IsFaceup()
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end end
function cm.thfilter(c) function cm.thfilter(c)
return (c.yaojishi or c.zhiyaoshu or c.tezhiyao) and c:IsAbleToHand() return (c:IsSetCard(0xc220) or c:IsSetCard(0x3221) or c:IsSetCard(0x5221)) and c:IsAbleToHand()
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.thfilter(chkc) end
...@@ -53,7 +52,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,7 +52,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function cm.vfilter(c) function cm.vfilter(c)
return c.tezhiyao return c:IsSetCard(0x5221)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local m=11631032 local m=11631032
local cm=_G["c"..m] local cm=_G["c"..m]
--strings --strings
cm.tezhiyao=true
function cm.initial_effect(c) function cm.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -30,7 +29,7 @@ end ...@@ -30,7 +29,7 @@ end
--activate --activate
function cm.cfilter(c) function cm.cfilter(c)
return c.yaojishi and c:IsFaceup() return c:IsSetCard(0xc220) and c:IsFaceup()
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
......
...@@ -91,7 +91,7 @@ end ...@@ -91,7 +91,7 @@ end
end end
end end
function s.filter9(c,tp,aa) function s.filter9(c,tp,aa)
return Card.IsPublic(c) and c:IsAttribute(aa) return Card.IsPublic(c) and Card.IsAttribute(c,aa)
end end
function s.lvcon(e,tp,eg,ep,ev,re,r,rp) function s.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffectLabel(tp,s) return Duel.GetFlagEffectLabel(tp,s)
......
--绝技回想
local m=13000750
local cm=_G["c"..m]
function c13000750.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c,false)
aux.AddFusionProcMix(c,false,true,cm.fusfilter1,cm.fusfilter2,cm.fusfilter3,cm.fusfilter4)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.spcon)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_PZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(13000750,1-tp,ACTIVITY_CHAIN)>2 or Duel.GetCustomActivityCount(13000750,tp,ACTIVITY_CHAIN)>2 end)
e3:SetTarget(cm.adtg2)
e3:SetOperation(cm.adop2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_EXTRA)
e4:SetCountLimit(1,m+2000)
e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCustomActivityCount(13000750,1-tp,ACTIVITY_CHAIN)>1 or Duel.GetCustomActivityCount(13000750,tp,ACTIVITY_CHAIN)>1) and e:GetHandler():IsFaceup() end)
e4:SetOperation(cm.disop)
c:RegisterEffect(e4)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
Duel.AddCustomActivityCounter(13000750,ACTIVITY_CHAIN,cm.chainfilter)
end
function cm.chainfilter(re,tp,cid)
local ph=Duel.GetCurrentPhase()
return false
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(rp,13000750,RESET_PHASE+PHASE_END,0,1)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD+LOCATION_HAND,0,4,nil)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.drop)
if Duel.SelectYesNo(tp,aux.Stringid(13000750,0)) then
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local b2=(Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and not c:IsForbidden()
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(13000750,1),aux.Stringid(13000750,2))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(13000750,1))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(13000750,2))+1
end
if op==0 then
Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)
elseif op==1 then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
Duel.BreakEffect()
end
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local h=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if h<3 then
Duel.Draw(tp,3-h,REASON_EFFECT)
end
if h2<3 then
Duel.Draw(1-tp,3-h2,REASON_EFFECT)
end
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup()
end
function cm.adtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.adop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.Destroy(c,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
e1:SetValue(cm.efilter)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetCountLimit(1,m+1000)
e1:SetCondition(cm.spcon2)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop2)
c:RegisterEffect(e1)
end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ng=Group.CreateGroup()
local dg=Group.CreateGroup()
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(i) then
local tc=te:GetHandler()
ng:AddCard(tc)
if tc:IsOnField() and tc:IsRelateToEffect(te) and tc:IsAbleToDeck() then
dg:AddCard(tc)
end
end
end
Duel.SetTargetCard(dg)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,dg,dg:GetCount(),0,0)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
local dg=Group.CreateGroup()
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.NegateActivation(i) then
local tc=te:GetHandler()
if tc:IsRelateToEffect(e) and tc:IsRelateToEffect(te) and tc:IsAbleToDeck() then
tc:CancelToGrave()
dg:AddCard(tc)
end
end
end
Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(i) and i>4 then
return true
end
end
return false
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,4,4,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
Duel.Release(g,REASON_RULE)
end
function cm.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
function cm.spfilter(c,e)
return not c:IsImmuneToEffect(e)
end
function cm.fusfilter1(c)
return c:IsLevel(1)
end
function cm.fusfilter2(c)
return c:IsLevel(2)
end
function cm.fusfilter3(c)
return c:IsLevel(3)
end
function cm.fusfilter4(c)
return c:IsLevel(4)
end
function cm.fusfilter5(c)
return c:IsLevel(5)
end
\ No newline at end of file
--智慧猩
local m=13000751
local cm=_G["c"..m]
function c13000751.initial_effect(c)
aux.EnablePendulumAttribute(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1,m+1000)
e4:SetCondition(cm.con)
e4:SetCost(cm.cost1)
e4:SetTarget(cm.settg)
e4:SetOperation(cm.setop)
c:RegisterEffect(e4)
end
function cm.filter(c)
return c:IsType(TYPE_RITUAL)
end
function cm.filter1(c)
return c:IsType(TYPE_RITUAL) and not c:IsPublic()
end
function cm.filter6(c)
return not c:IsType(TYPE_LINK) and not c:IsType(TYPE_XYZ)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e1)
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_HAND,0,1,c) and Duel.IsExistingMatchingCard(cm.filter6,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
Duel.SetChainLimit(aux.FALSE)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sel=nil
local g1=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_HAND,0,1,99,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local bb=Duel.SelectMatchingCard(tp,cm.filter6,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst()
local ct=#g1
local dd=0
if bb:IsLevel(1) then
sel=Duel.SelectOption(tp,aux.Stringid(m,0))
else
sel=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
end
if sel==1 then
ct=ct*-1
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(ct)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
bb:RegisterEffect(e1)
local g2=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local g3=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local i=g2:GetFirst()
local lev=0
sel=Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))
if sel==0 then
while i do
if i:IsType(TYPE_LINK) then
dd=Card.GetLink(i)
elseif i:IsType(TYPE_XYZ) then
dd=Card.GetRank(i)
else
dd=Card.GetLevel(i)
end
lev=lev+dd
i=g2:GetNext()
end
end
if sel==1 then
lev=1
while i do
if i:IsType(TYPE_LINK) then
dd=Card.GetLink(i)
elseif i:IsType(TYPE_XYZ) then
dd=Card.GetRank(i)
else
dd=Card.GetLevel(i)
end
lev=lev*dd
i=g2:GetNext()
end
end
if lev%24==0 then
Duel.Destroy(g3,REASON_EFFECT)
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINGMSG_LVRANK)
e:SetLabel(Duel.AnnounceLevel(tp,1,12))
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local num=e:GetLabel()
Duel.ConfirmDecktop(tp,num)
local g=Duel.GetDecktopGroup(tp,num)
local aa=g:Filter(cm.filter,nil)
local bb=#g-#aa
if #g>0 and Duel.Destroy(c,REASON_EFFECT)~=0 then
Duel.DisableShuffleCheck()
Duel.Damage(tp,bb*1000,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sc=g:FilterSelect(tp,cm.filter,1,1,nil):GetFirst()
if sc and sc:IsAbleToHand() then
Duel.SendtoHand(sc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sc)
Duel.ShuffleHand(tp)
else
Duel.SendtoGrave(sc,REASON_RULE)
end
end
if #g>1 then
Duel.SortDecktop(tp,tp,#g-1)
for i=1,#g-1 do
local dg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(dg:GetFirst(),SEQ_DECKBOTTOM)
end
end
end
...@@ -20,6 +20,7 @@ function c13015725.initial_effect(c) ...@@ -20,6 +20,7 @@ function c13015725.initial_effect(c)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,13015725) e1:SetCountLimit(1,13015725)
e1:SetCost(c13015725.cost)
e1:SetTarget(c13015725.thtg) e1:SetTarget(c13015725.thtg)
e1:SetOperation(c13015725.thop) e1:SetOperation(c13015725.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -34,6 +35,12 @@ function c13015725.initial_effect(c) ...@@ -34,6 +35,12 @@ function c13015725.initial_effect(c)
e2:SetOperation(c13015725.rmop) e2:SetOperation(c13015725.rmop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c13015725.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_COST)
end
function c13015725.tgfil1(c,e,tp) function c13015725.tgfil1(c,e,tp)
return c:IsFaceup() and c:IsSummonLocation(LOCATION_EXTRA) and Duel.IsExistingMatchingCard(c13015725.tgfil2,tp,LOCATION_ONFIELD,0,1,c,e,tp) return c:IsFaceup() and c:IsSummonLocation(LOCATION_EXTRA) and Duel.IsExistingMatchingCard(c13015725.tgfil2,tp,LOCATION_ONFIELD,0,1,c,e,tp)
end end
......
local m=15000219
local cm=_G["c"..m]
cm.name="蒂斯蒂娜之神仆"
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,15000219)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--xyz
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,15000220)
e3:SetCondition(cm.xcon)
e3:SetTarget(cm.xtg)
e3:SetOperation(cm.xop)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(12397569)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.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 cm.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1a4) and c:IsAbleToHand() and not c:IsAttribute(ATTRIBUTE_LIGHT)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)<1 then return end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function cm.xcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil)
end
function cm.lvfilter(c,sc)
return c:IsLevelAbove(1) and c:GetLevel()~=sc:GetLevel() and c:IsSetCard(0x1a4) and c:IsFaceup() and not c:IsCode(15000219)
end
function cm.xtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.lvfilter(chkc,c) end
if chk==0 then return Duel.IsExistingTarget(cm.lvfilter,tp,LOCATION_MZONE,0,1,nil,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,c)
end
function cm.xyzfilter(c)
return c:IsRace(RACE_AQUA) and c:IsXyzSummonable(nil)
end
function cm.xop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local g=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
end
\ No newline at end of file
local m=15000221
local cm=_G["c"..m]
cm.name="『同谐』的合奏-希佩"
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,2,nil,nil,99)
c:EnableReviveLimit()
--cannot disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(cm.effcon)
c:RegisterEffect(e1)
--Harmony
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(15000221)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
c:RegisterEffect(e2)
--
local e22=Effect.CreateEffect(c)
e22:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e22:SetRange(LOCATION_MZONE)
e22:SetCode(EVENT_ADJUST)
e22:SetOperation(cm.nameop)
c:RegisterEffect(e22)
--change activate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(cm.condition)
e3:SetCost(cm.cost)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
end
function cm.effcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.nametg(e,c)
return c:IsFaceup() and c~=e:GetHandler()
end
function cm.namefilter(c,e)
return c:IsFaceup() and not c:IsCode(15000221) and not c:IsImmuneToEffect(e)
end
function cm.name2filter(c)
return c:IsFaceup() and c:IsHasEffect(15000221) and not c:IsDisabled()
end
function cm.nameop(e)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(0,LOCATION_MZONE,LOCATION_MZONE):Filter(cm.namefilter,nil,e)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.namecon)
e1:SetValue(15000221)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function cm.namecon(e)
return Duel.IsExistingMatchingCard(cm.name2filter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(15000221) and c:IsType(TYPE_XYZ)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local code=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and code==15000221 and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,rc) and rc:IsCanOverlay()
end
function cm.cost(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 cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.repop)
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c):GetFirst()
if c:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.HintSelection(Group.FromCards(tc))
local og=c:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(tc,Group.FromCards(c))
end
end
\ No newline at end of file
local m=15000222
local cm=_G["c"..m]
cm.name="白夜骑士·负火之乌列尔"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,15000222)
--self
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetRange(LOCATION_HAND)
e0:SetCode(15000222)
c:RegisterEffect(e0)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--decrease tribute
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DECREASE_TRIBUTE)
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetTarget(cm.rfilter)
e2:SetCondition(cm.deccon)
e2:SetValue(cm.decval)
c:RegisterEffect(e2)
--summon with no tribute
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SUMMON_PROC)
e3:SetCondition(cm.ntcon)
c:RegisterEffect(e3)
--Destroy
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(cm.target)
e4:SetOperation(cm.operation)
c:RegisterEffect(e4)
--Destroyed
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_ATKCHANGE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_DESTROYED)
e5:SetCountLimit(1,15000222)
e5:SetTarget(cm.thtg)
e5:SetOperation(cm.thop)
c:RegisterEffect(e5)
end
function cm.decfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsFaceup()
end
function cm.rfilter(e,c)
return c:IsHasEffect(15000222)
end
function cm.deccon(e)
return Duel.IsExistingMatchingCard(cm.decfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function cm.decval(e,c)
return 0x1
end
function cm.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.decfilter,0,LOCATION_MZONE,LOCATION_MZONE,2,nil)
end
function cm.desfilter(c,sc,tp,seq)
local cseq=c:GetSequence()
local p=c:GetControler()
--local loc=c:GetLocation()&(LOCATION_MZONE+LOCATION_SZONE)
--if loc==LOCATION_MZONE then
if cseq==5 and p==tp and seq<=2 then return true end
if cseq==5 and p~=tp and seq>=2 and seq<5 then return true end
if cseq==6 and p==tp and seq>=2 and seq<5 then return true end
if cseq==6 and p~=tp and seq<=2 then return true end
if cseq<5 and p==tp then return math.abs(cseq-seq)<=1 end
if cseq<5 and p~=tp then
if seq==0 then return cseq>=3 end
if seq==1 then return cseq>=2 end
if seq==2 then return cseq>=1 and cseq<=3 end
if seq==3 then return cseq<=2 end
if seq==4 then return cseq<=1 end
end
--end
return false
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local seq=c:GetSequence()
if chkc then return chkc:IsOnField() and cm.desfilter(chkc,c,tp,seq) end
if chk==0 then return Duel.IsExistingTarget(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c,tp,seq) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,3,nil,c,tp,seq)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local id=c:GetFieldID()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCountLimit(1)
e1:SetOperation(cm.desop)
e1:SetLabel(id)
e1:SetLabelObject(e)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local tc=tg:GetFirst()
while tc do
tc:RegisterFlagEffect(15000222,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,id,aux.Stringid(m,3))
tc=tg:GetNext()
end
end
function cm.des2filter(c,id)
if c:GetFlagEffectLabel(15000222)~=0 then
for _,i in ipairs{c:GetFlagEffectLabel(15000222)} do
if i==id then return true end
end
end
return false
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local se=e:GetLabelObject()
local id=e:GetLabel()
local tg=Duel.GetMatchingGroup(cm.des2filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,id)
Duel.Destroy(tg,REASON_EFFECT)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(cm.decfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) then
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(cm.decfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
end
\ No newline at end of file
--永恒之心
function c21050000.initial_effect(c)
c:SetSPSummonOnce(21050000)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),2,2)
--tohand
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(21050000,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,21050000)
e2:SetTarget(c21050000.sptg1)
e2:SetOperation(c21050000.spop1)
c:RegisterEffect(e2)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c21050000.reptg)
e2:SetValue(c21050000.repval)
e2:SetOperation(c21050000.repop)
c:RegisterEffect(e2)
end
function c21050000.spfilter1(c,e,tp,zone)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c21050000.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=e:GetHandler():GetLinkedZone(tp)
if chk==0 then return Duel.IsExistingMatchingCard(c21050000.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,zone) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c21050000.spop1(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone(tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c21050000.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,zone)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
function c21050000.filter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsReason(REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c21050000.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c21050000.filter,1,nil,tp) and e:GetHandler():IsAbleToRemove() end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c21050000.repval(e,c)
return c21050000.filter(c,e:GetHandlerPlayer())
end
function c21050000.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
...@@ -60,6 +60,7 @@ function c39512960.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,6 +60,7 @@ function c39512960.discon(e,tp,eg,ep,ev,re,r,rp)
end end
function c39512960.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c39512960.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(39512960,3))
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
......
--N公 司 小 锤 希 斯 克 里 夫
local m=43990051
local cm=_G["c"..m]
function cm.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43990051,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,43990051)
e1:SetTarget(c43990051.thtg)
e1:SetOperation(c43990051.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--change
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(43990051,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,43991051)
-- e3:SetCondition(c43990051.cgcon)
e3:SetTarget(c43990051.cgtg)
e3:SetOperation(c43990051.cgop)
c:RegisterEffect(e3)
end
function c43990051.thfilter(c)
return c:IsSetCard(0x3510) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c43990051.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43990051.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c43990051.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c43990051.thfilter,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
function c43990051.cgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c43990051.cgfilter(c)
return not c:IsRace(RACE_MACHINE) and c:IsFaceup()
end
function c43990051.cgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c43990051.cgfilter(chkc) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c43990051.cgfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c43990051.cgfilter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c43990051.cgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_MACHINE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
--N公司 中锤 唐吉柯德
local m=43990052
local cm=_G["c"..m]
function cm.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43990052,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,43990052)
e1:SetTarget(c43990052.thtg)
e1:SetOperation(c43990052.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(43990052,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,43991052)
e3:SetTarget(c43990052.dttg)
e3:SetOperation(c43990052.dtop)
c:RegisterEffect(e3)
end
function c43990052.thfilter(c)
return c:IsSetCard(0x3510) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c43990052.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43990052.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c43990052.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c43990052.thfilter,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
function c43990052.dtfilter(c)
return (c:IsRace(RACE_MACHINE) and c:IsFaceup() and c:IsType(TYPE_MONSTER)) or c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c43990052.dttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c43990052.dtfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c43990052.dtfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c43990052.dtfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c43990052.dtop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--N公司 中锤 罗佳
local m=43990053
local cm=_G["c"..m]
function cm.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43990053,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c43990053.ttcon)
e1:SetOperation(c43990053.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--relive
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,43990053)
e2:SetTarget(c43990053.sptg)
e2:SetOperation(c43990053.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--change
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCountLimit(1,43991053)
e4:SetTarget(c43990053.cgtg)
e4:SetOperation(c43990053.cgop)
c:RegisterEffect(e4)
end
function c43990053.ctfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsFaceup()
end
function c43990053.ttcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c43990053.ctfilter,tp,0,LOCATION_MZONE,nil)
return minc<=1 and Duel.CheckTribute(c,1,1,mg,1-tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c43990053.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c43990053.ctfilter,tp,0,LOCATION_MZONE,nil)
local g=Duel.SelectTribute(tp,c,1,1,mg,1-tp)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function c43990053.filter(c,e,tp)
return c:IsSetCard(0x3510) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c43990053.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c43990053.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function c43990053.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(c43990053.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
function c43990053.cgfilter(c)
return not c:IsRace(RACE_MACHINE) and c:IsFaceup()
end
function c43990053.cgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c43990053.cgfilter(chkc) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c43990053.cgfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c43990053.cgfilter,tp,0,LOCATION_MZONE,1,3,nil)
end
function c43990053.cgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
while tc and tc:IsRelateToEffect(e) and tc:IsFaceup() do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_MACHINE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--N公司 大锤 默尔索
local m=43990054
local cm=_G["c"..m]
function cm.initial_effect(c)
--summon with 3 tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43990054,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c43990054.ttcon)
e1:SetOperation(c43990054.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE+LOCATION_HAND)
e2:SetCountLimit(1,43990054)
e2:SetCost(c43990054.thcost)
e2:SetTarget(c43990054.thtg)
e2:SetOperation(c43990054.thop)
c:RegisterEffect(e2)
--CATEGORY_DISABLE
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCategory(CATEGORY_DISABLE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,43991054)
e3:SetTarget(c43990054.dttg)
e3:SetOperation(c43990054.dtop)
c:RegisterEffect(e3)
--sp
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,43992054)
e4:SetCondition(c43990054.spcon)
e4:SetTarget(c43990054.sptg)
e4:SetOperation(c43990054.spop)
c:RegisterEffect(e4)
end
function c43990054.spcon(e,tp,eg,ep,ev,re,r,rp)
local race=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_RACE)
return re:IsActiveType(TYPE_MONSTER) and race&RACE_MACHINE>0 and rp==1-tp
end
function c43990054.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c43990054.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c43990054.ctfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsFaceup()
end
function c43990054.ttcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c43990054.ctfilter,tp,0,LOCATION_MZONE,nil)
return minc<=2 and Duel.CheckTribute(c,2,2,mg,1-tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c43990054.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c43990054.ctfilter,tp,0,LOCATION_MZONE,nil)
local g=Duel.SelectTribute(tp,c,2,2,mg,1-tp)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function c43990054.thcost(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 c43990054.thfilter(c)
return c:IsSetCard(0x3510) and c:IsLevelBelow(4) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c43990054.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43990054.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c43990054.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c43990054.thfilter,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
function c43990054.dtfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsFaceup() and aux.NegateMonsterFilter(c)
end
function c43990054.dttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c43990054.dtfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c43990054.dtfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,c43990054.dtfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c43990054.dtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
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:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
--N公司 准执锤者 辛克莱
local m=43990055
local cm=_G["c"..m]
function cm.initial_effect(c)
--summon with 3 tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43990055,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c43990055.ttcon)
e1:SetOperation(c43990055.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--race
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_MACHINE)
e2:SetCondition(c43990055.sumcon)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c43990055.efilter)
c:RegisterEffect(e3)
--negate
-- local e4=Effect.CreateEffect(c)
-- e4:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
-- e4:SetType(EFFECT_TYPE_QUICK_O)
-- e4:SetCode(EVENT_CHAINING)
-- e4:SetRange(LOCATION_MZONE)
-- e4:SetCountLimit(1,43990055)
-- e4:SetCondition(c43990055.discon)
-- e4:SetTarget(c43990055.distg)
-- e4:SetOperation(c43990055.disop)
-- c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetOperation(c43990055.spop)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e6)
--double
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e7:SetCondition(c43990055.damcon)
e7:SetOperation(c43990055.damop)
c:RegisterEffect(e7)
end
function c43990055.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetBattleTarget()~=nil
and e:GetHandler():GetBattleTarget():IsRace(RACE_MACHINE)
end
function c43990055.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2)
end
function c43990055.ctfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsFaceup()
end
function c43990055.ttcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c43990055.ctfilter,tp,0,LOCATION_MZONE,nil)
return minc<=3 and Duel.CheckTribute(c,3,3,mg,1-tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c43990055.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c43990055.ctfilter,tp,0,LOCATION_MZONE,nil)
local g=Duel.SelectTribute(tp,c,3,3 ,mg,1-tp)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function c43990055.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c43990055.efilter(e,te)
return te:IsActiveType(TYPE_TRAP+TYPE_SPELL)
end
function c43990055.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainDisablable(ev) and ep==1-tp
and (re:IsActiveType(TYPE_SPELL+TYPE_TRAP) or (rc:IsRace(RACE_MACHINE) and re:IsActiveType(TYPE_MONSTER)))
end
function c43990055.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c43990055.disop(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 c43990055.spop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("全部,都烧掉......")
Debug.Message("连同我那令人作呕的一生。")
end
\ No newline at end of file
--N公司 执锤者 浮士德
local m=43990056
local cm=_G["c"..m]
function cm.initial_effect(c)
--summon with 3 tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43990056,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c43990056.ttcon)
e1:SetOperation(c43990056.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--summon success
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c43990056.condition)
e2:SetTarget(c43990056.target)
e2:SetOperation(c43990056.operation)
c:RegisterEffect(e2)
--tribute check
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(c43990056.valcheck)
c:RegisterEffect(e3)
e2:SetLabelObject(e3)
e3:SetLabelObject(e2)
end
function c43990056.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c43990056.filter(c,e,tp)
return c:IsSetCard(0x3510) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c43990056.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c43990056.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c43990056.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c43990056.filter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,math.min(ct,ft))
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c43990056.valcheck(e,c)
local g=c:GetMaterial()
local ct=g:FilterCount(Card.IsRace,nil,RACE_MACHINE)
-- e:SetLabel(ct)
e:GetLabelObject():SetLabel(ct)
end
function c43990056.ctfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsFaceup()
end
function c43990056.ttcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c43990056.ctfilter,tp,0,LOCATION_MZONE,nil)
return minc<=2 and Duel.CheckTribute(c,2,99,mg,1-tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c43990056.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c43990056.ctfilter,tp,0,LOCATION_MZONE,nil)
local g=Duel.SelectTribute(tp,c,2,99,mg,1-tp)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
--异端的审判所
local m=43990057
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--change
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(c43990057.cgcon)
e2:SetOperation(c43990057.cgop)
c:RegisterEffect(e2)
--dss
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,43990057)
e3:SetTarget(c43990057.target)
e3:SetOperation(c43990057.operation)
c:RegisterEffect(e3)
end
function c43990057.cgcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local loc=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION)
return not rc:IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and rc:IsControler(1-tp)
end
function c43990057.cgop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not rc:IsRace(RACE_MACHINE) and rc:IsFaceup() then
Duel.Hint(HINT_CARD,0,43990057)
if rc:IsLocation(LOCATION_MZONE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_MACHINE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1) end
end
end
function c43990057.thfilter(c)
return c:IsSetCard(0x3510) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c43990057.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c43990057.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c43990057.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c43990057.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c43990057.smfilter(c)
return c:IsSummonable(true,nil) and c:IsRace(RACE_WARRIOR)
end
function c43990057.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c43990057.smfilter,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(43990057,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c43990057.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
end
--N公司的暴戾处刑
local m=43990058
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c43990058.target)
e1:SetOperation(c43990058.activate)
c:RegisterEffect(e1)
end
function c43990058.filter(c)
return not c:IsRace(RACE_MACHINE) and c:IsFaceup()
end
function c43990058.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43990058.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c43990058.smfilter(c)
return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)
end
function c43990058.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c43990058.filter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_MACHINE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
if Duel.IsExistingMatchingCard(c43990058.smfilter,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(43990058,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,c43990058.smfilter,tp,LOCATION_HAND,0,1,1,nil)
local stc=sg:GetFirst()
if stc then
local s1=stc:IsSummonable(true,nil,1)
local s2=stc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,stc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,stc,true,nil,1)
else
Duel.MSet(tp,stc,true,nil,1)
end
end
end
end
--被选中者的刻印
local m=43990059
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c43990059.activate1)
c:RegisterEffect(e1)
--instant
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(43990059,1))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetCountLimit(1,43990059)
e2:SetCondition(c43990059.condition)
e2:SetTarget(c43990059.target)
e2:SetOperation(c43990059.activate)
c:RegisterEffect(e2)
end
function c43990059.filter1(c)
return c:IsSetCard(0x3510) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c43990059.activate1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c43990059.filter1,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(43990059,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c43990059.condition(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer()
local ph=Duel.GetCurrentPhase()
return tn~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE))
end
function c43990059.filter(c)
return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)
end
function c43990059.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43990059.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c43990059.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c43990059.filter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local s1=tc:IsSummonable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil,1)
else
Duel.MSet(tp,tc,true,nil,1)
end
end
end
--N公司 浮士德
local m=43990060
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddLinkProcedure(c,c43990060.mfilter,1,1)
c:EnableReviveLimit()
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c43990060.condition)
e1:SetOperation(c43990060.regop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c43990060.thcon)
e2:SetTarget(c43990060.thtg)
e2:SetOperation(c43990060.thop)
c:RegisterEffect(e2)
--race
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetCode(EFFECT_CHANGE_RACE)
e3:SetValue(RACE_MACHINE)
e3:SetTarget(c43990060.rctg)
c:RegisterEffect(e3)
end
function c43990060.rctg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function c43990060.mfilter(c)
return c:IsLinkSetCard(0x3510)
end
function c43990060.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c43990060.regop(e,tp,eg,ep,ev,re,r,rp)
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:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c43990060.splimit)
Duel.RegisterEffect(e1,tp)
end
function c43990060.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(43990060) and bit.band(sumtype,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function c43990060.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c43990060.thfilter(c)
return c:IsCode(43990057) and c:IsAbleToHand()
end
function c43990060.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43990060.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c43990060.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c43990060.thfilter,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
--梦为完人的理想
local m=43990061
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,43990061+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c43990061.activate)
c:RegisterEffect(e1)
--hand tribute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_ADD_EXTRA_TRIBUTE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsFacedown))
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetValue(POS_FACEUP_ATTACK)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_HAND,0)
e3:SetTarget(c43990061.dccon)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(40008717,0))
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c43990061.condition)
e4:SetTarget(c43990061.target)
e4:SetOperation(c43990061.operation)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_MSET)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
e6:SetRange(LOCATION_SZONE)
e6:SetCode(EFFECT_MATERIAL_CHECK)
e6:SetValue(c43990061.valcheck)
e6:SetLabelObject(e5)
c:RegisterEffect(e6)
end
function c43990061.valcheck(e,c)
if c:GetMaterial() then
e:GetLabelObject():SetLabel(1)
e:GetLabelObject():GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
e:GetLabelObject():GetLabelObject():SetLabel(0)
end
end
function c43990061.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return tc:IsSummonType(SUMMON_TYPE_ADVANCE) and tc:IsSetCard(0x3510) and tc:GetSummonPlayer()==tp and e:GetLabel()==1
end
function c43990061.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c43990061.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c43990061.dccon(e,c)
return c:IsSetCard(0x3510)
end
function c43990061.filter(c)
return c:IsSetCard(0x3510) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c43990061.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c43990061.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(43990061,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--无形噬体·伪善
function c50204115.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--maintain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetCondition(c50204115.descon)
e1:SetOperation(c50204115.desop)
c:RegisterEffect(e1)
--spsummon limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetTarget(c50204115.sumlimit)
c:RegisterEffect(e2)
--scale
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_LSCALE)
e3:SetRange(LOCATION_PZONE)
e3:SetTargetRange(LOCATION_PZONE,LOCATION_PZONE)
e3:SetTarget(c50204115.sctg)
e3:SetValue(1)
c:RegisterEffect(e3)
local e31=e3:Clone()
e31:SetCode(EFFECT_CHANGE_RSCALE)
c:RegisterEffect(e31)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetCondition(c50204115.thcon)
e4:SetTarget(c50204115.thtg)
e4:SetOperation(c50204115.thop)
c:RegisterEffect(e4)
end
function c50204115.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c50204115.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.HintSelection(Group.FromCards(c))
if Duel.CheckReleaseGroup(tp,nil,1,c) and Duel.SelectYesNo(tp,aux.Stringid(50204115,0)) then
local g=Duel.SelectReleaseGroup(tp,nil,1,1,c)
Duel.Release(g,REASON_COST)
else Duel.Destroy(c,REASON_COST) end
end
function c50204115.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0xe0)
end
function c50204115.sctg(e,c)
return e:GetHandler():GetColumnGroup():IsContains(c)
or (c:GetControler()==e:GetHandler():GetControler() and c~=e:GetHandler())
end
function c50204115.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c50204115.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_PZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_PZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c50204115.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_PZONE,0,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--超级运动员夹击战术
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
end
function s.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb2) and c:IsAbleToHand()
end
function s.thfilter1(c,e)
return s.thfilter(c) and c:IsCanBeEffectTarget(e)
end
function s.desfilter2(c)
return true
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.thfilter(chkc) end
local ct1=Duel.GetMatchingGroupCount(s.thfilter1,tp,LOCATION_MZONE,0,nil,e)
local ct2=Duel.GetMatchingGroupCount(s.desfilter2,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return ct1>0 and ct2>0 end
local ct=math.min(ct1,3)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE,0,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,#g,0,LOCATION_ONFIELD)
local ch=Duel.GetCurrentChain()
if ch>1 and Duel.GetChainInfo(ch-1,CHAININFO_TRIGGERING_PLAYER)==1-tp then
Duel.SetChainLimit(s.chainlm)
end
end
function s.chainlm(e,rp,tp)
return tp==rp
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xb2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_HAND)
if ct>0 and Duel.IsExistingMatchingCard(s.desfilter2,tp,0,LOCATION_ONFIELD,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local hg=Duel.SelectMatchingCard(tp,s.desfilter2,tp,0,LOCATION_ONFIELD,1,ct,nil)
local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
Duel.HintSelection(hg)
if Duel.Destroy(hg,REASON_EFFECT)~=0 and #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sct=ct
if sct>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then sct=1 end
local ssg=sg:Select(tp,1,ct,nil)
Duel.SpecialSummon(ssg,0,tp,tp,false,false,POS_FACEUP)
end
end
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_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id+1)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW)
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 e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
function s.thfilter(c)
return c:IsSetCard(0xb2) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(id)
end
function s.thtg(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.thop(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:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--超级运动员 锋卫摇摆人
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
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:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(s.atkval)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(TIMING_END_PHASE,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,id+1)
e3:SetCondition(s.descon)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
--
if not s.global_check then
s.global_check=true
s[0]=0
s[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_HAND)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(s.clear)
Duel.RegisterEffect(ge2,0)
end
end
function s.chkfilter(c,ep)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSetCard(0xb2)
and c:GetPreviousControler()==ep
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:FilterCount(s.chkfilter,nil,0)>0 then
s[0]=s[0]+1
end
if eg:FilterCount(s.chkfilter,nil,1)>0 then
s[1]=s[1]+1
end
end
function s.clear(e,tp,eg,ep,ev,re,r,rp)
s[0]=0
s[1]=0
end
function s.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(id) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST)
end
function s.atkval(e,c)
return s[c:GetControler()]*500
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsAttackAbove(4000)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
...@@ -6,7 +6,7 @@ function s.initial_effect(c) ...@@ -6,7 +6,7 @@ function s.initial_effect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCost(s.spcost) e1:SetCost(s.spcost)
e1:SetTarget(s.sptg) e1:SetTarget(s.sptg)
......
...@@ -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.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 then if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and g: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()
......
--红血公 吸血鬼
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--to hand
local e02=Effect.CreateEffect(c)
e02:SetType(EFFECT_TYPE_FIELD)
e02:SetCode(EFFECT_SUMMON_PROC)
e02:SetRange(LOCATION_HAND)
e02:SetCondition(s.ntcon)
e02:SetValue(SUMMON_TYPE_NORMAL)
c:RegisterEffect(e02)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetLabelObject(e02)
e2:SetCountLimit(1,id+1)
e2:SetTarget(s.thtg2)
e2:SetOperation(s.thop2)
c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e22)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetOperation(s.regop)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function s.thfilter(c)
return c:IsSetCard(0x8e) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,2)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,aux.TRUE,2,2,REASON_EFFECT+REASON_DISCARD)
end
end
function s.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and Duel.CheckTribute(c,0)
end
function s.thfilter2(c)
return c:IsSetCard(0x8e) and c:IsAbleToHand()
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,0,0,0)
end
function s.sumfilter2(c,se)
return c:IsSummonable(true,se) and c:IsSetCard(0x8e) and c:IsType(TYPE_MONSTER)
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(s.sumfilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
local se=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,s.sumfilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,se)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,se)
end
end
end
end
function s.cfilter(c,tp)
return c:IsSummonLocation(LOCATION_GRAVE) and c:IsPreviousControler(1-tp)
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetReleaseGroup(tp)
if chk==0 then return rg:CheckSubGroup(aux.mzctcheckrel,2,2,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=rg:SelectSubGroup(tp,aux.mzctcheckrel,false,2,2,tp)
aux.UseExtraReleaseCount(g,tp)
Duel.Release(g,REASON_COST)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(id4d,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)~=0
end
function s.spfilter(c,e,tp,rc,tid)
return c:IsReason(REASON_BATTLE) and c:GetReasonCard()==rc and c:GetTurnID()==tid
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,LOCATION_GRAVE,1,nil,e,tp,e:GetHandler(),Duel.GetTurnCount()) end
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp,e:GetHandler(),Duel.GetTurnCount())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp,e:GetHandler(),Duel.GetTurnCount())
local g=nil
if tg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=tg:Select(tp,ft,ft,nil)
else
g=tg
end
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--吸血鬼红舞者
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_ZOMBIE),2,2)
--send to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--Special Summon this card from your GY
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,6))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+1)
e3:SetCondition(s.spcon2)
e3:SetTarget(s.sptg2)
e3:SetOperation(s.spop2)
c:RegisterEffect(e3)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
local ac=Duel.AnnounceType(tp)
e:SetLabel(ac)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_DECK)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local ty=TYPE_MONSTER
if e:GetLabel()==1 then ty=TYPE_SPELL
elseif e:GetLabel()==2 then ty=TYPE_TRAP end
if Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_HAND,nil,ty)>0 and Duel.IsChainDisablable(0)
and Duel.SelectYesNo(1-tp,aux.Stringid(id,4)) then
Duel.DiscardHand(1-tp,Card.IsType,1,1,REASON_EFFECT+REASON_DISCARD,nil,ty)
Duel.NegateEffect(0)
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_DECK,0,1,1,nil,ty)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(1-tp,Card.IsType,1-tp,LOCATION_DECK,0,1,1,nil,ty)
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_EFFECT)
end
function s.cfilter(c,tp)
return c:IsSummonLocation(LOCATION_GRAVE) and c:IsPreviousControler(1-tp)
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.sptg2(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.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetValue(5)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetValue(6)
c:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
end
--武器手
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_MAIN_END,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetTarget(s.sptg2)
e3:SetOperation(s.spop2)
c:RegisterEffect(e3)
if not s.global_check then
s.global_check=true
Hand_global_effect={}
--negate
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ge1:SetCode(EVENT_CHAINING)
ge1:SetCondition(s.discon)
Duel.RegisterEffect(ge1,0)
end
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
if not re or (re:IsHasCategory(CATEGORY_NEGATE)
and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE)) then return false end
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
if ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0 then
Hand_global_effect[re]=true
end
return
end
function s.cfilter(c)
return c:IsCode(68535320,95929069) and c:IsFaceup()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then return false end
return Duel.IsExistingMatchingCard(s.cfilter,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
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local ch=Duel.GetCurrentChain()
if ch>1 then
local p,ce=Duel.GetChainInfo(ch-1,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_EFFECT)
if p==1-tp then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ch-1,g)
Duel.ChangeChainOperation(ch-1,s.repop)
end
end
end
end
function s.repop(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_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function s.spfilter(c,e,tp)
return c:IsCode(68535320,95929069) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return false end
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
return g:CheckSubGroup(aux.dncheck,2,2)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
if not sg then return end
local tc=sg:GetFirst()
for tc in aux.Next(sg) do
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
--immune
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(s.efilter)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
end
end
Duel.SpecialSummonComplete()
end
function s.efilter(e,te,c)
if te:GetOwnerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end
return not Hand_global_effect[te]
end
--钢核成狂龙
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,36623431)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--special summon(remove 3 monster)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,4))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(s.sprcon)
e1:SetTarget(s.sprtg)
e1:SetOperation(s.sprop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--cost
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.mtcon)
e2:SetOperation(s.mtop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(TIMING_END_PHASE,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
end
function s.sprfilter(c)
return c:IsFaceupEx() and c:IsAbleToRemoveAsCost()
and (c:IsSetCard(0x1d) and c:IsType(TYPE_MONSTER) or c:IsCode(53039326))
end
function s.gcheck(g,tp)
return Duel.GetMZoneCount(tp,g)>0
and (#g==3 and g:FilterCount(Card.IsType,nil,TYPE_MONSTER)==3
or #g==1 and g:FilterCount(Card.IsCode,nil,53039326)==1)
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,e:GetHandler())
return g:CheckSubGroup(s.gcheck,1,3,tp)
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,s.gcheck,false,1,3,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_COST)
g:DeleteGroup()
end
function s.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function s.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end
function s.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.HintSelection(Group.FromCards(c))
local g1=Duel.GetMatchingGroup(s.cfilter1,tp,LOCATION_HAND,0,nil)
local select=1
if g1:GetCount()>0 then
select=Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,1))
else
select=Duel.SelectOption(tp,aux.Stringid(id,1))+1
end
if select==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=g1:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
else
Duel.Destroy(c,REASON_COST)
end
end
function s.filter(c)
return c:IsCode(36623431) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
local sg=Duel.GetMatchingGroup(aux.NOT(Card.IsSetCard),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1d)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function s.desfilter(c)
return c:IsCode(36623431) and c:IsAbleToHand()
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()==0 then return end
local tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
local sg=Duel.GetMatchingGroup(aux.NOT(Card.IsSetCard),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,0x1d)
if #sg>0 and tc:IsAbleToGrave()
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.SendtoGrave(tc,REASON_EFFECT)
Duel.Destroy(sg,REASON_EFFECT)
end
end
--水精鳞-深渊多里斯
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,s.matfilter1,nil,nil,aux.NonTuner(Card.IsRace,RACE_AQUA),1,99)
--hand synchro
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetCode(EFFECT_EXTRA_SYNCHRO_MATERIAL)
e0:SetRange(LOCATION_EXTRA)
e0:SetTargetRange(LOCATION_HAND,0)
e0:SetTarget(s.mattg)
e0:SetValue(s.matval)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(TIMING_END_PHASE,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
function s.matfilter1(c,syncard)
return c:IsAttribute(ATTRIBUTE_WATER) and (c:IsTuner(syncard) or c:IsLevel(7))
end
function s.mattg(e,c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(7)
end
function s.matval(e,c)
return c==e:GetHandler()
end
function s.spfilter1(c,e,tp)
return c:IsSetCard(0x74) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,c)
end
function s.spfilter2(c,e,tp,rc)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER) and not c:IsOriginalCodeRule(rc:GetOriginalCodeRule())
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
Duel.SendtoGrave(tc,REASON_COST)
e:SetLabelObject(tc)
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
local tc=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_GRAVE,0,1,1,nil,e,tp,tc)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_VALUE_SELF,tp,tp,false,false,POS_FACEUP)
end
end
--吸血鬼巫女
local s,id,o=GetID()
function s.initial_effect(c)
--summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetHintTiming(TIMING_MAIN_END,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,id)
e2:SetCondition(s.sumcon)
e2:SetCost(s.sumcost)
e2:SetTarget(s.sumtg)
e2:SetOperation(s.sumop)
c:RegisterEffect(e2)
--recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,5))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+1)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetCondition(s.reccon)
e3:SetTarget(s.rectg)
e3:SetOperation(s.recop)
c:RegisterEffect(e3)
end
function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function s.sumfilter(c,ec)
if not c:IsSetCard(0x8e) then return false end
--no tribute
local e1=Effect.CreateEffect(ec)
e1:SetDescription(aux.Stringid(id,4))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.ttcon)
e1:SetOperation(s.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local res=c:IsSummonable(true,nil)
e1:Reset()
return res
end
function s.ttfilter(c)
return c:IsFaceup() and not c:IsRace(RACE_ZOMBIE)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
local mi,ma=c:GetTributeRequirement()
if mi<minc then mi=minc end
if ma<mi then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft==0 and mi<2 then return false end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(s.ttfilter,tp,0,LOCATION_MZONE,nil)
local ct=mg:GetCount()
return ma>0 and ct>0 and ((ct>=mi and (ft>0 or Duel.CheckTribute(c,1))) or (ct<mi and Duel.CheckTribute(c,mi-ct)))
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c,minc)
local mi,ma=c:GetTributeRequirement()
if mi<minc then mi=minc end
if ma<mi then return false end
local tp=c:GetControler()
local res=false
local sg=Group.CreateGroup()
while mi>0 do
local mg1=Duel.GetMatchingGroup(s.ttfilter,tp,0,LOCATION_MZONE,nil)
local mg2=Group.__sub(Duel.GetTributeGroup(c),sg)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 and not sg:IsExists(Card.IsControler,1,nil,tp) then mg2=mg2:Filter(Card.IsControler,nil,tp) end
local mg=Group.__add(mg1,mg2)
if res then Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) else
mg=mg1:Clone()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2))
end
local mc=mg:Select(tp,1,1,nil):GetFirst()
local res1=s.ttfilter(mc) and (mi>1 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
--local res2=res and Group.GetCount(Group.__sub(mg,mc))>=mi-1
res=true
if res1
--and (not res2 or Duel.SelectYesNo(tp,aux.Stringid(id,3)))
then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(RACE_ZOMBIE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
mc:RegisterEffect(e1)
Duel.HintSelection(Group.FromCards(mc))
else
sg:AddCard(mc)
end
mi=mi-1
end
if #sg>0 then
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local tc=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND,0,1,1,nil,c):GetFirst()
if tc then
--no tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,4))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.ttcon)
e1:SetOperation(s.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
--reset when negated
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_NEGATED)
e2:SetOperation(s.rstop)
e2:SetLabelObject(e1)
e2:SetReset(RESET_PHASE+PHASE_MAIN1)
Duel.RegisterEffect(e2,tp)
Duel.Summon(tp,tc,true,nil)
end
end
function s.rstop(e,tp,eg,ep,ev,re,r,rp)
local e1=e:GetLabelObject()
if e1 then e1:Reset() end
e:Reset()
end
function s.reccon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:GetFirst():IsControler(tp) and eg:GetFirst():IsSetCard(0x8e)
end
function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ev)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
end
function s.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--星见魔 沙里斯
function c98920551.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920551,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98920551)
e1:SetCost(c98920551.thcost)
e1:SetTarget(c98920551.thtg)
e1:SetOperation(c98920551.thop)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98920551,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,98930551)
e3:SetTarget(c98920551.sptg)
e3:SetOperation(c98920551.spop)
c:RegisterEffect(e3)
end
function c98920551.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c98920551.thfilter(c)
return c:IsLevel(3) and c:IsAttack(800) and c:IsDefense(800) and c:IsAbleToHand()
and c:IsType(TYPE_MONSTER)
end
function c98920551.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920551.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function c98920551.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98920551.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if e:GetHandler():IsRelateToEffect(e) then
if Duel.SelectOption(tp,aux.Stringid(10406322,2),aux.Stringid(10406322,3))==0 then
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKTOP,REASON_EFFECT)
else
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
end
end
function c98920551.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 c98920551.lv_or_rk(c)
if c:IsType(TYPE_XYZ) then return c:GetRank()
else return c:GetLevel() end
end
function c98920551.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local val1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetSum(c98920551.lv_or_rk)*100
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(val1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2,true)
end
end
\ No newline at end of file
--归魂复仇死者·裁决侠
function c98920712.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,c98920712.matfilter,aux.FilterBoolFunction(Card.IsType,TYPE_EFFECT),1,1,true)
aux.AddContactFusionProcedure(c,c98920712.cfilter,LOCATION_MZONE,LOCATION_MZONE,c98920712.sprop(c))
--code
aux.EnableChangeCode(c,4388680)
--spsummon1
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920712,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c98920712.sptg1)
e2:SetOperation(c98920712.spop1)
c:RegisterEffect(e2)
--lock
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(98920712,1))
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_PHASE+PHASE_STANDBY)
e6:SetCountLimit(1)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(c98920712.tdcon)
e6:SetTarget(c98920712.tdtg)
e6:SetOperation(c98920712.tdop)
c:RegisterEffect(e6)
end
function c98920712.matfilter(c,fc)
return c:IsOriginalCodeRule(4388680) and c:IsOnField() and c:IsControler(fc:GetControler())
end
function c98920712.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function c98920712.cfilter(c,fc)
return c:IsAbleToGraveAsCost() and (c:IsControler(fc:GetControler()) or c:IsFaceup())
end
function c98920712.sprop(c)
return function(g)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c98920712.spfilter1(c,e,tp)
return c:IsSetCard(0x106) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920712.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
and Duel.IsExistingMatchingCard(c98920712.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c98920712.spop1(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)-Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
if ft>0 and ct>0 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
ct=math.min(ct,ft)
local g=Duel.GetMatchingGroup(c98920712.spfilter1,tp,LOCATION_GRAVE,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct)
if sg then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c98920712.tdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
end
function c98920712.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c98920712.tdop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
if tp==Duel.GetTurnPlayer() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
e2:SetTargetRange(1,0)
Duel.RegisterEffect(e2,tp)
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
e1:SetTargetRange(0,1)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
e2:SetTargetRange(0,1)
Duel.RegisterEffect(e2,tp)
end
end
\ No newline at end of file
--急袭猛禽-聚合猎鹰
function c98920713.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),4,2)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920713,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,98920713)
e1:SetCost(c98920713.thcost)
e1:SetCondition(c98920713.thcon)
e1:SetTarget(c98920713.thtg)
e1:SetOperation(c98920713.thop)
c:RegisterEffect(e1)
--attack up
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetDescription(aux.Stringid(98920713,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c98920713.cost)
e1:SetTarget(c98920713.atktg)
e1:SetOperation(c98920713.operation)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c98920713.discon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c98920713.distg)
e2:SetOperation(c98920713.disop)
c:RegisterEffect(e2)
end
function c98920713.costfilter(c,tp)
return c:IsSetCard(0x95) and c:IsType(TYPE_SPELL) and not c:IsPublic()
and Duel.IsExistingMatchingCard(c98920713.srfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c98920713.srfilter(c,code)
return c:IsSetCard(0x95) and c:IsType(TYPE_SPELL) and not c:IsCode(code) and c:IsAbleToHand()
end
function c98920713.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c98920713.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920713.costfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,c98920713.costfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst()
e:SetLabel(tc:GetCode())
Duel.ConfirmCards(1-tp,tc)
end
function c98920713.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98920713.thop(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98920713.srfilter,tp,LOCATION_DECK,0,1,1,nil,code)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c98920713.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 c98920713.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c98920713.atkfilter(c)
return c:IsSetCard(0xba) and c:IsType(TYPE_MONSTER)
end
function c98920713.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local ag=Duel.GetMatchingGroup(c98920713.atkfilter,e:GetHandlerPlayer(),LOCATION_GRAVE+LOCATION_MZONE,0,nil)
local ms=ag:GetClassCount(Card.GetCode)*-100
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(ms)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c98920713.disfilter(c)
return c:IsType(TYPE_XYZ) and c:IsRankAbove(10) and c:IsFaceup()
end
function c98920713.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c98920713.disfilter,tp,LOCATION_MZONE,0,1,nil)
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
end
function c98920713.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c98920713.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--古代的机械伏兵
local s,id,o=GetID()
function c98920722.initial_effect(c)
aux.AddCodeList(c,83104731)
--Special Summon (from hand : itself)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon1)
e1:SetTarget(s.sptg1)
e1:SetOperation(s.spop1)
c:RegisterEffect(e1)
e2=e1:Clone()
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(s.con1)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98920722,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCost(c98920722.spcost)
e3:SetTarget(c98920722.sptg)
e3:SetOperation(c98920722.spop)
c:RegisterEffect(e3)
--Destroy
local e12=Effect.CreateEffect(c)
e12:SetDescription(aux.Stringid(98920722,0))
e12:SetCategory(CATEGORY_DESTROY)
e12:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e12:SetCode(EVENT_LEAVE_FIELD)
e12:SetRange(LOCATION_GRAVE)
e12:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e12:SetCountLimit(1,98920722)
e12:SetCost(aux.bfgcost)
e12:SetCondition(c98920722.reccon)
e12:SetTarget(c98920722.rectg)
e12:SetOperation(c98920722.recop)
c:RegisterEffect(e12)
end
function s.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c98920722.efilter)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e4)
end
Duel.SpecialSummonComplete()
end
function s.con1(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c98920722.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c98920722.spcost(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 c98920722.spfilter(c,e,tp)
return c:IsCode(83104731) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c98920722.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c98920722.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c98920722.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c98920722.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
end
function c98920722.filter(c,tp)
return c:IsSetCard(0x7) and c:IsType(TYPE_FUSION)
end
function c98920722.reccon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c98920722.filter,1,nil,tp)
end
function c98920722.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c98920722.recop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
end
\ No newline at end of file
...@@ -30,36 +30,20 @@ function c9910060.chainfilter(re,tp,cid) ...@@ -30,36 +30,20 @@ function c9910060.chainfilter(re,tp,cid)
return not (re:GetHandler():IsRace(RACE_FAIRY) and re:IsActiveType(TYPE_MONSTER) return not (re:GetHandler():IsRace(RACE_FAIRY) and re:IsActiveType(TYPE_MONSTER)
and Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION)==LOCATION_HAND) and Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION)==LOCATION_HAND)
end end
function c9910060.cfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function c9910060.ovfilter(c) function c9910060.ovfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FAIRY) return c:IsFaceup() and c:IsSetCard(0x9951)
end end
function c9910060.selector(c,tp,g,sg,i) function c9910060.cfilter(c)
sg:AddCard(c) return c:IsAbleToRemoveAsCost() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
g:RemoveCard(c)
local flag=false
if i<2 then
flag=g:IsExists(c9910060.selector,1,nil,tp,g,sg,i+1)
else
flag=sg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_LIGHT)>0
and sg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_DARK)>0
end
sg:RemoveCard(c)
g:AddCard(c)
return flag
end end
function c9910060.xyzop(e,tp,chk) function c9910060.xyzop(e,tp,chk)
local g=Duel.GetMatchingGroup(c9910060.cfilter,tp,LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(c9910060.cfilter,tp,LOCATION_GRAVE,0,nil)
local sg=Group.CreateGroup() if chk==0 then return (Duel.GetCustomActivityCount(9910060,tp,ACTIVITY_CHAIN)~=0
if chk==0 then return (Duel.GetCustomActivityCount(9910060,tp,ACTIVITY_CHAIN)~=0 or Duel.GetCustomActivityCount(9910060,1-tp,ACTIVITY_CHAIN)~=0) and Duel.GetFlagEffect(tp,9910060)==0 and g:IsExists(c9910060.selector,1,nil,tp,g,sg,1) end or Duel.GetCustomActivityCount(9910060,1-tp,ACTIVITY_CHAIN)~=0)
for i=1,2 do and Duel.GetFlagEffect(tp,9910060)==0
and g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=g:FilterSelect(tp,c9910060.selector,1,1,nil,tp,g,sg,i) local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
sg:Merge(g1)
g:Sub(g1)
end
Duel.Remove(sg,POS_FACEUP,REASON_COST) Duel.Remove(sg,POS_FACEUP,REASON_COST)
Duel.RegisterFlagEffect(tp,9910060,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,9910060,RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -89,26 +89,27 @@ function c9910452.cfilter(c) ...@@ -89,26 +89,27 @@ function c9910452.cfilter(c)
end end
function c9910452.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c9910452.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local ct=Duel.GetMatchingGroupCount(c9910452.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local ct=Duel.GetMatchingGroupCount(c9910452.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<ct then return false end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<ct then return false end
local g=Duel.GetDecktopGroup(tp,ct) local g=Duel.GetDecktopGroup(tp,ct)
return g:FilterCount(Card.IsAbleToHand,nil)>0 return g:FilterCount(Card.IsAbleToHand,nil)>0
end end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end end
function c9910452.thfilter(c)
return c:IsSetCard(0x9950) and c:IsAbleToHand()
end
function c9910452.thop(e,tp,eg,ep,ev,re,r,rp) function c9910452.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local ct=Duel.GetMatchingGroupCount(c9910452.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local ct=Duel.GetMatchingGroupCount(c9910452.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.ConfirmDecktop(tp,ct) Duel.ConfirmDecktop(tp,ct)
local g=Duel.GetDecktopGroup(tp,ct) local g=Duel.GetDecktopGroup(tp,ct)
if g:GetCount()>0 then local tg=g:Filter(c9910452.thfilter,nil)
local tg=g:Filter(Card.IsAbleToHand,nil) if #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(9910452,3)) then
if tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=tg:Select(tp,1,1,nil) local sg=tg:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
end end
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
end
end end
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