Hello guys. I met a little problem. So i creating a very ineteresting game, and now i got stuck. My game have a match logical battle system, and i dont know how to create this skill type:
Every skill granted a specific damage. And if the player use a bad skill game over.
Example: The mob have 50hp, but your skill attack value 60, need to game over screen, or a self damage-
I trying this formula: 90+a.atk > b.hp ? 20+a.atk my Logic, how If the player dmg overdamage the enemy hp ( b-hp -> Current hp) then only dmg 20 ( this only example) but total not working.. Some idea or help? I Dont know how to create a self dmg, i try cal variable but not work =(
Thx in advance !
Every skill granted a specific damage. And if the player use a bad skill game over.
Example: The mob have 50hp, but your skill attack value 60, need to game over screen, or a self damage-
I trying this formula: 90+a.atk > b.hp ? 20+a.atk my Logic, how If the player dmg overdamage the enemy hp ( b-hp -> Current hp) then only dmg 20 ( this only example) but total not working.. Some idea or help? I Dont know how to create a self dmg, i try cal variable but not work =(
Thx in advance !