Open jomibauer opened 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.
UnitGrowths and UnitStats were being stored in separate UnitStat objects. Pay attention to where stats are getting created in the unitParser.
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
[x] Selecting a unit that's inactive during the moveTargetState gets a nullRefException
just add a null check before doing anything with the selected unit. Gonna bring up the map menu if the unit is null.
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.
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
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.
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.
I think this is fixed. I just needed to check for death in the OnPlayNextRound method in the skirmishPlayController.
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.
just added a function that makes sure the raw hit/ crit chance is between 100 & 0
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.
Add when u find em. Move to a comment with an explanation of the fix when you fix it