-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from FightCore/feat/hitbox-rework
Feat/hitbox rework
- Loading branch information
Showing
12 changed files
with
1,313 additions
and
548 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Character } from '../models/character'; | ||
import { Move } from '../models/move'; | ||
|
||
/** | ||
* Fixes unique moves by modifying the provided move object. | ||
* | ||
* @param {Move} move - The move object to be fixed. | ||
* @return {Move} The modified move object. | ||
*/ | ||
export function fixUniqueMoves(move: Move, character: Character): Move { | ||
if ((move.normalizedName === 'neutralb' || move.normalizedName === 'aneutralb') && character.normalizedName === 'ness') { | ||
return fixNessNeutralB(move); | ||
} | ||
if (move.normalizedName == 'nessspecial' && character.normalizedName === 'kirby') { | ||
return fixNessNeutralB(move); | ||
} | ||
|
||
return move; | ||
} | ||
|
||
function fixNessNeutralB(move: Move): Move { | ||
move.hits = move.hits.slice(move.hits.length - 1); | ||
|
||
// Add notes if they don't exist previously and ensure they start on a new line. | ||
if (!move.notes) { | ||
move.notes = ''; | ||
} else { | ||
move.notes += '\n'; | ||
} | ||
move.notes += | ||
'Damage starts as 11 but increases every frame by 1. Only the last hitbox is shown. Please check the website for more info.'; | ||
return move; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.