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
 
HomePortalLatest imagesSearchRegisterLog in

Share
 

 Request for a double Xyz Material card

View previous topic View next topic Go down 
AuthorMessage
ShikaShika




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

Request for a double Xyz Material card Empty
PostSubject: Request for a double Xyz Material card   Request for a double Xyz Material card Icon_minitimeSat Jul 12, 2014 9:46 pm

Hi everyone. I've been looking for a certain card effect for a while and haven't been able to find one. As such, I thought I'd put in a request here:

Quote :
Shadow of Xyz

Continuous Spell Card

If a DARK monster is used as an Xyz Material for an Xyz Summon, you can treat it as 2 monsters.

An important clarification is that the effect should be that you can treat such a monster as 2 monsters, not that you must. So, for example, you could summon an Xyz monster that usually requires 3 Materials using only 2 monsters as Materials.

Thanks for your attention. Smile
Back to top Go down
cane_63106

cane_63106


Member Title : D.D. Dragon Kaiser
Posts : 454
Join date : 2013-07-23
Location : St. Louis, MO

Request for a double Xyz Material card Empty
PostSubject: Re: Request for a double Xyz Material card   Request for a double Xyz Material card Icon_minitimeSun Jul 13, 2014 12:00 am

function c????.initial_effect(c)
function Auxiliary.AddXyzProcedure(c,f,ct,alterf,desc,maxct,op)
if c.xyz_filter==nil then
local code=c:GetOriginalCode()
local mt=_G["c" .. code]
mt.xyz_filter=f
mt.xyz_count=ct
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
if not maxct then maxct=ct end
if alterf then
e1:SetCondition(Auxiliary.XyzCondition2(f,ct,maxct,alterf,desc))
e1:SetOperation(Auxiliary.XyzOperation2(f,ct,maxct,alterf,desc,op))
else
e1:SetCondition(Auxiliary.XyzCondition(f,ct,maxct))
e1:SetOperation(Auxiliary.XyzOperation(f,ct,maxct))
end
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
end
function Auxiliary.XyzCondition(f,minc,maxc)
--og: use special material
return function(e,c,og)
if c==nil then return true end
local ft=Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)
local ct=-ft
local mt=Duel.GetFieldGroup(Duel.GetTurnPlayer(),LOCATION_MZONE,nil):Filter(Card.IsHasEffect,nil,????)
  if mt:GetCount()>0 then
