Commit 14ce4515 authored by Huangnan's avatar Huangnan

fix

parent 05ab455f
Pipeline #38738 passed with stages
in 36 minutes and 43 seconds
...@@ -950,7 +950,6 @@ ...@@ -950,7 +950,6 @@
21000679 0 --灾厄械灵自律电子核 21000679 0 --灾厄械灵自律电子核
21000704 0 --超能力拦截 21000704 0 --超能力拦截
21000781 0 --大原满美食汇 - 心爱甜品 21000781 0 --大原满美食汇 - 心爱甜品
21000823 0 --璃亚梦的地下演出场
21000860 0 --千川千寻 21000860 0 --千川千寻
#211 #211
21113800 1 --芳青之梦 颂枝谣 21113800 1 --芳青之梦 颂枝谣
......
...@@ -4,54 +4,53 @@ function cm.initial_effect(c) ...@@ -4,54 +4,53 @@ function cm.initial_effect(c)
c:EnableCounterPermit(0x624) c:EnableCounterPermit(0x624)
c:EnableCounterPermit(0x625,LOCATION_ONFIELD) c:EnableCounterPermit(0x625,LOCATION_ONFIELD)
--eup --eup
local ee1=Effect.CreateEffect(c)
ee1:SetType(EFFECT_TYPE_SINGLE)
ee1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ee1:SetRange(LOCATION_MZONE)
ee1:SetCode(EFFECT_UPDATE_ATTACK)
ee1:SetCondition(cm.incon)
ee1:SetValue(800)
c:RegisterEffect(ee1)
local ee2=ee1:Clone()
ee2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(ee1)
local ee3=Effect.CreateEffect(c)
ee3:SetType(EFFECT_TYPE_SINGLE)
ee3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ee3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ee3:SetRange(LOCATION_MZONE)
ee3:SetCondition(cm.incon)
ee3:SetValue(1)
c:RegisterEffect(ee3)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SEND_REPLACE) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTarget(cm.reptg) e1:SetCondition(cm.incon)
e1:SetValue(cm.repval) e1:SetValue(800)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EVENT_DESTROYED) e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.spcon2) e3:SetCondition(cm.incon)
e3:SetTarget(cm.sptg2) e3:SetValue(1)
e3:SetOperation(cm.spop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetRange(0xff)
e4:SetCondition(cm.rmcon)
e4:SetOperation(cm.rmop)
c:RegisterEffect(e4)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_DESTROYED)
e5:SetCondition(cm.spcon2)
e5:SetTarget(cm.sptg2)
e5:SetOperation(cm.spop2)
c:RegisterEffect(e5)
end end
function cm.incon(e) function cm.incon(e)
return Card.GetCounter(e:GetHandler(),0x624)>=1 return Card.GetCounter(e:GetHandler(),0x624)>=1
end end
function cm.repfilter(c,tp,card) function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
local ge=c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) local c=e:GetHandler()
return not ge and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:GetDestination()&LOCATION_GRAVE>0 and c==card return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
end end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rmop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp,c) end
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)~=0 then if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)~=0 then
--c:ReleaseEffectRelation(e) --c:ReleaseEffectRelation(e)
c:CancelToGrave() c:CancelToGrave()
...@@ -64,26 +63,25 @@ function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,26 +63,25 @@ function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
c:RegisterEffect(e1) c:RegisterEffect(e1)
c:AddCounter(0x625,2) c:AddCounter(0x625,2)
Duel.RegisterFlagEffect(tp,60002177,0,0,1) --结晶 Duel.RegisterFlagEffect(tp,60002177,0,0,1) --结晶
local e2=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_COUNTER)
e1:SetCategory(CATEGORY_COUNTER) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e2:SetCountLimit(1)
e1:SetCountLimit(1) e2:SetOperation(cm.Countdowncost)
e1:SetOperation(cm.Countdowncost) e2:SetRange(LOCATION_SZONE)
e1:SetRange(LOCATION_SZONE) e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT) c:RegisterEffect(e2)
c:RegisterEffect(e1) local e3=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_SINGLE)
e1:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetRange(LOCATION_SZONE)
e1:SetRange(LOCATION_SZONE) e3:SetCode(EFFECT_SELF_DESTROY)
e1:SetCode(EFFECT_SELF_DESTROY) e3:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT) e3:SetCondition(cm.Countdowncon)
e1:SetCondition(cm.Countdowncon) c:RegisterEffect(e3)
c:RegisterEffect(e1)
end end
return true return true
end end
...@@ -108,5 +106,7 @@ function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -108,5 +106,7 @@ function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp) function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) local c=e:GetHandler()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
c:AddCounter(0x624,1)
end end
\ No newline at end of file
...@@ -3,52 +3,52 @@ local cm,m,o=GetID() ...@@ -3,52 +3,52 @@ local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableCounterPermit(0x624) c:EnableCounterPermit(0x624)
--eup --eup
local ee1=Effect.CreateEffect(c)
ee1:SetType(EFFECT_TYPE_SINGLE)
ee1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ee1:SetRange(LOCATION_MZONE)
ee1:SetCode(EFFECT_UPDATE_ATTACK)
ee1:SetCondition(cm.incon)
ee1:SetValue(800)
c:RegisterEffect(ee1)
local ee2=ee1:Clone()
ee2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(ee2)
local ee3=Effect.CreateEffect(c)
ee3:SetDescription(aux.Stringid(m,2))
ee3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
ee3:SetType(EFFECT_TYPE_QUICK_O)
ee3:SetCode(EVENT_FREE_CHAIN)
ee3:SetRange(LOCATION_MZONE)
ee3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_NO_TURN_RESET)
ee3:SetCountLimit(1)
ee3:SetCondition(cm.incon)
ee3:SetTarget(cm.etg)
ee3:SetOperation(cm.eop)
c:RegisterEffect(ee3)
--to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCategory(CATEGORY_DRAW) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCondition(cm.incon)
e1:SetTarget(cm.tg) e1:SetValue(800)
e1:SetOperation(cm.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_NO_TURN_RESET)
e3:SetCountLimit(1)
e3:SetCondition(cm.incon)
e3:SetTarget(cm.etg)
e3:SetOperation(cm.eop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetTarget(cm.tg)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e6:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e6:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e6:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon) e6:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg) e6:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) e6:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e6)
end end
function cm.incon(e) function cm.incon(e)
return Card.GetCounter(e:GetHandler(),0x624)>=1 return Card.GetCounter(e:GetHandler(),0x624)>=1
......
...@@ -2,64 +2,63 @@ ...@@ -2,64 +2,63 @@
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableCounterPermit(0x624) c:EnableCounterPermit(0x624)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(3,m+EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(cm.descon)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
--to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_DESTROYED)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetTarget(cm.tg) e1:SetRange(LOCATION_HAND)
e1:SetOperation(cm.op) e1:SetCountLimit(3,m+EFFECT_COUNT_CODE_CHAIN)
e1:SetCondition(cm.descon)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() --to hand
e2:SetCode(EVENT_SPSUMMON_SUCCESS) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--evolve eff --evolve eff
local ee1=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
ee1:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
ee1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ee1:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
ee1:SetCode(EFFECT_UPDATE_ATTACK) e4:SetCode(EFFECT_UPDATE_ATTACK)
ee1:SetCondition(cm.econ) e4:SetCondition(cm.econ)
ee1:SetValue(cm.eval) e4:SetValue(cm.eval)
c:RegisterEffect(ee1) c:RegisterEffect(e4)
local ee2=ee1:Clone() local e5=e4:Clone()
ee2:SetCode(EFFECT_UPDATE_DEFENSE) e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(ee2) c:RegisterEffect(e5)
--change effect type --change effect type
local ee3=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
ee3:SetType(EFFECT_TYPE_FIELD) e6:SetType(EFFECT_TYPE_FIELD)
ee3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ee3:SetCode(60001542) e6:SetCode(60001542)
ee3:SetRange(LOCATION_MZONE) e6:SetRange(LOCATION_MZONE)
ee3:SetTargetRange(1,0) e6:SetTargetRange(1,0)
c:RegisterEffect(ee3) c:RegisterEffect(e6)
local ee4=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
ee4:SetDescription(aux.Stringid(m,2)) e7:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_LEAVE_GRAVE) e7:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_LEAVE_GRAVE)
ee4:SetType(EFFECT_TYPE_QUICK_O) e7:SetType(EFFECT_TYPE_QUICK_O)
ee4:SetCode(EVENT_FREE_CHAIN) e7:SetCode(EVENT_FREE_CHAIN)
ee4:SetRange(LOCATION_MZONE) e7:SetRange(LOCATION_MZONE)
ee4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_NO_TURN_RESET) e7:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_NO_TURN_RESET)
ee4:SetCountLimit(1) e7:SetCountLimit(1)
ee4:SetCondition(cm.execon) e7:SetCondition(cm.execon)
ee4:SetTarget(cm.etg) e7:SetTarget(cm.etg)
ee4:SetOperation(cm.eop) e7:SetOperation(cm.eop)
c:RegisterEffect(ee4) c:RegisterEffect(e7)
end end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) and (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE)) return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) and (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE))
...@@ -75,8 +74,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,8 +74,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.atktg) e2:SetTarget(cm.atktg)
e2:SetValue(400) e2:SetValue(400)
Duel.RegisterEffect(e2) Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end end
function cm.atktg(e,c) function cm.atktg(e,c)
return c:IsCode(60001542) and c:IsFaceup() return c:IsCode(60001542) and c:IsFaceup()
...@@ -94,7 +92,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,7 +92,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.spfil,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.spfil,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local num=Duel.GetFlagEffect(tp,m) local num=Duel.GetFlagEffect(tp,m)
c:AddCounter(0x624,num) c:AddCounter(0x624,num+1)
Duel.RegisterFlagEffect(tp,60002148,0,0,1) Duel.RegisterFlagEffect(tp,60002148,0,0,1)
end end
end end
......
...@@ -17,15 +17,15 @@ function cm.initial_effect(c) ...@@ -17,15 +17,15 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to hand --to hand
local e1=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1)) e3:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CUSTOM+m) e3:SetCode(EVENT_CUSTOM+m)
e1:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m+10000000) e3:SetCountLimit(1,m+10000000)
e1:SetTarget(cm.target) e3:SetTarget(cm.target)
e1:SetOperation(cm.activate) e3:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e3)
if not cm.global_check then if not cm.global_check then
cm.global_check=true cm.global_check=true
...@@ -43,12 +43,12 @@ function cm.thfilter(c) ...@@ -43,12 +43,12 @@ function cm.thfilter(c)
return c:IsCode(60040052) and c:IsAbleToHand() return c:IsCode(60040052) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
...@@ -11,9 +11,9 @@ function cm.initial_effect(c) ...@@ -11,9 +11,9 @@ function cm.initial_effect(c)
e1:SetTarget(cm.thtg) e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop) e1:SetOperation(cm.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e22=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e22:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e22)
if not cm.global_check then if not cm.global_check then
cm.global_check=true cm.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
...@@ -23,43 +23,40 @@ function cm.initial_effect(c) ...@@ -23,43 +23,40 @@ function cm.initial_effect(c)
ge1:SetOperation(cm.regop) ge1:SetOperation(cm.regop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
local e2=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(m,1))
e1:SetDescription(aux.Stringid(m,1)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_CUSTOM+60040075)
e1:SetCode(EVENT_CUSTOM+60040075) e2:SetRange(LOCATION_MZONE)
e1:SetRange(LOCATION_MZONE) e2:SetTarget(cm.target1)
e1:SetTarget(cm.target1) e2:SetOperation(cm.activate1)
e1:SetOperation(cm.activate1) c:RegisterEffect(e2)
c:RegisterEffect(e1) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
local e1=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetDescription(aux.Stringid(m,1)) e3:SetCode(EVENT_CUSTOM+70040075)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CUSTOM+70040075) e3:SetOperation(cm.activate2)
e1:SetRange(LOCATION_MZONE) c:RegisterEffect(e3)
e1:SetOperation(cm.activate2) local e4=Effect.CreateEffect(c)
c:RegisterEffect(e1) e4:SetDescription(aux.Stringid(m,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
local e1=Effect.CreateEffect(c) e4:SetCode(EVENT_CUSTOM+80040075)
e1:SetDescription(aux.Stringid(m,1)) e4:SetRange(LOCATION_MZONE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetTarget(cm.target3)
e1:SetCode(EVENT_CUSTOM+80040075) e4:SetOperation(cm.activate3)
e1:SetRange(LOCATION_MZONE) c:RegisterEffect(e4)
e1:SetTarget(cm.target3)
e1:SetOperation(cm.activate3)
c:RegisterEffect(e1)
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsCode(m+1) and c:IsAbleToHand() return c:IsCode(m+1) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
...@@ -93,7 +90,6 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,7 +90,6 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
...@@ -122,5 +118,5 @@ function cm.target3(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -122,5 +118,5 @@ function cm.target3(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.activate3(e,tp,eg,ep,ev,re,r,rp) function cm.activate3(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.Draw(p,d,REASON_EFFECT) Duel.Damage(p,d,REASON_EFFECT)
end end
\ No newline at end of file
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