Commit ae34c6f2 authored by wind2009's avatar wind2009

Fix Kuebiko

parent 9521c3a2
Pipeline #28285 passed with stages
in 1 minute and 7 seconds
......@@ -40,10 +40,10 @@ function s.discfilter(c,tp)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if rp~=1-tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(s.discfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
if c:IsStatus(STATUS_BATTLE_DESTROYED) or not c:GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF then return false end
if rp~=1-tp or not re:IsActiveType(TYPE_MONSTER) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local loc,tg=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TARGET_CARDS)
return loc==LOCATION_MZONE and tg and tg:IsExists(s.discfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -58,7 +58,10 @@ end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tg=g:GetMaxGroup(Card.GetAttack)
if Duel.SSet(tp,e:GetHandler()) and Duel.NegateEffect(ev) and tg:IsContains(re:GetHandler()) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoHand(eg,nil,REASON_EFFECT)
local c=e:GetHandler()
local rc=re:GetHandler()
if c:IsRelateToEffect(e) and Duel.SSet(tp,c) and Duel.NegateEffect(ev) and tg:IsContains(rc) and rc:IsRelateToEffect(re) then
Duel.BreakEffect()
Duel.SendtoHand(rc,nil,REASON_EFFECT)
end
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