Skip to content

Status rework#3

Merged
Alrysc merged 46 commits intofeature-pullfrom
status_rework
Oct 10, 2025
Merged

Status rework#3
Alrysc merged 46 commits intofeature-pullfrom
status_rework

Conversation

@Alrysc
Copy link
Copy Markdown
Owner

@Alrysc Alrysc commented Aug 30, 2025

Reworked statuses to use new StatusBehaviorDirector. Statuses should act much closer to source material now. This includes the following:

  • Certain statuses can expire more quickly based on player input
  • Certain statuses cancel each other when applied
  • The time that Entities become actionable after statuses and other actions shifted by a frame
  • Character::CanAttack more accurately reflects whether or not an action could take place by taking statuses into account
  • Transformations cancel certain statuses

Drag is an exceptional status. Movement was changed to make Drag more accurate:

  • Movement reworked, now uses MoveAction
  • Drag keeps Entity from acting for the correct amount of time
  • Movement no longer waits an additional frame to end when endlag is 0 frames
  • Entity::IsMoving and Entity::IsSliding return false during the final endlag

Additionally, a few extra changes were made to pass certain status tests:

  • BattleSceneBase shows counter text and toggles counter off even if the player who countered was not the local player
    • This should mean non-players may be capable of countering now. The text does not show unless the class is Player, however.
  • FullSynchro and bonuses are removed from all Players that use a card with FullSynchro, not only the local player
  • Network battles listen to broadcast counters on the Players
  • Buster now has Hit::no_counter and an aggressor Entity ID.

There are a few bonus changes as well:

  • Confuse status added (pulled from 8d47940 and c749c3a, adjusted for new status handling)
  • Fixed incorrect behavior where Player could be marked for decross even when not in a form
  • Fixed a softlock when countering a time freeze action on the last possible frame
  • Fixed Grass heal timer usage
  • Added some Lua functions for checking certain statuses on an Entity
  • ScriptedPlayer charged_time_table_func and ScriptedPlayerForm calculate_charge_time_func unified to charge_time_func, ScriptedPlayer and level passed in
  • Corrected Character::CanAttackImpl mistake

While functioning and playable now, there are still some points to think about:

  • Hit flags that don't causes actual statuses are also delayed until Drag is over. It might be expected that, say, Retangible and Pierce have their status callbacks called during Drag rather than after.
  • The flinch callback plays a hit sound by default. This can be odd when Drag ends in flinching, since an "extra" hit sound might happen.

Many of the ideas for status handling and a large amount of programming and test setup came from @TheMaverickProgrammer.

Copy link
Copy Markdown
Collaborator

@TheMaverickProgrammer TheMaverickProgrammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. There's some TODO items we can discuss.

Alrysc added 3 commits August 30, 2025 10:23
…h extra accuracy. Entity public functions for generically checking status.

CanAttack used in every place that PlayerControlledState can queue an action. CanAttack is false until the end of the frame that it would become true, to match certain source behavior.
…mMission checks CanAttack instead of IsIdle when flipping

"Actionable" didn't describe what these do. They are used to set idle animation and check for idle animation. CanAttack more reliably checks if the Character can act.
An Entity would continue attempting to slide when the same Tile was moved to, and would follow in the previous move direction of none. Also, because the ActionQueue clear call, in response to a Drag hit, was moved, Drag could queue behind an ice slide. Drag takes priority over this now by clearing an ice slide queued on the previous frame.
… overrides to do flinch and charge cancel, flinch handling is no longer a status callback
This makes endlag of frames(0) actually have 0 frames of additional time.
…ements including Drag use it, Drag movement acts correctly
@Alrysc Alrysc marked this pull request as draft September 30, 2025 00:42
@Alrysc Alrysc marked this pull request as ready for review September 30, 2025 00:42
…ring UpdateMovement. No longer calls MoveAction.Update so that Update(0) properly does not elapse time
Copy link
Copy Markdown
Collaborator

@TheMaverickProgrammer TheMaverickProgrammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some things to discuss but this is already looking much better too. Great collabing with you on this.

frameFreezeCancel = true;
// Breaking immediately ends freeze, before the next Entity update.
// Seen by freeze being cleared during time freeze.
// TODO: Likely related to this, breaking clears frozen even when
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are filtered hit props and original hit props in the combat pipeline. Sounds like a similar concept is needed here.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds like a good thing to check. This is Entity::Hit, though, which I think won't run if a defense blocked the attack. Maybe this check should be moved to collision checks instead, so it can run regardless of whether or not the attack was finally blocked.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that is a good idea!

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracking over here: #11. Will handle on a different branch.

@Alrysc Alrysc self-assigned this Oct 10, 2025
@Alrysc Alrysc merged commit 079a789 into feature-pull Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants