IMPORTANT NOTICE 2
My other hack ASM Machina has fulfilled the prophecy stated below, and renders this hack obsolete. Since it is pretty buggy, use Wrap Improvements at your own peril; I have no plans to fix it, but will leave it up for posterity. My new, amazing hack can be found at https://www.romhacking.net/hacks/6124/
IMPORTANT NOTICE
It has come to the patcher's attention that there are multiple actual bugs in the hack, of arguable severity. Alas, due to the march of progress on a much larger hack which is to contain this one and more, this hack can't be easily fixed (although the larger hack will fix these issues).
-One: In order for trapping moves to deal damage not based on the opponent's past move now that the last move is not the trapping move, it had to be that damage was recalculated each hit. However, this would also mean an accuracy check, which the patcher tried to bypass in order that continuing hits could not miss. However, due to the unusual game logic, this bypassing also made the actual moves unable to ever miss. So, uh, good luck.
-Two: the level swapping detailed below is the result of the aforementioned bypassing also bypassing the swap back of enemy and player levels, from being swapped for calculations. Thus, it is recommended to be safe that players defeat a Pokémon or switch when the levels are in the unswapped position, which should happen every other turn under a trapping move used by the Enemy, specifically.
Watch for the aforementioned larger hack, in which the patcher gives up and just lets continuing hits miss.
Now, back to the original description:
The mechanics of Wrap and other trapping moves in Generation 1 are extremely frustrating. One is expected to sit there, entirely unable to attack, as the opponent spams a low-power, but high-accuracy move. This hack aims to modify those mechanics in order to make them similar to later games. That is, trapping moves allow one to attack, but not to swap out. And really, that's the whole hack, with a few caveats listed below.
Firstly, if one tries to swap out, one will be denied with the message "X is already out!" Although recycling a message like that is not ideal, the creation of a new message is a bit beyond the patcher's capabilities, and given the notorious space limitations of the game, could cause unintended problems.
Secondly, some graphical issues occur with trapping moves. For one thing, sometimes the level of the player and enemy will swap. This seems to be a mechanic used internally, which for whatever reason is being shown as a result of the patch. This is not a permanent change, and will not affect the true levels of your Pokémon outside of battle.
Another issue that has been very rarely encountered is that if an opposing Pokémon faints during a trapping move, the player's Pokémon may be sent out again, then the message that the enemy fainted is shown again, and then the XP is awarded. Interestingly, and fortuitously, this has only been encountered in wild battles, and no actual problems have occurred.
Finally, along with patches to change this mechanic for both Red and Blue, this hack archive also contains versions of the patch which address a few smaller issues, which make for a smoother experience with sacrificing the...character, so to speak, of the game. Namely, Ghost type is now super-effective against Psychic type (which is surprisingly unhelpful, since that only applies to Lick), Focus Energy actually increases critical rate, an enemy's Psywave cannot deal 0 damage, and all parts of the player's accumulated Bide damage are cleared with the enemy switches out. The latter two are important fixes, since they are causes of Link Battle desynchronization. Also of note is what was not fixed, namely the wrap glitch involving Hyper Beam, and the issues surrounding Counter and switching out. Both require enough effort and preparation that they cannot ruin a game unsuspectingly, and fixing Counter involves a fundamental rewriting that goes beyond the scope of a sidebar to a hack.
As with any sort of hack, please speak up regarding any issues. In particular, given the irony involved, reports of issues this patch causes with regards to Link Battles are especially appreciated.
CREDITS
Thanks to the maintainers of the Pokémon Red/Blue disassembly project at https://github.com/pret/pokered, without which none of this hack would be possible.
Database match: Pokemon - Red Version (USA, Europe) (SGB Enhanced)
Database: No-Intro: Game Boy/Color (v. 20210227-015730)
File/ROM SHA-1: EA9BCAE617FDF159B045185467AE58B2E4A48B9A
File/ROM CRC32: 9F7FDD53