Marc
  • Marc
  • Advanced Member Topic Starter
2015-12-21T03:34:23Z
This card cannot be Normal Summoned or Set. This card can only be Special Summoned by removing from play 2 DARK monsters in your Graveyard. Once per turn: you can banish 1 card on the field.

Last one! Where did I go wrong?

Quote:

--Legendary Dragon of the Shadows
function c1067000000.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c1067000000.spcon)
e1:SetOperation(c1067000000.spop)
c:RegisterEffect(e1)
--Remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1067000000,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c1067000000.rmtg)
e2:SetOperation(c1067000000.remop)
c:RegisterEffect(e2)
end
function c1067000000.spfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
end
function c1067000000.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1067000000.spfilter,tp,LOCATION_GRAVE,0,2,nil)
end
function c1067000000.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1067000000.spfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c1067000000.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return true end
if Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(1067000000,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c1067000000.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c1067000000.filter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,0,nil)==0
end
end

Michael Lawrence Dee
2015-12-22T07:11:14Z
Dark monster done. Just change the numbers.
File Attachment(s):
c135.lua (2kb) downloaded 1 time(s).

You cannot view/download attachments. Try to login or register.

Now this is how I play:
Marc
  • Marc
  • Advanced Member Topic Starter
2015-12-22T22:00:43Z
Thanks Michael! I appreciate it!
Users browsing this topic