The IGM's "workhorse" is Events #19 to #107. It records the attack animation frames and analyzes their comparisons. The "Victory Test" is event #108 to event #124. It would be better for you to read those events from the available source code.
These two functions are tailored and customized specifically for my RPG duels and rules.
- If you make any adjustments to the sprite animation frames (adding more or fewer attack frames) then you also need to adjust the "consultSportsAnnouncer" narratives accordingly.
- If you make any adjustments to the "Combat Intensity" then you also need to adjust the "Victory Test" accordingly.
Conclusion
There you are! 121 Events creates a simplified Slot Machine Combat Engine. You should consider replacing the artwork with a different theme once you have a license to do so. For example, I use this "Slot Machine" game mechanics as a mini-adventure. (See Wizard's Toad Tutorial) Play "Wizard's Toad" in the Scirra Arcade.
Here's the "non-optimized with logic errors" .c3p example with HTML layers. If you decide to purchase this from the Construct Asset Store, you'll have:
- The Construct2 and Construct3 editions.
- all its artwork (Hint: also available from https://game-icons.net/)
- permission to use it in one or more projects
- integration with external CSS files and parent RPGs. (a PHP script is supplied separately for client/server deployment).
- a Developer's Guide with more detailed development information on its construction than presented in this tutorial