Commit bcf91f4b authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

fix Impenetrable Formation (#1808)

parent 3f7cf17b
...@@ -4,7 +4,7 @@ function c96631852.initial_effect(c) ...@@ -4,7 +4,7 @@ function c96631852.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c96631852.target) e1:SetTarget(c96631852.target)
e1:SetOperation(c96631852.operation) e1:SetOperation(c96631852.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -25,19 +25,16 @@ function c96631852.initial_effect(c) ...@@ -25,19 +25,16 @@ function c96631852.initial_effect(c)
e3:SetValue(700) e3:SetValue(700)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c96631852.filter(c)
return c:IsFaceup() and c:IsDefenseAbove(0)
end
function c96631852.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c96631852.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c96631852.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c96631852.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c96631852.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c96631852.operation(e,tp,eg,ep,ev,re,r,rp) function c96631852.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc) c:SetCardTarget(tc)
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