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 | .
 

 Xyz with Trap Cards - Resolved

View previous topic View next topic Go down 
AuthorMessage
NostalgiaX

avatar


Member Title : Novice Duelist
Posts : 13
Join date : 2014-09-01
Age : 25
Location : United States

PostSubject: Xyz with Trap Cards - Resolved   Tue Sep 09, 2014 10:02 pm

I have an Xyz Monster that can be Xyz Summoned using 2 Level 1 monsters OR two Continuous Trap Cards the player controls as Xyz Material. Is it possible to code this, and if so, how can it be done?


Last edited by NostalgiaX on Wed Sep 10, 2014 6:40 pm; edited 1 time in total
Back to top Go down
View user profile
StormWing0




Member Title : Over Creative Card Ideas
Posts : 451
Join date : 2013-07-14
Age : 26
Location : Tacoma, WA

PostSubject: Re: Xyz with Trap Cards - Resolved   Tue Sep 09, 2014 10:23 pm

I know it is possible for spells to be used as material but that is with their effect so I'm guessing if you can find spell and trap cards that add themselves to XYZ cards as material than you could modify their effects to be used by an XYZ for this purpose. Smile

_________________
Own Archetypes being worked on: RoseHarpie, OrbLit, Crystal Elemental (No cards yet on the last one).

Current Hamachi Room that isn't full:
Name: StormWing120V3
Pass: 1234

Discord Channel: Instant Invite Let me know if this fails to work right.  If it fully works it'll replace the Hamachi above.

Keep in mind these below are just estimates and even if it says 100% it only means what is needed for the main dueling deck is done
RoseHarpie 50% finished but no code or images
OrbLit 80% finished some images but no code
Crystal Elemental 0% finished
Back to top Go down
View user profile
VB99

avatar


Member Title : Legendary Planet
Posts : 368
Join date : 2013-11-10

PostSubject: Re: Xyz with Trap Cards - Resolved   Wed Sep 10, 2014 1:46 am

To my knowledge, the only thing you could do is to special summon it by sending the 2 trap cards to the graveyard, make that special summon count as XYZ-Summon and THEN add them as XYZ-Material, but to directly XYZ-Summon with them...

On the other hand, I'm not THAT advanced in scripting, so I might be wrong.

_________________
Back to top Go down
View user profile http://www.fanfiktion.de/u/VB99
StormWing0




Member Title : Over Creative Card Ideas
Posts : 451
Join date : 2013-07-14
Age : 26
Location : Tacoma, WA

PostSubject: Re: Xyz with Trap Cards - Resolved   Wed Sep 10, 2014 1:52 am

Uria, Lord of Searing Flames does this for traps in general so I'm sure,  Could also look up XYZ Revival and XYZ Reborn along with Big Bang Panic for changing them into material.  Uria has the summoning using Traps part and the others should have the attaching them as material part so it should work. Smile

_________________
Own Archetypes being worked on: RoseHarpie, OrbLit, Crystal Elemental (No cards yet on the last one).

Current Hamachi Room that isn't full:
Name: StormWing120V3
Pass: 1234

Discord Channel: Instant Invite Let me know if this fails to work right.  If it fully works it'll replace the Hamachi above.

Keep in mind these below are just estimates and even if it says 100% it only means what is needed for the main dueling deck is done
RoseHarpie 50% finished but no code or images
OrbLit 80% finished some images but no code
Crystal Elemental 0% finished
Back to top Go down
View user profile
NostalgiaX

avatar


Member Title : Novice Duelist
Posts : 13
Join date : 2014-09-01
Age : 25
Location : United States

PostSubject: Re: Xyz with Trap Cards - Resolved   Wed Sep 10, 2014 6:11 pm

EDIT: Nevermind, I figured it out. The answer is yes, it's possible. O.o
Just gotta tweak Uria's code a little.

For anyone who's curious:
Code:
function cXXXXXX.initial_effect(c)
   --Xyz Summon
   aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,1),2)
   c:EnableReviveLimit()
   --Xyz Summon w/Traps
   local e1=Effect.CreateEffect(c)
   e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
   e1:SetType(EFFECT_TYPE_FIELD)
   e1:SetCode(EFFECT_SPSUMMON_PROC)
   e1:SetRange(LOCATION_EXTRA)
   e1:SetCondition(c144105.xyzcon)
   e1:SetOperation(c144105.xyzop)
   c:RegisterEffect(e1)
end



function cXXXXXX.xyzfilter(c)
   local tpe=c:GetType()
   return c:IsFaceup() and tpe==0x20004
end

function cXXXXXX.xyzcon(e,c)
   if c==nil then return true end
   if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)==0 then
      return Duel.IsExistingMatchingCard(cXXXXXX.xyzfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
         and Duel.IsExistingMatchingCard(cXXXXXX.xyzfilter,c:GetControler(),LOCATION_ONFIELD,0,2,nil)
   else
      return Duel.IsExistingMatchingCard(cXXXXXX.xyzfilter,c:GetControler(),LOCATION_ONFIELD,0,2,nil)
   end
end
function cXXXXXX.xyzop(e,tp,eg,ep,ev,re,r,rp,c)
   local c=e:GetHandler()
   if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)==0 then
      Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
      local g1=Duel.SelectMatchingCard(tp,cXXXXXX.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil)
      Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
      local g2=Duel.SelectMatchingCard(tp,cXXXXXX.xyzfilter,tp,LOCATION_ONFIELD,0,2,2,g1:GetFirst())
      g2:AddCard(g1:GetFirst())
      Duel.Overlay(c,g2)
   else
      Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
      local g=Duel.SelectMatchingCard(tp,cXXXXXX.xyzfilter,tp,LOCATION_ONFIELD,0,2,2,nil)
      Duel.Overlay(c,g)
   end
end


I'm still new to this, so I don't understand ALL of what's happening and I'm sure there's some areas that could be cleaned up... but yeah, that works.

Thanks, StormWing, for the idea. xD
Back to top Go down
View user profile
Sponsored content





PostSubject: Re: Xyz with Trap Cards - Resolved   

Back to top Go down
 

Xyz with Trap Cards - Resolved

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

 Similar topics

-
» How to build an Anti-Meta deck
» How to properly side-deck
» Trap Reactor Y FI and Spell Reactor RE
» trap deck(rate and fix)
» My new Class Cards.

Permissions in this forum:You cannot reply to topics in this forum
Mackpro :: MackPro :: Custom Card Ruling and Bugs-