Code: Select all
@@Secret Attack
[H: inputStr = json.append("","Message||Limit who can see output|LABEL|TEXT=FALSE")]
[H, foreach(player,getAllPlayerNames()): inputStr = json.append(inputStr,
strformat("%s|1|%s|CHECK",player,player))]
[H: hasInput = input(json.toList(inputStr,"##"))]
[H: abort(hasInput)]
[H: outputList = ""]
[H, foreach(player,getAllPlayerNames()), code: {
[H: pVal = eval(player)]
[H, if(pVal == 1): outputList = listAppend(outputList,player)]
}]
[S,W(outputList): "<font color=red><b>SECRET ATTACK: </b></font><b>Do not discuss with other players</b><br>"]
[S,W(outputList), MACRO("Attack@Lib:libDnD35Pathfinder"): "" ]