Making a battle system in the prototype I used, this is what I did:
1. Set player and enemy HP, Attack and Defense values
2. Assign a random value from 1 to 20 to the 1d20 variable
3. Compare 1d20 value with the enemy's DEF. If its lower, print "Miss" and proceed to 6
4. If it's higher, assign a random value from 1 to 6 to the 1d6 variable, then add the Player's ATK, and subtract the total from the Enemy's HP.
5. Print the damage dealt and the enemy's current HP.
6. Repeat the process 1 to 5 using the Enemy's stats against the Player.
1. Set player and enemy HP, Attack and Defense values
2. Assign a random value from 1 to 20 to the 1d20 variable
3. Compare 1d20 value with the enemy's DEF. If its lower, print "Miss" and proceed to 6
4. If it's higher, assign a random value from 1 to 6 to the 1d6 variable, then add the Player's ATK, and subtract the total from the Enemy's HP.
5. Print the damage dealt and the enemy's current HP.
6. Repeat the process 1 to 5 using the Enemy's stats against the Player.
😍1
Really makes you think what else you could make if you were using a more powerful engine and understanding how the code works 🤔
Forwarded from 🎀 Lyn the Loved
I wanna make friends in every country so I can learn how to swear in 200+ languages
🔥1
Forwarded from Satibel
YouTube
Fix Your Posture with Calisthenics! - TikTok Compilation
By request, I'll start uploading some TikTok compilations onto YouTube. Not everyone has the TikTok app and some prefer to view it here.
The videos ARE in vertical. I apologize if this bothers you. All TikTok videos are viewed in vertical. If this video…
The videos ARE in vertical. I apologize if this bothers you. All TikTok videos are viewed in vertical. If this video…