Commit c1a863ea authored by wyykak's avatar wyykak

Merge branch 'patch-3' into 'master'

Update c99677720.lua 舰指

See merge request !22
parents c648df5e 6880dbe9
Pipeline #15038 passed with stage
in 2 minutes and 3 seconds
......@@ -5,22 +5,19 @@ function c99677720.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,99677720)
e1:SetCost(c99677720.cost)
e1:SetTarget(c99677720.target)
e1:SetOperation(c99677720.activate)
c:RegisterEffect(e1)
end
function c99677720.cfilter(c,ft)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x70e) and c:IsType(TYPE_MONSTER)
and not c:IsCode(99677709) and c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x70e)
and not c:IsCode(99677709) and c:IsAbleToGraveAsCost()
end
function c99677720.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local loc=LOCATION_HAND+LOCATION_ONFIELD
if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(c99677720.cfilter,tp,loc,0,1,nil,ft) end
if chk==0 then return Duel.IsExistingMatchingCard(c99677720.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c99677720.cfilter,tp,loc,0,1,1,nil,ft)
local g=Duel.SelectMatchingCard(tp,c99677720.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function c99677720.filter(c)
......
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