D
When this card is activated: You can add 1 "Destiny HERO - Plasma" from your Deck or GY to your hand. While you control "Destiny HERO - Plasma", apply the following effects.
● You cannot draw during the Draw Phase.
● Your opponent cannot target cards you control with card effects.
● Each "Destiny HERO - Plasma" you control gains 100 ATK for each monster in the GYs, cannot be destroyed by your opponent's card effects, also can make a second attack during each Battle Phase.
local CARD_ID_0 = 83965310 --Destiny HERO - Plasma
local SETCARD_ID_0 = 0xc008 --Destiny

local CARD_ID_0 = 83965310 --Destiny HERO - Plasma
local SETCARD_ID_0 = 0xc008 --Destiny
local s, id, o = GetID()
function s.initial_effect(c)
	aux.AddSetNameMonsterList(c, SETCARD_ID_0)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH + CATEGORY_GRAVE_ACTION)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetOperation(s.activate)
	c:RegisterEffect(e1)
	--draw skip
	local e2 = Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_FIELD)
	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
	e2:SetCode(EFFECT_CANNOT_DRAW)
	e2:SetRange(LOCATION_SZONE)
	e2:SetTargetRange(1, 0)
	e2:SetCondition(s.skipcon)
	c:RegisterEffect(e2)
	local e3 = e2:Clone()
	e3:SetCode(EFFECT_DRAW_COUNT)
	e3:SetValue(0)
	c:RegisterEffect(e3)
	--cannot be target
	local e4 = Effect.CreateEffect(c)
	e4:SetType(EFFECT_TYPE_FIELD)
	e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE + EFFECT_FLAG_SET_AVAILABLE)
	e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
	e4:SetRange(LOCATION_SZONE)
	e4:SetTargetRange(LOCATION_ONFIELD, 0)
	e4:SetCondition(s.condition)
	e4:SetValue(aux.tgoval)
	c:RegisterEffect(e4)
	--atkup
	local e5 = Effect.CreateEffect(c)
	e5:SetType(EFFECT_TYPE_FIELD)
	e5:SetCode(EFFECT_UPDATE_ATTACK)
	e5:SetRange(LOCATION_SZONE)
	e5:SetTargetRange(LOCATION_MZONE, 0)
	e5:SetTarget(aux.TargetBoolFunction(Card.IsCode, CARD_ID_0))
	e5:SetValue(s.atkval)
	c:RegisterEffect(e5)
	local e6 = e5:Clone()
	e6:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
	e6:SetValue(aux.indoval)
	c:RegisterEffect(e6)
	local e7 = e5:Clone()
	e7:SetCode(EFFECT_EXTRA_ATTACK)
	e7:SetValue(1)
	c:RegisterEffect(e7)
end
function s.thfilter(c)
	return c:IsCode(CARD_ID_0) and c:IsAbleToHand()
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter), tp, LOCATION_GRAVE + LOCATION_DECK, 0, nil)
	if g:GetCount() > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 0)) then
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
		local sg = g:Select(tp, 1, 1, nil)
		Duel.SendtoHand(sg, nil, REASON_EFFECT)
		Duel.ConfirmCards(1 - tp, sg)
	end
end
function s.cfilter(c)
	return c:IsFaceup() and c:IsCode(CARD_ID_0)
end
function s.condition(e)
	local tp = e:GetHandlerPlayer()
	return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_ONFIELD, 0, 1, nil)
end
function s.skipcon(e)
	return s.condition(e) and Duel.GetCurrentPhase() == PHASE_DRAW
end
function s.atkval(e, c)
	return Duel.GetMatchingGroupCount(Card.IsType, 0, LOCATION_GRAVE, LOCATION_GRAVE, nil, TYPE_MONSTER) * 100
end


D
When this card is activated: You can add 1 "Destiny HERO - Plasma" from your Deck or GY to your hand. While you control "Destiny HERO - Plasma", apply the following effects.
● You cannot draw during the Draw Phase.
● Your opponent cannot target cards you control with card effects.
● Each "Destiny HERO - Plasma" you control gains 100 ATK for each monster in the GYs, cannot be destroyed by your opponent's card effects, also can make a second attack during each Battle Phase.
-- D
local CARD_ID_0 = 83965310 --Destiny HERO - Plasma
local SETCARD_ID_0 = 0xc008 --Destiny
local s, id, o = GetID()
function s.initial_effect(c)
	aux.AddSetNameMonsterList(c, SETCARD_ID_0)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH + CATEGORY_GRAVE_ACTION)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetOperation(s.activate)
	c:RegisterEffect(e1)
	--draw skip
	local e2 = Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_FIELD)
	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
	e2:SetCode(EFFECT_CANNOT_DRAW)
	e2:SetRange(LOCATION_SZONE)
	e2:SetTargetRange(1, 0)
	e2:SetCondition(s.skipcon)
	c:RegisterEffect(e2)
	local e3 = e2:Clone()
	e3:SetCode(EFFECT_DRAW_COUNT)
	e3:SetValue(0)
	c:RegisterEffect(e3)
	--cannot be target
	local e4 = Effect.CreateEffect(c)
	e4:SetType(EFFECT_TYPE_FIELD)
	e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE + EFFECT_FLAG_SET_AVAILABLE)
	e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
	e4:SetRange(LOCATION_SZONE)
	e4:SetTargetRange(LOCATION_ONFIELD, 0)
	e4:SetCondition(s.condition)
	e4:SetValue(aux.tgoval)
	c:RegisterEffect(e4)
	--atkup
	local e5 = Effect.CreateEffect(c)
	e5:SetType(EFFECT_TYPE_FIELD)
	e5:SetCode(EFFECT_UPDATE_ATTACK)
	e5:SetRange(LOCATION_SZONE)
	e5:SetTargetRange(LOCATION_MZONE, 0)
	e5:SetTarget(aux.TargetBoolFunction(Card.IsCode, CARD_ID_0))
	e5:SetValue(s.atkval)
	c:RegisterEffect(e5)
	local e6 = e5:Clone()
	e6:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
	e6:SetValue(aux.indoval)
	c:RegisterEffect(e6)
	local e7 = e5:Clone()
	e7:SetCode(EFFECT_EXTRA_ATTACK)
	e7:SetValue(1)
	c:RegisterEffect(e7)
end
function s.thfilter(c)
	return c:IsCode(CARD_ID_0) and c:IsAbleToHand()
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter), tp, LOCATION_GRAVE + LOCATION_DECK, 0, nil)
	if g:GetCount() > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 0)) then
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
		local sg = g:Select(tp, 1, 1, nil)
		Duel.SendtoHand(sg, nil, REASON_EFFECT)
		Duel.ConfirmCards(1 - tp, sg)
	end
end
function s.cfilter(c)
	return c:IsFaceup() and c:IsCode(CARD_ID_0)
end
function s.condition(e)
	local tp = e:GetHandlerPlayer()
	return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_ONFIELD, 0, 1, nil)
end
function s.skipcon(e)
	return s.condition(e) and Duel.GetCurrentPhase() == PHASE_DRAW
end
function s.atkval(e, c)
	return Duel.GetMatchingGroupCount(Card.IsType, 0, LOCATION_GRAVE, LOCATION_GRAVE, nil, TYPE_MONSTER) * 100
end

