In a choice event, players are prompted with 1 or more images. Clicking on an image will chain to a new event.
"choice": {
"pickDuelist": {
"micon": "choiceIcon.webp",
"image": "choiceBackground.webp",
"title": "Which duelist are you?",
"list": [
{"desc": "You are Yugi Moto", "name": "Yugi", "img": "Yugi.webp", "chain": "pack:Yugi"},
{"desc": "You are Seto Kaiba", "name": "Seto", "img": "Seto.webp", "chain": "pack:Kaiba"},
{"desc": "You are Yami Bakura", "name": "Bakura", "img": "Bakura.webp", "chain": "pack:Bakura"}
]
}
}
You can disable choices with vars, by adding a "disable" attribute to the choice.
If the key is equal to the value, the choice will be disabled (it will not appear to the user).
In the example below, three choices are provided. However, if any of the vars "dog", "cat", or "rat" are set to "dead", that choice will not appear.
"choice": {
"packEqualToLevel": {
"list": [
{"desc":"Dog Pack","name": "Dog Pack","img":"dog.webp","chain":"pack:dog", "disable" : [ {"dog" : "dead"} ] },
{"desc":"Cat Pack","name": "Cat Pack","img":"cat.webp","chain":"pack:cat", "disable" : [ {"cat" : "dead"} ] },
{"desc":"Rat Pack","name": "Rat Pack","img":"rat.webp","chain":"pack:rat", "disable" : [ {"rat" : "dead"} ] },
]
}
}
You can check multiple values by putting each inside of an [Array]. In this case, it will be disabled only if all the vars are correct.
In the example below, the choice will only be disabled if eg "dog1" is set to "dead" and "dog2" is set to "notComingBack".
"choice": {
"packEqualToLevel": {
"list": [
{"desc":"Dog Pack","name": "Dog Pack","img":"dog.webp","chain":"pack:dog", "disable" : [ {"dog1" : "dead"}, {"dog2" : "notComingBack"} ] },
{"desc":"Cat Pack","name": "Cat Pack","img":"cat.webp","chain":"pack:cat", "disable" : [ {"cat1" : "dead"}, {"cat2" : "notComingBack"} ] },
{"desc":"Rat Pack","name": "Rat Pack","img":"rat.webp","chain":"pack:rat", "disable" : [ {"rat1" : "dead"}, {"rat2" : "notComingBack"} ] },
]
}
}