Commit 6c651f67 authored by REIKAI's avatar REIKAI 💬

fix

parent 078451ce
Pipeline #23884 passed with stages
in 28 minutes and 16 seconds
No preview for this file type
......@@ -39,12 +39,12 @@ function cm.setfilter2(c,code)
and not c:IsCode(code)
end
function cm.togtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and cm.setfilter1(chkc,tp) end
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and cm.setfilter1(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.setfilter1,tp,LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.setfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.togop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -161,6 +161,13 @@ function cm.spcon(e,c)
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH)
e0:SetReset(RESET_EVENT+0x7e0000)
e0:SetOperation(function() c:SetStatus(STATUS_PROC_COMPLETE,false) end)
c:RegisterEffect(e0)
e:GetLabelObject():Reset()
end
function cm.cfilter(c)
......
......@@ -4,6 +4,7 @@ local m,cm=rk.set(16172004)
cm.code=16172004
cm.side_code=16172005
function cm.initial_effect(c)
aux.AddCodeList(c,16172004)
--Szone Activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
......
......@@ -31,7 +31,7 @@ function cm.cfilter(c,tp)
return c:IsSetCard(0xcc7) and c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsFaceup() or c:IsControler(tp)) and (c:IsReleasable() or (c:IsLocation(LOCATION_HAND) and flag))
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler(),tp) end
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
......
......@@ -3,8 +3,7 @@ function c16400099.initial_effect(c)
--copy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16400099,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCountLimit(1,16400099)
e1:SetCost(c16400099.cpcost)
e1:SetTarget(c16400099.cptg)
......@@ -14,7 +13,6 @@ function c16400099.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,16400199)
......@@ -32,8 +30,7 @@ function c16400099.cpfilter(c,exc,e,tp,eg,ep,ev,re,r,rp)
end
function c16400099.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c16400099.cpfilter,tp,LOCATION_HAND,0,1,nil,c,e,tp,eg,ep,ev,re,r,rp) end
if chk==0 then return Duel.IsExistingMatchingCard(c16400099.cpfilter,tp,LOCATION_HAND,0,1,nil,c,e,tp,eg,ep,ev,re,r,rp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c16400099.cpfilter,tp,LOCATION_HAND,0,1,1,nil,c,e,tp,eg,ep,ev,re,r,rp)
local te=g:GetFirst():CheckActivateEffect(true,true,false)
......@@ -79,9 +76,8 @@ function c16400099.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function c16400099.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
if Duel.Draw(p,d,REASON_EFFECT)==ct then
local ct=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
if Duel.Draw(p,ct,REASON_EFFECT)==ct then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
......
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