Skip to content

Duel.AnnounceCoin ​

Signature ​

lua
Duel.AnnounceCoin(int player) -> int

Description ​

Lets player choose one of the built-in coin-side options and returns the zero-based option index.

Parameters ​

  • player int

Returns ​

  • int - Zero-based option index.

Source ​

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

Used By ​

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

  • Detected in 18 indexed script(s).
  • Search this function in the Script Explorer with Duel.AnnounceCoin.
CardIDScriptDetected Calls
Reversal Box2606417Scripts/c2606417.lua1
Dark Time Wizard40235813Scripts/c40235813.lua1
Goddess of the Two Sides50915474Scripts/c50915474.lua1
VIP Whale14556954Scripts/c14556954.lua1
Time Wizard of Tomorrow26273196Scripts/c26273196.lua1
Prepare to Strike Back4483989Scripts/c4483989.lua1
Lucky Chance96012004Scripts/c96012004.lua1
Head Judging38143903Scripts/c38143903.lua1
Fairy Box21598948Scripts/c21598948.lua1
Time Wizard71625222Scripts/c71625222.lua1
Kryuel82642348Scripts/c82642348.lua1
Goddess of Whim67959180Scripts/c67959180.lua1
B.E.S. Covered Core15317640Scripts/c15317640.lua1
Gamble37313786Scripts/c37313786.lua1
Sasuke Samurai #464538655Scripts/c64538655.lua1
Fiend Comedian81172176Scripts/c81172176.lua1
Abare Ushioni89718302Scripts/c89718302.lua1
Jirai Gumo94773007Scripts/c94773007.lua1

Script Examples ​

Reversal Box (2606417) ​

Source: Scripts/c2606417.lua

lua
	local tc=Duel.GetFirstTarget()
	Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COIN)
	local coin=Duel.AnnounceCoin(tp)
	local res=Duel.TossCoin(tp,1)
	if coin~=res and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then

Dark Time Wizard (40235813) ​

Source: Scripts/c40235813.lua

lua
		local p=1-tp
		Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COIN)
		local coin=Duel.AnnounceCoin(tp)
		local res=Duel.TossCoin(tp,1)
		if coin==res then

Goddess of the Two Sides (50915474) ​

Source: Scripts/c50915474.lua

lua
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
	Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COIN)
	local coin=Duel.AnnounceCoin(tp)
	local res=Duel.TossCoin(tp,1)
	if coin~=res then