name: Majioshaleon
card_text: Your opponent cannot select this card as an attack target while they control any Spell/Trap Cards. During battle between this attacking card and a Defense Position monster whose DEF is lower than the ATK of this card, inflict the difference as Battle Damage to your opponent.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--cannot be battle target
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
  	e1:SetCondition(s.ccon)
  	e1:SetValue(aux.imval1)
  	c:RegisterEffect(e1)
  	--pierce
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_PIERCE)
  	c:RegisterEffect(e2)
  end
  function s.ccon(e)
  	return Duel.IsExistingMatchingCard(Card.IsType, e:GetHandlerPlayer(), 0, LOCATION_ONFIELD, 1, nil, TYPE_SPELL + TYPE_TRAP)
  end
  
  
source_text: Majioshaleon
  Your opponent cannot select this card as an attack target while they control any Spell/Trap Cards. During battle between this attacking card and a Defense Position monster whose DEF is lower than the ATK of this card, inflict the difference as Battle Damage to your opponent.
target_text: -- Majioshaleon
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--cannot be battle target
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
  	e1:SetCondition(s.ccon)
  	e1:SetValue(aux.imval1)
  	c:RegisterEffect(e1)
  	--pierce
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_PIERCE)
  	c:RegisterEffect(e2)
  end
  function s.ccon(e)
  	return Duel.IsExistingMatchingCard(Card.IsType, e:GetHandlerPlayer(), 0, LOCATION_ONFIELD, 1, nil, TYPE_SPELL + TYPE_TRAP)
  end
  
  