name: Hyper
card_text: 1 Tuner + 1+ non-Tuner monsters
  Monsters with less ATK than this card cannot attack, also neither player can activate the effects of face-up monsters on the field with more ATK than this card. If this card in your possession is destroyed by your opponent's card and sent to your GY: You can target 1 Tuner and 1 non-Tuner monster in your GY with the same Type and Attribute as each other; add them to your hand. You can only use this effect of "Hyper Psychic Riser" once per turn.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro summon
  	aux.AddSynchroProcedure(c, nil, aux.NonTuner(nil), 1)
  	c:EnableReviveLimit()
  	--attack limit
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_CANNOT_ATTACK)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e1:SetTarget(s.atktg)
  	c:RegisterEffect(e1)
  	--actlimit
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e2:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetTargetRange(1, 1)
  	e2:SetValue(s.actlimit)
  	c:RegisterEffect(e2)
  	--tohand
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetCategory(CATEGORY_TOHAND)
  	e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e3:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_CARD_TARGET)
  	e3:SetCode(EVENT_TO_GRAVE)
  	e3:SetCountLimit(1, id)
  	e3:SetCondition(s.thcon)
  	e3:SetTarget(s.thtg)
  	e3:SetOperation(s.thop)
  	c:RegisterEffect(e3)
  end
  function s.atktg(e, c)
  	return c:GetAttack() < e:GetHandler():GetAttack()
  end
  function s.actlimit(e, re, tp)
  	local loc = re:GetActivateLocation()
  	return loc == LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetAttack() > e:GetHandler():GetAttack()
  end
  function s.thcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsReason(REASON_DESTROY) and rp == 1 - tp
  end
  function s.thfilter1(c, tp)
  	return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() and Duel.IsExistingTarget(s.thfilter2, tp, LOCATION_GRAVE, 0, 1, c, c:GetAttribute(), c:GetRace())
  end
  function s.thfilter2(c, att, rac)
  	return c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_TUNER) and c:IsAttribute(att) and c:IsRace(rac) and c:IsAbleToHand()
  end
  function s.thtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return false
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.thfilter1, tp, LOCATION_GRAVE, 0, 1, nil, tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  	local g1 = Duel.SelectTarget(tp, s.thfilter1, tp, LOCATION_GRAVE, 0, 1, 1, nil, tp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  	local g2 = Duel.SelectTarget(tp, s.thfilter2, tp, LOCATION_GRAVE, 0, 1, 1, g1:GetFirst(), g1:GetFirst():GetAttribute(), g1:GetFirst():GetRace())
  	g1:Merge(g2)
  	Duel.SetOperationInfo(0, CATEGORY_TOHAND, g1, 2, 0, 0)
  end
  function s.thop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect, nil, e)
  	if g:GetCount() > 0 then
  		Duel.SendtoHand(g, nil, REASON_EFFECT)
  	end
  end
  
  
source_text: Hyper
  1 Tuner + 1+ non-Tuner monsters
  Monsters with less ATK than this card cannot attack, also neither player can activate the effects of face-up monsters on the field with more ATK than this card. If this card in your possession is destroyed by your opponent's card and sent to your GY: You can target 1 Tuner and 1 non-Tuner monster in your GY with the same Type and Attribute as each other; add them to your hand. You can only use this effect of "Hyper Psychic Riser" once per turn.
target_text: -- Hyper
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro summon
  	aux.AddSynchroProcedure(c, nil, aux.NonTuner(nil), 1)
  	c:EnableReviveLimit()
  	--attack limit
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_CANNOT_ATTACK)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e1:SetTarget(s.atktg)
  	c:RegisterEffect(e1)
  	--actlimit
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e2:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetTargetRange(1, 1)
  	e2:SetValue(s.actlimit)
  	c:RegisterEffect(e2)
  	--tohand
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetCategory(CATEGORY_TOHAND)
  	e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e3:SetProperty(EFFECT_FLAG_DELAY + EFFECT_FLAG_CARD_TARGET)
  	e3:SetCode(EVENT_TO_GRAVE)
  	e3:SetCountLimit(1, id)
  	e3:SetCondition(s.thcon)
  	e3:SetTarget(s.thtg)
  	e3:SetOperation(s.thop)
  	c:RegisterEffect(e3)
  end
  function s.atktg(e, c)
  	return c:GetAttack() < e:GetHandler():GetAttack()
  end
  function s.actlimit(e, re, tp)
  	local loc = re:GetActivateLocation()
  	return loc == LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetAttack() > e:GetHandler():GetAttack()
  end
  function s.thcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsReason(REASON_DESTROY) and rp == 1 - tp
  end
  function s.thfilter1(c, tp)
  	return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() and Duel.IsExistingTarget(s.thfilter2, tp, LOCATION_GRAVE, 0, 1, c, c:GetAttribute(), c:GetRace())
  end
  function s.thfilter2(c, att, rac)
  	return c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_TUNER) and c:IsAttribute(att) and c:IsRace(rac) and c:IsAbleToHand()
  end
  function s.thtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return false
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.thfilter1, tp, LOCATION_GRAVE, 0, 1, nil, tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  	local g1 = Duel.SelectTarget(tp, s.thfilter1, tp, LOCATION_GRAVE, 0, 1, 1, nil, tp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  	local g2 = Duel.SelectTarget(tp, s.thfilter2, tp, LOCATION_GRAVE, 0, 1, 1, g1:GetFirst(), g1:GetFirst():GetAttribute(), g1:GetFirst():GetRace())
  	g1:Merge(g2)
  	Duel.SetOperationInfo(0, CATEGORY_TOHAND, g1, 2, 0, 0)
  end
  function s.thop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect, nil, e)
  	if g:GetCount() > 0 then
  		Duel.SendtoHand(g, nil, REASON_EFFECT)
  	end
  end
  
  