Planes 1.11

This commit is contained in:
barelyprofessional
2025-10-10 22:47:41 -05:00
parent 0971b444fc
commit 30f7479ad5
@@ -381,22 +381,21 @@ public class Planes : ICommand
if (fullCounter < 20 || (fullCounter-3) % 20 > 3) useBoard = 0; if (fullCounter < 20 || (fullCounter-3) % 20 > 3) useBoard = 0;
else if (fullCounter >= 20 && (fullCounter - 3) % 20 < 3) useBoard = 1; else if (fullCounter >= 20 && (fullCounter - 3) % 20 < 3) useBoard = 1;
else logger.Info($"Failed to select proper gameboard for gameplay outcome. UseBoard: {useBoard} | FullCounter: {fullCounter} | Counter: {counter} | Height: {plane.Height} | FrameCounter: {frameCounter}"); else logger.Info($"Failed to select proper gameboard for gameplay outcome. UseBoard: {useBoard} | FullCounter: {fullCounter} | Counter: {counter} | Height: {plane.Height} | FrameCounter: {frameCounter}");
switch (planesBoards[boardCounter % 2][plane.Height, counter]) switch (planesBoards[boardCounter % 2][plane.Height, counter])
{ {
case 0: //do nothing plane hit neutral space case 0: //do nothing plane hit neutral space
neutral = true; neutral = true;
if (fullCounter == 3) logger.Info($"Generated first plane impact outcome. Framecounter: {frameCounter} | FullCounter: {fullCounter} | Counter: {counter} | Outcome: neutral"); if (fullCounter == 3) logger.Info($"Generated first plane impact outcome. Framecounter: {frameCounter} | FullCounter: {fullCounter} | Counter: {counter} | Outcome: neutral");
break; break;
case 1: //hit rocket case 1: //hit rocket
planesBoards[boardCounter % 2][plane.Height, counter] = 0; //plane consumes rocket planesBoards[useBoard][plane.Height, counter] = 0; //plane consumes rocket
plane.HitRocket(); plane.HitRocket();
noseUp = false; noseUp = false;
if (fullCounter == 3) logger.Info($"Generated first plane impact outcome. Framecounter: {frameCounter} | FullCounter: {fullCounter} | Counter: {counter} | Outcome: bomb"); if (fullCounter == 3) logger.Info($"Generated first plane impact outcome. Framecounter: {frameCounter} | FullCounter: {fullCounter} | Counter: {counter} | Outcome: bomb");
break; break;
case 2: //hit multi case 2: //hit multi
planesBoards[boardCounter % 2][plane.Height, counter] = 0; //plane consumes multi planesBoards[useBoard][plane.Height, counter] = 0; //plane consumes multi
plane.HitMulti(); plane.HitMulti();
noseUp = true; noseUp = true;
if (fullCounter == 3) logger.Info($"Generated first plane impact outcome. Framecounter: {frameCounter} | FullCounter: {fullCounter} | Counter: {counter} | Outcome: multi"); if (fullCounter == 3) logger.Info($"Generated first plane impact outcome. Framecounter: {frameCounter} | FullCounter: {fullCounter} | Counter: {counter} | Outcome: multi");
@@ -434,11 +433,10 @@ public class Planes : ICommand
{ {
break; break;
} }
//maybe fuckery around here //maybe fuckery around here
} }
fullCounter++; fullCounter++;
} }
plane.Gravity(); plane.Gravity();
if ((fullCounter-3) % 20 == 3 && !firstBoard)//removes old planesboard, adds new planeboard when necessary **********************************************************************NEEDS MORE UPDATES if ((fullCounter-3) % 20 == 3 && !firstBoard)//removes old planesboard, adds new planeboard when necessary **********************************************************************NEEDS MORE UPDATES
{ {
@@ -569,14 +567,16 @@ public class Planes : ICommand
if ((firstBoard && (counter + column < 20)) || (!firstBoard && (counter + column < 0))) useBoard = 0; if ((firstBoard && (counter + column < 20)) || (!firstBoard && (counter + column < 0))) useBoard = 0;
else if ((firstBoard && (counter + column > 19)) || (!firstBoard && (column + counter < 20))) else if ((firstBoard && (counter + column > 19)) || (!firstBoard && (column + counter < 20)))
useBoard = 1; useBoard = 1;
else if (!firstBoard && (counter + column > 20)) useBoard = 2; else if (!firstBoard && (counter + column > 19)) useBoard = 2;
else else
{ {
logger.Info($"Failed to properly switch to the correct board. Fullcounter: {fullCounter} | Counter: {counter} | Row: {row} | Column: {column} | FirstBoard: {firstBoard} "); logger.Info($"Failed to properly switch to the correct board. Fullcounter: {fullCounter} | Counter: {counter} | Row: {row} | Column: {column} | FirstBoard: {firstBoard} ");
useBoard = -1; useBoard = -1;
} }
if (column + counter > 19)
{
counter = (fullCounter - 3) % 20;
}
if (row == plane.Height && column == -1 && plane.JustHitMulti > 1) if (row == plane.Height && column == -1 && plane.JustHitMulti > 1)
{ {
output += Boost; output += Boost;
@@ -595,7 +595,6 @@ public class Planes : ICommand
break; break;
} }
} }
else if (row == 6)//row between the gameboard and where the carrier is displayed, should show the plane in this row on top of the boat on a win else if (row == 6)//row between the gameboard and where the carrier is displayed, should show the plane in this row on top of the boat on a win
{ {
output += Air; output += Air;
@@ -613,7 +612,6 @@ public class Planes : ICommand
* instead it needs to use that counter to iterate back * instead it needs to use that counter to iterate back
* so in this case where the value is -3, we need planesBoards[0][row, 20 - counter] * so in this case where the value is -3, we need planesBoards[0][row, 20 - counter]
*/ */
if (firstBoard && (counter + column < 0)) if (firstBoard && (counter + column < 0))
{ {
output += Air; output += Air;
@@ -637,7 +635,6 @@ public class Planes : ICommand
} }
} }
output += "[br]"; output += "[br]";
} }
return output; return output;
@@ -665,7 +662,6 @@ public class Planes : ICommand
} }
} }
} }
return board; return board;
} }
} }