Commit cd3e4713 authored by Nemo Ma's avatar Nemo Ma

0925 wild

parent a3c7de8b
...@@ -324,6 +324,25 @@ ...@@ -324,6 +324,25 @@
67200708 0 67200708 0
67200709 0 67200709 0
67200710 0 67200710 0
70052400 0
70052402 0
70052404 0
70052405 0
70052407 0
70052409 0
70052411 0
70052412 0
70052414 0
70052416 0
70052418 0
70052420 0
70052422 0
70052424 0
70052426 0
70052428 0
70052430 0
70052431 0
70052433 0
72100301 0 72100301 0
72100302 0 72100302 0
72100303 0 72100303 0
...@@ -730,6 +749,54 @@ ...@@ -730,6 +749,54 @@
90700085 0 90700085 0
92781608 0 92781608 0
94380880 0 94380880 0
96071000 0
96071001 0
96071002 0
96071003 0
96071005 0
96071007 0
96071010 0
96071012 0
96071013 0
96071015 0
96071016 0
96071018 0
96071020 0
96071021 0
96071022 0
96071023 0
96071025 0
96071026 0
96071027 0
96071029 0
96071031 0
96071032 0
96071033 0
96071035 0
96071036 0
96071038 0
96071040 0
96071041 0
96071042 0
96071044 0
96071045 0
96071046 0
96071048 0
96071050 0
96071051 0
96071052 0
96071054 0
96071056 0
96071058 0
96071060 0
96071062 0
96071065 0
96071067 0
96071069 0
96071071 0
96071073 0
96071074 0
96071075 0
98452220 0 98452220 0
99550610 0 99550610 0
99700125 0 99700125 0
...@@ -923,6 +990,17 @@ ...@@ -923,6 +990,17 @@
30015045 0 30015045 0
30015080 0 30015080 0
30015100 0 30015100 0
#220925
15004108 0
25000081 0
31400088 0
33330102 0
60002092 0
60152802 0
65010028 0
89387014 0
871100003 0
30000325 1
#220918 #220918
114509 0 114509 0
20000457 0 20000457 0
...@@ -1150,7 +1228,6 @@ ...@@ -1150,7 +1228,6 @@
60000062 0 60000062 0
12057802 0 12057802 0
12057819 0 12057819 0
30000325 0
30005095 0 30005095 0
60002025 0 60002025 0
83000068 0 83000068 0
......
No preview for this file type
expansions/pics/25000000.jpg

165 KB | W: | H:

expansions/pics/25000000.jpg

165 KB | W: | H:

expansions/pics/25000000.jpg
expansions/pics/25000000.jpg
expansions/pics/25000000.jpg
expansions/pics/25000000.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/25000001.jpg

167 KB | W: | H:

expansions/pics/25000001.jpg

168 KB | W: | H:

expansions/pics/25000001.jpg
expansions/pics/25000001.jpg
expansions/pics/25000001.jpg
expansions/pics/25000001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/25000104.jpg

230 KB | W: | H:

expansions/pics/25000104.jpg

229 KB | W: | H:

expansions/pics/25000104.jpg
expansions/pics/25000104.jpg
expansions/pics/25000104.jpg
expansions/pics/25000104.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/25000403.jpg

284 KB | W: | H:

expansions/pics/25000403.jpg

284 KB | W: | H:

expansions/pics/25000403.jpg
expansions/pics/25000403.jpg
expansions/pics/25000403.jpg
expansions/pics/25000403.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/70052400.jpg

12.9 KB | W: | H:

expansions/pics/70052400.jpg

55.6 KB | W: | H:

expansions/pics/70052400.jpg
expansions/pics/70052400.jpg
expansions/pics/70052400.jpg
expansions/pics/70052400.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/70052402.jpg

11.8 KB | W: | H:

expansions/pics/70052402.jpg

51.5 KB | W: | H:

expansions/pics/70052402.jpg
expansions/pics/70052402.jpg
expansions/pics/70052402.jpg
expansions/pics/70052402.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/70052405.jpg

12.8 KB | W: | H:

expansions/pics/70052405.jpg

55.4 KB | W: | H:

expansions/pics/70052405.jpg
expansions/pics/70052405.jpg
expansions/pics/70052405.jpg
expansions/pics/70052405.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/70052412.jpg

12.1 KB | W: | H:

expansions/pics/70052412.jpg

50.9 KB | W: | H:

expansions/pics/70052412.jpg
expansions/pics/70052412.jpg
expansions/pics/70052412.jpg
expansions/pics/70052412.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/70052414.jpg

11.6 KB | W: | H:

expansions/pics/70052414.jpg

51.2 KB | W: | H:

expansions/pics/70052414.jpg
expansions/pics/70052414.jpg
expansions/pics/70052414.jpg
expansions/pics/70052414.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/70052416.jpg

12.7 KB | W: | H:

expansions/pics/70052416.jpg

56.5 KB | W: | H:

expansions/pics/70052416.jpg
expansions/pics/70052416.jpg
expansions/pics/70052416.jpg
expansions/pics/70052416.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/70052420.jpg

11.3 KB | W: | H:

expansions/pics/70052420.jpg

52.1 KB | W: | H:

expansions/pics/70052420.jpg
expansions/pics/70052420.jpg
expansions/pics/70052420.jpg
expansions/pics/70052420.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/70052426.jpg

