name: 静寂のロッド-ケースト
card_text: 装備モンスターの守備力は500ポイントアップする。
  装備モンスターを対象にするこのカード以外の魔法カードの効果を無効にし破壊する。
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_EQUIP)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_CONTINUOUS_TARGET)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  	--Def
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_EQUIP)
  	e2:SetCode(EFFECT_UPDATE_DEFENSE)
  	e2:SetValue(500)
  	c:RegisterEffect(e2)
  	--Equip limit
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetCode(EFFECT_EQUIP_LIMIT)
  	e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e3:SetValue(1)
  	c:RegisterEffect(e3)
  	--disable
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_FIELD)
  	e4:SetCode(EFFECT_DISABLE)
  	e4:SetRange(LOCATION_SZONE)
  	e4:SetTargetRange(LOCATION_SZONE, LOCATION_SZONE)
  	e4:SetTarget(s.distg)
  	c:RegisterEffect(e4)
  	--disable effect
  	local e5 = Effect.CreateEffect(c)
  	e5:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e5:SetCode(EVENT_CHAIN_SOLVING)
  	e5:SetRange(LOCATION_SZONE)
  	e5:SetOperation(s.disop)
  	c:RegisterEffect(e5)
  	--self destroy
  	local e6 = Effect.CreateEffect(c)
  	e6:SetType(EFFECT_TYPE_FIELD)
  	e6:SetCode(EFFECT_SELF_DESTROY)
  	e6:SetRange(LOCATION_SZONE)
  	e6:SetTargetRange(LOCATION_SZONE, LOCATION_SZONE)
  	e6:SetTarget(s.distg)
  	c:RegisterEffect(e6)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup()
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(Card.IsFaceup, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP)
  	Duel.SelectTarget(tp, Card.IsFaceup, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_EQUIP, e:GetHandler(), 1, 0, 0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
  		Duel.Equip(tp, e:GetHandler(), tc)
  	end
  end
  function s.distg(e, c)
  	local ec = e:GetHandler()
  	if c == ec or c:GetCardTargetCount() == 0 then
  		return false
  	end
  	local eq = ec:GetEquipTarget()
  	return eq and c:GetCardTarget():IsContains(eq) and c:IsType(TYPE_SPELL)
  end
  function s.disop(e, tp, eg, ep, ev, re, r, rp)
  	local ec = e:GetHandler()
  	if not ec:GetEquipTarget() or not re:IsActiveType(TYPE_SPELL) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
  		return
  	end
  	local g = Duel.GetChainInfo(ev, CHAININFO_TARGET_CARDS)
  	if not g or not g:IsContains(ec:GetEquipTarget()) then
  		return
  	end
  	if Duel.NegateEffect(ev, true) and re:GetHandler():IsRelateToEffect(re) then
  		Duel.Destroy(re:GetHandler(), REASON_EFFECT)
  	end
  end
  
  
source_text: 静寂のロッド-ケースト
  装備モンスターの守備力は500ポイントアップする。
  装備モンスターを対象にするこのカード以外の魔法カードの効果を無効にし破壊する。
target_text: -- 静寂のロッド-ケースト
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_EQUIP)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_CONTINUOUS_TARGET)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  	--Def
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_EQUIP)
  	e2:SetCode(EFFECT_UPDATE_DEFENSE)
  	e2:SetValue(500)
  	c:RegisterEffect(e2)
  	--Equip limit
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetCode(EFFECT_EQUIP_LIMIT)
  	e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e3:SetValue(1)
  	c:RegisterEffect(e3)
  	--disable
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_FIELD)
  	e4:SetCode(EFFECT_DISABLE)
  	e4:SetRange(LOCATION_SZONE)
  	e4:SetTargetRange(LOCATION_SZONE, LOCATION_SZONE)
  	e4:SetTarget(s.distg)
  	c:RegisterEffect(e4)
  	--disable effect
  	local e5 = Effect.CreateEffect(c)
  	e5:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e5:SetCode(EVENT_CHAIN_SOLVING)
  	e5:SetRange(LOCATION_SZONE)
  	e5:SetOperation(s.disop)
  	c:RegisterEffect(e5)
  	--self destroy
  	local e6 = Effect.CreateEffect(c)
  	e6:SetType(EFFECT_TYPE_FIELD)
  	e6:SetCode(EFFECT_SELF_DESTROY)
  	e6:SetRange(LOCATION_SZONE)
  	e6:SetTargetRange(LOCATION_SZONE, LOCATION_SZONE)
  	e6:SetTarget(s.distg)
  	c:RegisterEffect(e6)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup()
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(Card.IsFaceup, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP)
  	Duel.SelectTarget(tp, Card.IsFaceup, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_EQUIP, e:GetHandler(), 1, 0, 0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
  		Duel.Equip(tp, e:GetHandler(), tc)
  	end
  end
  function s.distg(e, c)
  	local ec = e:GetHandler()
  	if c == ec or c:GetCardTargetCount() == 0 then
  		return false
  	end
  	local eq = ec:GetEquipTarget()
  	return eq and c:GetCardTarget():IsContains(eq) and c:IsType(TYPE_SPELL)
  end
  function s.disop(e, tp, eg, ep, ev, re, r, rp)
  	local ec = e:GetHandler()
  	if not ec:GetEquipTarget() or not re:IsActiveType(TYPE_SPELL) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
  		return
  	end
  	local g = Duel.GetChainInfo(ev, CHAININFO_TARGET_CARDS)
  	if not g or not g:IsContains(ec:GetEquipTarget()) then
  		return
  	end
  	if Duel.NegateEffect(ev, true) and re:GetHandler():IsRelateToEffect(re) then
  		Duel.Destroy(re:GetHandler(), REASON_EFFECT)
  	end
  end
  
  