Devlog 4:A (DONE BY ERNIE BURROWS)


New Features.

  • Added healing ability.
  • Added robot armor slots.
  • Added defense ability.
  • Set up enemy ability choosing AI.
  • Refactored abilities to allow for ability uses per battle

Added healing ability.

I added a scriptable object of a healing ability. Overall this was not that much work due to some good code hierarchy set up earlier in the project. I even did it the right way and made a .Heal() function instead of just passing in a negative number to .TakeDamage()

Added robot armor slots.

I added a head, body and weapon armor slots to both the enemy and the player robot, all 3 slots have a ability effect increase from 0-100%.

The head armor slot effects the healing percent, the Body armor slot decreases incoming damage, and the Weapon "Armor" slot increases outgoing damage. I calculated all this in the BattleSystem.cs. Essentially the armors will increase or decrease the correct stat based on their effect %.

Added defense ability.

I had to do some thinking on what the "Defense" ability would be. Since we have armor that effects both incoming and outgoing attack damage, a tail whip or bolster wasn't going to do it here. I thought for a second on making an initiative or attack speed to the system... Then I realized this would mean I had to re-work the entire system. So I settled on the most annoying ability in turn based RPG's... That's right, the defense ability increases your characters chance to dodge an attack. The calculations for this are in BattleSystem.cs, but essentially I generate a random number between 0 and 100 and if the dodge percent is higher then that number then the attack misses.

Set up enemy ability choosing AI.

I created a function that will choose which ability the enemy will perform next. The function is in BattleState.cs and it follows the below flow chart. However, it also has a bit more added complexity of checking the uses left on abilities. Once the enemy is out of uses on an ability it will transition to the next state of decision making. If the enemy somehow uses all of it ability uses (nearly impossible) the enemy will simply sit there and let you kill it.

Refactored abilities to allow for ability uses per battle

I changed the Battle Character to have a list of a custom class Abilities. This class holds an AbilitySO, a statingUses, and a currentUsesLeft. This actually did require that I refactor most of the code in the game since a lot of systems where expecting to receive the AbilitySO and not a custom class. Luckly changing ability -> ability.ability was not that hard to do.

Flow Chart with Pseudocode:

Youtube -> 



Github-> https://github.com/GEIII-GearUp/GearUp/tree/7e783770ccf990e02e41333b7d4b95aae8d4...

Get Gear Up

Leave a comment

Log in with itch.io to leave a comment.