name: Flamvell
card_text: This card cannot be Special Summoned. This card can only be Normal Summoned by Tributing 1 "Flamvell" monster you control. Once per turn, you can remove from play 1 monster in your Graveyard with 200 DEF to inflict damage to your opponent equal to that monster's ATK.
external_ids: local SETCARD_ID_0 = 0x2c --Flamvell
  
lua: local SETCARD_ID_0 = 0x2c --Flamvell
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--cannot special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e1:SetValue(aux.FALSE)
  	c:RegisterEffect(e1)
  	--summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_LIMIT_SUMMON_PROC)
  	e2:SetCondition(s.sumcon)
  	e2:SetOperation(s.sumop)
  	e2:SetValue(SUMMON_TYPE_ADVANCE)
  	c:RegisterEffect(e2)
  	--damage
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetCategory(CATEGORY_DAMAGE)
  	e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e3:SetType(EFFECT_TYPE_IGNITION)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCountLimit(1)
  	e3:SetCost(s.damcost)
  	e3:SetTarget(s.damtg)
  	e3:SetOperation(s.damop)
  	c:RegisterEffect(e3)
  end
  function s.mfilter(c, tp)
  	return c:IsSetCard(SETCARD_ID_0) and (c:IsControler(tp) or c:IsFaceup())
  end
  function s.sumcon(e, c, minc)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	local mg = Duel.GetMatchingGroup(s.mfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, tp)
  	return minc <= 1 and Duel.CheckTribute(c, 1, 1, mg)
  end
  function s.sumop(e, tp, eg, ep, ev, re, r, rp, c)
  	local mg = Duel.GetMatchingGroup(s.mfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, tp)
  	local sg = Duel.SelectTribute(tp, c, 1, 1, mg)
  	c:SetMaterial(sg)
  	Duel.Release(sg, REASON_SUMMON + REASON_MATERIAL)
  end
  function s.cfilter(c)
  	return c:IsDefense(200) and c:IsAbleToRemoveAsCost()
  end
  function s.damcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_GRAVE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
  	local g = Duel.SelectMatchingCard(tp, s.cfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil)
  	Duel.Remove(g, POS_FACEUP, REASON_COST)
  	e:SetLabel(g:GetFirst():GetAttack())
  end
  function s.damtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetTargetPlayer(1 - tp)
  	Duel.SetTargetParam(e:GetLabel())
  	Duel.SetOperationInfo(0, CATEGORY_DAMAGE, nil, 0, 1 - tp, e:GetLabel())
  end
  function s.damop(e, tp, eg, ep, ev, re, r, rp)
  	local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
  	Duel.Damage(p, d, REASON_EFFECT)
  end
  
  
source_text: Flamvell
  This card cannot be Special Summoned. This card can only be Normal Summoned by Tributing 1 "Flamvell" monster you control. Once per turn, you can remove from play 1 monster in your Graveyard with 200 DEF to inflict damage to your opponent equal to that monster's ATK.
target_text: -- Flamvell
  local SETCARD_ID_0 = 0x2c --Flamvell
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--cannot special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e1:SetValue(aux.FALSE)
  	c:RegisterEffect(e1)
  	--summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_LIMIT_SUMMON_PROC)
  	e2:SetCondition(s.sumcon)
  	e2:SetOperation(s.sumop)
  	e2:SetValue(SUMMON_TYPE_ADVANCE)
  	c:RegisterEffect(e2)
  	--damage
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetCategory(CATEGORY_DAMAGE)
  	e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e3:SetType(EFFECT_TYPE_IGNITION)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCountLimit(1)
  	e3:SetCost(s.damcost)
  	e3:SetTarget(s.damtg)
  	e3:SetOperation(s.damop)
  	c:RegisterEffect(e3)
  end
  function s.mfilter(c, tp)
  	return c:IsSetCard(SETCARD_ID_0) and (c:IsControler(tp) or c:IsFaceup())
  end
  function s.sumcon(e, c, minc)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	local mg = Duel.GetMatchingGroup(s.mfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, tp)
  	return minc <= 1 and Duel.CheckTribute(c, 1, 1, mg)
  end
  function s.sumop(e, tp, eg, ep, ev, re, r, rp, c)
  	local mg = Duel.GetMatchingGroup(s.mfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, tp)
  	local sg = Duel.SelectTribute(tp, c, 1, 1, mg)
  	c:SetMaterial(sg)
  	Duel.Release(sg, REASON_SUMMON + REASON_MATERIAL)
  end
  function s.cfilter(c)
  	return c:IsDefense(200) and c:IsAbleToRemoveAsCost()
  end
  function s.damcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_GRAVE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
  	local g = Duel.SelectMatchingCard(tp, s.cfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil)
  	Duel.Remove(g, POS_FACEUP, REASON_COST)
  	e:SetLabel(g:GetFirst():GetAttack())
  end
  function s.damtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetTargetPlayer(1 - tp)
  	Duel.SetTargetParam(e:GetLabel())
  	Duel.SetOperationInfo(0, CATEGORY_DAMAGE, nil, 0, 1 - tp, e:GetLabel())
  end
  function s.damop(e, tp, eg, ep, ev, re, r, rp)
  	local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
  	Duel.Damage(p, d, REASON_EFFECT)
  end
  
  