local m=minc-mt:GetCount()
if m<=ct and minc>mt:GetCount() then return false end
if og then
return og:IsExists(f,minc,nil)
else
local ms=mt:GetFirst()
local g=Duel.GetXyzMaterial(c)
while ms do
if c:GetRank()==ms:GetLevel() and c:IsAttribute(ATTRIBUTE_DARK) then
if m>0 then 
return g:IsExists(f,m,nil)
else
return g:IsExists(f,1,nil)
end
else
return g:IsExists(f,minc,nil)
end
ms=mt:GetNext()
end
end
else
if minc<=ct then return false end
if og then
return og:IsExists(f,minc,nil)
else
local g=Duel.GetXyzMaterial(c)
return g:IsExists(f,minc,nil)
end
end
end
end
function Auxiliary.XyzOperation(f,minc,maxc)
return function(e,tp,eg,ep,ev,re,r,rp,c,og)
if og then
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local g=Duel.GetXyzMaterial(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local mt=Duel.GetFieldGroup(Duel.GetTurnPlayer(),LOCATION_MZONE,nil):Filter(Card.IsHasEffect,nil,????)
if mt:GetCount()>0 and c:IsAttribute(ATTRIBUTE_DARK)  then
local mp=mt:Filter(Card.GetLevel,nil,c:GetRank()):GetCount()
if g:FilterCount(f,nil)==minc-mp then
local mg=g:Filter(f,nil):FilterSelect(tp,Card.IsHasEffect,mp,mp,nil,????)
if minc-(mp*2)>0 then
local mg2=g:FilterSelect(tp,f,minc-(mp*2),maxc,mg:GetFirst())
mg:Merge(mg2)
end
c:SetMaterial(mg)
Duel.Overlay(c,mg)
else if g:FilterCount(f,nil)>minc-mp and mp>0 then
local mpt=mt:Filter(Card.GetLevel,nil,c:GetRank()):GetFirst()
local mg=Group.CreateGroup()
if mpt then
if Duel.SelectYesNo(tp,aux.Stringid(????,0)) then
mg:AddCard(mpt)
end
mpt=mt:Filter(Card.GetLevel,nil,c:GetRank()):GetNext()
if mg and minc-1>mp and mpt and Duel.SelectYesNo(tp,aux.Stringid(????,0)) then
mg:AddCard(mpt)
if minc>mg:GetCount()*2 then
local mg2=g:FilterSelect(tp,f,minc-4,maxc,mg:GetFirst()+mg:GetNext())
mg:Merge(mg2)
end
else if mg:GetCount()==0 then
mg=g:FilterSelect(tp,f,minc,minc,nil)
else
if minc-2~=0 or maxc-2~=0 then
  local mg2=g:FilterSelect(tp,f,minc-2,maxc,mg:GetFirst())
  mg:Merge(mg2)
end
end
end  
c:SetMaterial(mg)
Duel.Overlay(c,mg)
end
else
local mg=g:FilterSelect(tp,f,minc,maxc,nil)
c:SetMaterial(mg)
Duel.Overlay(c,mg)
end
end
else
local mg=g:FilterSelect(tp,f,minc,maxc,nil)
c:SetMaterial(mg)
Duel.Overlay(c,mg)
end
end
end
end
function Auxiliary.XyzCondition2(f,minc,maxc,alterf,desc)
return function(e,c,og)
if c==nil then return true end
local ft=Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)
local ct=-ft
local mt=Duel.GetFieldGroup(Duel.GetTurnPlayer(),LOCATION_MZONE,nil):Filter(Card.IsHasEffect,nil,????)
if mt:GetCount()>0 then
local m=minc-mt:GetCount()
if m<=ct and minc>mt:GetCount() then return false end
if og then
return og:IsExists(f,minc,nil)
else
if ct<1 and Duel.IsExistingMatchingCard(alterf,c:GetControler(),LOCATION_MZONE,0,1,nil) then return true end
local ms=mt:GetFirst()
local g=Duel.GetXyzMaterial(c)
while ms do
if c:GetRank()==ms:GetLevel() and c:IsAttribute(ATTRIBUTE_DARK)  then
if m>0 then 
return g:IsExists(f,m,nil)
else
return g:IsExists(f,1,nil)
end
else
return g:IsExists(f,minc,nil)
end
ms=mt:GetNext()
end
end
else
if minc<=ct then return false end
if og then
return og:IsExists(f,minc,nil)
else
if ct<1 and Duel.IsExistingMatchingCard(alterf,c:GetControler(),LOCATION_MZONE,0,1,nil) then return true end
local g=Duel.GetXyzMaterial(c)
return g:IsExists(f,minc,nil)
end
end
end
end
function Auxiliary.XyzOperation2(f,minc,maxc,alterf,desc,op)
return function(e,tp,eg,ep,ev,re,r,rp,c,og)
local ft=Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)
local ct=-ft
local g=Duel.GetXyzMaterial(c)
local mt=Duel.GetFieldGroup(Duel.GetTurnPlayer(),LOCATION_MZONE,nil):Filter(Card.IsHasEffect,nil,????)

