name: Ryu
card_text: At the end of the Damage Step, if this card battled a Warrior or Spellcaster monster: Destroy that monster.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--destroy
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_DESTROY)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e1:SetCode(EVENT_DAMAGE_STEP_END)
  	e1:SetCondition(s.descon)
  	e1:SetTarget(s.destg)
  	e1:SetOperation(s.desop)
  	c:RegisterEffect(e1)
  end
  function s.descon(e, tp, eg, ep, ev, re, r, rp)
  	local t = e:GetHandler():GetBattleTarget()
  	e:SetLabelObject(t)
  	return aux.dsercon(e, tp, eg, ep, ev, re, r, rp) and t and t:IsRace(RACE_SPELLCASTER + RACE_WARRIOR) and t:IsRelateToBattle()
  end
  function s.destg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, e:GetLabelObject(), 1, 0, 0)
  end
  function s.desop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = e:GetLabelObject()
  	if tc:IsRelateToBattle() then
  		Duel.Destroy(tc, REASON_EFFECT)
  	end
  end
  
  
source_text: Ryu
  At the end of the Damage Step, if this card battled a Warrior or Spellcaster monster: Destroy that monster.
target_text: -- Ryu
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--destroy
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_DESTROY)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e1:SetCode(EVENT_DAMAGE_STEP_END)
  	e1:SetCondition(s.descon)
  	e1:SetTarget(s.destg)
  	e1:SetOperation(s.desop)
  	c:RegisterEffect(e1)
  end
  function s.descon(e, tp, eg, ep, ev, re, r, rp)
  	local t = e:GetHandler():GetBattleTarget()
  	e:SetLabelObject(t)
  	return aux.dsercon(e, tp, eg, ep, ev, re, r, rp) and t and t:IsRace(RACE_SPELLCASTER + RACE_WARRIOR) and t:IsRelateToBattle()
  end
  function s.destg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, e:GetLabelObject(), 1, 0, 0)
  end
  function s.desop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = e:GetLabelObject()
  	if tc:IsRelateToBattle() then
  		Duel.Destroy(tc, REASON_EFFECT)
  	end
  end
  
  