name: Inferno
card_text: When you take 3000 or more Battle Damage from 1 attack, you can activate this card. Remove all monsters in each player's Deck and Graveyard from play.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_REMOVE)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_BATTLE_DAMAGE)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return ep == tp and ev >= 3000
  end
  function s.chkfilter(c)
  	return c:IsType(TYPE_MONSTER) and not c:IsAbleToRemove()
  end
  function s.filter(c)
  	return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_DECK + LOCATION_GRAVE, LOCATION_GRAVE, 1, nil)
  			and not Duel.IsExistingMatchingCard(s.chkfilter, tp, LOCATION_DECK + LOCATION_GRAVE, LOCATION_GRAVE, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_REMOVE, nil, 1, tp, LOCATION_DECK + LOCATION_GRAVE)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local sg = Duel.GetMatchingGroup(s.filter, tp, LOCATION_DECK + LOCATION_GRAVE, LOCATION_DECK + LOCATION_GRAVE, nil)
  	Duel.Remove(sg, POS_FACEUP, REASON_EFFECT)
  end
  
  
source_text: Inferno
  When you take 3000 or more Battle Damage from 1 attack, you can activate this card. Remove all monsters in each player's Deck and Graveyard from play.
target_text: -- Inferno
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_REMOVE)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_BATTLE_DAMAGE)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return ep == tp and ev >= 3000
  end
  function s.chkfilter(c)
  	return c:IsType(TYPE_MONSTER) and not c:IsAbleToRemove()
  end
  function s.filter(c)
  	return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_DECK + LOCATION_GRAVE, LOCATION_GRAVE, 1, nil)
  			and not Duel.IsExistingMatchingCard(s.chkfilter, tp, LOCATION_DECK + LOCATION_GRAVE, LOCATION_GRAVE, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_REMOVE, nil, 1, tp, LOCATION_DECK + LOCATION_GRAVE)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local sg = Duel.GetMatchingGroup(s.filter, tp, LOCATION_DECK + LOCATION_GRAVE, LOCATION_DECK + LOCATION_GRAVE, nil)
  	Duel.Remove(sg, POS_FACEUP, REASON_EFFECT)
  end
  
  