fork/training-mode-ce

git clone https://git.julia.blue/fork/training-mode-ce

AitchMerge pull request #243 from NickCondron/remove-asmf9241ee

nix
1.8 KiB76 linesraw
1    # To be inserted at 80040f04
2    .include "../../../../Globals.s"
3    .include "../../../../m-ex/Header.s"
4
5    .set entity, 31
6    .set player, 31
7    .set playerdata, 31
8
9# r27 = Attacker Slot
10# r28 = Victim Slot
11
12# r5 = Attacker
13# r6 = Victim
14
15# This injection makes the Pummel Move ID skip the combo count increment. Originally only 5 moves perform this behavior, pummel not being one of them.
16
17    # Get Attacker Pointer
18    mr r3, r27
19    branchl r12, PlayerBlock_LoadMainCharDataOffset
20    lwz r5, 0x2C(r3)
21    # Get Victim Pointer
22    mr r3, r28
23    branchl r12, PlayerBlock_LoadMainCharDataOffset
24    lwz r6, 0x2C(r3)
25
26######################
27## Check For Pummel ##
28######################
29
30    cmpwi r30, 0x34
31    beq NoComboInc
32
33#################################
34## Check For Same Move as Last ##
35#################################
36
37SameMoveCheck:
38    lhz r3, 0x18EC(r6)  # Last Move Instance Victim Was Hit By
39    lhz r4, 0x2088(r5)  # Attacking Player's Current Move Instance
40    cmpw r3, r4
41    bne SkipSameMoveCheck
42    # Check If Its a Throw
43    cmpwi r30, 0x35
44    blt NoComboInc
45    cmpwi r30, 0x38
46    bgt NoComboInc
47    # Check If Attacker Is Grabbable (Attacker is Set Grabbable When the Throw Releases the Victim)
48    lhz r3, 0x1A6A(r5)  # Grabbable Flag
49    cmpwi r3, 0x0
50    bne NoComboInc
51    b Original
52
53SkipSameMoveCheck:
54################################
55## Check For MidGrab Hitboxes ##
56################################
57
58    # Allow Cliff Attacks
59    cmpwi r30, 0x3F
60    beq Original
61    cmpwi r30, 0x3E
62    beq Original
63
64    # Check If Attacker Is Grabbable (Attacker is Set Grabbable When the Throw Releases the Victim)
65    lhz r3, 0x1A6A(r5)  # Grabbable Flag
66    cmpwi r3, 0x0
67    bne NoComboInc
68
69    b Original
70
71NoComboInc:
72    # Spoof Pummel as Some Other Move that Triggers the Check
73    li r30, 76
74
75Original:
76    addi r3, r28, 0