Commit fe98b4d8 authored by TanakaKotoha's avatar TanakaKotoha

tetoki

parent 10dbbd9f
...@@ -15,9 +15,10 @@ function c81003005.cfilter(c) ...@@ -15,9 +15,10 @@ function c81003005.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x817) return c:IsFaceup() and c:IsSetCard(0x817)
end end
function c81003005.condition(e,tp,eg,ep,ev,re,r,rp) function c81003005.condition(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or not Duel.IsChainNegatable(ev) then return false end local c=e:GetHandler()
if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return Duel.IsExistingMatchingCard(c81003005.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c81003005.cfilter,tp,LOCATION_MZONE,0,1,nil)
and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end end
function c81003005.target(e,tp,eg,ep,ev,re,r,rp,chk) function c81003005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -25,7 +26,11 @@ function c81003005.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,7 +26,11 @@ function c81003005.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c81003005.activate(e,tp,eg,ep,ev,re,r,rp) function c81003005.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and (rc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then if not Duel.NegateActivation(ev) then return end
if rc:IsRelateToEffect(re) and not rc:IsLocation(LOCATION_DECK) then
if (rc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
and rc:IsSSetable() then
Duel.BreakEffect()
rc:CancelToGrave() rc:CancelToGrave()
Duel.SSet(tp,rc) Duel.SSet(tp,rc)
Duel.ConfirmCards(1-tp,rc) Duel.ConfirmCards(1-tp,rc)
...@@ -53,3 +58,4 @@ function c81003005.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,3 +58,4 @@ function c81003005.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
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