NostalgiaX
2015-07-29T03:01:20Z
I'm trying to code a card that allows a player to Pendulum Summon Synchro Monsters. I've looked around for cards with similar effects to learn from them, but I can't find any. Here's the effect.

(Pendulum Effect)
"Once per turn: You can Tribute 1 Tuner monster you control; You can Pendulum Summon Synchro Monsters from your Extra Deck that list the Tributed Tuner as Synchro Material. Destroy all Pendulum Summoned monsters you control during your End Phase."

An example of how I want it to work:
The player's Pendulum Scale allows them to summon monsters levels 2-6. The player Tributes a "Junk Synchron" from their side of the field. They can then Pendulum Summon "Junk Warrior" (Level 5) from their Extra Deck, but cannot Pendulum Summon "Junk Destroyer" due it its Level being higher than the Pendulum Scale.

Even if someone can just point me in the direction of a card with a similar effect, that would be very helpful.


EDIT


My biggest issue is that I'm not sure how to get the card's name (or set) and make sure the appropriate Synchro Monster's level is within the player's Pendulum Scale.
Haku_Yowane
2015-07-29T03:56:12Z
I'am sorry......but i think the system would forbid you if you trying to do so......every synchro pendulum monsters must first be synchro summoned before they can be pendulum summoned normally after they're destroyed and enters the extra deck. for example, if you have a pendulum synchro monster in your extra deck (if that card still in face-down) you will need to synchro summon it first, after it got destroyed, it will enter back to the extra deck in face-up position, on that moment you can pendulum summon that monster. i also have a synchro pendulum monster custom card. maybe you can learn a bit by opening my custom card here.

http://www.mediafire.com...loid+Custom+Card+New.zip 

i hope it will help you, sorry if my explanation is not clear enough
Kindrindra
2015-07-29T07:28:41Z
Actually, if I'm understanding the idea correctly, I think it would be possible, but you'd have to take a pretty roundabout method to do it. I think the best method would be to reference a card that uses an unconventional Synchro Summon as the base (Superheavy Samurai Battleball comes to mind), but edit the Special Summon function a little bit. To explain that last part in a way that makes a little more sense...



Duel.SpecialSummon(tc,0,tp,tp,false,false)
This is what you'd use for a normal special summon (generally), but the second variable, the zero, is what specifies summon type. It's normally zero, but Battleball for example has it as "SUMMON_TYPE_SYNCHRO" and ritual summons have it as "SUMMON_TYPE_RITUAL". You can set it to "SUMMON_TYPE_PENDULUM", and it will count as a Pendulum Summon. Just remember that since the card was not Synchro Summoned, it will be subject to the Synchro rules that you can't then Summon it from the Grave or Banished Zone. (You'll also have to change that first "false" into "true" to ignore Summoning Conditions iirc.)

I learned this because I once coded a card which allows you to Pendulum Summon on your opponent's turn (mostly referenced Return from the Different Dimension), so if I'm not totally misunderstanding what you're going for it should work.


tl;dr: If you want the text to read something like "Tribute 1 Tuner Monster you control; Special Summon 1 Synchro Monster that lists the tributed monster as a Synchro Material from your Extra Deck. (This Special Summon is treated as a Pendulum Summon.) If you activate this effect: Destroy all Pendulum Summoned monsters you control during your End Phase.", it should be fine. If you want "Tribute 1 Tuner Monster you control; This turn, you can Pendulum Summon Synchro Monsters that list that monster as a Synchro Material from your Extra Deck. If you activate this effect: Destroy all Pendulum Summoned monsters you control during your End Phase.", that... Might be more difficult. You'd likely have to search up the part of the code that deals with Pendulum Summons, and then maybe reference Cybernetic Fusion Support?
Cards scripted: ...lost count
Cards released: 18
Cards illustrated: Double digits
Main Decks: D/D, Heraldic, Gusto on good days
NostalgiaX
2015-07-29T14:22:03Z
Originally Posted by: Kindrindra 

Actually, if I'm understanding the idea correctly, I think it would be possible, but you'd have to take a pretty roundabout method to do it. I think the best method would be to reference a card that uses an unconventional Synchro Summon as the base (Superheavy Samurai Battleball comes to mind), but edit the Special Summon function a little bit. To explain that last part in a way that makes a little more sense...



