Hi! Using Harlowe for the first time ever today. I am not much of a coder so please bare with me.
I want to check an array to see what type Essence is set to, and then increase the resourceEssence that corresponds with what essence is active. I’m currently doing this with too many if statements, but I’m sure there’s a better way to do this? I might want to add to the array later on and this seems cumbersome.
(set: $essenceType to
(a:"Air","Earth","Fire","Water"))
(if: $essenceType is "air")[(set: $resourceAir to +1)]
(if: $essenceType is "earth")[(set: $resourceEarth to +1)]
(if: $essenceType is "fire")[(set: $resourceFire to +1)]
(if: $essenceType is "water")[(set: $resourceWater to +1)]