So, today, the skies opened up and dumped gallons upon gallons of water on the city. Classes were cancelled because there was a lot of flooding on the roads. Classes for teachers...were somehow not cancelled. I prepare pretty far in advanced for my classes, so after tying up some loose ends, I've had half a work day dedicated to this project, and honestly might update again later today.
A bit embarrassed about working with 3D assets when I'm supposed to be working, I worked entirely on code - which no one will ask me about because it's just visual white noise.
Behold: Combat basically complete.
In the global singleton, I add a player and enemy array - this will need to be touched by other things later (like who you are talking to, and whatever I figure out for "deckbuilding")
You'll notice a few new mons - I added an additional 4, bringing us up to 8 total. Likely the final number.
We bring these in at the beginning of the round. I believe duplicate() would also work here, which might be necessary depending on how the menu goes.
Then grab the size of the array and store it in some variables that previously were specifically set. I spent an hour trying to just adjust the size of the array (with remove, resize, erase, etc...) and couldn't get anything to work in a way I liked and that didn't throw up issues/actual crashes.
The worst part of this is that the enemy STILL has a set order of enemies (always going 1, 2 and 3). This infuriates me, but at a certain point, it's not worth the effort. Abandoning it for now might make it click somewhere in my mind later. I do want to get it to work, because currently ko'ed mons continue to contribute their team effects.
Well anyway. Let's look at the attack function.
There's a little left-over mess from me trying to use arrays more and dictionaries less. But, overall, we have a lot of new variables.
Because I implemented team effects. And boy, did I implement them poorly! But who cares! It works!
And this calls from the lengthened list of team effects which is stored in the singleton, but also in the mon dics.
Oh, and finally, to avoid the horrible bug where the battlescene would persist into the 3D world despite specifically destroying itself, now the game just counts down from 2 and then closes.
So let's see combat!
Most text has been moved to the in-window text box. Clearly...it's not easy to read and gets big bricks on info pretty regularly. I'll clean this up.
The team effects all pop up and some messages about status, damage, and crits is visible. Not very clear, but functional enough, I think.
Although we won, it threw this in the terminal right at the end. This means the enemy is trying to change again when it should admit defeat and be done. I'll squash this pretty quick, I think.