jomibauer / unity

0 stars 0 forks source link

Bugs #22

Open jomibauer opened 2 years ago

jomibauer commented 2 years ago

Add when u find em. Move to a comment with an explanation of the fix when you fix it

jomibauer commented 2 years ago

Fixed this by clearing the Turn in the Exit Player Phase State. I think this just resets it but probably needs a lil more testing before we can say its totally fine.

jomibauer commented 2 years ago

UnitGrowths and UnitStats were being stored in separate UnitStat objects. Pay attention to where stats are getting created in the unitParser.

jomibauer commented 2 years ago

Fixed this by overriding the base Disable method in WeaponSelectionState. Now the WeaponSelection Options are set to null whenever we disable or switch from the state

jomibauer commented 2 years ago
jomibauer commented 2 years ago

I fixed this because unitDied was not getting set back to false at the start of each Skirmish. If I want a variable to be reset everytime I start a state, I need to do in in the Enable method, not anywhere else.

jomibauer commented 2 years ago

fixed, it was an issue with changing the timing of state changes. Encapsulated the stateChange that occurs when there's been no hit inside of a Coroutine, fixed it

jomibauer commented 2 years ago

This didnt have to do with swapping. The distance calculation wasn't using the absolute value of the calculation so if a unit attacked to the left or from below it was considered negative range. fixed by using mathf.abs on the distance calc.

jomibauer commented 2 years ago

I fixed this by simply increasing the limit on i in the loop inside Previous() by 1. This still works after some testing, so I think its fine. What was happening is, when my attackRange was missing some elements because I was attacking something close to the edge of the map, the previous loop wouldnt reach all the way to the square just one element before the current selection. incresing the iterator limit means that it can reach it before breaking.

Just a thought, thismay not work if im in a corner and my attack range is further limited. Something to remember.

jomibauer commented 2 years ago

I think this is fixed. I just needed to check for death in the OnPlayNextRound method in the skirmishPlayController.

jomibauer commented 2 years ago

The way i am calculating levelDelta meant that sometimes it was a flat reduction of exp, which combined with other reductions meant that exp was 0 or sometimes negative. Changed it, but now high-level units are getting too much exp. I should probably set a hard minimum on some values like killPot and deltaLevel and trigger them when the actual value is negative w/ a ternary.

-- I tweaked the formula of the experience manager to scale xp a bit better as you get really distant from the other units level. Still probably needs some testing.

jomibauer commented 2 years ago

just added a function that makes sure the raw hit/ crit chance is between 100 & 0

jomibauer commented 2 years ago

this was just getting hidden in the SkirmishPreviewPane's Hide method. I added an else block to where we turn it on in the Show method to turn it off in these cases.