Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Locales PR
What are the changes the user will see?
Corrosive Gas will be usable in game
Why am I making these changes?
Corrosive Gas is currently unimplemented
What are the changes from a developer perspective?
isNullified
,nullify()
,removedNullification
added to modifier.ts, alongside checks toshouldApply
andmatch
. This will nullify the held item and prevent it's effects from working. I thought this would be the best way to simulate Corrosive Gas' taking an item away then returning it at BattleEnd. I believe this can also be used for other unimplemented moves like Embargo and Magic Room in the futureNullifyHeldItemAttr
- applies nullify on a random item modifier. This affect lasts until the end of the turn. It has all the same ability attrs as Knock Off or Incinerate, since Corrosive Gas technically removes the item. After the item is nullified, it isTransferable is set to false, to prevent knocking off, stealing, or corroding an already corroded item.battle-end-phase.ts
I remove the nullified status from the item, as well as if it its isTransferable was set to false, it gets reverted to true. Since only transferable items would get nullified, it acts as a guard clause, preventing items that should be set to false getting set to true.battle-scene.ts
I added logic to hide the nullified items from the modifierBarScreenshots/Videos
Basic Flow:
corrosive.mp4
Effect lasts on switch:
switch.mp4
Sticky Hold Interaction:
sticky.mp4
Substitute interaction:
sub.mp4
Untransferable Item interaction:
untransferitems.mp4
Harvest Interaction:
harvest.mp4
How to test the changes?
npm run test corrosive_gas
Checklist
beta
as my base branchnpm run test
)