Commit 99db88a5 authored by Huangnan's avatar Huangnan

fix

parent cf8394c2
Pipeline #40807 failed with stages
in 4 minutes and 20 seconds
No preview for this file type
......@@ -72,7 +72,7 @@
01234568 0 --破灭召唤之剑
01257000 0 --轨道标枪
#013
#01300901 1 --栖夜莉丝
01300901 1 --栖夜莉丝
01300910 2 --白昼梦
01300911 0 --青空梦
01300900 0 --妮蒂亚
......@@ -1173,7 +1173,7 @@
18700062 2 --血罪灵骸·嗔罪骸蛇
18700067 1 --天魔血罪·万千苦厄皆呓语·十恶埋骨·原罪骸灵
18700087 1 --灾绝灭术·归鸿
18700090 1 --奇物-16 真相没于虚假
18700090 0 --奇物-16 真相没于虚假
18700132 1 --无常戏伶 芙蕾娜·维尔薇特
18700136 0 --朔月寻物 奇归黑塔
18700151 1 --祈星魔女之凭依
......@@ -1190,7 +1190,7 @@
18700320 0 --温迪戈-风铃山谷
18700324 1 --奇物-13 错落巡航表
18700380 0 --奇物-12 困于渊洋
18700408 0 --奇物-44 引灯重明
18700408 1 --奇物-44 引灯重明
18700556 0 --封藏此刻
18700195 0 --升阶魔法-超时空巡征追猎
18700165 1 --祈星魔女 夏璃
......@@ -1222,6 +1222,11 @@
18700476 0 --祈星连携·共赴同心
18700169 1 --祈星魔女之祈祷
18700130 1 --奇物-36 蓝槿罗之华
18700254 0 --奇物-73 镜中如我
18700732 0 --奇物-123 自适舒压剂
18700094 1 --黑月塔主 索斯芙娅·塔维尔
18700091 1 --朔月黑塔
18700548 1 --雾海寂渊·白喰若璃
#190
19023163 0 --渊海·禁域
#192
......@@ -2249,7 +2254,7 @@
50220130 1 --觉醒的伏龙-月蚀
50220135 1 --觉醒的伏龙-日珥
50221425 1 --符龙王-魔咒
50223135 0 --狂之数码兽 悟空兽
50223135 1 --狂之数码兽 悟空兽
50223155 1 --天王数码兽 钢铁海龙兽
50224085 0 --寒之数码兽 雪人兽
50224175 1 --尖尖碰碰拳
......@@ -2593,6 +2598,24 @@
60007244 0 --罗德岛·近卫干员-霜叶
60010225 1 --景元-天戈麾斥-
60010226 1 --拂晓之前
60010232 1 --白露-衔药龙女-
60010233 1 --时节不居
60010234 1 --罗刹-寻索世间-
60010235 1 --棺的回响
60012002 1 --唯有沉默
60012004 1 --比阳光更明亮的
60012005 1 --彦卿-剑胎武骨-
60012006 1 --如泥酣眠
60012008 1 --我将,巡征追猎
60012009 1 --素裳-游刃若水-
60012010 1 --论剑
60012011 1 --停云-玲珑八面-
60012012 1 --镂月裁云之意
60012014 1 --长路终有归途
60012016 1 --过往未来
60012018 1 --此身为剑
60012019 0 --云璃-掷山破云-
60012020 0 --落日时起舞
#601
60150608 2 --千夜 娱乐屋
......@@ -2940,6 +2963,7 @@
75640150 1 --虚拟主播 甘城猫猫
75640151 1 --甜点时刻 甘城猫猫
75646463 0 --便携模式 菲米莉丝
75600168 0 --心械之地 红理惠
#757
75739001 0 --幻灵调和
75739002 0 --红幻灵
......@@ -2953,13 +2977,15 @@
75739011 0 --幻灵创生
75739012 0 --幻灵爆发
75739013 0 --幻灵威吓
#777
#77707704 0 --大罪之器 克洛克沃克人偶
77707704 0 --大罪之器 克洛克沃克人偶
77707705 0 --Vessel of Sin 祸世之剪
77707706 0 --大罪之器 马隆汤匙
77777777 0 --Paganini Caprice Number 24
77707702 0 --大罪之器 维诺姆之剑
77707703 2 --大罪之器 康琪塔酒杯
#780
78021000 0 --幻星神 阿斯特提
#791
......
......@@ -19,7 +19,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCountLimit(1,id+20000)
e1:SetTarget(s.tg1)
e1:SetOperation(s.op1)
c:RegisterEffect(e1)
......
......@@ -29,7 +29,6 @@ function s.initial_effect(c)
e3:SetCode(EVENT_CHANGE_POS)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+20000)
e3:SetCondition(s.rmcon)
e3:SetTarget(s.rmtg)
e3:SetOperation(s.rmop)
c:RegisterEffect(e3)
......@@ -62,14 +61,6 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
--
function s.cfilter(c,tp)
local np=c:GetPosition()
local pp=c:GetPreviousPosition()
return c:IsReason(REASON_EFFECT) and ((pp==0x1 and np==0x4) or (pp==0x4 and np==0x1))
end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
......
......@@ -44,11 +44,11 @@ function s.atkval(e,c)
return g:GetCount()*500
end
--
function s.filter(c,tp)
function s.filter(c,e,tp)
return c:IsSetCard(0x52a3) and (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 ) or (c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.cfilter(c)
......@@ -56,7 +56,7 @@ function s.cfilter(c)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
if tc:IsType(TYPE_SPELL+TYPE_TRAP) then
Duel.SSet(tp,tc)
......
......@@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
if Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local dg=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local dg=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
if dg:GetCount()>0 then
Duel.ChangePosition(dg,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
......@@ -107,14 +107,14 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,tp) then
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if tc then
local s1=tc:IsAbleToHand()
local s2=(tc:IsType(TYPE_SPELL+TYPE_TRAP) and tc:IsSSetable() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) or (tc:IsType(TYPE_MONSTER) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
if s1 and (not s2 or Duel.SelectYesNo(tp,aux.Stringid(id,2))) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
else
if tc:IsType(TYPE_SPELL+TYPE_TRAP) then
Duel.SSet(tp,tc)
......
......@@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
if Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local dg=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local dg=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
if dg:GetCount()>0 then
Duel.ChangePosition(dg,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
......
......@@ -2,5 +2,160 @@
local m=16104439
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep2(c,cm.ffilter1,2,99,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToExtra,LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_HAND,0,Duel.SendtoExtraP,nil,REASON_COST)
--P effect
local custom_code=aux.RegisterMergedDelayedEvent_ToSingleCard(c,m,EVENT_CHAINING)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.pseltg)
e1:SetOperation(cm.pselop)
c:RegisterEffect(e1)
local e1_1=Effect.CreateEffect(c)
e1_1:SetDescription(aux.Stringid(m,3))
e1_1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1_1:SetRange(LOCATION_PZONE)
e1_1:SetProperty(EFFECT_FLAG_DELAY)
e1_1:SetCountLimit(1,m)
e1_1:SetCode(custom_code)
e1_1:SetCondition(cm.ptricon)
e1_1:SetTarget(cm.ptritg)
e1_1:SetOperation(cm.ptriop)
c:RegisterEffect(e1_1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(cm.setop)
c:RegisterEffect(e2)
--Effect Add Summon Proc
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.namecon)
e4:SetTarget(cm.target)
e4:SetOperation(cm.operation)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(0,TIMING_END_PHASE)
e5:SetCondition(cm.namecon2)
c:RegisterEffect(e5)
if not cm.globalcheck then
cm.globalcheck = true
_Regi_Card = Card.RegisterEffect
_Regi_Player = Duel.RegisterEffect
Card.RegisterEffect = function (card,effect,...)
local con = effect:GetCondition() or aux.TRUE
effect:SetCondition(cm.hackcon(con,c:GetOriginalCodeRule()))
return _Regi_Card(card,effect,...)
end
Duel.RegisterEffect = function (effect,player)
local con = effect:GetCondition() or aux.TRUE
effect:SetCondition(cm.hackcon(con,effect:GetOwner():GetOriginalCodeRule()))
return _Regi_Player(effect,player)
end
end
end
function cm.ffilter1(c)
return c:IsSetCard(0xccb)
end
function cm.isinclude(table,code)
for _,v in ipairs(table) do
if v==code then
return true
end
end
return false
end
function cm.hackcon(con,code)
return function (e,tp,eg,ep,ev,re,r,rp)
local tb = {Duel.GetFlagEffectLabel(0,m)}
local tb2 = {Duel.GetFlagEffectLabel(1,m)}
return con(e,tp,eg,ep,ev,re,r,rp) and not (cm.isinclude(tb,code) or cm.isinclude(tb2,code))
end
end
function cm.pseltg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.pselop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,tp,tp,false,false,POS_FACEUP)
end
end
function cm.ptricon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetCount()>0 and rp==1-tp
end
function cm.ptritg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.ptriop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(tp,eg)
local g=eg:Select(tp,1,1,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
local code=tc:GetOriginalCodeRule()
if code then
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,2,code)
end
end
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(Card.IsCanChangePosition,tp,0,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSITION)
local sg=g:Select(tp,1,1,nil)
Duel.ChangePosition(sg,POS_FACEDOWN)
end
function cm.namecon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,m)
end
function cm.namecon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,m)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil,tp)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:IsFacedown() then
Duel.ConfirmCards(tp,tc)
end
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,tc:GetType()&0x7)
for gc in aux.Next(g) do
if gc:IsFacedown() then
Duel.ConfirmCards(tp,gc)
end
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CANNOT_TRIGGER)
e1_1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1_1)
end
end
end
\ No newline at end of file
......@@ -36,7 +36,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not e:GetHandler():IsLocation(LOCATION_HAND)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function cm.desfilter(c)
return not c:IsLocation(LOCATION_SZONE) or c:GetSequence()<5
......
......@@ -7,13 +7,14 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCondition(cm.hcon)
e2:SetTarget(cm.htg)
e2:SetOperation(cm.hop)
c:RegisterEffect(e2)
local e4=e1:Clone()
e4:SetCondition(cm.hcon)
e4:SetTarget(cm.htg)
e4:SetOperation(cm.hop)
c:RegisterEffect(e4)
--change effect type
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
......@@ -35,10 +36,10 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not e:GetHandler():IsLocation(LOCATION_HAND)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function cm.desfilter(c)
return not c:IsLocation(LOCATION_SZONE) or c:GetSequence()<5
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -50,18 +50,18 @@ function cm.spcost(e,c,tp,st)
return Duel.GetFlagEffect(tp,m)~=0 or Duel.IsPlayerAffectedByEffect(tp,60010230)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(1,m,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(0,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.fil(c)
return c:IsCanHaveCounter(0x62a) and Duel.IsCanAddCounter(tp,0x62a,1,c) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:GetCounter(0x62a)<14
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.fil,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(cm.fil,tp,LOCATION_MZONE,0,e:GetHandler())
for tc in aux.Next(g) do
tc:AddCounter(0x62a,8)
end
......
......@@ -3,7 +3,7 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
......@@ -35,12 +35,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not e:GetHandler():IsLocation(LOCATION_HAND)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Recover(tp,1000,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,m,0,0,1)
Duel.RegisterFlagEffect(tp,m+40000000,0,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -57,17 +57,26 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp)
end
function cm.kop(e,tp,eg,ep,ev,re,r,rp)
local num=Duel.GetFlagEffect(tp,m)
if Duel.GetLP(tp)==0 and num~=0 then
local num=Duel.GetFlagEffect(tp,m+40000000)
--Debug.Message(Duel.GetLP(tp)==0)
--Debug.Message(num~=0)
if Duel.GetLP(tp)<=0 and num~=0 then
--Debug.Message("1")
Duel.SetLP(tp,8000)
Duel.ResetFlagEffect(tp,m)
for i=1,num-1 do
Duel.RegisterFlagEffect(tp,m,0,0,1)
if num~=1 then
Duel.ResetFlagEffect(tp,m+40000000)
for i=1,num-1 do
Duel.RegisterFlagEffect(tp,m+40000000,0,0,1)
end
else
Duel.ResetFlagEffect(tp,m+40000000)
end
end
end
function cm.nlosecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)~=0
return Duel.GetFlagEffect(e:GetHandler(),m+40000000)~=0
end
function cm.hcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -3,7 +3,7 @@ local cm,m,o=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DEFCHANGE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_DEFCHANGE+CATEGORY_COUNTER+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
......@@ -36,7 +36,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not e:GetHandler():IsLocation(LOCATION_HAND)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
......
......@@ -6,11 +6,13 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetProperty(0)
e2:SetCondition(cm.hcon)
e2:SetTarget(cm.htg)
e2:SetOperation(cm.hop)
......@@ -26,7 +28,7 @@ function cm.initial_effect(c)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
......@@ -36,7 +38,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not e:GetHandler():IsLocation(LOCATION_HAND)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -26,7 +26,7 @@ function cm.initial_effect(c)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
......@@ -36,7 +36,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not e:GetHandler():IsLocation(LOCATION_HAND)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_SZONE,1,nil) end
......
......@@ -51,8 +51,8 @@ function cm.xyzop(e,tp,chk)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
Duel.RegisterFlagEffect(tp,m+10000000,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(1,m,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(0,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -36,7 +36,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not e:GetHandler():IsLocation(LOCATION_HAND)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -83,19 +83,14 @@ function cm.acon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_SZONE)
end
function cm.afil(c,e,tp)
return c:IsCanHaveCounter(0x62a) and Duel.IsCanAddCounter(tp,0x62a,1,c) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4)
end
function cm.atg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.afil,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
end
function cm.aop(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.afil,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_GRAVE,0,1,5,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -36,7 +36,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not e:GetHandler():IsLocation(LOCATION_HAND)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
......
......@@ -96,6 +96,6 @@ end
function cm.rop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Remove(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -36,7 +36,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not e:GetHandler():IsLocation(LOCATION_HAND)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)~=0 end
......
......@@ -6,11 +6,13 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetProperty(0)
e2:SetCondition(cm.hcon)
e2:SetTarget(cm.htg)
e2:SetOperation(cm.hop)
......@@ -37,7 +39,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not e:GetHandler():IsLocation(LOCATION_HAND)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function cm.sfilter(c,e)
return c:IsType(TYPE_SPELL)
......@@ -139,7 +141,7 @@ function cm.acon(e,tp,eg,ep,ev,re,r,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_SZONE)
end
function cm.afil(c)
return c:IsLevelBelow(5) and c:GetTextAttack()>0
return c:IsCanHaveCounter(0x62a) and Duel.IsCanAddCounter(tp,0x62a,1,c) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:GetTextAttack()>0
end
function cm.acost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.afil,1,nil) end
......
......@@ -36,7 +36,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not e:GetHandler():IsLocation(LOCATION_HAND)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -36,7 +36,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not e:GetHandler():IsLocation(LOCATION_HAND)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
......
......@@ -90,6 +90,8 @@ function cm.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD)
end
function cm.dop(e,tp,eg,ep,ev,re,r,rp)
local loc=0
if Duel.IsPlayerAffectedByEffect(tp,m) then loc=LOCATION_ONFIELD end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,loc,1,1,nil)
if g:GetCount()>0 then
......
......@@ -36,7 +36,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not e:GetHandler():IsLocation(LOCATION_HAND)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) end
......
......@@ -36,7 +36,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not e:GetHandler():IsLocation(LOCATION_HAND)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
......
......@@ -92,8 +92,11 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(sg) do
if tc:GetCounter(0x62a)~=0 then num=num+tc:GetCounter(0x62a) end
end
if sg:GetCount()==0 and Duel.Release(sg,REASON_EFFECT)~=0 then
e:GetHandler():AddCounter(0x62a,num)
if Duel.Release(sg,REASON_EFFECT) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
if sg:GetCount()==0 and Duel.Release(sg,REASON_EFFECT)~=0 then
e:GetHandler():AddCounter(0x62a,num)
end
end
end
......
......@@ -36,10 +36,11 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_HAND) and not e:GetHandler():IsLocation(LOCATION_HAND)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
local num=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return num>0 and Duel.IsPlayerCanDraw(tp,num) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
--仙舟测试卡
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)
c:RegisterEffect(e1)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_FZONE)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(tp,10000,REASON_EFFECT)
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