Skip to content

Duel.RockPaperScissors ​

Signature ​

lua
Duel.RockPaperScissors([bool repeat]) -> int

Description ​

Runs the Rock-Paper-Scissors selector and returns the winning player; repeat defaults to true.

Parameters ​

  • repeat bool optional - default: true

Returns ​

  • int - Winning player.

Source ​

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

Used By ​

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

  • Detected in 1 indexed script(s).
  • Search this function in the Script Explorer with Duel.RockPaperScissors.
CardIDScriptDetected Calls
Transmission Gear58297729Scripts/c58297729.lua1

Script Examples ​

Transmission Gear (58297729) ​

Source: Scripts/c58297729.lua

lua
	if not a:IsRelateToBattle() or not d:IsRelateToBattle() then return end
	if a:IsControler(1-tp) then a,d=d,a end
	local res=Duel.RockPaperScissors()
	if res==tp then
		Duel.Remove(d,POS_FACEDOWN,REASON_RULE)