Commit b97b852a authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 6dc1d50c
......@@ -41,7 +41,7 @@ function c12009058.drop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local cc=(cg-sg)*2
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==cc then
if true then
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
......
......@@ -21,8 +21,11 @@ function cm.initial_effect(c)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
end
function cm.filter11(c)
return c:IsAbleToHand() and c:IsSetCard(0xfa1)
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
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.IsExistingMatchingCard(cm.filter11,tp,LOCATION_DECK,0,1,nil) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
......
--- @title 风卷浪
--- @author 神鹰(455168247@qq.com)
--- @date 2018-2-23 00:34:32
--- @2020-8-2 修复:Ruby
--- @修复内容:cost回手方法没有加IsAbleToHandAsCost的检测以及没有是否会空发的检测
local m = 32828002
local cm = _G["c" .. m]
function cm.initial_effect(c)
......@@ -16,18 +17,29 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
end
function cm.costfilter(c)
return c:IsAbleToHandAsCost()
end
function cm.cost(e, tp, eg, ep, ev, re, r, rp, chk)
local c = e:GetHandler()
if chk == 0 then
return Duel.IsExistingMatchingCard(nil, tp, LOCATION_ONFIELD, 0, 1, c)
return Duel.IsExistingMatchingCard(cm.costfilter, tp, LOCATION_ONFIELD, 0, 1, c)
end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RTOHAND)
local g = Duel.SelectMatchingCard(tp, nil, tp, LOCATION_ONFIELD, 0, 1, 1, c)
local g = Duel.SelectMatchingCard(tp, cm.costfilter, tp, LOCATION_ONFIELD, 0, 1, 1, c)
Duel.SendtoHand(g, nil, REASON_COST)
end
function cm.target(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, 1, e:GetHandler()) end
local ft = 1
local t1 = Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
local t2 = Duel.GetFieldGroupCount(1-tp,0,LOCATION_ONFIELD)
local c = e:GetHandler()
if c:IsLocation(LOCATION_ONFIELD) or c:IsLocation(LOCATION_HAND) then ft = 2 end
if chk == 0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, 1, e:GetHandler())
and (t1+t2) > ft
end
local g = Duel.GetMatchingGroup(Card.IsAbleToDeck, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, e:GetHandler())
Duel.SetOperationInfo(0, CATEGORY_TODECK, g, 1, 0, 0)
end
......
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