using multiple choice quiz to keep track of game score
Would it be possible to keep track of a game score during a turn based battle (like subtracting health pts if one option is chosen or adding pts if another is chosen) using something like a multiple choice quiz, where the option value either adds or subtracts some value? the score itself is determined by the option selected and is then represented by how many health pts or mana pts are deducted/added for 2 players, one of which is a npc monster and the other of which is a player character. each round (player attacks, monster attacks or player heals) can have a whole new quiz so values don't have to be continually passed from page to page, only the score, which is represented by two graphics (player health/mana and monster health).
the upside is i can pass the score from one page to the next by modifying the graphics beforehand and just have the multiple choice display the relevant graphic that contains the health/mana (scores) of the 2 combatants, the downside is i have no idea how to do that with javascript. i'm assuming the script would have to display a graphical score instead of a number score.
perhaps it could take a full health/mana bar graphic and a smaller graphic representing an empty/full unit of health and an empty/full unit of mana, and automate the entire process by applying the empty/full unit to the correct location on the full bar graphic, using z-indexing
if damage done is never more than 1 unit per round it is easily assigned the multiple choice option value of -1 health unit.
if heal is chosen and is never more than 2 mana per round, it is easily assigned the value of -2 mana units and +2 health units.
the monster always deducts 1 unit from the player each round. but the player may not always deduct 1 unit from the monster, if they choose to heal instead.
not sure how that could be depicted using multiple choice quiz options.