diff --git a/official/c29208536.lua b/official/c29208536.lua index 11d3e466e0..e8aa2a2c8a 100644 --- a/official/c29208536.lua +++ b/official/c29208536.lua @@ -30,16 +30,17 @@ function s.initial_effect(c) end s.xyz_number=45 function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsFaceup() and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end + local c=e:GetHandler() + if chkc then return chkc:IsOnField() and chkc:IsNegatable() and chkc~=c end + if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) + local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then + if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsFaceup() and tc:IsRelateToEffect(e) then c:SetCardTarget(tc) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -47,6 +48,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.disablecon) tc:RegisterEffect(e1) + if tc:IsType(TYPE_TRAPMONSTER) then + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2:SetCode(EFFECT_DISABLE_TRAPMONSTER) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e2) + end end end function s.disablecon(e) @@ -63,4 +72,4 @@ function s.aclimit(e,re,tp) table.insert(cg,tc:GetCode()) end return re:GetHandler():IsCode(table.unpack(cg)) -end +end \ No newline at end of file