Commit f9cdb4fc authored by TanakaKotoha's avatar TanakaKotoha

lbw

parent 24d649fa
...@@ -36,7 +36,7 @@ function cm.filter1(c,e) ...@@ -36,7 +36,7 @@ function cm.filter1(c,e)
return not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
end end
function cm.filter2(c,e,tp,m,f,chkf) function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsLevel(6) and c:IsSetCard(0x9d) and (not f or f(c)) return c:IsType(TYPE_FUSION) and c:IsLevel(6) and c:IsSetCard(0xfb6) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -102,7 +102,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -102,7 +102,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp return Duel.GetTurnPlayer()==1-tp
end end
function cm.thfilter(c,tp) function cm.thfilter(c,tp)
......
...@@ -16,46 +16,46 @@ function c81003005.cfilter(c) ...@@ -16,46 +16,46 @@ function c81003005.cfilter(c)
end end
function c81003005.condition(e,tp,eg,ep,ev,re,r,rp) function c81003005.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end if ep==tp 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 Duel.IsChainNegatable(ev) 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 local rc=re:GetHandler()
if chk==0 then return rc:IsSSetable() and (rc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
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 not Duel.NegateActivation(ev) then return end if not Duel.NegateActivation(ev) then return end
if rc:IsRelateToEffect(re) and not rc:IsLocation(LOCATION_DECK) then if rc:IsRelateToEffect(re) and not rc:IsLocation(LOCATION_DECK) then
if (rc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) if (rc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and rc:IsSSetable() then
and rc:IsSSetable() then Duel.BreakEffect()
Duel.BreakEffect() rc:CancelToGrave()
rc:CancelToGrave() Duel.SSet(tp,rc)
Duel.SSet(tp,rc) Duel.ConfirmCards(1-tp,rc)
Duel.ConfirmCards(1-tp,rc) local e0=Effect.CreateEffect(e:GetHandler())
local e0=Effect.CreateEffect(e:GetHandler()) e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e0:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e0:SetReset(RESET_EVENT+RESETS_REDIRECT)
e0:SetReset(RESET_EVENT+RESETS_REDIRECT) e0:SetValue(LOCATION_REMOVED)
e0:SetValue(LOCATION_REMOVED) rc:RegisterEffect(e0,true)
rc:RegisterEffect(e0,true) if rc:IsType(TYPE_QUICKPLAY) then
if rc:IsType(TYPE_QUICKPLAY) then local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) rc:RegisterEffect(e1)
rc:RegisterEffect(e1) end
end if rc:IsType(TYPE_TRAP) then
if rc:IsType(TYPE_TRAP) then local e2=Effect.CreateEffect(e:GetHandler())
local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) rc:RegisterEffect(e2)
rc:RegisterEffect(e2) end
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