Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This LUA script is intended for TMNT:Tournament fighters for the NES
- -- ------------------------------------------------------------------------------
- -- This little LUA script will enhance your TMNT:tournament fighters experience with a new mechanic similar to MK's "randper kombat" option
- -- Each five seconds it will attempt to morph both fighters into another random character.
- -- If you are playing story mode, you'll still progress as the character you've chosen at the beginning.
- -- Known bugs:
- -- Character palette remains unchanged, so you wouldn't immediately know which turtle you've become. It actually adds a bit more spice to the action.
- -- Not all character data is loaded correctly after morphing. In particular, the special charge timer doesn't immediately gets its new max value. This, in turn, may lead to Raphael's special being broken (it still works but travels much shorter distance).
- -- During the bonus game you'll notice that the walls occasionally become damaged by themselves when you aren't a turtle. This enables Shredder to smash any wall with a single hit. Also the game can rarely crash, so it is recommended to save before the bonus game.
- local x = 1;
- local y = 0;
- local z = 0;
- while (true) do
- -- we check current system time so we could attempt a morph every five seconds.
- x = os.time();
- y = x % 5;
- -- before morphing, we check the byte at $0520+X to determine whether the character stands still at the moment.
- -- attempting to morph him while fighting may crash the game (or just look kind of badass).
- z = memory.readbyte(0x0521);
- if (y == 0) and (z == 0) then
- y = math.random(0,6);
- memory.writebyte(0x551, y);
- end;
- z = memory.readbyte(0x0520);
- if (y == 0) and (z == 0) then
- y = math.random(0,6);
- memory.writebyte(0x550, y);
- end;
- FCEU.frameadvance();
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement