Skip to content

Duel.Win ​

Signature ​

lua
Duel.Win(int player, int reason) -> void

Description ​

Sets player as the duel winner with reason, but only if no winner has already been set.

Parameters ​

  • player int
  • reason int

Source ​

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

Used By ​

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

  • Detected in 20 indexed script(s).
  • Search this function in the Script Explorer with Duel.Win.
CardIDScriptDetected Calls
Summer Schoolwork Successful!77751766Scripts/c77751766.lua1
Phantasm Spiral Assault97795930Scripts/c97795930.lua1
Exodius the Ultimate Forbidden Lord13893596Scripts/c13893596.lua1
Destiny Board94212438Scripts/c94212438.lua1
Exodia, the Legendary Defender5008836Scripts/c5008836.lua1
Vennominaga the Deity of Poisonous Snakes8062132Scripts/c8062132.lua1
F.A. Winners69553552Scripts/c69553552.lua1
Number iC1000: Numerounius Numerounia15862758Scripts/c15862758.lua1
Ghostrick Angel of Mischief53334641Scripts/c53334641.lua1
Musical Sumo Dice Games96637156Scripts/c96637156.lua1
Last Turn28566710Scripts/c28566710.lua3
Number 88: Gimmick Puppet of Leo48995978Scripts/c48995978.lua1
Relay Soul42776960Scripts/c42776960.lua1
Number C88: Gimmick Puppet Disaster Leo6165656Scripts/c6165656.lua1
Holactie the Creator of Light10000040Scripts/c10000040.lua1
Jackpot 781171949Scripts/c81171949.lua1
Flying Elephant66765023Scripts/c66765023.lua1
True Exodia37984331Scripts/c37984331.lua1
Final Countdown95308449Scripts/c95308449.lua1
Exodia the Forbidden One33396948Scripts/c33396948.lua3

Script Examples ​

Summer Schoolwork Successful! (77751766) ​

Source: Scripts/c77751766.lua

lua
				if Duel.SSet(tp,g:GetFirst())>0 and Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_DECK,0,nil)<=1 then
					Duel.BreakEffect()
					Duel.Win(tp,0x23)
				end
			end

Phantasm Spiral Assault (97795930) ​

Source: Scripts/c97795930.lua

lua
	if c:GetFlagEffect(97795930)>2 then
		local WIN_REASON_CELESTIAL_WHIRLPOOL=0x1c
		Duel.Win(tp,WIN_REASON_CELESTIAL_WHIRLPOOL)
	end
end

Exodius the Ultimate Forbidden Lord (13893596) ​

Source: Scripts/c13893596.lua

lua
		if c:GetOriginalCode()==13893596 and c:IsFaceup() and g:IsContains(tc) and g:GetClassCount(Card.GetCode)==5 then
			local WIN_REASON_EXODIUS = 0x14
			Duel.Win(tp,WIN_REASON_EXODIUS)
		end
	end