Duel.SpecialSummon(tc,0,tp,tp,false,false)
This is what you'd use for a normal special summon (generally), but the second variable, the zero, is what specifies summon type. It's normally zero, but Battleball for example has it as "SUMMON_TYPE_SYNCHRO" and ritual summons have it as "SUMMON_TYPE_RITUAL". You can set it to "SUMMON_TYPE_PENDULUM", and it will count as a Pendulum Summon. Just remember that since the card was not Synchro Summoned, it will be subject to the Synchro rules that you can't then Summon it from the Grave or Banished Zone. (You'll also have to change that first "false" into "true" to ignore Summoning Conditions iirc.)

I learned this because I once coded a card which allows you to Pendulum Summon on your opponent's turn (mostly referenced Return from the Different Dimension), so if I'm not totally misunderstanding what you're going for it should work.


tl;dr: If you want the text to read something like "Tribute 1 Tuner Monster you control; Special Summon 1 Synchro Monster that lists the tributed monster as a Synchro Material from your Extra Deck. (This Special Summon is treated as a Pendulum Summon.) If you activate this effect: Destroy all Pendulum Summoned monsters you control during your End Phase.", it should be fine. If you want "Tribute 1 Tuner Monster you control; This turn, you can Pendulum Summon Synchro Monsters that list that monster as a Synchro Material from your Extra Deck. If you activate this effect: Destroy all Pendulum Summoned monsters you control during your End Phase.", that... Might be more difficult. You'd likely have to search up the part of the code that deals with Pendulum Summons, and then maybe reference Cybernetic Fusion Support?



That was the problem. Yes, I wanted it to be treated as a Pendulum Summon (not a Synchro Summon) so that the player could summon other monsters as well. However, they'd all go to the graveyard during the End Phase and the player wouldn't be able to Special Summon the Synchro Monster, since it wasn't properly summoned. That was going to be the drawback.

My biggest issue is that I'm not sure how to get the card's name (or set) and make sure the appropriate Synchro Monster's level is within the player's Pendulum Scale. I'll look into Cybernetic Fusion Support and some spell cards that take advantage of Pendulum Zones/Scales and see what I can come up with.
Tegardee
2015-07-29T18:15:05Z
Impossible, to code this effect you want, you must have Synchro monsters FACE-UP on your Extra Deck. because the code of the Pendulum Summon is coded to Pendulum Summon from Hand or Face-up from the Extra Deck.
Kindrindra
2015-07-29T19:06:06Z
Originally Posted by: NostalgiaX 

That was the problem. Yes, I wanted it to be treated as a Pendulum Summon (not a Synchro Summon) so that the player could summon other monsters as well. However, they'd all go to the graveyard during the End Phase and the player wouldn't be able to Special Summon the Synchro Monster, since it wasn't properly summoned. That was going to be the drawback.

My biggest issue is that I'm not sure how to get the card's name (or set) and make sure the appropriate Synchro Monster's level is within the player's Pendulum Scale. I'll look into Cybernetic Fusion Support and some spell cards that take advantage of Pendulum Zones/Scales and see what I can come up with.



In that case, here's the other half of what you'll need- This is from the "utility" file in the script folder, specifically the part of it that makes pendulum monsters, well, pendulum monsters. (I discovered this is where all the summoning procedures are kept by... Well, messing up a ritual summon really badly.) What you'll probably want to do is have the card grant a similar effect to the monsters you're adding to the summon list.

function Auxiliary.AddPendulumProcedure(c)
	local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetCode(EFFECT_SPSUMMON_PROC_G)
	e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
	e1:SetRange(LOCATION_PZONE)
	e1:SetCountLimit(1,10000000)
	e1:SetCondition(Auxiliary.PendCondition())
	e1:SetOperation(Auxiliary.PendOperation())
	e1:SetValue(SUMMON_TYPE_PENDULUM)
	c:RegisterEffect(e1)