12.7 KB | W: | H:

expansions/pics/70052426.jpg

53.1 KB | W: | H:

expansions/pics/70052426.jpg
expansions/pics/70052426.jpg
expansions/pics/70052426.jpg
expansions/pics/70052426.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/70052428.jpg

12.4 KB | W: | H:

expansions/pics/70052428.jpg

55 KB | W: | H:

expansions/pics/70052428.jpg
expansions/pics/70052428.jpg
expansions/pics/70052428.jpg
expansions/pics/70052428.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/70052430.jpg

12.6 KB | W: | H:

expansions/pics/70052430.jpg

53.8 KB | W: | H:

expansions/pics/70052430.jpg
expansions/pics/70052430.jpg
expansions/pics/70052430.jpg
expansions/pics/70052430.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -3,7 +3,7 @@ local m=25000000 ...@@ -3,7 +3,7 @@ local m=25000000
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) --e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE_START+PHASE_DRAW) e1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e1:SetRange(LOCATION_HAND+LOCATION_DECK) e1:SetRange(LOCATION_HAND+LOCATION_DECK)
......
...@@ -3,7 +3,7 @@ local m=25000001 ...@@ -3,7 +3,7 @@ local m=25000001
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) --e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE_START+PHASE_DRAW) e1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e1:SetRange(LOCATION_HAND+LOCATION_DECK) e1:SetRange(LOCATION_HAND+LOCATION_DECK)
......
...@@ -6,14 +6,14 @@ function cm.initial_effect(c) ...@@ -6,14 +6,14 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) --e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
Duel.RegisterEffect(e1,0) Duel.RegisterEffect(e1,0)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(25000000) e2:SetCode(25000000)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) --e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(cm.condition2) e2:SetCondition(cm.condition2)
e2:SetOperation(cm.operation) e2:SetOperation(cm.operation)
Duel.RegisterEffect(e2,0) Duel.RegisterEffect(e2,0)
......
--契灵·神眷之子 --契灵·神眷之子
local m=70052400 local m=70052400
local set=0xee0 local set=0xff0
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m) --special summon
--Move local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(cm.spcon)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--remove
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2)) e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCategory(CATEGORY_REMOVE)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_MOVE) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.movcon) e1:SetCountLimit(1,m)
e1:SetTarget(cm.movtg) e1:SetCost(cm.rmcost)
e1:SetOperation(cm.movop) e1:SetTarget(cm.rmtg)
e1:SetOperation(cm.rmop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--draw --draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3)) e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHANGE_POS) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_TO_DECK)
e2:SetCountLimit(1) e2:SetCountLimit(1,70052401)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg) e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop) e2:SetOperation(cm.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,4))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1)
e3:SetCondition(cm.rmcon)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
--atk/def
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,5))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_EQUIP)
e4:SetCountLimit(1)
e4:SetOperation(cm.atkop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5)
--recover
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,6))
e6:SetCategory(CATEGORY_RECOVER)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_CONTROL_CHANGED)
e6:SetCountLimit(1)
e6:SetTarget(cm.restg)
e6:SetOperation(cm.resop)
c:RegisterEffect(e6)
--spsummon
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(m,1))
e7:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetRange(LOCATION_REMOVED)
e7:SetCountLimit(1,m)
e7:SetCondition(aux.exccon)
e7:SetTarget(cm.sptg)
e7:SetOperation(cm.spop)
c:RegisterEffect(e7)
end end
--Move --special summon
function cm.movcon(e,tp,eg,ep,ev,re,r,rp) function cm.spfilter(c)
local c=e:GetHandler() return c:IsSetCard(0xff0) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsLocation(LOCATION_MZONE) and c:IsControler(c:GetPreviousControler())
end end
function cm.spfilter(c,e,tp) function cm.spcon(e,c)
return c:IsSetCard(0xee0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler())
end end
function cm.movtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler())
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end end
function cm.movop(e,tp,eg,ep,ev,re,r,rp) --remove
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if chk==0 then return e:GetHandler():IsReleasable() end
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND,0,1,1,nil,e,tp) Duel.Release(e:GetHandler(),REASON_COST)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--draw
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local np=e:GetHandler():GetPosition()
local pp=e:GetHandler():GetPreviousPosition()
return ((np<3 and pp>3) or (pp<3 and np>3))
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--destroy
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
end end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
...@@ -127,58 +70,15 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -127,58 +70,15 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
end end
--atk/def --draw
function cm.atkop(e,tp,eg,ep,ev,re,r,rp) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.SetTargetPlayer(tp)
local e1=Effect.CreateEffect(c) Duel.SetTargetParam(1)
e1:SetType(EFFECT_TYPE_SINGLE) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
end
--recover
function cm.restg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(2500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,2500)
end end
function cm.resop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end
--spsummon
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.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 ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,70052401,0,TYPES_TOKEN_MONSTER,1500,1500,1,RACE_FAIRY,ATTRIBUTE_LIGHT)
and Duel.SelectYesNo(tp,aux.Stringid(m,7)) then
Duel.BreakEffect()
local token=Duel.CreateToken(tp,70052401)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(1)
token:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
end
\ No newline at end of file
This diff is collapsed.
--契灵·胶果冻
local m=70052404
local set=0xff0
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(cm.acost)
e1:SetOperation(cm.aop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DICE+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_DECK)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
--Activate
function cm.acost(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 cm.aop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(cm.damval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.damval(e,re,val,r,rp,rc)
return val/2
end
function cm.counterfilter(c)
return c:IsSetCard(0xff0)
end
--recover
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,3)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local d1,d2,d3=Duel.TossDice(tp,3)
local rec=(d1+d2+d3)*200
Duel.Recover(tp,rec,REASON_EFFECT)
end
\ No newline at end of file
--契灵·芳香法师 --契灵·芳香法师
local m=70052405 local m=70052405
local set=0xee0 local set=0xff0
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m) --special summon
--place local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,2))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(cm.spcon)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetCategory(CATEGORY_DICE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,m)
e1:SetCost(cm.cost) e1:SetTarget(cm.thtg)
e1:SetTarget(cm.target) e1:SetOperation(cm.thop)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon local e2=e1:Clone()
local e2=Effect.CreateEffect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,m)
e2:SetCondition(aux.exccon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--special summon/to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_DECK)
e3:SetCountLimit(1,70052406)
e3:SetTarget(cm.stptg)
e3:SetOperation(cm.stpop)
c:RegisterEffect(e3)
end end
--fusion summon --special summon
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spfilter(c)
if chk==0 then return e:GetHandler():IsReleasable() end return c:IsSetCard(0xff0) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
Duel.Release(e:GetHandler(),REASON_COST)
end end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler())
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler())
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
--to hand
function cm.filter(c) function cm.filter(c)
return c:IsSetCard(0xee0) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() return c:IsSetCard(0xff0) and c:IsAbleToHand()
end end
function cm.target(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.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) local dc=Duel.TossDice(tp,1)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) Duel.ConfirmDecktop(tp,dc)
local tc=g:GetFirst() local dg=Duel.GetDecktopGroup(tp,dc)
if tc then local g=dg:Filter(cm.filter,nil)
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) if g:GetCount()>0 then
local e1=Effect.CreateEffect(e:GetHandler()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
e1:SetCode(EFFECT_CHANGE_TYPE) local sg=g:Select(tp,1,1,nil)
e1:SetType(EFFECT_TYPE_SINGLE) Duel.SendtoHand(sg,nil,REASON_EFFECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) Duel.ConfirmCards(1-tp,sg)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end end
Duel.ShuffleDeck(tp)
end end
--spsummon --special summon/to hand
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.stpfilter(c,e,tp,ft)
local c=e:GetHandler() return c:IsSetCard(0xff0) and not c:IsCode(m) and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
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)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.refilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.refilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.refilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetAttack())
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.stptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if chk==0 then return Duel.IsExistingMatchingCard(cm.stpfilter,tp,LOCATION_DECK,0,1,nil,e,tp,ft) end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
Duel.BreakEffect() function cm.stpop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT) local g=Duel.SelectMatchingCard(tp,cm.stpfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ft)
local tc=g:GetFirst()
if tc then
if ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end end
end end
end end
\ No newline at end of file
--契灵·荒川剑豪
local m=70052407
local set=0xff0
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(cm.spcon)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_DECK)
e2:SetCountLimit(1,70052408)
e2:SetTarget(cm.stptg)
e2:SetOperation(cm.stpop)
c:RegisterEffect(e2)
end
--special summon
function cm.spfilter(c)
return c:IsSetCard(0xff0) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler())
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler())
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
--extra Summon
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function cm.tfilter(c,e,tp)
return c:IsSetCard(0xff0) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(cm.tfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
end
--
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.tfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local e2_1=Effect.CreateEffect(e:GetHandler())
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_UPDATE_ATTACK)
e2_1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e2_1:SetValue(1500)
e2_1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2_1,true)
Duel.BreakEffect()
if Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_MZONE,1,nil,TYPE_MONSTER) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
local gn=Group.CreateGroup()
local g2=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_MZONE,nil,TYPE_MONSTER)
while g2:GetCount()>0 do
local tc2=g2:GetFirst()
if tc2:IsCanBeBattleTarget(tc) then
gn:AddCard(tc2)
g2:RemoveCard(tc2)
else
g2:RemoveCard(tc2)
end
end
if gn:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g1=gn:FilterSelect(tp,Card.IsType,1,1,nil,TYPE_MONSTER)
if g1:GetCount()>0 then
local tc1=g1:GetFirst()
if tc1:IsLocation(LOCATION_MZONE) and tc:IsLocation(LOCATION_MZONE) then
if not tc1:IsPosition(POS_FACEUP_ATTACK) then
Duel.ChangePosition(tc1,POS_FACEUP_ATTACK)
end
if not tc:IsPosition(POS_FACEUP_ATTACK) then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end
if tc1:IsLocation(LOCATION_MZONE) and tc:IsLocation(LOCATION_MZONE) then
Duel.CalculateDamage(tc,tc1)
end
end
end
end
end
end
end
--special summon
function cm.cfilter(c,e,tp)
return c:IsSetCard(0xff0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.stptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.stpop(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,cm.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--契灵·火蛾罗巫女
local m=70052409
local set=0xff0
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(cm.spcon)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,70052410)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--draw and replace
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_DECK)
e3:SetTarget(cm.drtg)
e3:SetOperation(cm.drop)
c:RegisterEffect(e3)
end
--special summon
function cm.spfilter(c)
return c:IsSetCard(0xff0) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler())
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler())
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
--to hand
function cm.filter(c)
return c:IsSetCard(0xff0) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and not c:IsPublic()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,cm.filter,p,LOCATION_HAND,0,1,63,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(1-p,g)
local ct=Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(p)
Duel.BreakEffect()
Duel.Draw(p,ct,REASON_EFFECT)
end
end
--draw and replace
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
--契灵·赤勇者
local m=70052411
local set=0xff0
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(cm.spcon)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_DECK)
e1:SetTarget(cm.stptg)
e1:SetOperation(cm.stpop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(cm.atkval)
e2:SetCondition(cm.atkcon)
c:RegisterEffect(e2)
--defup
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.defcon)
e3:SetOperation(cm.defop)
c:RegisterEffect(e3)
end
--special summon
function cm.spfilter(c)
return c:IsSetCard(0xff0) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler())
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler())
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
--spsummon
function cm.stpfilter(c,e,tp,ft)
return c:IsSetCard(0xff0) and not c:IsCode(m) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.stptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.stpfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.stpop(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,cm.stpfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--atk
function cm.atkval(e,c)
if c:IsDefensePos() then return 0 else return c:GetDefense() end
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsDisabled() and e:GetHandler():IsAttackPos()
end
--defup
function cm.defcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsDisabled() and e:GetHandler():IsDefensePos()
end
function cm.defop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(1500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--契灵·药穗䍺 --契灵·金羽鹗
local m=70052412 local m=70052412
local set=0xee0 local set=0xff0
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--negate --negate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DISABLE) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_ONFIELD+LOCATION_GRAVE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCost(aux.bfgcost) e1:SetCost(cm.descost)
e1:SetTarget(cm.destg) e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop) e1:SetOperation(cm.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--damage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2)) e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_HAND) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetCode(EVENT_TO_DECK)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,70052413) e2:SetCountLimit(1,70052413)
e2:SetCondition(cm.spcon) e2:SetTarget(cm.damtg)
e2:SetTarget(cm.sptg) e2:SetOperation(cm.damop)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
--negate --negate
function cm.descost(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 cm.destg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) end if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function cm.desop(e,tp,eg,ep,ev,re,r,rp,chk) function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.GetFirstTarget() local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER) and not IsType(TYPE_NORMAL)) and tc:IsRelateToEffect(e) then if g:GetCount()>0 then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.HintSelection(g)
local e1=Effect.CreateEffect(c) Duel.Destroy(g,REASON_EFFECT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end end
end end
--spsummon function cm.counterfilter(c)
function cm.cfilter1(c,tp) return c:IsSetCard(0xff0)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter1,1,nil,1-tp)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) --damage
local c=e:GetHandler() function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) local ct=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*200)
end end
function cm.spfilter(c,e,tp) function cm.damop(e,tp,eg,ep,ev,re,r,rp)
return c:IsSetCard(0xee0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
end local ct=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
function cm.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,ct*200,REASON_EFFECT)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end end
\ No newline at end of file
--契灵·金羽鹗 --契灵·药穗䍺
local m=70052414 local m=70052414
local set=0xee0 local set=0xff0
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--negate --negate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_ONFIELD+LOCATION_GRAVE) e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCost(aux.bfgcost) e1:SetCost(cm.descost)
e1:SetTarget(cm.destg) e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop) e1:SetOperation(cm.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--send to grave
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2)) e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetCode(EVENT_TO_DECK)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,70052415) e2:SetCountLimit(1,70052415)
e2:SetCondition(cm.spcon) e2:SetTarget(cm.target)
e2:SetTarget(cm.sptg) e2:SetOperation(cm.operation)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
--negate --negate
function cm.descost(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 cm.destg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.destg(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 chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function cm.desop(e,tp,eg,ep,ev,re,r,rp) function cm.desop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local tc=Duel.GetFirstTarget()
if g:GetCount()>0 then if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.HintSelection(g) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.Destroy(g,REASON_EFFECT) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end end
end end
--spsummon function cm.counterfilter(c)
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsSetCard(0xff0)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and aux.exccon(e)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) --send to grave
local c=e:GetHandler() function cm.tgfilter(c)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end return c:IsSetCard(0xff0) and not c:IsCode(m) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() if chk==0 then return true end
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
Duel.BreakEffect() function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE) local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
e1:SetCode(EFFECT_UPDATE_ATTACK) if g:GetCount()>0 then
e1:SetValue(1000) Duel.SendtoGrave(g,REASON_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end end
end end
\ No newline at end of file
--契灵·火蛾罗巫女 --契灵·精灵龙
local m=70052416 local m=70052416
local set=0xee0 local set=0xff0
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m) --attack up
--search S/T
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCost(cm.cost) e1:SetCost(cm.atkcost)
e1:SetTarget(cm.target) e1:SetTarget(cm.atktg)
e1:SetOperation(cm.operation) e1:SetOperation(cm.atkop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--place Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1)) e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCategory(CATEGORY_TOHAND)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_DECK)
e2:SetCountLimit(1,70052417) e2:SetCountLimit(1,70052417)
e2:SetCost(aux.bfgcost) e2:SetTarget(cm.rthtg)
e2:SetTarget(cm.tftg) e2:SetOperation(cm.rthop)
e2:SetOperation(cm.tfop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,70052418)
e3:SetCondition(aux.exccon)
e3:SetCost(cm.spcost)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end end
--search S/T --attack up
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() if chk==0 then return e:GetHandler():IsReleasable() end
if chk==0 then return c:IsDiscardable() end Duel.Release(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function cm.filter(c) function cm.atkfilter(c)
return c:IsSetCard(0xee0) and c:IsAbleToHand() return c:IsFaceup() and c:IsSetCard(0xff0) and c:GetBaseAttack()~=c:GetAttack()
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.atkfilter(chkc) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) if chk==0 then return Duel.IsExistingTarget(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SelectTarget(tp,cm.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local tc=Duel.GetFirstTarget()
local tg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil) if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if tg:GetCount()>0 then local diff=math.abs(tc:GetBaseAttack()-tc:GetAttack())
Duel.SendtoHand(tg,nil,REASON_EFFECT) local e1=Effect.CreateEffect(e:GetHandler())
Duel.ConfirmCards(1-tp,tg) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(diff)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end end
end end
--place function cm.counterfilter(c)
function cm.tffilter(c,tp) return c:IsSetCard(0xff0)
return c:IsSetCard(0xee0)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function cm.tftg(e,tp,eg,ep,ev,re,r,rp,chk) --tohand
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 function cm.rthtg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_ONFIELD)
end end
function cm.tfop(e,tp,eg,ep,ev,re,r,rp) function cm.rthop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tffilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,tp):GetFirst() if g:GetCount()>0 then
if tc then Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
--spsummon
function cm.cfilter(c)
return c:IsSetCard(0xee0) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
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)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,0,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.SelectYesNo(tp,aux.Stringid(m,3))
Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,Card.IsSummonable,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,true,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end end
end end
\ No newline at end of file
--契灵·梦尾鲛
local m=70052418
local set=0xff0
local cm=_G["c"..m]
function cm.initial_effect(c)
--attack up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_DECK)
e2:SetCountLimit(1,70052419)
e2:SetTarget(cm.rectg)
e2:SetOperation(cm.recop)
c:RegisterEffect(e2)
end
--attack up
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.filter(c)
return c:IsSetCard(0xff0) and c:IsFaceup()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(1000)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(cm.efilter)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e3:SetOwnerPlayer(tp)
tc:RegisterEffect(e3)
end
end
function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function cm.counterfilter(c)
return c:IsSetCard(0xff0)
end
--recover
function cm.recfilter(c)
return c:IsFaceup() and c:IsSetCard(0xff0)
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.recfilter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.recfilter,tp,LOCATION_MZONE,0,nil)
local rec=g:GetClassCount(Card.GetCode)*500
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,rec)
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.recfilter,tp,LOCATION_MZONE,0,nil)
local rec=g:GetClassCount(Card.GetCode)*500
Duel.Recover(tp,rec,REASON_EFFECT)
end
\ No newline at end of file
--契灵·圣遗之墟 --契灵·飞赢鱼
local m=70052420 local m=70052420
local set=0xee0 local set=0xff0
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m) --search S/T
--Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES) e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--draw skip Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetDescription(aux.Stringid(m,0))
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCategory(CATEGORY_DRAW)
e2:SetCode(EFFECT_CANNOT_DRAW) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_SZONE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e2:SetTargetRange(1,0) e2:SetCode(EVENT_TO_DECK)
e2:SetCondition(cm.skipcon) e2:SetCountLimit(1,70052421)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_DRAW_COUNT)
e3:SetValue(0)
c:RegisterEffect(e3)
--cannot be target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_ONFIELD,0)
e4:SetCondition(cm.condition)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
--atkup
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(aux.TargetBoolFunction(Card.IsCode,70052400))
e5:SetValue(cm.atkval)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e6:SetValue(aux.indoval)
c:RegisterEffect(e6)
local e7=e5:Clone()
e7:SetCode(EFFECT_EXTRA_ATTACK)
e7:SetValue(1)
c:RegisterEffect(e7)
--recover
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(m,1))
e8:SetCategory(CATEGORY_RECOVER)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e8:SetRange(LOCATION_SZONE)
e8:SetCode(EVENT_BATTLE_DAMAGE)
e8:SetCondition(cm.reccon)
e8:SetTarget(cm.rectg)
e8:SetOperation(cm.recop)
c:RegisterEffect(e8)
--atk
local e9=Effect.CreateEffect(c)
e9:SetCategory(CATEGORY_ATKCHANGE)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e9:SetCode(EVENT_ATTACK_ANNOUNCE)
e9:SetRange(LOCATION_SZONE)
e9:SetCondition(cm.atkcon)
e9:SetTarget(cm.atktg)
e9:SetOperation(cm.atkop)
c:RegisterEffect(e9)
--to hand
local e10=Effect.CreateEffect(c)
e10:SetDescription(aux.Stringid(m,2))
e10:SetCategory(CATEGORY_TOHAND)
e10:SetType(EFFECT_TYPE_IGNITION)
e10:SetProperty(EFFECT_FLAG_CARD_TARGET)
e10:SetRange(LOCATION_SZONE)
e10:SetCountLimit(1,m)
e10:SetTarget(cm.thtg)
e10:SetOperation(cm.thop)
c:RegisterEffect(e10)
end end
--Activate --search S/T
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end end
function cm.filter(c,e,sp) function cm.filter(c)
return c:IsCode(70052400) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xff0) and c:IsAbleToHand()
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp) if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
if cg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=cg:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--draw skip
function cm.skipcon(e)
return cm.condition(e) and Duel.GetCurrentPhase()==PHASE_DRAW
end
--cannot be target
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(70052400)
end
function cm.condition(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
--atkup
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,0,LOCATION_REMOVED,LOCATION_REMOVED,nil,TYPE_MONSTER)*300
end
--recover
function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
if ep==tp then return false end
local rc=eg:GetFirst()
return cm.condition(e) and rc:IsControler(tp) and rc:IsSetCard(0xee0)
end
function cm.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 end
function cm.recop(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Recover(p,d,REASON_EFFECT) local tg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
end if tg:GetCount()>0 then
--atk Duel.SendtoHand(tg,nil,REASON_EFFECT)
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,tg)
local ac=Duel.GetAttacker()
return cm.condition(e) and ac:IsFaceup() and ac:IsControler(tp) and ac:IsSetCard(0xee0)
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xee0)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(100)
tc:RegisterEffect(e1)
tc=g:GetNext()
end end
end end
--to hand function cm.counterfilter(c)
function cm.thfilter(c) return c:IsSetCard(0xff0)
return c:IsSetCard(0xee0) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) --draw
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and cm.thfilter(chkc) end function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() Duel.Draw(tp,1,REASON_EFFECT)
if tc:IsRelateToEffect(e) then Duel.Draw(1-tp,1,REASON_EFFECT)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end end
\ No newline at end of file
--契灵·暴焰㸲
local m=70052422
local set=0xff0
local cm=_G["c"..m]
function cm.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.atkcost)
e1:SetTarget(cm.atktg)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_DECK)
e2:SetCountLimit(1,70052423)
e2:SetTarget(cm.adtg)
e2:SetOperation(cm.adop)
c:RegisterEffect(e2)
end
--atkup
function cm.atkcost(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 cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xff0)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
tc:RegisterFlagEffect(m,RESET_EVENT+0x1220000+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetCondition(cm.damcon)
e2:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
Duel.RegisterEffect(e2,tp)
end
end
function cm.damcon(e)
return e:GetHandler():GetBattleTarget()~=nil
end
function cm.counterfilter(c)
return c:IsSetCard(0xff0)
end
--atk/def
function cm.adfilter(c)
return c:IsFaceup() and c:IsSetCard(0xff0)
end
function cm.adtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.adfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1000)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
\ No newline at end of file
--契灵·不恼虎
local m=70052424
local set=0xff0
local cm=_G["c"..m]
function cm.initial_effect(c)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.discon)
e1:SetCost(cm.cost)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_DECK)
e2:SetCountLimit(1,70052425)
e2:SetTarget(cm.dmtg)
e2:SetOperation(cm.dmop)
c:RegisterEffect(e2)
end
--negate
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function cm.counterfilter(c)
return c:IsSetCard(0xff0)
end
--damage
function cm.dmfilter(c)
return c:IsFaceup() and c:GetBaseAttack()>0
end
function cm.dmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.dmfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
function cm.dmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectMatchingCard(tp,cm.dmfilter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT)
end
end
\ No newline at end of file
--契灵·念佛猪 --契灵·念佛猪
local m=70052426 local m=70052426
local set=0xee0 local set=0xff0
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--control --control
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetRange(LOCATION_GRAVE) e1:SetCost(cm.cost)
e1:SetCost(aux.bfgcost)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2)) e2:SetDescription(aux.Stringid(m,3))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DESTROYED) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_TO_DECK)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,70052427) e2:SetCountLimit(1,70052427)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
--control --control
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
...@@ -44,31 +46,23 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,31 +46,23 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.GetControl(tc,tp) Duel.GetControl(tc,tp)
end end
end end
--spsummon function cm.counterfilter(c)
function cm.spfilter(c,tp) return c:IsSetCard(0xff0)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) --special summon
return eg:IsExists(cm.spfilter,1,nil,tp) and aux.exccon(e) function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_MONSTER_REBORN,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,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,0)>1 Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
and Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
and tc:IsRelateToEffect(e) then if g:GetCount()>0 then
Duel.GetControl(tc,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
--契灵·炎鬼磐蟹 --契灵·魔女仆
local m=70052428 local m=70052428
local set=0xee0 local set=0xff0
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m) --special summon
--pierce local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(cm.spcon)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetDescription(aux.Stringid(m,1))
e1:SetCode(EFFECT_PIERCE) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--double attack local e2=e1:Clone()
local e2=Effect.CreateEffect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(1)
c:RegisterEffect(e2)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,70052429)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_DECK)
e3:SetCountLimit(1,70052429)
e3:SetTarget(cm.chtg)
e3:SetOperation(cm.chop)
c:RegisterEffect(e3)
end end
--spsummon --special summon
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spfilter(c)
return ep==tp and aux.exccon(e) return c:IsSetCard(0xff0) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcon(e,c)
local c=e:GetHandler() if c==nil then return true end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end local tp=c:GetControler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler())
function cm.spop(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local e1=Effect.CreateEffect(c) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
e1:SetCode(EFFECT_UPDATE_ATTACK) end
e1:SetValue(ev) --to hand
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) function cm.thfilter(c)
c:RegisterEffect(e1) return c:IsSetCard(0xff0) and c:IsType(TYPE_MONSTER) and not c:IsCode(m) and c:IsAbleToHand()
end end
Duel.SpecialSummonComplete() 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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1)
end end
function cm.disfilter(c)
return c:IsSetCard(0xff0) and c:IsType(TYPE_MONSTER)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()==0 then return end
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,cm.disfilter,1,1,REASON_EFFECT)
end
--tohand
function cm.chfilter(c)
return c:IsSetCard(0xff0) and not c:IsCode(m) and c:IsAbleToHand()
end
function cm.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.chfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.chfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--契灵·不恼虎 --契灵·血魔剑 霸王
local m=70052430 local m=70052430
local set=0xee0 local set=0xff0
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m) --special summon
--negate local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
e0:SetCondition(cm.spcon)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--atk/def1
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_POSITION) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m) e1:SetValue(cm.atkval1)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCondition(cm.discon)
e1:SetCost(cm.discost)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk up local e2=e1:Clone()
local e2=Effect.CreateEffect(c) e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,70052431)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk/def2
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(cm.atkval2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_TO_DECK)
e5:SetCountLimit(1,m)
e5:SetTarget(cm.destg)
e5:SetOperation(cm.desop)
c:RegisterEffect(e5)
end end
--negate --special summon
function cm.discon(e,tp,eg,ep,ev,re,r,rp) function cm.spfilter(c,ft,tp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) return c:IsSetCard(0xff0) and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function cm.filter(c) function cm.spcon(e,c)
return c:IsFaceup() and c:IsSetCard(0xee0) and c:IsCanTurnSet() if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,cm.spfilter,2,nil,ft,tp)
end end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler() local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chkc then return chkc~=c and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end local g=Duel.SelectReleaseGroup(tp,cm.spfilter,2,2,nil,ft,tp)
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,c) end Duel.Release(g,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) --disable
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,c) local e1=Effect.CreateEffect(c)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) e1:SetType(EFFECT_TYPE_FIELD)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCode(EFFECT_DISABLE)
e1:SetTarget(cm.distg)
c:RegisterEffect(e1)
end end
function cm.disop(e,tp,eg,ep,ev,re,r,rp) --disable
if Duel.NegateActivation(ev) then function cm.distg(e,c)
local tc=Duel.GetFirstTarget() return c:IsType(TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.Destroy(tc,REASON_EFFECT)
end
end
end end
--atk up --atk/def1
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.atkval1(e,c)
return e:GetHandler():GetBattleTarget() local g=Duel.GetMatchingGroup(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_MONSTER)
return g:GetClassCount(Card.GetAttribute)*500
end end
function cm.tgfilter(c) --atk/def2
return c:IsSetCard(0xee0) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() function cm.atkval2(e,c)
local g=Duel.GetMatchingGroup(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_MONSTER)
return g:GetClassCount(Card.GetRace)*500
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) --destroy
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK) 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 end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) Duel.Destroy(g,REASON_EFFECT)
local c=e:GetHandler()
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and c:IsRelateToBattle() and c:IsFaceup() then
local lv=tc:GetLevel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(lv*500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e1)
end
end end
\ No newline at end of file
--契灵·圣遗之墟
local m=70052431
local set=0xff0
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)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,70052432)
e3:SetCode(EVENT_TO_DECK)
e3:SetCondition(cm.condition)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_TO_HAND)
c:RegisterEffect(e4)
--atk up
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetRange(LOCATION_FZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xff0))
e5:SetValue(500)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e6)
end
--to hand
function cm.thfilter(c)
return c:IsCode(70052400) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.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 cm.thop(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetFirstMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,nil)
if tg and Duel.SendtoHand(tg,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tg)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
--search
function cm.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousControler(tp)
and (c:IsPreviousLocation(LOCATION_GRAVE+LOCATION_REMOVED) or (c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)))
and c:IsSetCard(0xff0) and not c:IsLocation(LOCATION_EXTRA)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0 and eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.mfilter(c)
return c:IsFaceup() and c:IsCode(70052400)
end
function cm.filter(c,e,tp,chk)
return c:IsSetCard(0xff0) and c:IsType(TYPE_MONSTER)
and (c:IsAbleToHand() or chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK))
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local b=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.mfilter,tp,LOCATION_MZONE,0,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,b)
local tc=g:GetFirst()
if tc then
if b and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
\ No newline at end of file
--契灵·窥视自然
local m=70052433
local set=0xff0
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,70052434)
e2:SetCondition(cm.tohcon)
e2:SetTarget(cm.tohtg)
e2:SetOperation(cm.tohop)
c:RegisterEffect(e2)
end
--Activate
function cm.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xff0) and c:IsAbleToHand()
end
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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if #sg>0 then
Duel.BreakEffect()
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
--to hand
function cm.tohcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.tohfilter,1,nil) and not eg:IsContains(e:GetHandler())
end
function cm.tohfilter(c)
return c:IsSetCard(0xff0) and c:IsPreviousLocation(LOCATION_MZONE)
end
function cm.tohtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.tohop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--神道觉醒
local m=96071000
local set=0xff8
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function cm.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xff7) and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode()) and Duel.GetLocationCountFromEx(tp,tp,c)>0
end
function cm.filter2(c,e,tp,tcode)
return c:IsSetCard(0xff8) and c.assault_name==tcode and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=1 then return false end
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,cm.filter1,1,nil,e,tp)
end
local rg=Duel.SelectReleaseGroup(tp,cm.filter1,1,1,nil,e,tp)
e:SetLabel(rg:GetFirst():GetCode())
Duel.Release(rg,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,e:GetLabel()):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
\ No newline at end of file
--式神·风林火山 山风
local m=96071001
local set=0xff7
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--(pzone) destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(cm.pdcon)
e1:SetTarget(cm.pdtg)
e1:SetOperation(cm.pdop)
c:RegisterEffect(e1)
--disable attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--multi attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EXTRA_ATTACK)
e3:SetValue(1)
c:RegisterEffect(e3)
end
--(pzone) destroy
function cm.pdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp
end
function cm.pdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttacker():IsRelateToBattle() end
Duel.SetTargetCard(Duel.GetAttacker())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,Group.FromCards(e:GetHandler(),Duel.GetAttacker()),2,0,0)
end
function cm.pdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local g=Group.FromCards(c,tc):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==2 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--disable attack
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xff7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateAttack() and c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--神道觉醒 初翎山风
local m=96071002
local set=0xff7
local set=0xff8
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableCounterPermit(0xff)
c:SetCounterLimit(0xff,5)
--add counter
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.ctcon)
e1:SetTarget(cm.cttg)
e1:SetOperation(cm.ctop)
c:RegisterEffect(e1)
--cannot be target/indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.effcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
--atk
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetValue(cm.atkval)
e5:SetCondition(cm.atkcon)
c:RegisterEffect(e5)
--actlimit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetCode(EFFECT_CANNOT_ACTIVATE)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(0,1)
e6:SetValue(3)
e6:SetCondition(cm.eqcon)
c:RegisterEffect(e6)
--destroy
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(m,1))
e7:SetCategory(CATEGORY_DESTROY)
e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetCode(EVENT_FREE_CHAIN)
e7:SetRange(LOCATION_MZONE)
e7:SetProperty(EFFECT_FLAG_CARD_TARGET)
e7:SetCountLimit(1,m)
e7:SetCost(cm.descost)
e7:SetTarget(cm.destg)
e7:SetOperation(cm.desop)
c:RegisterEffect(e7)
end
cm.card_code_list={96071000}
cm.assault_name=96071001
--add counter
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (Duel.GetAttacker()==c or Duel.GetAttackTarget()==c)
end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0xff)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0xff,1)
end
end
--indestructable
function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0xff)>=1
end
--cannot be target
function cm.efilter(e,re,rp)
return re:IsActiveType(TYPE_MONSTER)
end
--atk
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0xff)>=2
end
function cm.atkval(e,c)
return c:GetCounter(0xff)*1000
end
--actlimit
function cm.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0xff)==3
end
--destroy
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xff,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xff,1,REASON_COST)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--式神·玉轮逐月 追月神
local m=96071003
local set=0xff7
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.pencon)
e1:SetTarget(cm.pentg)
e1:SetOperation(cm.penop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_HAND)
e2:SetRange(LOCATION_EXTRA)
e2:SetCountLimit(1,96071004)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
--draw
function cm.cfilter(c)
return c:IsSetCard(0xff7)
end
function cm.pencon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--special summon
function cm.tdfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DRAW and eg:IsExists(cm.tdfilter,1,nil,1-tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xff7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spop(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 c:IsLocation(LOCATION_HAND)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--to hand
function cm.filter(c)
return c:IsSetCard(0xff7) and c:IsAbleToDeck() and not c:IsPublic()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,cm.filter,p,LOCATION_HAND,0,1,63,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(1-p,g)
local ct=Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(p)
Duel.BreakEffect()
Duel.Draw(p,ct+1,REASON_EFFECT)
end
end
\ No newline at end of file
--式神·高天艳阳 日和坊
local m=96071005
local set=0xff7
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--reverse damage
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.negtg)
e1:SetOperation(cm.negop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CUSTOM+m)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_EXTRA)
e2:SetCountLimit(1,96071006)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(cm.supcon)
e3:SetTarget(cm.suptg)
e3:SetOperation(cm.supop)
c:RegisterEffect(e3)
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_DESTROYED)
ge1:SetCondition(cm.regcon)
ge1:SetOperation(cm.regop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(cm.cfilter,1,nil,0) then v=v+1 end
if eg:IsExists(cm.cfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,ep,e:GetLabel())
end
--reverse damage
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xff7)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tefilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tefilter),tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoExtraP(tc,nil,REASON_EFFECT) and tc:IsLocation(LOCATION_EXTRA)
and tc:GetDefense()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Recover(tp,tc:GetDefense(),REASON_EFFECT)
end
end
--special summon
function cm.tkfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return ev==tp or ev==PLAYER_ALL
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xff7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spop(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 c:IsLocation(LOCATION_HAND)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--spsummon
function cm.supcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function cm.suptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.supop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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