name: Barbaroid,
card_text: 5 Machine-Type "roid" monsters
  This card can make a second attack during each Battle Phase. This card cannot attack your opponent directly. After damage calculation, if this card attacked an opponent's monster: Negate the effects of that monster (including in the Graveyard). If this card destroys an opponent's monster by battle: Inflict 1000 damage to your opponent.
external_ids: local SETCARD_ID_0 = 0x16 --roid
  
lua: local SETCARD_ID_0 = 0x16 --roid
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion material
  	c:EnableReviveLimit()
  	aux.AddFusionProcFunRep(c, s.ffilter, 5, true)
  	--extra attack
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_EXTRA_ATTACK)
  	e1:SetValue(1)
  	c:RegisterEffect(e1)
  	--disable
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e2:SetCode(EVENT_BATTLED)
  	e2:SetCondition(s.discon)
  	e2:SetOperation(s.disop)
  	c:RegisterEffect(e2)
  	--damage
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 1))
  	e3:SetCategory(CATEGORY_DAMAGE)
  	e3:SetCode(EVENT_BATTLE_DESTROYING)
  	e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e3:SetCondition(s.damcon)
  	e3:SetTarget(s.damtg)
  	e3:SetOperation(s.damop)
  	c:RegisterEffect(e3)
  	--
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_SINGLE)
  	e4:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
  	c:RegisterEffect(e4)
  end
  function s.ffilter(c)
  	return c:IsFusionSetCard(SETCARD_ID_0) and c:IsRace(RACE_MACHINE)
  end
  function s.discon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetAttackTarget() and e:GetHandler() == Duel.GetAttacker()
  end
  function s.disop(e, tp, eg, ep, ev, re, r, rp)
  	local bc = e:GetHandler():GetBattleTarget()
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_DISABLE)
  	e1:SetReset(RESET_EVENT + 0x57a0000)
  	bc:RegisterEffect(e1)
  	local e2 = Effect.CreateEffect(e:GetHandler())
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_DISABLE_EFFECT)
  	e2:SetReset(RESET_EVENT + 0x57a0000)
  	bc:RegisterEffect(e2)
  end
  function s.damcon(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
  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(1000)
  	Duel.SetOperationInfo(0, CATEGORY_DAMAGE, nil, 0, 1 - tp, 1000)
  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: Barbaroid,
  5 Machine-Type "roid" monsters
  This card can make a second attack during each Battle Phase. This card cannot attack your opponent directly. After damage calculation, if this card attacked an opponent's monster: Negate the effects of that monster (including in the Graveyard). If this card destroys an opponent's monster by battle: Inflict 1000 damage to your opponent.
target_text: -- Barbaroid,
  local SETCARD_ID_0 = 0x16 --roid
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion material
  	c:EnableReviveLimit()
  	aux.AddFusionProcFunRep(c, s.ffilter, 5, true)
  	--extra attack
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_EXTRA_ATTACK)
  	e1:SetValue(1)
  	c:RegisterEffect(e1)
  	--disable
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e2:SetCode(EVENT_BATTLED)
  	e2:SetCondition(s.discon)
  	e2:SetOperation(s.disop)
  	c:RegisterEffect(e2)
  	--damage
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 1))
  	e3:SetCategory(CATEGORY_DAMAGE)
  	e3:SetCode(EVENT_BATTLE_DESTROYING)
  	e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e3:SetCondition(s.damcon)
  	e3:SetTarget(s.damtg)
  	e3:SetOperation(s.damop)
  	c:RegisterEffect(e3)
  	--
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_SINGLE)
  	e4:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
  	c:RegisterEffect(e4)
  end
  function s.ffilter(c)
  	return c:IsFusionSetCard(SETCARD_ID_0) and c:IsRace(RACE_MACHINE)
  end
  function s.discon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetAttackTarget() and e:GetHandler() == Duel.GetAttacker()
  end
  function s.disop(e, tp, eg, ep, ev, re, r, rp)
  	local bc = e:GetHandler():GetBattleTarget()
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_DISABLE)
  	e1:SetReset(RESET_EVENT + 0x57a0000)
  	bc:RegisterEffect(e1)
  	local e2 = Effect.CreateEffect(e:GetHandler())
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_DISABLE_EFFECT)
  	e2:SetReset(RESET_EVENT + 0x57a0000)
  	bc:RegisterEffect(e2)
  end
  function s.damcon(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
  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(1000)
  	Duel.SetOperationInfo(0, CATEGORY_DAMAGE, nil, 0, 1 - tp, 1000)
  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
  
  