Skip to content

Group.Sub ​

Signature ​

lua
Group.Sub(Group g1, Group g2) -> void

Description ​

Removes every card in g2 from g1. g1 is mutated unless it is read-only; g2 is not changed.

Parameters ​

  • g1 Group
  • g2 Group

Source ​

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

Used By ​

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

  • Detected in 89 indexed script(s).
  • Search this function in the Script Explorer with Group.Sub.
CardIDScriptDetected Calls
Artmage Non-Finito74631897Scripts/c74631897.lua1
Ashtraja Susanoo17020474Scripts/c17020474.lua1
D/D/D Alfred the Divine Sage King11852093Scripts/c11852093.lua1
El Shaddoll Apkallone50907446Scripts/c50907446.lua1
Mementotlan Fusion66518509Scripts/c66518509.lua1
Performage Cup Tricker6812770Scripts/c6812770.lua1
D/D Count Surveyor5997110Scripts/c5997110.lua2
Aroma Blend25861589Scripts/c25861589.lua1
Invocation - "Sword"37432075Scripts/c37432075.lua1
Invocation74063034Scripts/c74063034.lua1
A-to-Z-Dragon Buster Cannon65172015Scripts/c65172015.lua1
Branded in White34995106Scripts/c34995106.lua1
S:P Little Knight29301450Scripts/c29301450.lua1
Alba System Dogmatikalamity93053159Scripts/c93053159.lua2
Lunalight Masquerade2344618Scripts/c2344618.lua1
Amazoness Secret Arts86758746Scripts/c86758746.lua1
Berserkion the Electromagna Warrior42901635Scripts/c42901635.lua1
Nebulus, Dragon Ruler of Mishaps94655777Scripts/c94655777.lua1
Heavy Interlock20071842Scripts/c20071842.lua1
Gem-Knight Master Diamond Dispersion25342956Scripts/c25342956.lua2
Number 4: Stealth Kragen67557908Scripts/c67557908.lua1
ABC-Dragon Buster1561110Scripts/c1561110.lua1
Magikey Maftea99426088Scripts/c99426088.lua1
Metaltron XII, the True Dracombatant57761191Scripts/c57761191.lua1
...and 65 more

Script Examples ​

Artmage Non-Finito (74631897) ​

Source: Scripts/c74631897.lua

lua
	local g=e:GetLabelObject()
	local dg=g:Filter(s.disfilter,nil)
	g:Sub(dg)
	Duel.SendtoGrave(dg,REASON_SPSUMMON+REASON_DISCARD)
	Duel.Release(g,REASON_SPSUMMON)

Ashtraja Susanoo (17020474) ​

Source: Scripts/c17020474.lua

lua
				end
				local tmg=tg:Clone()
				tmg:Sub(selg)
				local tc=tmg:SelectUnselect(selg,tp,finish,false,1,tg:GetCount())
				if not tc then

D/D/D Alfred the Divine Sage King (11852093) ​

Source: Scripts/c11852093.lua

lua
		Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
		pg=g:Select(tp,ct,ct,nil)
		g:Sub(pg)
	else
		g=Group.CreateGroup()