a place for all your custom card needs you can post scripts pics and request for card to be made also please donate to the funding for a new server made for custom card duels
 
HomePortalCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | .
 

 Help with a card effect

View previous topic View next topic Go down 
AuthorMessage
ShikaShika




Member Title : Card newbie
Posts : 11
Join date : 2014-07-12

PostSubject: Help with a card effect   Wed Nov 05, 2014 10:53 pm

Hey all. I'm trying but failing to script a card with the following effect:

Quote :
Once per turn: you can detach 1 Xyz Material from this card to send to the Graveyard 1 card that your opponent controls (for no effect), and if you do, cards with that name and their effects cannot be used for the rest of the Duel.

Here are the relevant portions of my current script:

Quote :
function c6000311.initial_effect(c)
--Pop
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(6000311,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c6000311.popcost)
e1:SetOperation(c6000311.popop)
c:RegisterEffect(e1)
end
function c6000311.popfilter(c)
return c:IsAbleToGrave()
end
function c6000311.popcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c6000311.popop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbletoGrave,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
local des=g:Select(tp,1,1,nil)
e:SetLabel(des:GetFirst():GetCode())
Duel.HintSelection(des)
Duel.BreakEffect()
Duel.SendtoGrave(des,REASON_RULE)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c6000311.aclimit)
e1:SetLabel(e:GetLabel())
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_FORBIDDEN)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
e2:SetLabelObject(e:GetLabelObject())
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_DISABLE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_IGNORE_RANGE)
e3:SetLabelObject(e:GetLabelObject())
Duel.RegisterEffect(e3,tp)
end
end
function c6000311.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end

This is a combination of the effects of Apoqliphort Killer, Prohibition, and Cursed Seal of the Forbidden Spell.

The actual ToGrave effect works fine, but the Forbidden/Can't Use effect doesn't seem to work at all. Targeted cards can later be played without issue.

If anyone can help, it would be greatly appreciated.
Back to top Go down
View user profile
TGAP-Trixie

avatar


Member Title : Trixie does not even...
Posts : 273
Join date : 2014-04-17

PostSubject: Re: Help with a card effect   Thu Nov 06, 2014 1:38 am

This is from vulcan the divine, maybe it might help

Vulcan the divine:
 

You'd need to make it only affect your opponent (not you) and for the remainder of the duel (rather than 1 turn).

And change hand to graveyard more than likely. The problem is, this might have to recognize what the cards were on the field so if the card your opponent sends was face-down it might not work.
Back to top Go down
View user profile
 

Help with a card effect

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» [OCG] Anti-Hope, God of Despair
» [MB01] Exod Flame
» toons deck discussion
» Card Ruling at Diamond Dude?
» Dragunity Aklys as an Equip Card Rulling

Permissions in this forum:You cannot reply to topics in this forum
Mackpro :: MackPro :: Requests-