Created Fish Will Now Always Get on Hook (markdown)

voloved 2023-03-01 17:03:39 -05:00
parent 437ee30d50
commit b7b86d11f0
1 changed files with 68 additions and 0 deletions

@ -0,0 +1,68 @@
By devolov
**Goal:** Make it so fishing will always get a Pokemon on hook. No more need for the fishing rhythm game.
```diff
-------------------------- src/field_player_avatar.c --------------------------
index 3cac852fb..071feaf99 100644
@@ -1864,21 +1864,19 @@ static bool8 Fishing_ShowDots(struct Task *task)
AlignFishingAnimationFrames();
task->tFrameCounter++;
if (JOY_NEW(A_BUTTON))
{
- task->tStep = FISHING_NO_BITE;
- if (task->tRoundsPlayed != 0)
- task->tStep = FISHING_GOT_AWAY;
- return TRUE;
+ task->tStep = FISHING_GOT_BITE;
+ return FALSE;
}
else
{
if (task->tFrameCounter >= 20)
{
task->tFrameCounter = 0;
if (task->tNumDots >= task->tDotsRequired)
{
- task->tStep++;
+ task->tStep = FISHING_GOT_BITE;
if (task->tRoundsPlayed != 0)
task->tStep++;
task->tRoundsPlayed++;
}
@@ -1949,11 +1947,9 @@ static bool8 Fishing_WaitForA(struct Task *task)
};
AlignFishingAnimationFrames();
task->tFrameCounter++;
- if (task->tFrameCounter >= reelTimeouts[task->tFishingRod])
- task->tStep = FISHING_GOT_AWAY;
- else if (JOY_NEW(A_BUTTON))
+ if (JOY_NEW(A_BUTTON))
task->tStep++;
return FALSE;
}
@@ -1968,20 +1964,8 @@ static bool8 Fishing_CheckMoreDots(struct Task *task)
};
AlignFishingAnimationFrames();
task->tStep++;
- if (task->tRoundsPlayed < task->tMinRoundsRequired)
- {
- task->tStep = FISHING_START_ROUND;
- }
- else if (task->tRoundsPlayed < 2)
- {
- // probability of having to play another round
- s16 probability = Random() % 100;
-
- if (moreDotsChance[task->tFishingRod][task->tRoundsPlayed] > probability)
- task->tStep = FISHING_START_ROUND;
- }
return FALSE;
}
static bool8 Fishing_MonOnHook(struct Task *task)
```