local b1=g:IsExists(f,minc-mt:GetCount(),nil)
local b2=ct<1 and Duel.IsExistingMatchingCard(alterf,tp,LOCATION_MZONE,0,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
if (b1 and b2 and Duel.SelectYesNo(tp,desc)) or ((not b1) and b2) then
local mg=Duel.SelectMatchingCard(tp,alterf,tp,LOCATION_MZONE,0,1,1,nil)
local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then
Duel.Overlay(c,mg2)
end
Duel.Overlay(c,mg)
c:SetMaterial(mg)
if op~=nil then op(e,tp) end
else
if mt:GetCount()~=0 and c:IsAttribute(ATTRIBUTE_DARK)  then
local mp=mt:Filter(Card.GetLevel,nil,c:GetRank()):GetCount()
if g:FilterCount(f,nil)==minc-mp then
local mg=g:Filter(f,nil):FilterSelect(tp,Card.IsHasEffect,mp,mp,nil,????)
if minc-(mp*2)>0 then
local mg2=g:FilterSelect(tp,f,minc-(mp*2),maxc-(mp*2),mg:GetFirst())
mg:Merge(mg2)
end
c:SetMaterial(mg)
Duel.Overlay(c,mg)
if op~=nil then op(e,tp) end
else if g:FilterCount(f,nil)>minc-mp and mp>0 then
local mpt=mt:Filter(Card.GetLevel,nil,c:GetRank()):GetFirst()
local mg=Group.CreateGroup()
if mpt then
if Duel.SelectYesNo(tp,aux.Stringid(????,0)) then
mg:AddCard(mpt)
end
mpt=mt:Filter(Card.GetLevel,nil,c:GetRank()):GetNext()
if mg and minc-1>mp and mpt and Duel.SelectYesNo(tp,aux.Stringid(????,0)) then
mg:AddCard(mpt)
if minc>mg:GetCount()*2 then
local mg2=g:FilterSelect(tp,f,minc-4,maxc-4,mg:GetFirst()+mg:GetNext())
mg:Merge(mg2)
end
else if mg:GetCount()==0 then
mg=g:FilterSelect(tp,f,minc,minc,nil)
else
if minc-2~=0 or maxc-2~=0 then
local mg2=g:FilterSelect(tp,f,minc-2,maxc-2,mg:GetFirst())
mg:Merge(mg2)
end
end
end  
c:SetMaterial(mg)
Duel.Overlay(c,mg)
end
else 
local mg=g:FilterSelect(tp,f,minc,maxc,nil)
c:SetMaterial(mg)
Duel.Overlay(c,mg)
end
end
else
local mg=g:FilterSelect(tp,f,minc,maxc,nil)
c:SetMaterial(mg)
Duel.Overlay(c,mg)
end
end
end
end
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--XYZ
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(????)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c????.target)
c:RegisterEffect(e2)
end
function c????.target(e,c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsFaceup() and not c:IsType(TYPE_XYZ)
end
Back to top Go down
http:// https://www.youtube.com/user/cane63106/videos
ShikaShika




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

Request for a double Xyz Material card Empty
PostSubject: Re: Request for a double Xyz Material card   Request for a double Xyz Material card Icon_minitimeSun Jul 13, 2014 12:18 am

Hey, thanks for the effort. I tried out the script (replacing all the "????", of course), and got the following error:

"58: attempt to call field 'GetXyzMaterial' (a nil value)"

Any idea what's causing it?
Back to top Go down
cane_63106

cane_63106


Member Title : D.D. Dragon Kaiser
Posts : 454
Join date : 2013-07-23
Location : St. Louis, MO

Request for a double Xyz Material card Empty
PostSubject: Re: Request for a double Xyz Material card   Request for a double Xyz Material card Icon_minitimeSun Jul 13, 2014 12:23 pm

sorry, no. i just copied the script from Ice Fire World and changed water to dark and the card number to ????
Back to top Go down
http:// https://www.youtube.com/user/cane63106/videos
outlaw1994

outlaw1994
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 29
Location : bundaberg qld australia

Request for a double Xyz Material card Empty
PostSubject: Re: Request for a double Xyz Material card   Request for a double Xyz Material card Icon_minitimeSun Jul 13, 2014 12:48 pm

its an issue in the latest version so wont work atm
Back to top Go down
https://mackpro.forumotion.com
Sponsored content





Request for a double Xyz Material card Empty
PostSubject: Re: Request for a double Xyz Material card   Request for a double Xyz Material card Icon_minitime

Back to top Go down
 

Request for a double Xyz Material card

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

 Similar topics

-
» Card scripting request
» Custom card scripting request.
» Shoutmon custom card request (if this effect can actually be programmed)
» Request! DBZ Cards to be added to YgoPro!
» Level adjustment and material count

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