Skip to content

Duel.GetFieldGroupCount ​

Signature ​

lua
Duel.GetFieldGroupCount(int player, int s, int o) -> int

Description ​

Returns the number of cards in the specified locations from player's viewpoint.

Parameters ​

  • player int
  • s int
  • o int

Returns ​

  • int

Source ​

  • D:\Programs\GitHub\ygopro-core\libduel.cpp:4966

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 950 indexed script(s).
  • Search this function in the Script Explorer with Duel.GetFieldGroupCount.
CardIDScriptDetected Calls
Levia-Dragoon - Daedalus78579058Scripts/c78579058.lua2
Spellbook of the Grand Circle11911336Scripts/c11911336.lua1
El Shaddoll Apkallone50907446Scripts/c50907446.lua1
GMX 55th Experiment Report38984832Scripts/c38984832.lua1
Nekroz Kaleidoscope51124303Scripts/c51124303.lua1
Junoldo the Shadespirit Power Patron10266279Scripts/c10266279.lua2
Odd-Eyes Arcray Dragon6218704Scripts/c6218704.lua1
Flower Cardian Peony with Butterfly57261568Scripts/c57261568.lua1
Jupredo the Shademachine Power Patron43871165Scripts/c43871165.lua2
Vernusylph and the Changing Season37313338Scripts/c37313338.lua1
Ostinato9113513Scripts/c9113513.lua1
Cyber Dragon, the Luminous Mech Dragon66664203Scripts/c66664203.lua1
Nervedo the Shadebeast Power Patron17473466Scripts/c17473466.lua2
GMX - VELOX82706696Scripts/c82706696.lua1
Purrely25550531Scripts/c25550531.lua1
Ghoti Fury65898344Scripts/c65898344.lua2
Numeron Calling77402960Scripts/c77402960.lua1
Kaiki the Unity Star60822251Scripts/c60822251.lua1
Genex Ally Triarm17760003Scripts/c17760003.lua1
Odd-Eyes Venom Dragon45014450Scripts/c45014450.lua2
Gunkan Sushipyard Seaside Supper Spot62200831Scripts/c62200831.lua1
PSY-Framegear Alpha75425043Scripts/c75425043.lua2
Shimmering Shatterer of the Sacred Beasts3441553Scripts/c3441553.lua2
Sylvan Dancepione21903613Scripts/c21903613.lua1
...and 926 more

Script Examples ​

Levia-Dragoon - Daedalus (78579058) ​

Source: Scripts/c78579058.lua

lua
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then
		local h=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
		return h>0 and Duel.IsPlayerCanDraw(1-tp,h)
	end

Spellbook of the Grand Circle (11911336) ​

Source: Scripts/c11911336.lua

lua
	if Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then
		Duel.ConfirmCards(1-tp,sg)
		if sg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>1 then
			Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
			local dg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,2,2,nil)

El Shaddoll Apkallone (50907446) ​

Source: Scripts/c50907446.lua

lua
	if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
		Duel.ConfirmCards(1-tp,g)
		if g:GetFirst():IsLocation(LOCATION_HAND) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 then
			Duel.BreakEffect()
			Duel.ShuffleHand(tp)