Closed LouisDeconinck closed 2 years ago
The reason I want to use this, is that I want a card to either have 0, 1 or 2 Sun or 0, 1 or 2 Snow, but never both at the same time. Is there any other way how I could achieve this?
Let's finish this over on Discussion, it's not a feature request :)
The following code always returns 'No sun' even if the SunUp variable contains 1 or 2. I noticed that this is because data['SunUp'] is always an array. How can I change certain elements on the cards if a certain condition is met? Using ranges (https://squib.readthedocs.io/en/v0.18.0/arrays.html) seems a lot less flexible.
In the example (https://squib.readthedocs.io/en/v0.18.0/arrays.html#examples), this code is used to identify the Thief and Grifter:
text range: 0..1, str: 'Thief and Grifter only!!', x: 25, y:200
Wouldn't it be a lot more logical to check if the name of the card matches Thief or Grifter? That way, if the cards change position in your data, the code still works.Is there any possibility of using case or if when using Squib? If not this would seem like a very useful function.