name: Dinowrestler
card_text: 1 "Dinowrestler" Link Monster + 1 "Dinowrestler" monster
  If this card battles, your opponent cannot activate Spell/Trap Cards until the end of the Damage Step. If this card attacks a Defense Position monster, inflict piercing battle damage. Your opponent's monsters cannot target monsters for attacks, except this one. If this card destroys a monster by battle: It gains 500 ATK. If this card is destroyed by card effect: Destroy all your opponent's Attack Position monsters.
external_ids: local SETCARD_ID_0 = 0x11a --Dinowrestler
  
lua: local SETCARD_ID_0 = 0x11a --Dinowrestler
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableReviveLimit()
  	aux.AddFusionProcFun2(c, s.matfilter1, aux.FilterBoolFunction(Card.IsFusionSetCard, SETCARD_ID_0), true)
  	--actlimit
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTargetRange(0, 1)
  	e1:SetValue(s.actlimit)
  	e1:SetCondition(s.actcon)
  	c:RegisterEffect(e1)
  	--pierce
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_PIERCE)
  	c:RegisterEffect(e2)
  	--atk limit
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetTargetRange(0, LOCATION_MZONE)
  	e3:SetValue(s.atklimit)
  	c:RegisterEffect(e3)
  	--atkup
  	local e4 = Effect.CreateEffect(c)
  	e4:SetCategory(CATEGORY_ATKCHANGE)
  	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e4:SetCode(EVENT_BATTLE_DESTROYING)
  	e4:SetCondition(s.atkcon)
  	e4:SetOperation(s.atkop)
  	c:RegisterEffect(e4)
  	--destroy
  	local e5 = Effect.CreateEffect(c)
  	e5:SetCategory(CATEGORY_DESTROY)
  	e5:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e5:SetCode(EVENT_DESTROYED)
  	e5:SetCondition(s.descon)
  	e5:SetTarget(s.destg)
  	e5:SetOperation(s.desop)
  	c:RegisterEffect(e5)
  end
  function s.matfilter1(c)
  	return c:IsFusionType(TYPE_LINK) and c:IsFusionSetCard(SETCARD_ID_0)
  end
  function s.actlimit(e, re, tp)
  	return re:IsHasType(EFFECT_TYPE_ACTIVATE)
  end
  function s.actcon(e)
  	return Duel.GetAttacker() == e:GetHandler() or Duel.GetAttackTarget() == e:GetHandler()
  end
  function s.atklimit(e, c)
  	return c ~= e:GetHandler()
  end
  function s.atkcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsFaceup() and e:GetHandler():IsRelateToBattle()
  end
  function s.atkop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsFacedown() or not c:IsRelateToEffect(e) then
  		return
  	end
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_UPDATE_ATTACK)
  	e1:SetValue(500)
  	e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_DISABLE)
  	c:RegisterEffect(e1)
  end
  function s.descon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsReason(REASON_EFFECT)
  end
  function s.destg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	local g = Duel.GetMatchingGroup(Card.IsAttackPos, tp, 0, LOCATION_MZONE, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.desop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(Card.IsAttackPos, tp, 0, LOCATION_MZONE, nil)
  	if g:GetCount() > 0 then
  		Duel.Destroy(g, REASON_EFFECT)
  	end
  end
  
  
source_text: Dinowrestler
  1 "Dinowrestler" Link Monster + 1 "Dinowrestler" monster
  If this card battles, your opponent cannot activate Spell/Trap Cards until the end of the Damage Step. If this card attacks a Defense Position monster, inflict piercing battle damage. Your opponent's monsters cannot target monsters for attacks, except this one. If this card destroys a monster by battle: It gains 500 ATK. If this card is destroyed by card effect: Destroy all your opponent's Attack Position monsters.
target_text: -- Dinowrestler
  local SETCARD_ID_0 = 0x11a --Dinowrestler
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableReviveLimit()
  	aux.AddFusionProcFun2(c, s.matfilter1, aux.FilterBoolFunction(Card.IsFusionSetCard, SETCARD_ID_0), true)
  	--actlimit
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTargetRange(0, 1)
  	e1:SetValue(s.actlimit)
  	e1:SetCondition(s.actcon)
  	c:RegisterEffect(e1)
  	--pierce
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_PIERCE)
  	c:RegisterEffect(e2)
  	--atk limit
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetTargetRange(0, LOCATION_MZONE)
  	e3:SetValue(s.atklimit)
  	c:RegisterEffect(e3)
  	--atkup
  	local e4 = Effect.CreateEffect(c)
  	e4:SetCategory(CATEGORY_ATKCHANGE)
  	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e4:SetCode(EVENT_BATTLE_DESTROYING)
  	e4:SetCondition(s.atkcon)
  	e4:SetOperation(s.atkop)
  	c:RegisterEffect(e4)
  	--destroy
  	local e5 = Effect.CreateEffect(c)
  	e5:SetCategory(CATEGORY_DESTROY)
  	e5:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e5:SetCode(EVENT_DESTROYED)
  	e5:SetCondition(s.descon)
  	e5:SetTarget(s.destg)
  	e5:SetOperation(s.desop)
  	c:RegisterEffect(e5)
  end
  function s.matfilter1(c)
  	return c:IsFusionType(TYPE_LINK) and c:IsFusionSetCard(SETCARD_ID_0)
  end
  function s.actlimit(e, re, tp)
  	return re:IsHasType(EFFECT_TYPE_ACTIVATE)
  end
  function s.actcon(e)
  	return Duel.GetAttacker() == e:GetHandler() or Duel.GetAttackTarget() == e:GetHandler()
  end
  function s.atklimit(e, c)
  	return c ~= e:GetHandler()
  end
  function s.atkcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsFaceup() and e:GetHandler():IsRelateToBattle()
  end
  function s.atkop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsFacedown() or not c:IsRelateToEffect(e) then
  		return
  	end
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_UPDATE_ATTACK)
  	e1:SetValue(500)
  	e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_DISABLE)
  	c:RegisterEffect(e1)
  end
  function s.descon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsReason(REASON_EFFECT)
  end
  function s.destg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	local g = Duel.GetMatchingGroup(Card.IsAttackPos, tp, 0, LOCATION_MZONE, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.desop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(Card.IsAttackPos, tp, 0, LOCATION_MZONE, nil)
  	if g:GetCount() > 0 then
  		Duel.Destroy(g, REASON_EFFECT)
  	end
  end
  
  