Difference between revisions of "Mothula"
(→Elements of the fight) |
|||
Line 59: | Line 59: | ||
</pre> | </pre> | ||
− | The value {{HEX2|7F}} is equal to {{BIN|0111 1111}} in binary, so ANDing it with {{HEX2|90}} ({{BIN|10011111}}) is now using the value {{BIN|0001 1111}}, or {{HEX2|10}}. When that timer reaches {{HEX2|06}}, Mothula recovers from recoil, but before then, the instruction that sets Mothula's immunity timer to 32 frames is skipped. The check for recoil function is not called until near the end of Mothula's main routine, | + | The value {{HEX2|7F}} is equal to {{BIN|0111 1111}} in binary, so ANDing it with {{HEX2|90}} ({{BIN|10011111}}) is now using the value {{BIN|0001 1111}}, or {{HEX2|10}}. When that timer reaches {{HEX2|06}}, Mothula recovers from recoil, but before then, the instruction that sets Mothula's immunity timer to 32 frames is skipped. The check for recoil function is not called until near the end of Mothula's main routine. The beginning of the routine has an instruction that removes Mothula's immunity to damage, and the middle is where that immunity is set, when applicable. Combined, these create a logical execution of instructions that guarantees this short period of no immunity on a first hit. |
== Strategy == | == Strategy == |
Revision as of 14:06, 4 March 2019
Location | Skull Woods | ||||
---|---|---|---|---|---|
HP | 32 | - | - | ||
2 | 2 | 2 | |||
4 | 4 | - | |||
8 | 8 | - | |||
- | - | - | |||
- | - | - | |||
Arrghus | Blind |
Tiny Moth Dik
Elements of the fight
Mothula
Mothula has 4 main AI routines:
- Sit around
- Rise
- Flap around
- Shoot beams
The first 2 routines are used for the opening before the fight. From there on, the routines alternate between flapping and shooting.
Spike blocks are spawned with a routine that's outside of Mothula's main AI.
- Main AI
- Check vulnerability for a value greater than 0
- Mothula deals with recoiling in a very weird way (see below)
- Mothula's invulnerability lasts 32 frames. When taking a hit, she will switch to flap around mode and the beam countdown will be set to 64 frames. Taking a hit does not change Mothula's movement cycle.
- Flap around
- Check the beam timer. If it's time to shoot, set the main do stuff timer to 63 and jump to the shoot routine
- Flap wings
- Increase or decrease altitude, as determined
- There is a repeated cycle of movements with a period of 8:
- For 7 movements: move in random direction for between 31 and 95 frames
- For the 8th movement: move towards Link for 128 frames
- For any movement, if Mothula hits a wall, the movement timer immediately ends
- Shoot beams
- Wait around for the movement timer (which should be 63 frames from flapping around)
- Also be shooting
- Set the AI routine back to flapping and choose a random number between 64 and 95 for the new beam timer.
- Spikes
Spikes attempt to spawn from a random position every 64 frames. Spawns will fail if there is no spike tile on the chosen point or if there are too many sprites.
- Floor
Conveyors move in a random direction for between 96 and 223 frames. Before choosing a new random direction, the floor will sit still for 32 frames. (Technically, the floor's timer is between 128 and 255 frames, but the wait period has been factored out.)
The floor stops moving as soon as Mothula starts exploding.
- Recoiling (complicated mess)
When Mothula is hit, standard recoil code checks the velocity of the recoil and, if it's too high, sets the value to $90
, or 10010000
in binary. The next frame, Mothula has this line of code to run:
AND.b #$7F : CMP.b #$06 : BNE .early_recover_delay
The value $7F
is equal to 01111111
in binary, so ANDing it with $90
(10011111
) is now using the value 00011111
, or $10
. When that timer reaches $06
, Mothula recovers from recoil, but before then, the instruction that sets Mothula's immunity timer to 32 frames is skipped. The check for recoil function is not called until near the end of Mothula's main routine. The beginning of the routine has an instruction that removes Mothula's immunity to damage, and the middle is where that immunity is set, when applicable. Combined, these create a logical execution of instructions that guarantees this short period of no immunity on a first hit.
Strategy
Josh's Mothula Tutorial is excellent. You should watch it.
- You can start the fight by hitting Mothula twice every time. This can be done by either dashing into the block on top of the screen right as she's getting vulnerable, or by doing a prolonged Pokedash.
- Since Link lands in the same place every time, and the conveyors can only go in one of four different directions, it's possible to find visual and movement cues to get the double hit no matter what. This takes a lot of practice.
- You can hit her into a block tile to damage her.
- As long as the conveyors aren't going downwards, you can usually get off a Pokedash when she's camping near the spikes at the top. This is a fairly advanced strategy to go for and requires a lot of practice.
- When Mothula is in the middle on the left or right side, try to get below her and slash her upwards. If you slash her from a diagonal in this situation, she might bounce into the spikes, but being below her in the middle should work.
- The best way to deal with the moving spikes is to practice the double hit, and pokedash.. The faster you kill her, the less of a problem they will be.
- There is a lot of pattern recognition to this fight. You will have to do the fight hundreds of times in practice to get a feel for what works and what doesn't work. Good luck!
Individual Mothula Pattern Tutorials by Xelna