Commit 54c7f05a authored by GuGu's avatar GuGu

Update c23162.lua

parent 34e8c59b
Pipeline #40800 passed with stage
in 6 seconds
......@@ -28,8 +28,9 @@ function c23162.initial_effect(c)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(23162,0))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCost(c23162.cost)
--e5:SetCondition(c23162.condition)
e5:SetTarget(c23162.target)
e5:SetOperation(c23162.operation)
......@@ -48,21 +49,23 @@ end
function c23162.atkup(e,c)
return Duel.GetMatchingGroupCount(c23162.atkfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)*500
end
function c23162.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c23162.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c23162.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,1,REASON_COST)
end
function c23162.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c23162.filter(c)
return c:IsAbleToDeck()
return c:IsAbleToDeckAsCost() and c:IsType(TYPE_MONSTER)
end
function c23162.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c23162.filter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return true end
end
function c23162.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c23162.filter,tp,LOCATION_GRAVE,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c23162.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,1,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(23162,5))
local se1=Duel.SelectOption(tp,aux.Stringid(23162,1),aux.Stringid(23162,2))+1
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(23162,6))
......
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