rrcampbell-exe / yarnsworths-tales

A storyline generator for fantasy roleplaying games.
https://rrcampbell-exe.github.io/yarnsworths-tales/
2 stars 0 forks source link

Vengeance functionality #4

Closed rrcampbell-exe closed 3 years ago

rrcampbell-exe commented 3 years ago

Description The goal is to create a display that, when "vengeance" is called in valueSet, appends another string like "vengeance for his brother's murder."

Possible Solutions

rrcampbell-exe commented 3 years ago

On feature/vengeance branch, justifications like "for their brother's murder" currently appear after any value chosen, not just "vengeance."

It appears the conditional (if-statement) is not reading condition ((valueSet[randomIndex]) = "vengeance") properly.

rrcampbell-exe commented 3 years ago

RESOLVED Issue was that code read as if (valueSet[randomIndex] = "vengeance") when it needed to read as if (valueSet[randomIndex] === "vengeance")