name: Vernusylph
card_text: All EARTH monsters you control are also treated as "Vernusylph" monsters. Once per turn, if you would discard a "Vernusylph" monster(s) and 1 card to activate the effect of that "Vernusylph" monster in your hand, you can discard only that "Vernusylph" monster(s) instead.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--add setcode
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(LOCATION_MZONE, 0)
  	e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute, ATTRIBUTE_EARTH))
  	e2:SetCode(EFFECT_ADD_SETCODE)
  	e2:SetValue(0x182)
  	c:RegisterEffect(e2)
  	--change cost
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(id)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e3:SetCountLimit(1)
  	e3:SetTargetRange(1, 0)
  	c:RegisterEffect(e3)
  end
  
  
source_text: Vernusylph
  All EARTH monsters you control are also treated as "Vernusylph" monsters. Once per turn, if you would discard a "Vernusylph" monster(s) and 1 card to activate the effect of that "Vernusylph" monster in your hand, you can discard only that "Vernusylph" monster(s) instead.
target_text: -- Vernusylph
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--add setcode
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(LOCATION_MZONE, 0)
  	e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute, ATTRIBUTE_EARTH))
  	e2:SetCode(EFFECT_ADD_SETCODE)
  	e2:SetValue(0x182)
  	c:RegisterEffect(e2)
  	--change cost
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(id)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e3:SetCountLimit(1)
  	e3:SetTargetRange(1, 0)
  	c:RegisterEffect(e3)
  end
  
  