Skip to content

Group.GetNext ​

Signature ​

lua
Group.GetNext(Group g) -> Card|nil

Description ​

Advances g's internal iterator and returns the next card, or nil when there are no more cards.

How To Use It ​

GetNext belongs to the GetFirst iteration pattern. It advances the same internal pointer and returns nil after the final card.

lua
for tc in aux.Next(g) do
    -- aux.Next wraps GetFirst/GetNext
end

When you only need the number of cards, use #g or g:GetCount() instead of iterating.

Parameters ​

  • g Group

Returns ​

  • Card|nil

Source ​

  • D:\Programs\GitHub\ygopro-core\libgroup.cpp:908

Guided Examples ​

Learn how to use this function in context:

Used By ​

Generated from the local Scripts/ folder and cards.cdb.

  • Detected in 781 indexed script(s).
  • Search this function in the Script Explorer with Group.GetNext.
CardIDScriptDetected Calls
Pendulum Evolution55795155Scripts/c55795155.lua1
Astrograph Sorcerer76794549Scripts/c76794549.lua1
Ultra Polymerization76647978Scripts/c76647978.lua1
Goyo Emperor59255742Scripts/c59255742.lua1
Prank-Kids Weather Washer44509529Scripts/c44509529.lua1
PSY-Framelord Omega74586817Scripts/c74586817.lua2
Shining Draw35906693Scripts/c35906693.lua1
Barian's Chaos Draw97769122Scripts/c97769122.lua1
Nekroz Kaleidoscope51124303Scripts/c51124303.lua2
Bujinki Ahashima71095768Scripts/c71095768.lua1
PSY-Framelord Zeta37192109Scripts/c37192109.lua2
Penetration Fusion8778267Scripts/c8778267.lua1
DoSolfachord Coolia80776622Scripts/c80776622.lua1
Prank-Kids Rocket Ride18514525Scripts/c18514525.lua1
Gravity Balance37930737Scripts/c37930737.lua1
Vernusylph and the Changing Season37313338Scripts/c37313338.lua1
Isolde, Two Tales of the Noble Knights59934749Scripts/c59934749.lua1
Black Dragon Ninja56562619Scripts/c56562619.lua2
Mixeroid71340250Scripts/c71340250.lua1
Echelon of the Fire Kings38798785Scripts/c38798785.lua1
Magical Hats81210420Scripts/c81210420.lua1
Cyberse Reminder56337500Scripts/c56337500.lua1
Grandpa Demetto44190146Scripts/c44190146.lua1
Flame Swordsrealm73714736Scripts/c73714736.lua1
...and 757 more

Script Examples ​

Pendulum Evolution (55795155) ​

Source: Scripts/c55795155.lua

lua
	while tc do
		Duel.RegisterFlagEffect(tc:GetSummonPlayer(),55795155,RESET_PHASE+PHASE_END,0,1)
		tc=g:GetNext()
	end
end

Astrograph Sorcerer (76794549) ​

Source: Scripts/c76794549.lua

lua
			tc:RegisterFlagEffect(76794549,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
		end
		tc=eg:GetNext()
	end
end

Ultra Polymerization (76647978) ​

Source: Scripts/c76647978.lua

lua
				sc:RegisterEffect(e4,true)
			end
			sc=mg:GetNext()
		end
		Duel.SpecialSummonComplete()