top of page

Overview

Sin slayer has a turn-based system that controls the player turn and enemy turn. At the start of the player's turn, player will be asked to flip cards in order to determine the actions that are able to played this turn. After deciding, the system will start the battle log by showing the log text on the screen. 

Functionality

-Flipping cards, cursor clicking

-Cards decide the player's actions

-Action menu, cursor clicking, and number keys

-Battle log

-Constantly update player and enemy's information

Flip Cards

By using a mouse to click on the cards, the cards will flip over and show the action. 

The card start by showing the card back, which is blank black color. Every card can only be clicked once.

The cards will return a value to the count of the same kind of card and the count deliver its value to a boolean value to enable or disable the selection in the action menu.

When six cards are flipped, proceed to the action menu prompt.

FlippingCards.png
FlipCardScript.png
CampareCardScript.png

Shuffling

Before the player's turn begin, shuffling will be executed. This will randomize the card deck.

The shuffle function randomly swaps elements in the array. This swap action will happen more than a hundred times to ensure randomness. 

Mouse&KeyboardInputScript.png

Battle Log

The battle log help player visualizes the damage and situation of the battle.

When the battle log starts, player input will be disabled. It starts with the player's action(s), and then the enemy's action.

 

If the player actions more than one time, between each action will have a short gap time in order to visualize each action. 

Attack & Defense

The player and enemy's attacks are determined by hit, which comes from DND. 

Hit value is randomized for every attack, based on the character's hit stat.

If the hit is lower or equal to the enemy's defense, the attack will miss. Otherwise, the attack will land. The damage value is determined by the character's minimum and maximum attack value.

BattleLog.png
CardShuffleScript.png

Action Menu Input

The player can use either mouse or keyboard for action menu input. 

Clicking the corresponding number key, or clicking on the action text works the same.

The action buttons lead to the skill description and confirmation for using that action.

ActionMenu.png
BattleControlScript.png
BattleScript.png
bottom of page