Commit ac0504ae authored by POLYMER's avatar POLYMER

update 241028 wd

parent 65a42f3f
...@@ -5975,6 +5975,19 @@ ...@@ -5975,6 +5975,19 @@
25800380 0 25800380 0
72412110 0 72412110 0
87490445 0 87490445 0
12847415 0
12847417 0
12847419 0
60000002 0
60000003 0
60000005 0
60000007 0
60000009 0
60000010 0
60000016 0
60000017 0
87402378 0
87402379 0
#limit #limit
33403513 1 33403513 1
82204250 0 82204250 0
...@@ -6425,90 +6438,8 @@ ...@@ -6425,90 +6438,8 @@
14000701 0 14000701 0
14000702 0 14000702 0
14010201 0 14010201 0
9950020 0
9950050 0
9950051 0
9950068 0
9950086 0
9950088 0
9950111 0
9950130 0
9950149 0
9950150 0
9950170 0
9950173 0
9950186 0
9950193 0
9950514 0
9950912 0
9951092 0
9951064 0
9950939 0
9951102 0
9950154 0
9951031 0
9950177 0
9950183 0
9950915 0
9950963 0
9950144 0
9951152 0
9951293 0
9950432 0
9950433 0
9950438 0
9950507 0
9980651 0
9980653 0
9980655 0
9980663 0
9980721 0
9980739 0
9980768 0
9980778 0
9980851 0
9980860 0
9980909 0
9980919 0
9980925 0
9980929 0
9980950 0
9980969 0
9981019 0
9981115 0
9981123 0
9981130 0
9981134 0
9981153 0
9981155 0
9981167 0
9981171 0
9981175 0
9981182 0
9981194 0
9981196 0
9981197 0
9981199 0
9981203 0
9981507 0
9981510 0
9981512 0
9981513 0
9981515 0
9981517 0
9981532 0
9981536 0
9981593 0
9981582 0
9981587 0
9981596 0
9981637 0
65010102 0 65010102 0
65010328 0 65010328 0
9951073 0
9950981 0
9950996 0
9950997 0
90700001 0 90700001 0
98731001 0 98731001 0
111146448 2 111146448 2
...@@ -6536,122 +6467,8 @@ ...@@ -6536,122 +6467,8 @@
11450998 0 11450998 0
70002035 0 70002035 0
90700085 0 90700085 0
87402379 0
#limit #limit
9950000 1
9950002 1
9950014 1
9950016 1
9950017 1
9950054 1
9950056 1
9950060 1
9950065 1
9950066 1
9950067 1
9950073 1
9950076 1
9950079 1
9950082 1
9950091 1
9950099 1
9950102 1
9950103 1
9950118 1
9950121 1
9950132 1
9950142 1
9950143 1
9950145 1
9950165 1
9950166 1
9950167 1
9950190 1
9950254 1
9950925 1
9950176 1
9950978 1
9951046 1
9951043 1
9950947 1
9950547 1
9950920 1
9950279 1
9950281 1
9950276 1
9950277 1
9950278 1
9950409 1
9950436 1
9950961 1
9950411 1
9950413 1
9950423 1
9950424 1
9980111 1
9980126 1
9980173 1
9980177 1
9980178 1
9980188 1
9980194 1
9980231 1
9980232 1
9980234 1
9980235 1
9980236 1
9980237 1
9980240 1
9980241 1
9980248 1
9980251 1
9980266 1
9980276 1
9980283 1
9980295 1
9980413 1
9980439 1
9980440 1
9980444 1
9980518 1
9980579 1
9980605 1
9980606 1
9980635 1
9980636 1
9980637 1
9980647 1
9980654 1
9980713 1
9980715 1
9980717 1
9980718 1
9980724 1
9980775 1
9980823 1
9980836 1
9980845 1
9980854 1
9980858 1
9980931 1
9980949 1
9980954 1
9980990 1
9981103 1
9981132 1
9981139 1
9981140 1
9981143 1
9981145 1
9981151 1
9981152 1
9981179 1
9981181 1
9981183 1
9981202 1
9981206 1
9981504 1
9981579 1
9981632 1
14010206 1 14010206 1
33400006 1 33400006 1
33700311 1 33700311 1
...@@ -6670,37 +6487,11 @@ ...@@ -6670,37 +6487,11 @@
65010090 1 65010090 1
65010100 1 65010100 1
65010124 1 65010124 1
9951070 1
9951097 1
9951098 1
9951079 1
9951161 1
9951160 1
9950991 1
9950998 1
9951003 1
9951062 1
9951067 1
98730213 1 98730213 1
98730215 1 98730215 1
98730217 1 98730217 1
98730219 1 98730219 1
#semi limit #semi limit
9980110 2
9980129 2
9980160 2
9980163 2
9980181 2
9980186 2
9980219 2
9980243 2
9980312 2
9980746 2
9980747 2
9980774 2
9980848 2
9980853 2
9980958 2
13257316 2 13257316 2
13257346 2 13257346 2
14010084 2 14010084 2
......
No preview for this file type
...@@ -91,13 +91,14 @@ function cm.desop3(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,13 +91,14 @@ function cm.desop3(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
--if EVO_GAME then return end --if EVO_GAME then return end
EVO_GAME=true --EVO_GAME=true
local c=e:GetHandler() local c=e:GetHandler()
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_CUSTOM+m) e1:SetCode(EVENT_CUSTOM+m)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetOperation(cm.evoperation) e1:SetOperation(cm.evoperation)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
c:SetTurnCounter(0) c:SetTurnCounter(0)
end end
......
...@@ -22,7 +22,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,7 +22,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if cm[c]~=1 then if cm[c]~=1 then
if Duel.GetFlagEffect(tp,m)>0 or cm[c]==2 then cm[c]=nil return end if Duel.GetFlagEffect(tp,m)>0 or cm[c]==2 then cm[c]=nil return end
local g=Duel.GetMatchingGroup(cm.nfilter,tp,LOCATION_HAND+LOCATION_DECK,0,c) local g=Duel.GetMatchingGroup(cm.nfilter,tp,LOCATION_HAND+LOCATION_DECK,0,c)
if not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if 0==1 then -- not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
for rc in aux.Next(g) do cm[rc]=2 end for rc in aux.Next(g) do cm[rc]=2 end
return return
end end
...@@ -30,6 +30,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,6 +30,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
g:AddCard(c) g:AddCard(c)
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
if tc~=c then if tc~=c then
g:RemoveCard(c)
--Debug.Message(tc:GetLocation()) --Debug.Message(tc:GetLocation())
for rc in aux.Next(g) do cm[rc]=2 end for rc in aux.Next(g) do cm[rc]=2 end
cm[tc]=1 cm[tc]=1
...@@ -47,19 +48,20 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,19 +48,20 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if KOISHI_CHECK then if KOISHI_CHECK then
local code=g:GetFirst():GetOriginalCode() local code=g:GetFirst():GetOriginalCode()
c:SetEntityCode(code) c:SetEntityCode(code)
local ini=cm.initial_effect
cm.initial_effect=function() end
c:ReplaceEffect(m,0)
cm.initial_effect=ini
if not g:GetFirst():IsType(TYPE_NORMAL) or g:GetFirst():IsType(TYPE_PENDULUM) then if not g:GetFirst():IsType(TYPE_NORMAL) or g:GetFirst():IsType(TYPE_PENDULUM) then
c:ReplaceEffect(code,0) local cn=getmetatable(g:GetFirst())
else if cn then cn.initial_effect(c) end
local ini=cm.initial_effect --c:ReplaceEffect(code,0)
cm.initial_effect=function() end
c:ReplaceEffect(m,0)
cm.initial_effect=ini
end end
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
else else
local loc=c:GetLocation() local loc=c:GetLocation()
Duel.SendtoGrave(c,REASON_EFFECT) Duel.Remove(c,POS_FACEDOWN,REASON_RULE)
c=Duel.CreateToken(tp,g:GetFirst():GetOriginalCode()) c=Duel.CreateToken(tp,g:GetFirst():GetOriginalCode())
if loc==LOCATION_HAND then if loc==LOCATION_HAND then
Duel.SendtoHand(c,nil,0) Duel.SendtoHand(c,nil,0)
......
--司祭灵 伊西丝
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DECKDES+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,id+1)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(s.thcon)
e3:SetTarget(s.thtg1)
e3:SetOperation(s.thop1)
c:RegisterEffect(e3)
end
function s.filter(c)
return (c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_EARTH)) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if not tc then return end
local op=aux.SelectFromOptions(tp,{tc:IsAbleToHand(),1190},{tc:IsAbleToGrave(),1191})
if op==1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else Duel.SendtoGrave(tc,REASON_EFFECT) end
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK+LOCATION_HAND)
end
function s.thfilter1(c)
return c:IsCode(12847417) and c:IsAbleToHand()
end
function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,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 s.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter1),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 s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,17484499)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetCondition(s.handcon)
c:RegisterEffect(e2)
--LP
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_GRAVE)
e3:SetTargetRange(0,1)
e3:SetCondition(s.lpcon)
e3:SetOperation(s.lpop)
c:RegisterEffect(e3)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function s.setfilter(c)
return (c:IsCode(17484499) or aux.IsCodeListed(c,17484499)) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() and not c:IsCode(id)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local c=e:GetHandler()
if #g>0 then
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
if Duel.SSet(tp,tc)>0 then
if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
if tc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
end
function s.handcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
or Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)>=15
end
function s.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_DECK+LOCATION_HAND) and c:IsControler(1-tp)
end
function s.filter(c)
return c:IsCode(17484499) and (c:IsLocation(LOCATION_ONFIELD) and c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function s.lpcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
local d1=eg:FilterCount(s.cfilter,tp,1,nil)*300
Duel.Hint(HINT_CARD,0,id)
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-d1)
end
\ No newline at end of file
--古代兵神 塞赫美特
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,17484499)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,s.matfilter1,nil,nil,aux.NonTuner(nil),1,99)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetCondition(s.tgcon)
e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop)
c:RegisterEffect(e1)
--change name
aux.EnableChangeCode(c,17484499,LOCATION_MZONE+LOCATION_GRAVE)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+1)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(s.tgcon1)
e2:SetTarget(s.tgtg1)
e2:SetOperation(s.tgop1)
c:RegisterEffect(e2)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+1)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(s.tgcon1)
e3:SetTarget(s.tdtg)
e3:SetOperation(s.tdop)
c:RegisterEffect(e1)
end
function s.matfilter1(c,syncard)
return c:IsTuner(syncard) or c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_FAIRY)
end
function s.tgfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_FAIRY) and c:IsAbleToGrave()
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function s.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_DECK+LOCATION_HAND) and c:IsControler(1-tp)
end
function s.tgcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.tgtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,5) and Duel.IsPlayerCanDiscardDeck(1-tp,5) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,PLAYER_ALL,5)
end
function s.tgop1(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetDecktopGroup(tp,5)
local g2=Duel.GetDecktopGroup(1-tp,5)
g1:Merge(g2)
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g1,REASON_EFFECT)
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
...@@ -8,6 +8,7 @@ function c28317923.initial_effect(c) ...@@ -8,6 +8,7 @@ function c28317923.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DRAW_PHASE) e1:SetHintTiming(TIMING_DRAW_PHASE)
e1:SetCountLimit(2,EFFECT_COUNT_CODE_CHAIN)
e1:SetTarget(c28317923.sptg) e1:SetTarget(c28317923.sptg)
e1:SetOperation(c28317923.spop) e1:SetOperation(c28317923.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -19,6 +20,7 @@ function c28317923.initial_effect(c) ...@@ -19,6 +20,7 @@ function c28317923.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_DRAW_PHASE) e2:SetHintTiming(TIMING_DRAW_PHASE)
e2:SetCountLimit(2,EFFECT_COUNT_CODE_CHAIN)
e2:SetTarget(c28317923.fstg) e2:SetTarget(c28317923.fstg)
e2:SetOperation(c28317923.fsop) e2:SetOperation(c28317923.fsop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -28,7 +30,7 @@ function c28317923.initial_effect(c) ...@@ -28,7 +30,7 @@ function c28317923.initial_effect(c)
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_TOGRAVE+CATEGORY_DECKDES) e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_HAND+LOCATION_MZONE)
e3:SetCondition(c28317923.tgcon) e3:SetCondition(c28317923.tgcon)
e3:SetTarget(c28317923.tgtg) e3:SetTarget(c28317923.tgtg)
e3:SetOperation(c28317923.tgop) e3:SetOperation(c28317923.tgop)
...@@ -41,7 +43,7 @@ function c28317923.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,7 +43,7 @@ function c28317923.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetLP(tp)>3000 then if Duel.GetLP(tp)>3000 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000)
end end
Duel.SetChainLimit(c28317923.limit(e:GetHandler())) --Duel.SetChainLimit(c28317923.limit(e:GetHandler()))
end end
function c28317923.limit(c) function c28317923.limit(c)
return function (e,lp,tp) return function (e,lp,tp)
...@@ -81,7 +83,7 @@ function c28317923.fstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -81,7 +83,7 @@ function c28317923.fstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return res return res
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetChainLimit(c28317923.limit(e:GetHandler())) --Duel.SetChainLimit(c28317923.limit(e:GetHandler()))
end end
function c28317923.fsop(e,tp,eg,ep,ev,re,r,rp) function c28317923.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
......
...@@ -8,6 +8,7 @@ function c28318524.initial_effect(c) ...@@ -8,6 +8,7 @@ function c28318524.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DRAW_PHASE) e1:SetHintTiming(TIMING_DRAW_PHASE)
e1:SetCountLimit(2,EFFECT_COUNT_CODE_CHAIN)
e1:SetTarget(c28318524.sptg) e1:SetTarget(c28318524.sptg)
e1:SetOperation(c28318524.spop) e1:SetOperation(c28318524.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -19,6 +20,7 @@ function c28318524.initial_effect(c) ...@@ -19,6 +20,7 @@ function c28318524.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_DRAW_PHASE) e2:SetHintTiming(TIMING_DRAW_PHASE)
e2:SetCountLimit(2,EFFECT_COUNT_CODE_CHAIN)
e2:SetTarget(c28318524.fstg) e2:SetTarget(c28318524.fstg)
e2:SetOperation(c28318524.fsop) e2:SetOperation(c28318524.fsop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -28,7 +30,7 @@ function c28318524.initial_effect(c) ...@@ -28,7 +30,7 @@ function c28318524.initial_effect(c)
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_HAND+LOCATION_MZONE)
e3:SetCondition(c28318524.thcon) e3:SetCondition(c28318524.thcon)
e3:SetTarget(c28318524.thtg) e3:SetTarget(c28318524.thtg)
e3:SetOperation(c28318524.thop) e3:SetOperation(c28318524.thop)
...@@ -41,7 +43,7 @@ function c28318524.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,7 +43,7 @@ function c28318524.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetLP(tp)>3000 then if Duel.GetLP(tp)>3000 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000)
end end
Duel.SetChainLimit(c28318524.limit(e:GetHandler())) --Duel.SetChainLimit(c28318524.limit(e:GetHandler()))
end end
function c28318524.limit(c) function c28318524.limit(c)
return function (e,lp,tp) return function (e,lp,tp)
...@@ -81,7 +83,7 @@ function c28318524.fstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -81,7 +83,7 @@ function c28318524.fstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return res return res
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetChainLimit(c28318524.limit(e:GetHandler())) --Duel.SetChainLimit(c28318524.limit(e:GetHandler()))
end end
function c28318524.fsop(e,tp,eg,ep,ev,re,r,rp) function c28318524.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
......
...@@ -8,6 +8,7 @@ function c28318627.initial_effect(c) ...@@ -8,6 +8,7 @@ function c28318627.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DRAW_PHASE) e1:SetHintTiming(TIMING_DRAW_PHASE)
e1:SetCountLimit(2,EFFECT_COUNT_CODE_CHAIN)
e1:SetTarget(c28318627.sptg) e1:SetTarget(c28318627.sptg)
e1:SetOperation(c28318627.spop) e1:SetOperation(c28318627.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -19,6 +20,7 @@ function c28318627.initial_effect(c) ...@@ -19,6 +20,7 @@ function c28318627.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_DRAW_PHASE) e2:SetHintTiming(TIMING_DRAW_PHASE)
e2:SetCountLimit(2,EFFECT_COUNT_CODE_CHAIN)
e2:SetTarget(c28318627.fstg) e2:SetTarget(c28318627.fstg)
e2:SetOperation(c28318627.fsop) e2:SetOperation(c28318627.fsop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -28,7 +30,7 @@ function c28318627.initial_effect(c) ...@@ -28,7 +30,7 @@ function c28318627.initial_effect(c)
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON+CATEGORY_LEAVE_GRAVE) e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON+CATEGORY_LEAVE_GRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_HAND+LOCATION_MZONE)
e3:SetCondition(c28318627.spcon) e3:SetCondition(c28318627.spcon)
e3:SetTarget(c28318627.sptg2) e3:SetTarget(c28318627.sptg2)
e3:SetOperation(c28318627.spop2) e3:SetOperation(c28318627.spop2)
...@@ -41,7 +43,7 @@ function c28318627.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,7 +43,7 @@ function c28318627.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetLP(tp)>3000 then if Duel.GetLP(tp)>3000 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000)
end end
Duel.SetChainLimit(c28318627.limit(e:GetHandler())) --Duel.SetChainLimit(c28318627.limit(e:GetHandler()))
end end
function c28318627.limit(c) function c28318627.limit(c)
return function (e,lp,tp) return function (e,lp,tp)
...@@ -81,7 +83,7 @@ function c28318627.fstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -81,7 +83,7 @@ function c28318627.fstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return res return res
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetChainLimit(c28318627.limit(e:GetHandler())) --Duel.SetChainLimit(c28318627.limit(e:GetHandler()))
end end
function c28318627.fsop(e,tp,eg,ep,ev,re,r,rp) function c28318627.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
......
...@@ -8,6 +8,7 @@ function c28319116.initial_effect(c) ...@@ -8,6 +8,7 @@ function c28319116.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DRAW_PHASE) e1:SetHintTiming(TIMING_DRAW_PHASE)
e1:SetCountLimit(2,EFFECT_COUNT_CODE_CHAIN)
e1:SetTarget(c28319116.sptg) e1:SetTarget(c28319116.sptg)
e1:SetOperation(c28319116.spop) e1:SetOperation(c28319116.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -19,6 +20,7 @@ function c28319116.initial_effect(c) ...@@ -19,6 +20,7 @@ function c28319116.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_DRAW_PHASE) e2:SetHintTiming(TIMING_DRAW_PHASE)
e2:SetCountLimit(2,EFFECT_COUNT_CODE_CHAIN)
e2:SetTarget(c28319116.fstg) e2:SetTarget(c28319116.fstg)
e2:SetOperation(c28319116.fsop) e2:SetOperation(c28319116.fsop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -28,7 +30,7 @@ function c28319116.initial_effect(c) ...@@ -28,7 +30,7 @@ function c28319116.initial_effect(c)
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_HAND+LOCATION_MZONE)
e3:SetCondition(c28319116.decon) e3:SetCondition(c28319116.decon)
e3:SetTarget(c28319116.detg) e3:SetTarget(c28319116.detg)
e3:SetOperation(c28319116.deop) e3:SetOperation(c28319116.deop)
...@@ -41,7 +43,7 @@ function c28319116.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,7 +43,7 @@ function c28319116.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetLP(tp)>3000 then if Duel.GetLP(tp)>3000 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000)
end end
Duel.SetChainLimit(c28319116.limit(e:GetHandler())) --Duel.SetChainLimit(c28319116.limit(e:GetHandler()))
end end
function c28319116.limit(c) function c28319116.limit(c)
return function (e,lp,tp) return function (e,lp,tp)
...@@ -81,7 +83,7 @@ function c28319116.fstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -81,7 +83,7 @@ function c28319116.fstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return res return res
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetChainLimit(c28319116.limit(e:GetHandler())) --Duel.SetChainLimit(c28319116.limit(e:GetHandler()))
end end
function c28319116.fsop(e,tp,eg,ep,ev,re,r,rp) function c28319116.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
......
...@@ -8,6 +8,7 @@ function c28319225.initial_effect(c) ...@@ -8,6 +8,7 @@ function c28319225.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DRAW_PHASE) e1:SetHintTiming(TIMING_DRAW_PHASE)
e1:SetCountLimit(2,EFFECT_COUNT_CODE_CHAIN)
e1:SetTarget(c28319225.sptg) e1:SetTarget(c28319225.sptg)
e1:SetOperation(c28319225.spop) e1:SetOperation(c28319225.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -19,6 +20,7 @@ function c28319225.initial_effect(c) ...@@ -19,6 +20,7 @@ function c28319225.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_DRAW_PHASE) e2:SetHintTiming(TIMING_DRAW_PHASE)
e2:SetCountLimit(2,EFFECT_COUNT_CODE_CHAIN)
e2:SetTarget(c28319225.fstg) e2:SetTarget(c28319225.fstg)
e2:SetOperation(c28319225.fsop) e2:SetOperation(c28319225.fsop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -28,7 +30,7 @@ function c28319225.initial_effect(c) ...@@ -28,7 +30,7 @@ function c28319225.initial_effect(c)
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_HAND+LOCATION_MZONE)
e3:SetCondition(c28319225.thcon) e3:SetCondition(c28319225.thcon)
e3:SetTarget(c28319225.thtg) e3:SetTarget(c28319225.thtg)
e3:SetOperation(c28319225.thop) e3:SetOperation(c28319225.thop)
...@@ -36,8 +38,8 @@ function c28319225.initial_effect(c) ...@@ -36,8 +38,8 @@ function c28319225.initial_effect(c)
--check --check
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EVENT_PREDRAW) e4:SetCode(EVENT_PREDRAW)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetRange(0xff) e4:SetRange(0xff)
e4:SetCountLimit(1,28319225+EFFECT_COUNT_CODE_DUEL) e4:SetCountLimit(1,28319225+EFFECT_COUNT_CODE_DUEL)
e4:SetCondition(c28319225.condition) e4:SetCondition(c28319225.condition)
...@@ -51,7 +53,7 @@ function c28319225.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,7 +53,7 @@ function c28319225.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetLP(tp)>3000 then if Duel.GetLP(tp)>3000 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000)
end end
Duel.SetChainLimit(c28319225.limit(e:GetHandler())) --Duel.SetChainLimit(c28319225.limit(e:GetHandler()))
end end
function c28319225.limit(c) function c28319225.limit(c)
return function (e,lp,tp) return function (e,lp,tp)
...@@ -91,7 +93,7 @@ function c28319225.fstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -91,7 +93,7 @@ function c28319225.fstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return res return res
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetChainLimit(c28319225.limit(e:GetHandler())) --Duel.SetChainLimit(c28319225.limit(e:GetHandler()))
end end
function c28319225.fsop(e,tp,eg,ep,ev,re,r,rp) function c28319225.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
......
...@@ -12,6 +12,7 @@ function c28391031.initial_effect(c) ...@@ -12,6 +12,7 @@ function c28391031.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetHintTiming(TIMING_DRAW_PHASE) e1:SetHintTiming(TIMING_DRAW_PHASE)
e1:SetCountLimit(2,EFFECT_COUNT_CODE_CHAIN)
e1:SetTarget(c28391031.settg) e1:SetTarget(c28391031.settg)
e1:SetOperation(c28391031.setop) e1:SetOperation(c28391031.setop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -48,7 +49,7 @@ function c28391031.initial_effect(c) ...@@ -48,7 +49,7 @@ function c28391031.initial_effect(c)
--to deck --to deck
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(28391031,1)) e6:SetDescription(aux.Stringid(28391031,1))
e6:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE) e6:SetCategory(CATEGORY_TODECK+CATEGORY_DAMAGE)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_CHAINING) e6:SetCode(EVENT_CHAINING)
e6:SetProperty(EFFECT_FLAG_DELAY) e6:SetProperty(EFFECT_FLAG_DELAY)
...@@ -63,7 +64,7 @@ end ...@@ -63,7 +64,7 @@ end
function c28391031.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c28391031.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c28391031.chkfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) and not c:IsForbidden() and c:CheckUniqueOnField(tp) end if chk==0 then return Duel.IsExistingMatchingCard(c28391031.chkfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) and not c:IsForbidden() and c:CheckUniqueOnField(tp) end
Duel.SetChainLimit(c28391031.limit(e:GetHandler())) --Duel.SetChainLimit(c28391031.limit(e:GetHandler()))
end end
function c28391031.limit(c) function c28391031.limit(c)
return function (e,lp,tp) return function (e,lp,tp)
...@@ -129,16 +130,5 @@ function c28391031.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -129,16 +130,5 @@ function c28391031.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
local ag=Duel.GetMatchingGroup(c28391031.atkfilter,tp,LOCATION_MZONE,0,nil,e) Duel.Damage(1-tp,ct*500,REASON_EFFECT)
if ct>0 and #ag>0 then
for tc in aux.Next(ag) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*300)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end end
--承岚 FR-0026M
local cm,m,o=GetID()
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(0xff)
e3:SetCost(cm.icost)
e3:SetCondition(cm.icon)
e3:SetTarget(cm.itg)
e3:SetOperation(cm.iop)
c:RegisterEffect(e3)
end
function cm.filter1(c)
return c:IsPublic() and c:IsAbleToGraveAsCost()
end
function cm.filter2(c)
return c:IsSetCard(0x3623) and not c:IsCode(m) and c:IsAbleToGraveAsCost()
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.filter1,tp,LOCATION_HAND,LOCATION_HAND,1,c)
or (Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) and Duel.GetFlagEffect(tp,m)==0))
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local c=e:GetHandler()
local wt=0
if Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_HAND,LOCATION_HAND,1,c)
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) and Duel.GetFlagEffect(tp,m)==0
and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
wt=1
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
if not Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_HAND,LOCATION_HAND,1,c)
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) and Duel.GetFlagEffect(tp,m)==0 then
wt=1
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
local g=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if wt==1 then
g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK,0,1,1,nil)
elseif wt==0 then
g=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_HAND,LOCATION_HAND,1,1,c)
end
local tc=g:GetFirst()
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3623) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end
function cm.icost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
if not (c:IsPublic() or c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) then Duel.ConfirmCards(1-tp,c) end
end
function cm.icon(e,tp,eg,ep,ev,re,r,rp)
local tf=false
local c=e:GetHandler()
local loc=0
if c:IsLocation(LOCATION_DECK) then loc=1
elseif c:IsLocation(LOCATION_HAND) then loc=2
elseif c:IsLocation(LOCATION_ONFIELD) then loc=3
elseif c:IsLocation(LOCATION_GRAVE) then loc=4
elseif c:IsLocation(LOCATION_REMOVED) then loc=5 end
if loc==0 then return end
if e:GetLabel()==0 then
tf=false
elseif e:GetLabel()~=loc then
tf=true
end
e:SetLabel(loc)
return tf
end
function cm.itg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.iop(e,tp,eg,ep,ev,re,r,rp,c)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetOperatedGroup():GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetLabel(tc:GetCode())
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return se and se:GetHandler():IsCode(m) and c:GetCode()==e:GetLabel()
end
\ No newline at end of file
--承岚 FR-0045B
local cm,m,o=GetID()
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_HAND)
e1:SetCondition(cm.discon)
e1:SetCost(cm.discost)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(0xff)
e3:SetCost(cm.icost)
e3:SetCondition(cm.icon)
e3:SetTarget(cm.itg)
e3:SetOperation(cm.iop)
c:RegisterEffect(e3)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.IsChainNegatable(ev)
end
function cm.costfilter1(c)
return c:IsPublic() and c:IsAbleToGraveAsCost()
end
function cm.costfilter2(c)
return c:IsSetCard(0x3623) and c:IsAbleToGraveAsCost()
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost()
and (Duel.IsExistingMatchingCard(cm.costfilter1,tp,LOCATION_HAND,LOCATION_HAND,1,c)
or (Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_HAND,0,1,c)
and Duel.GetFlagEffect(tp,m))) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=nil
local wt=0
if Duel.IsExistingMatchingCard(cm.costfilter1,tp,LOCATION_HAND,LOCATION_HAND,1,c)
and Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_HAND,0,1,c)
and Duel.GetFlagEffect(tp,m)==0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
wt=1
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
elseif not Duel.IsExistingMatchingCard(cm.costfilter1,tp,LOCATION_HAND,LOCATION_HAND,1,c)
and Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_HAND,0,1,c)
and Duel.GetFlagEffect(tp,m)==0 then
wt=1
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
if wt==1 then
g=Duel.SelectMatchingCard(tp,cm.costfilter2,tp,LOCATION_HAND,0,1,1,c)
elseif wt==0 then
g=Duel.SelectMatchingCard(tp,cm.costfilter1,tp,LOCATION_HAND,LOCATION_HAND,1,1,c)
end
g:AddCard(c)
Duel.SendtoGrave(g,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.icost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
if not (c:IsPublic() or c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) then Duel.ConfirmCards(1-tp,c) end
end
function cm.icon(e,tp,eg,ep,ev,re,r,rp)
local tf=false
local c=e:GetHandler()
local loc=0
if c:IsLocation(LOCATION_DECK) then loc=1
elseif c:IsLocation(LOCATION_HAND) then loc=2
elseif c:IsLocation(LOCATION_ONFIELD) then loc=3
elseif c:IsLocation(LOCATION_GRAVE) then loc=4
elseif c:IsLocation(LOCATION_REMOVED) then loc=5 end
if loc==0 then return end
if e:GetLabel()==0 then
tf=false
elseif e:GetLabel()~=loc then
tf=true
Duel.RegisterFlagEffect(tp,m+10000000,0,0,1)
end
e:SetLabel(loc)
return tf
end
function cm.itg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(500*Duel.GetFlagEffect(tp,m+10000000))
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500*Duel.GetFlagEffect(tp,m+10000000))
end
function cm.iop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_CARD,0,m)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
--承岚 FR-1035B
local cm,m,o=GetID()
function cm.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_REMOVE+CATEGORY_TODECK+CATEGORY_LEAVE_GRAVE)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(0xff)
e3:SetCost(cm.icost)
e3:SetCondition(cm.icon)
e3:SetTarget(cm.itg)
e3:SetOperation(cm.iop)
c:RegisterEffect(e3)
end
function cm.fil1(c)
return c:IsSetCard(0x3623) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.fil2(c,e,tp,code1)
return c:IsSetCard(0x3623) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not c:IsCode(code1)
end
function cm.fil3(c,code1,code2)
return c:IsSetCard(0x3623) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and c:IsFaceup()
and not c:IsCode(code1) and not c:IsCode(code2)
end
function cm.fil4(c,code1,code2,code3)
return c:IsSetCard(0x3623) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
and not c:IsCode(code1) and not c:IsCode(code2) and not c:IsCode(code3)
end
function cm.fil5(c,code1,code2,code3,code4)
return c:IsSetCard(0x3623) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
and not c:IsCode(code1) and not c:IsCode(code2) and not c:IsCode(code3) and not c:IsCode(code4)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local code={}
if Duel.IsExistingMatchingCard(cm.fil1,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
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 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
code[1]=Duel.GetOperatedGroup():GetFirst():GetCode()
Duel.ConfirmCards(1-tp,g)
else
code[1]=0
end
else
code[1]=0
end
Duel.BreakEffect()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.fil2,tp,LOCATION_HAND,0,1,nil,e,tp,code[1])
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.fil2,tp,LOCATION_HAND,0,1,1,nil,e,tp,code[1])
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
code[2]=Duel.GetOperatedGroup():GetFirst():GetCode()
else
code[2]=0
end
else
code[2]=0
end
Duel.BreakEffect()
if Duel.IsExistingMatchingCard(cm.fil3,tp,LOCATION_MZONE,0,1,nil,code[1],code[2]) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.fil3,tp,LOCATION_MZONE,0,1,1,nil,code[1],code[2])
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
code[3]=Duel.GetOperatedGroup():GetFirst():GetCode()
else
code[3]=0
end
else
code[3]=0
end
Duel.BreakEffect()
if Duel.IsExistingMatchingCard(cm.fil4,tp,LOCATION_GRAVE,0,1,nil,code[1],code[2],code[3]) and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.fil4,tp,LOCATION_GRAVE,0,1,1,nil,code[1],code[2],code[3])
if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
code[4]=Duel.GetOperatedGroup():GetFirst():GetCode()
else
code[4]=0
end
else
code[4]=0
end
Duel.BreakEffect()
if Duel.IsExistingMatchingCard(cm.fil5,tp,LOCATION_REMOVED,0,1,nil,code[1],code[2],code[3],code[4]) and Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.fil5,tp,LOCATION_REMOVED,0,1,1,nil,code[1],code[2],code[3],code[4])
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
end
function cm.icost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
if not (c:IsPublic() or c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) then Duel.ConfirmCards(1-tp,c) end
end
function cm.icon(e,tp,eg,ep,ev,re,r,rp)
local tf=false
local c=e:GetHandler()
local loc=0
if c:IsLocation(LOCATION_DECK) then loc=1
elseif c:IsLocation(LOCATION_HAND) then loc=2
elseif c:IsLocation(LOCATION_ONFIELD) then loc=3
elseif c:IsLocation(LOCATION_GRAVE) then loc=4
elseif c:IsLocation(LOCATION_REMOVED) then loc=5 end
if loc==0 then return end
if e:GetLabel()==0 then
tf=false
elseif e:GetLabel()~=loc then
tf=true
end
e:SetLabel(loc)
return tf
end
function cm.itg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
end
function cm.iop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_CARD,0,m)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.DiscardDeck(p,d,REASON_EFFECT)
end
\ No newline at end of file
--承岚 FR-0023R
local cm,m,o=GetID()
function cm.initial_effect(c)
--extra summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e2:SetRange(LOCATION_MZONE)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_EXTRA_SET_COUNT)
c:RegisterEffect(e3)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(0xff)
e3:SetCost(cm.icost)
e3:SetCondition(cm.icon)
e3:SetTarget(cm.itg)
e3:SetOperation(cm.iop)
c:RegisterEffect(e3)
end
function cm.icost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
if not (c:IsPublic() or c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) then Duel.ConfirmCards(1-tp,c) end
end
function cm.icon(e,tp,eg,ep,ev,re,r,rp)
local tf=false
local c=e:GetHandler()
local loc=0
if c:IsLocation(LOCATION_DECK) then loc=1
elseif c:IsLocation(LOCATION_HAND) then loc=2
elseif c:IsLocation(LOCATION_ONFIELD) then loc=3
elseif c:IsLocation(LOCATION_GRAVE) then loc=4
elseif c:IsLocation(LOCATION_REMOVED) then loc=5 end
if loc==0 then return end
if e:GetLabel()==0 then
tf=false
elseif e:GetLabel()~=loc then
tf=true
end
e:SetLabel(loc)
return tf
end
function cm.itg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_MZONE)
end
function cm.iop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
if tc and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0
and tc:IsLocation(LOCATION_REMOVED) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetValue(Duel.GetTurnCount())
tc:RegisterFlagEffect(m,RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
e1:SetValue(0)
tc:RegisterFlagEffect(m,RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1)
end
Duel.RegisterEffect(e1,tp)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp or Duel.GetTurnCount()==e:GetValue() then return false end
return e:GetLabelObject():GetFlagEffect(m)~=0
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.ReturnToField(tc)
end
\ No newline at end of file
--承岚 FR-0036A
local cm,m,o=GetID()
function cm.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(0xff)
e3:SetCost(cm.icost)
e3:SetCondition(cm.icon)
e3:SetTarget(cm.itg)
e3:SetOperation(cm.iop)
c:RegisterEffect(e3)
end
function cm.drfil1(c)
return c:IsPublic() and c:IsAbleToGrave()
end
function cm.drfil2(c)
return c:IsSetCard(0x3623) and c:IsAbleToRemove()
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.drfil1,tp,LOCATION_HAND,LOCATION_HAND,1,nil)
or (Duel.IsExistingMatchingCard(cm.drfil2,tp,LOCATION_GRAVE,0,1,nil) and Duel.GetFlagEffect(tp,m)==0)) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local wt=0
if Duel.IsExistingMatchingCard(cm.drfil1,tp,LOCATION_HAND,LOCATION_HAND,1,nil)
and Duel.IsExistingMatchingCard(cm.drfil2,tp,LOCATION_GRAVE,0,1,nil)
and Duel.GetFlagEffect(tp,m)==0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
wt=1
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
if not Duel.IsExistingMatchingCard(cm.drfil1,tp,LOCATION_HAND,LOCATION_HAND,1,nil)
and Duel.IsExistingMatchingCard(cm.drfil2,tp,LOCATION_GRAVE,0,1,nil)
and Duel.GetFlagEffect(tp,m)==0 then
wt=1
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
local g=nil
local num=0
if wt==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=Duel.SelectMatchingCard(tp,cm.drfil12,tp,LOCATION_GRAVE,0,1,1,nil)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then num=num+1 end
if Duel.IsExistingMatchingCard(cm.drfil1,tp,LOCATION_HAND,LOCATION_HAND,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
gg=Duel.SelectMatchingCard(tp,cm.drfil11,tp,LOCATION_HAND,LOCATION_HAND,1,1,nil)
if Duel.SendtoGrave(gg,REASON_EFFECT)~=0 then num=num+1 end
end
elseif wt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=Duel.SelectMatchingCard(tp,cm.drfil11,tp,LOCATION_HAND,LOCATION_HAND,1,2,nil)
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then num=#Duel.GetOperatedGroup() end
end
Duel.Draw(tp,num,REASON_EFFECT)
end
function cm.icost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
if not (c:IsPublic() or c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) then Duel.ConfirmCards(1-tp,c) end
end
function cm.icon(e,tp,eg,ep,ev,re,r,rp)
local tf=false
local c=e:GetHandler()
local loc=0
if c:IsLocation(LOCATION_DECK) then loc=1
elseif c:IsLocation(LOCATION_HAND) then loc=2
elseif c:IsLocation(LOCATION_ONFIELD) then loc=3
elseif c:IsLocation(LOCATION_GRAVE) then loc=4
elseif c:IsLocation(LOCATION_REMOVED) then loc=5 end
if loc==0 then return end
if e:GetLabel()==0 then
tf=false
elseif e:GetLabel()~=loc then
tf=true
Duel.RegisterFlagEffect(tp,m+10000000,0,0,1)
end
e:SetLabel(loc)
return tf
end
function cm.itg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,1)
end
function cm.iop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,Duel.GetFlagEffect(tp,m+10000000),nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
\ No newline at end of file
--承岚 FR-1030D
local cm,m,o=GetID()
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,cm.mfilter,1)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_PUBLIC)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_HAND,LOCATION_HAND)
c:RegisterEffect(e2)
end
function cm.mfilter(c)
return c:IsLinkRace(RACE_WARRIOR) and not c:IsType(TYPE_LINK)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.filter(c)
return c:IsSetCard(0x3623) and c:IsAbleToHand() and (c:IsLocation(LOCATION_DECK) or (c:IsLocation(LOCATION_REMOVED) and c:IsFaceup()))
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+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
--承岚 EMPRESS
local cm,m,o=GetID()
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,cm.lcheck)
c:EnableReviveLimit()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_PUBLIC)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_HAND,LOCATION_HAND)
c:RegisterEffect(e2)
--negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.discon)
e4:SetCost(cm.discost)
e4:SetTarget(cm.distg)
e4:SetOperation(cm.disop)
c:RegisterEffect(e4)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TODECK+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
end
function cm.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x3623)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,LOCATION_HAND,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsPublic,tp,LOCATION_HAND,LOCATION_HAND,1,1,nil)
Duel.SendtoGrave(g,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)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0
and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.filter1(c)
return c:IsSetCard(0x3623) and c:IsAbleToGrave()
end
function cm.filter2(c)
return c:IsAbleToDeck()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil)
or Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local b1=false
local b2=false
if Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) then b1=true end
if Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) then b2=true end
if b1==true and b2==true then
op=aux.SelectFromOptions(tp,{b1,aux.Stringid(m,1)},{b2,aux.Stringid(m,2)})
elseif b1==true and b2==false then
op=1
elseif b1==false and b2==true then
op=2
else return end
if op==1 then
local g=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
aux.GCheckAdditional=aux.dncheck
local hg=g:SelectSubGroup(tp,aux.TRUE,false,1,#g)
aux.GCheckAdditional=nil
if hg and #hg>0 then Duel.SendtoGrave(hg,REASON_EFFECT) end
elseif op==2 then
local g=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if g and #g>0 then Duel.SendtoDeck(g,nil,2,REASON_EFFECT) end
end
end
function cm.spcheck(g)
return g:GetClassCount(Card.GetCode)==g:GetCount()
end
\ No newline at end of file
--承岚 扭转万象
local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(0xff)
e3:SetCost(cm.icost)
e3:SetCondition(cm.icon)
e3:SetTarget(cm.itg)
e3:SetOperation(cm.iop)
c:RegisterEffect(e3)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lp=Duel.GetLP(tp)
if chk==0 then return Duel.CheckLPCost(tp,lp-1,true) end
e:SetLabel(lp-1)
Duel.PayLPCost(tp,lp-1,true)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WARRIOR))
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WARRIOR))
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(cm.efilter)
Duel.RegisterEffect(e1,tp)
if c:IsRelateToEffect(e) and c:IsCanTurnSet() and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
function cm.icost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
if not (c:IsPublic() or c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) then Duel.ConfirmCards(1-tp,c) end
end
function cm.icon(e,tp,eg,ep,ev,re,r,rp)
local tf=false
local c=e:GetHandler()
local loc=0
if c:IsLocation(LOCATION_DECK) then loc=1
elseif c:IsLocation(LOCATION_HAND) then loc=2
elseif c:IsLocation(LOCATION_ONFIELD) then loc=3
elseif c:IsLocation(LOCATION_GRAVE) then loc=4
elseif c:IsLocation(LOCATION_REMOVED) then loc=5 end
if loc==0 then return end
if e:GetLabel()==0 then
tf=false
elseif e:GetLabel()~=loc then
tf=true
end
e:SetLabel(loc)
return tf
end
function cm.itg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
end
function cm.iop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_CARD,0,m)
if Duel.SSet(tp,e:GetHandler())~=0 then
if Duel.GetCurrentPhase()==PHASE_END then return end
local turnp=Duel.GetTurnPlayer()
Duel.SkipPhase(turnp,PHASE_STANDBY,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(turnp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,turnp)
end
end
--云端星灵 希恩克尔
local m=87402378
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:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--summon success
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(cm.sumsuc)
c:RegisterEffect(e2)
--redirect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e3:SetValue(LOCATION_DECK)
e3:SetCondition(cm.condition)
c:RegisterEffect(e3)
end
cm.check_setname="云端星灵"
function cm.check(c)
return not c:IsPublic()
end
function cm.thcheck(c,typ)
return (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsAbleToHand() and not c:IsType(typ)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) then return end
local g=Duel.GetMatchingGroup(cm.check,tp,LOCATION_HAND,0,nil)
Duel.ConfirmCards(1-tp,g)
local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local exist=0
for tc in aux.Next(hg) do
exist=exist|tc:GetType()&0x7
end
local g=Duel.GetMatchingGroup(cm.thcheck,tp,LOCATION_REMOVED+LOCATION_GRAVE+LOCATION_DECK,0,nil,exist)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:SelectSubGroup(tp,cm.gcheck,false,1,3)
if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function cm.gcheck(g)
return g:FilterCount(Card.IsType,nil,TYPE_MONSTER)<=1
and g:FilterCount(Card.IsType,nil,TYPE_SPELL)<=1
and g:FilterCount(Card.IsType,nil,TYPE_TRAP)<=1
end
function cm.condition(e)
return e:GetHandler():IsFaceup()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg=Duel.GetRitualMaterialEx(tp):Filter(Card.IsAbleToDeck,nil)
return cm.RitualUltimateFilter(c,nil,e,tp,mg,nil,aux.GetCappedAttack,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND+LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
::cancel::
local mg=Duel.GetRitualMaterialEx(tp):Filter(Card.IsAbleToDeck,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if cm.RitualUltimateFilter(e:GetHandler(),nil,e,tp,mg,nil,aux.GetCappedAttack,"Greater") then
local tc=e:GetHandler()
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
aux.GCheckAdditional=cm.RitualCheckAdditional(tc,tc:GetAttack(),"Greater")
local mat=mg:SelectSubGroup(tp,cm.RitualCheck,true,1,#mg,tp,tc,tc:GetAttack(),"Greater")
aux.GCheckAdditional=nil
if not mat then goto cancel end
tc:SetMaterial(mat)
Duel.SendtoDeck(mat,nil,2,REASON_EFFECT+REASON_RITUAL)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function cm.RitualCheckGreater(g,c,atk)
if atk==0 then return false end
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(aux.GetCappedAttack,atk)
end
function cm.RitualCheckEqual(g,c,atk)
if atk==0 then return false end
return g:CheckWithSumEqual(aux.GetCappedAttack,atk,#g,#g)
end
function cm.RitualCheck(g,tp,c,atk,greater_or_equal)
return cm["RitualCheck"..greater_or_equal](g,c,atk) and Duel.GetMZoneCount(tp,g,tp)>0 and (not c.mat_group_check or c.mat_group_check(g,tp))
and (not aux.RCheckAdditional or aux.RCheckAdditional(tp,g,c))
end
function cm.RitualCheckAdditional(c,atk,greater_or_equal)
if greater_or_equal=="Equal" then
return function(g)
return (not aux.RGCheckAdditional or aux.RGCheckAdditional(g)) and g:GetSum(aux.GetCappedAttack)<=atk
end
else
return function(g,ec)
if atk==0 then return #g<=1 end
if ec then
return (not aux.RGCheckAdditional or aux.RGCheckAdditional(g,ec)) and g:GetSum(aux.GetCappedAttack)-aux.GetCappedAttack(ec)<=atk
else
return not aux.RGCheckAdditional or aux.RGCheckAdditional(g)
end
end
end
end
function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,attack_function,greater_or_equal,chk)
if bit.band(c:GetType(),0x81)~=0x81 or (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then
mg:Merge(m2)
end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
else
mg:RemoveCard(c)
end
local atk=3000
aux.GCheckAdditional=cm.RitualCheckAdditional(c,atk,greater_or_equal)
local res=mg:CheckSubGroup(cm.RitualCheck,1,#mg,tp,c,atk,greater_or_equal)
aux.GCheckAdditional=nil
return res
end
\ No newline at end of file
--地底王灵 塔尔塔萝斯
function c87402379.initial_effect(c)
c:EnableReviveLimit()
--copy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetCountLimit(1,87402379)
e1:SetCost(c87402379.cpcost)
e1:SetTarget(c87402379.cptg)
e1:SetOperation(c87402379.cpop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c87402379.rmcon)
e2:SetTarget(c87402379.rmtg)
e2:SetOperation(c87402379.rmop)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c87402379.rmtg)
e2:SetOperation(c87402379.rmop)
c:RegisterEffect(e2)
--to deck
--negate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c87402379.tdcon)
e2:SetOperation(c87402379.tdop)
c:RegisterEffect(e2)
end
function c87402379.cpfilter(c)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_RITUAL) and c:IsAbleToRemoveAsCost()
and c:CheckActivateEffect(true,true,false)~=nil
end
function c87402379.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function c87402379.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c87402379.cpfilter,tp,LOCATION_DECK,0,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c87402379.cpfilter,tp,LOCATION_DECK,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(true,true,true)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function c87402379.cpop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te then
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
function c87402379.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c87402379.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c87402379.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil,POS_FACEDOWN):GetFirst()
if rc and Duel.Remove(rc,POS_FACEDOWN,REASON_EFFECT)~=0 then
rc:RegisterFlagEffect(87402379,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
function c87402379.tdfil(c)
return c:IsAbleToDeck() and c:GetFlagEffect(87402379)~=0
end
function c87402379.tdcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsExistingMatchingCard(c87402379.tdfil,tp,LOCATION_REMOVED,0,1,nil)
end
function c87402379.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(c87402379.tdfil,tp,LOCATION_REMOVED,0,1,nil) and Duel.SelectEffectYesNo(tp,c,aux.Stringid(87402379,0)) then
local tc=Duel.SelectMatchingCard(tp,c87402379.tdfil,tp,LOCATION_REMOVED,0,1,1,nil):GetFirst()
Duel.ConfirmCards(1-tp,tc)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
local ctype=0
if tc:IsType(TYPE_MONSTER) then ctype=bit.bor(ctype,TYPE_MONSTER) end
if tc:IsType(TYPE_SPELL) then ctype=bit.bor(ctype,TYPE_SPELL) end
if tc:IsType(TYPE_TRAP) then ctype=bit.bor(ctype,TYPE_TRAP) end
if re:IsActiveType(ctype) and Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(re:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
end
end
...@@ -784,10 +784,9 @@ ...@@ -784,10 +784,9 @@
!setname 0x6622 瀚海晏霞 !setname 0x6622 瀚海晏霞
!setname 0xa622 十天众 !setname 0xa622 十天众
!setname 0xc622 枢机神 !setname 0xc622 枢机神
!setname 0x3623 承岚
!setname 0x626 黄昏 !setname 0x626 黄昏
!setname 0x3626 黄昏之骑士 !setname 0x3626 黄昏之骑士
!setname 0x62e 圣兽装骑 !setname 0x62e 圣兽装骑
!setname 0x362e 圣兽装骑·鲸 !setname 0x362e 圣兽装骑·鲸
!setname 0x562e 圣兽装骑·鲨 !setname 0x562e 圣兽装骑·鲨
......
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