end
function Auxiliary.PConditionFilter(c,e,tp,lscale,rscale)
	local lv=0
	if c.pendulum_level then
		lv=c.pendulum_level
	else
		lv=c:GetLevel()
	end
	return (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM)))
		and lv>lscale and lv<rscale and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false)
		and not c:IsForbidden()
end
function Auxiliary.PendCondition()
	return	function(e,c,og)
				if c==nil then return true end
				local tp=c:GetControler()
				if c:GetSequence()~=6 then return false end
				local rpz=Duel.GetFieldCard(tp,LOCATION_SZONE,7)
				if rpz==nil then return false end
				local lscale=c:GetLeftScale()
				local rscale=rpz:GetRightScale()
				if lscale>rscale then lscale,rscale=rscale,lscale end
				local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
				if ft<=0 then return false end
				if og then
					return og:IsExists(Auxiliary.PConditionFilter,1,nil,e,tp,lscale,rscale)
				else
					return Duel.IsExistingMatchingCard(Auxiliary.PConditionFilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,nil,e,tp,lscale,rscale)
				end
			end
end
function Auxiliary.PendOperation()
	return	function(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
				local rpz=Duel.GetFieldCard(tp,LOCATION_SZONE,7)
				local lscale=c:GetLeftScale()
				local rscale=rpz:GetRightScale()
				if lscale>rscale then lscale,rscale=rscale,lscale end
				local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
				if og then
					Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
					local g=og:FilterSelect(tp,Auxiliary.PConditionFilter,1,ft,nil,e,tp,lscale,rscale)
					sg:Merge(g)
				else
					Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
					local g=Duel.SelectMatchingCard(tp,Auxiliary.PConditionFilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,ft,nil,e,tp,lscale,rscale)
					sg:Merge(g)
				end
				Duel.HintSelection(Group.FromCards(c))
				Duel.HintSelection(Group.FromCards(rpz))
			end
end


And then there's this part

function Auxiliary.penlimit(e,se,sp,st)
	return bit.band(st,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end

Which is probably the part that makes them Pendulum Summonable. So either you can easily use the second part to make the selected card Pendulum Summonable (reference Dual-Type Monsters like the anime T.G.), or you'll have to dig a little more into depth with the first part. Good luck!
Cards scripted: ...lost count
Cards released: 18
Cards illustrated: Double digits
Main Decks: D/D, Heraldic, Gusto on good days
NostalgiaX
2015-07-31T18:22:42Z
It's starting to look like doing this is too advanced for me. I'll take a look at everything more and try to understand how to get the effect to work the way I'd like. Thank you for all your help!
Michael Lawrence Dee
2015-08-02T02:38:48Z
Originally Posted by: NostalgiaX 

It's starting to look like doing this is too advanced for me. I'll take a look at everything more and try to understand how to get the effect to work the way I'd like. Thank you for all your help!



I can make it possible. Recreate your card text below since your previous posts are pretty long. This is not an impossible script.
Now this is how I play:
NostalgiaX
2015-08-03T06:34:32Z
Originally Posted by: Michael Lawrence Dee 

Originally Posted by: NostalgiaX 

It's starting to look like doing this is too advanced for me. I'll take a look at everything more and try to understand how to get the effect to work the way I'd like. Thank you for all your help!



I can make it possible. Recreate your card text below since your previous posts are pretty long. This is not an impossible script.



Sure. The card text reads as follows:
Once per turn: You can Tribute 1 Tuner monster you control; You can Pendulum Summon Synchro Monsters from your Extra Deck that list the Tributed Tuner as Synchro Material. Destroy all Pendulum Summoned monsters you control during your End Phase.
Michael Lawrence Dee
2015-08-03T06:40:20Z
Originally Posted by: NostalgiaX 

Originally Posted by: Michael Lawrence Dee 

Originally Posted by: NostalgiaX 

It's starting to look like doing this is too advanced for me. I'll take a look at everything more and try to understand how to get the effect to work the way I'd like. Thank you for all your help!



I can make it possible. Recreate your card text below since your previous posts are pretty long. This is not an impossible script.



Sure. The card text reads as follows:
Once per turn: You can Tribute 1 Tuner monster you control; You can Pendulum Summon Synchro Monsters from your Extra Deck that list the Tributed Tuner as Synchro Material. Destroy all Pendulum Summoned monsters you control during your End Phase.



Unfortunately, obtaining the list of a specific Synchro Materials is impossible. If this were Fusion Monsters, this could've been easier since you can obtain the list of Fusion Materials.
Now this is how I play:
NostalgiaX
2015-08-03T06:45:09Z
Originally Posted by: Michael Lawrence Dee 

Originally Posted by: NostalgiaX 

Originally Posted by: Michael Lawrence Dee 

Originally Posted by: NostalgiaX 

It's starting to look like doing this is too advanced for me. I'll take a look at everything more and try to understand how to get the effect to work the way I'd like. Thank you for all your help!



I can make it possible. Recreate your card text below since your previous posts are pretty long. This is not an impossible script.



Sure. The card text reads as follows:
Once per turn: You can Tribute 1 Tuner monster you control; You can Pendulum Summon Synchro Monsters from your Extra Deck that list the Tributed Tuner as Synchro Material. Destroy all Pendulum Summoned monsters you control during your End Phase.



Unfortunately, obtaining the list of a specific Synchro Materials is impossible. If this were Fusion Monsters, this could've been easier since you can obtain the list of Fusion Materials.



Not a big deal. Would it be possible to Pendulum Summon any Synchro Monster from the Extra Deck as long as their Level is within the Pendulum Scale? If so, I don't mind going with that effect instead.
Michael Lawrence Dee
2015-08-03T06:49:18Z
Originally Posted by: NostalgiaX 


Not a big deal. Would it be possible to Pendulum Summon any Synchro Monster from the Extra Deck as long as their Level is within the Pendulum Scale? If so, I don't mind going with that effect instead.



Yes. But is this a Pendulum Monster? Or a card that would use a separate Pendulum Monster? Don't worry, I can do them either way.

So:
Tribute 1 Tuner; during this turn, you can Pendulum Summon any Synchro Monster whose Level.....

Correct?
Now this is how I play:
NostalgiaX
2015-08-03T06:53:30Z
Originally Posted by: Michael Lawrence Dee 

Originally Posted by: NostalgiaX 


Not a big deal. Would it be possible to Pendulum Summon any Synchro Monster from the Extra Deck as long as their Level is within the Pendulum Scale? If so, I don't mind going with that effect instead.



Yes. But is this a Pendulum Monster? Or a card that would use a separate Pendulum Monster? Don't worry, I can do them either way.

So:
Tribute 1 Tuner; during this turn, you can Pendulum Summon any Synchro Monster whose Level.....

Correct?



Correct, and it's the Pendulum Effect of a Pendulum Monster.
Michael Lawrence Dee
2015-08-03T07:08:20Z
Originally Posted by: NostalgiaX 

Originally Posted by: Michael Lawrence Dee 

Originally Posted by: NostalgiaX 


Not a big deal. Would it be possible to Pendulum Summon any Synchro Monster from the Extra Deck as long as their Level is within the Pendulum Scale? If so, I don't mind going with that effect instead.



Yes. But is this a Pendulum Monster? Or a card that would use a separate Pendulum Monster? Don't worry, I can do them either way.

So:
Tribute 1 Tuner; during this turn, you can Pendulum Summon any Synchro Monster whose Level.....

Correct?



Correct, and it's the Pendulum Effect of a Pendulum Monster.



Ok. Expect this tomorrow or next week. Also, make sure your using the description string. And make sure your card number is 8-digits or less. If not, Pendulum Summoning may show up as ??? and it would not work properly. Also, you might have to Pendulum Summon using the right card instead of the usual left.
Now this is how I play:
Michael Lawrence Dee
2015-08-03T08:02:01Z
Hmmm... It was easier than expected. Just modify it to match your card number.
File Attachment(s):
c73.lua (3kb) downloaded 14 time(s).

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

Now this is how I play:
NostalgiaX
2015-08-03T17:53:03Z
Originally Posted by: Michael Lawrence Dee 

Hmmm... It was easier than expected. Just modify it to match your card number.



It works! Thank you so much. Looking at the code, I think I understand how you did it too. I really appreciate your help!