Thread: Development: Ability Resource Thread
View Single Post
  #13    
Old February 28th, 2015 (7:46 AM). Edited November 11th, 2015 by Chacha Dinosaur.
Chacha Dinosaur's Avatar
Chacha Dinosaur Chacha Dinosaur is offline
Adamant and adaptive dinosaur.
     
    Join Date: Jul 2013
    Age: 24
    Gender: Male
    Posts: 453
    Re: Urobolos

    Sorry the for the late reply. The callasm command and battle string loader hack are posted in the Quick R&D thread and these things are already installed in MrDS' Patch.

    Re: AtecianCorp.

    Lol, you just the need to make the byte changes mentioned the post in a Hex Editor and install Jambo's battle string and setword command.

    Anyway, here are some more abilities!

    1. Mold Breaker, Teravolt and Turboblaze:
    Spoiler:
    Fire Red:
    Spoiler:
    Step I
    Spoiler:
    Mold Breaker Table:-
    Code:
    00 00 00 00 01 01 00 01 01 00 01 01 01 00 00 01 
    00 02 01 01 01 01 00 00 00 01 02 00 00 01 00 00 
    00 00 00 00 00 00 00 01 01 01 00 01 00 00 00 01 
    00 00 00 01 01 00 00 00 00 00 00 00 01 00 00 01 
    00 00 00 00 00 00 00 00 01 01 00 01 00 00 01 01 
    00 00 01 00 00 00 01 01 01 00 00 00 00 00 00 00 
    00 00 00 00 00 00 00 02 00 00 00 00 00 00 01 00 
    01 00 00 00 00 01 00 00 00 00 00 01 00 00 00 01 
    00 00 00 00 00 00 00 01 01 01 00 00 00 01 00 01 
    00 00 01 00 01 00 00 00 00 00 00 00 00 01 01 00 
    00 00 00 00 00 00 00 00 00 00 01 00 01 00 00 00 
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Insert this table if your ROM has Ability Indices in the same order as that mentioned in the OP (Otherwise you need to modify the table using the Info given below)
    There are 256 entries in this table which equal to the maximum No. of abilities that can be accommodated in a GBA rom.

    An entry for each ability takes one byte of space and there are entries for every ability. The entry is set to 00 if Mold Breaker does not negate the Ability, 01 (or a non-zero value) if Mold Breaker is able to negate it and 02 if the Ability is negated by Mold Breaker to simulate the Gen V hazard effect.

    For e.g, the first entry is for Ability ID 0x0, the Blank Ability, so it does not need to be checked against Mold Breaker and therefore its entry should be set to 00. The second entry is for Stench (ID = 0x1) so set to 00. The 6th entry is set to 01 because MB negates Sturdy (ID = 0x5).

    There are some abilities that are not supported by this implementation and require specific explicit Mold Breaker checks. Hence, their entry is set to 00 to avoid wastage of time.
    Spoiler:

    1. Damp (It checks the whole battle field for presence of Damp rather than a single target, so the 'faintifnotdamp' battlescript command needs to be modified for this. I'm leaving this for now because I'm lazy

    2. Lightning and Storm Drain (Mold Breaker should allow redirection of move).

    3. Friend Guard, Aroma Veil, Sweet Veil, Flower Veil (The target's boosts are sometimes by virtue of its Ally's Ability).



    Modify the table accordingly if there is a need to.

    Step II
    Spoiler:
    1a. Replace x8TTTTTT in the routines with the offset of the Mold breaker table.
    1b. Insert these routines with byte changes in the respective code comments.

    Routine I (Checks for user's Mold Breaker prior to move execution and then disables Abilities that are negated by Mold Breaker)
    Spoiler:

    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    .global moldbreaker
         
    AbilityBufferUser:
         	push {r2-r4}
    	ldr r0, .Bank
    	ldr r0, [r0]
    	mov r1, #0x58
    	ldr r2, .BattleData
    	mul r0, r1
    	add r0, r0, r2
    	ldrb r0, [r0]
    MoldBreakerCheck:
    	cmp r0, #0x69
       	beq MoldBreaker
        	cmp r0, #0xA4
        	beq MoldBreaker
        	cmp r0, #0xA5
        	bne Return
    MoldBreaker:
    AbilityBufferTarget:
         	ldr r0, .Bank
    	add r0, #0x1
         	ldrb r4, [r0]
    	mul r1, r4 
    	add r1, r1, r2 
         	ldrb r3, [r1]
    LoadTable:
         	ldr r0, .MoldBreakerTable
       	add r2, r0, r3
         	ldrb r0, [r2]
    CheckIfAffected:
        	cmp r0, #0x0
         	beq Return
    Affected:
         	mov r0, #0xFF
         	strb r0, [r1]
         	ldr r0, .DisabledAbilityLoc
         	add r0, r4
         	strb r3, [r0]
    Return:
        	pop {r2-r4}
         	bl Canceler
         	lsl r0, r0, #0x18
         	lsr r2, r0, #0x18
         	cmp r2, #0x0
         	beq Continue
         	ldr r0, .Return
         	bx r0
    Continue:
         	ldr r0, .Return2
         	bx r0
    
    Canceler:
         	ldr r0, .Return3
         	bx r0
    
    .align 2
    
    .Bank: .word 0x02023D6B
    .BattleData: .word 0x02023C04
    .MoldBreakerTable: .word 0x08TTTTTT
    .DisabledAbilityLoc: .word 0x0203C034
    .Return: .word 0x0801DAFD
    .Return2: .word 0x0801D7D7
    .Return3: .word 0x080192D5
    
    @At 1D7C8: 00 48 00 47 XX+1 XX XX 08

    Routine II (Checks for user's Mold Breaker in target iterating moves like Earthquake and then disables abilities that negate damage)
    Spoiler:

    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    .global moldbreakermultipletargets
         
    AbilityBufferUser:
         	push {r1-r4}
    	ldr r0, .Bank
    	ldr r0, [r0]
    	mov r1, #0x58
    	ldr r2, .BattleData
    	mul r0, r1
    	add r0, r0, r2
    	ldrb r0, [r0]
    MoldBreakerCheck:
    	cmp r0, #0x69
       	beq MoldBreaker
        	cmp r0, #0xA4
        	beq MoldBreaker
        	cmp r0, #0xA5
        	bne Return
    MoldBreaker:
    AbilityBufferTarget:
         	ldr r0, .Bank
    	add r0, #0x1
         	ldrb r4, [r0]
    	mul r1, r4 
    	add r1, r1, r2 
         	ldrb r3, [r1]
    LoadTable:
         	ldr r0, .MoldBreakerTable
       	add r2, r0, r3
         	ldrb r0, [r2]
    CheckIfAffected:
        	cmp r0, #0x0
         	beq Return
    Affected:
         	mov r0, #0xFF
         	strb r0, [r1]
         	ldr r0, .DisabledAbilityLoc
         	add r0, r4
         	strb r3, [r0]
    Return:
        	pop {r1-r4}
         	ldr r0, [r1]
    	add r0, #0x1
    	str r0, [r1]
    	pop {r0}
    	bx r0
    
    .align 2
    
    .Bank: .word 0x02023D6B
    .BattleData: .word 0x02023C04
    .MoldBreakerTable: .word 0x08TTTTTT
    .DisabledAbilityLoc: .word 0x0203C034
    
    @At 225E0: 00 48 00 47 XX+1 XX XX 08


    Routine III and its associated Battle Script (Generation V effect. Makes the foe affected by entry hazards even if it has an ability to negate the hazards effect (except Magic Guard))
    Spoiler:

    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    .global moldbreakerhazards
         
    AbilityBufferUser:
         	push {lr}
    	ldr r0, .Bank
    	ldrb r0, [r0]
    	mov r1, #0x58
    	ldr r2, .BattleData
    	mul r0, r1
    	add r0, r0, r2
    	ldrb r0, [r0]
    MoldBreakerCheck:
    	cmp r0, #0x69
       	beq MoldBreaker
        	cmp r0, #0xA4
        	beq MoldBreaker
        	cmp r0, #0xA5
        	bne Return
    MoldBreaker:
    AbilityBufferTarget:
         	ldr r0, .Bank
    	add r0, #0x1
         	ldrb r4, [r0]
    	mul r1, r4 
    	add r1, r1, r2 
         	ldrb r3, [r1]
    LoadTable:
         	ldr r0, .MoldBreakerTable
       	add r2, r0, r3
         	ldrb r0, [r2]
    CheckIfAffected:
        	cmp r0, #0x0
         	beq Return
    Affected:
         	mov r0, #0xFF
         	strb r0, [r1]
         	ldr r0, .DisabledAbilityLoc
         	add r0, r4
         	strb r3, [r0]
    Return:
    	pop {r0}
    	bx r0
    
    .align 2
    
    .Bank: .word 0x02023D6B
    .BattleData: .word 0x02023C04
    .MoldBreakerTable: .word 0x08TTTTTT
    .DisabledAbilityLoc: .word 0x0203C034
    
    .align 2
    moldBreakerTable: .word 0x08TTTTTT
    Battle Script at YYYYYY:
    Code:
    09 0A E2 00 58 00 3A 2B 04 4C 2B 02 02 08 00 00 00 ZZ ZZ ZZ 08 2E 8A 3E 02 02 05 F6
    Battle Script at ZZZZZZ:
    Code:
    4C 00 4D 00 4E 00 00 3A 10 54 01 F8 XX+1 XX XX 28 52 00 28 4E 69 1D 08
    At x28308 insert YY YY YY 08 in reverse hex


    Routine IV (Restores disabled abilities at the end of move execution)
    Spoiler:
    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    .global restoreabilities
         
    EndTurn:
         	ldr r0, .Outcome
    	mov r1, #0x0
    	strb r1, [r0]
    	ldr r0, .Index
    	strb r1, [r0]
    RestoreAbilities:
    	push {r2-r6}
    	ldr r4, .Battlers
    	ldrb r4, [r4]
    	mov r3, #0x0
    	ldr r5, .DisabledAbilityLoc
    	ldr r6, .BattleData
    Loop:
    	ldrb r2 [r5, #0x0]
    	cmp r2, #0x0
    	beq EndLoop
    	strb r2, [r6]
    	strb r1, [r5]
    EndLoop:
    	add r3, r3, #0x1
    	cmp r3, r4
    	bge Exit
    	add r5, r5, #0x1
    	add r6, r6, #0x58
    	b Loop
    Exit:
    	pop {r2-r6}
    	ldr r1, .EndLoc
    	mov r0, #0xB
    	strb r0, [r1]
    	bx lr
    
    .align 2
    
    .Outcome: .word 0x02023DCC
    .Index: .word 0x02023BC4
    .Battlers: .word 0x02023D6C
    .DisabledAbilityLoc: .word 0x0203C034
    .BattleData: .word 0x02023C04
    .EndLoc: .word 0x02023BE3
    
    @ Go to your Battle Script command table, search for CD 2C 02 08 and replace it by XX+1 XX XX 08 (We are replacing the 'End' Battle Script Command. Not the case in Emerald






    2. Unaware & Updated Keen Eye (+ Sacred Sword Effect)
    Spoiler:
    This only works with Doesntknowhowtoplay's DPSS patch.
    LL is the move effect ID for Sacred sword effect (Set the Pointer to the Basic Damaging Battle Script as an entry in the Move Effect Table).

    Fire Red:
    Spoiler:
    Just insert these routines and make bytes changes mentioned their comments.

    Attack and Special Attack Unaware:
    Spoiler:

    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    .global unwareattack
    
    main:
    cmp r4, #0x2
    bne nocrit
    cmp r2, #0x6
    ble ignorestat
    
    nocrit:
    mov r0, #0x20
    ldr r1, [sp, #0x4]
    ldrb r1, [r1, r0]
    cmp r1, #0x6E
    beq ignorestat
    ldr r1, return1
    bx r1
    
    ignorestat:
    ldr r1, return2
    bx r1
    
    .align 2
    return1: .word 0x0803F3D1
    return2: .word 0x0803F3E1
    
    @At 3F3C8: 00 49 08 47 XX XX XX 08

    Defense and Special Defense Unaware:
    Spoiler:

    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    .global unwaredefense
    
    main:
    cmp r4, #0x2
    bne nocrit
    cmp r2, #0x5
    bgt ignorestat
    
    nocrit:
    mov r0, #0x20
    ldrb r1, [r6, r0]
    cmp r1, #0x6E
    beq ignorestat
    
    ldr r1, currMove
    ldrh r1, [r1, #0x0]
    mov r0, #0xC
    mul r1, r0
    ldr r0, moveTable
    add r0, r0, r1
    ldrb r1, [r0, #0x0]
    cmp r1, #0xLL
    beq ignorestat
    
    ldr r1, return1
    bx r1
    
    ignorestat:
    ldr r1, return2
    bx r1
    
    .align 2
    currMove: .word 0x02023D4C
    moveTable: .word 0x08250C04
    return1: .word 0x0803F419
    return2: .word 0x0803F429
    
    @At 3F410: 00 49 08 47 XX XX XX 08

    Accuracy and Evasiveness Unaware + Updated Keen Eye
    Spoiler:

    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    .global unawareaccuracy
    
    LoadUserData:
          mov r2, r3
          ldr r0, .UserBank
          mov r1, #0x58
          ldrb r4, [r0]
          mul r4, r1
          add r4, r4, r2
    
    LoadTargetData:
          add r0, #0x1
          ldrb r3, [r0]
          mul r3, r1
          add r3, r3, r2
    
    CheckTargetUnaware:
          mov r1, #0x20
          ldrb r0, [r3, r1]
          cmp r0, #0x6E
          beq SetZeroAccuracy
    
    LoadUserAccuracy:
          ldrb r5, [r4, #0x1E]
          b CheckUserUnaware
    
    SetZeroAccuracy:
          mov r5, #0x6
    
    CheckUserUnaware:
          ldrb r0, [r4, r1]
          cmp r0, #0x6E
          beq SetZeroEvasion
    
    CheckSacredSwordChipAway:
          ldr r1, .CurrMove
          ldrh r1, [r1]
          lsl r0, r1, #0x1
          add r1, r1, r0
          lsl r1, r1, #0x2
          ldr r0, .MoveData
          add r1, r1, r0
          ldrb r0, [r1]
          cmp r0, #0xLL
          beq SetZeroEvasion
    
    LoadTargetEvasion:
          ldrb r2, [r3, #0x1F]
    
    CheckForPositiveEvasion:
          cmp r2, #0x6
          ble CalcNetBuff
    
    PositiveEvasion:
    
    CheckUserKeenEye:
          add r4, #0x20
          ldrb r0, [r4]
          cmp r0, #0x33
          bne CalcNetBuff
    
    CheckForesite:      
          ldr r0, [r3, #0x50]
          mov r1, #0x80
          lsl r1, r1, #0x16
          and r0, r1
          cmp r0, #0x0
          beq CalcNetBuff
                
    SetZeroEvasion:       
          mov r2, #0x6
    
    CalcNetBuff:
          
    GravityCheck:
          ldr r1, .GravityCounter
          ldrb r0, [r1]
          cmp r0, #0x0
          beq Exit
    
    DecreaseEvasion:            
          sub r2, r2, #0x2
          cmp r2, #0x0
          bge Exit     
          mov r2, #0x0 
    
    Exit:
          add r0, r5, #0x6
          sub r0, r0, r2      
          ldr r1, .Return
          bx r1
    
    .align 2
    .GravityCounter: .word 0x0203C03B
    .UserBank: .word 0x02023D6B
    .CurrMove: .word 0x02023D4A
    .MoveData: .word 0x08250c04
    .Return: .word 0x0801DFAA+1
    
    /*At x1DF60: 00 48 00 47 XX+1 XX XX 08*/





    3. New Switch-in Ability System
    Spoiler:
    Note:-
    Spoiler:
    There is an existing one made that has been used for implementing abilities like Download etc.
    But there is one problem with that switch-in manager. It performs an OR logic with status byte of the banked pokemon with x00000200 (so that the switch-in script does not execute repeatedly at the start of a turn) which causes a nasty side effect. The nasty side effect is that pokemon possessing an ability which uses that switch-in logic becomes totally immune to non-volatile status conditions (e.g burn, poison, sleep etc.).

    A battling banked mon's status condition is stored in a Word and the functions responible for inflicting these status have a check that the content of status Word should be absolute zero otherwise no status infliction happens. So when the switch-in ability mon is inflicted with a Status Move, the Status Word of the banked mon would always atleast consist of x00000200 (i.e 1 in its 9th bit) and hence fails to be inflicted with the status.

    The new system in this post hooks with the Intimidate ability and ORs special status flag with x800000 to avoid the repetitive problem instead of ORing with the status byte to avoid the statusimmunity problem. This also uses a similar table system compared that previous switch-in one but uses custom Battle Scripts instead of custom ASM as entries.

    Also, there is logic added to solve inconsistencies due to Trace, Skill Swap and Role Play on switch-in abilities while simultaneously updating Intimidate to latest Generation (activation due to copying by Trace, RolePlay etc.)

    Fire Red:
    Spoiler:
    Step I
    Spoiler:

    1a. One custom table of the size ((No. of Switch-in Abilities)*8 bytes) is going to be used for this system, so select suitable starting offsets for the table according to the requirements.
    1b. In the routine, replace x8TTTTTT (near the last line) with the table's starting offset,
    1c. Insert the routine somewhere.
    Routine
    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    .global switchinabilities
    
    IntimidateCheck:
    cmp r1, #0x16
    bne LoadTable
    ldr r0, [r2, #0x0]
    and r0, r6
    cmp r0, #0x0
    beq NextIter
    ldr r0, =0x0801BAAD
    bx r0
    
    LoadTable:
    push {r2-r3}
    mov r3, #0x0
    ldr r0, .TableLoc
    Loop:
    lsl r2, r3, #0x3
    add r2, r2, r0
    ldrb r2, [r2]
    cmp r1, r2
    beq Success
    cmp r2, #0xFF
    beq PopBeforeNextIter
    add r3, #0x1
    b Loop
    
    Success:
    lsl r2, r3, #0x3
    add r2, r2, r0
    ldr r0, [r2, #0x4]
    pop {r2-r3}
    push {r0}
    ldr r0, [r2, #0x0]
    and r0, r6
    cmp r0, #0x0
    bne PopR0BeforeNextIter
    mov r4, r8
    strb r1, [r4, #0x0]
    ldr r0, [r2, #0x0]
    orr r0, r6
    str r0, [r2, #0x0]
    ldr r0, =0x02023D6B
    strb r5, [r0]
    pop {r0}
    ldr r1, =0x0801BABB
    bx r1
    
    PopR0BeforeNextIter:
    pop {r0}
    b NextIter
    
    PopBeforeNextIter:
    pop {r2-r3}
    
    NextIter:
    ldr r0, =0x0801B4FF
    bx r0
    
    
    .align
    .TableLoc: .word 0x8TTTTTT
    
    @insert 00 48 00 47 xx+1 xx xx 08 at 1B4F0

    Step II
    Spoiler:

    Now, here are some sample Battle Scripts to understand how to make custom Battle Scripts for switch-in abilities.

    Pressure Message Battle Script:
    Spoiler:

    #dynamic 0x740280

    #org @main
    call @pressuremessage
    // The table should have pointer to this
    end3

    #org @pressuremessage
    pause 0x20


    setbyte 0x2023D6C 0x0
    cmde1 0x81D936A

    setword 0x0203C020 ("Offset to pressure message")
    printstring 0x184
    waitmessage 0x40
    return

    // Pressure Message Hex: FD 13 FE DD E7 00 D9 EC D9 E6 E8 DD E2 DB 00 E4 E6 D9 E7 E7 E9 E6 D9 AB FF


    The bolded part will be the crux of every switch-in script using this system, so make sure to start your switch-in battle script using these lines. Also, in case if you want to understand the need for this part:
    Spoiler:

    'pause 0x20' - Pauses for half a second
    'setbyte 0x2023D6C 0x0 - Sets the content of 0x2023D6C to 0x0. This must be set to zero for command e1 to work properly.
    'cmd e1 0x81D936A' - This sets the user buffer (0x2023FDB not 0x2023D6B in this case) and target buffer (0x2023D6C) and is used in Target Iteration for Intimidate in doubles. The second parameter is an offset to branch after the Iteration finishes, the offset '0x81D936A' just contains a script containing the command '3C' (i.e a return command).


    Similarly, message scripts can be created for Mold Breaker, Terravolt and Turboblaze.
    Abilities like Download, Imposter and Frisk would require some extra logic.

    Now compile them and also note down the table pointer of the script

    Step III
    Spoiler:

    Now fill the table in the format: (Ability ID) 00 00 00 (the pointer to the associated script).. Hence, each ability entry will use 8 (1+1+1+1+4) entries per table for this implementation.
    Only include those abilities in the tables that have switch-in logic. Also make sure that the table is terminated by a FF.

    Step IV
    Spoiler:

    This adjusts Trace, Skill Swap and Role Play to the latest standards while simultaneously solving the inconsistencies due to the routines.

    Insert these custom ASM and corresponding battle scripts.

    Skill Swap Adjust:
    Spoiler:

    Code:
    text
    .align 2
    .thumb
    .thumb_func
    .global switchinabilitiesskillswap
    
    push {lr}
    ldr r6, =0x2023C04
    ldr r7, =0x2023DFC
    mov r5, #0x80
    lsl r5, r5, #0xC
    mov r4, #0x58
    ldr r3, =0x2023D6B
    ldrb r2, [r3, #0x0]
    lsl r1, r2, #0x2
    add r1, r1, r7
    ldr r0, [r1] 
    mul r2, r4
    add r2, r2, r6
    ldrb r2, [r2, #0x0]
    cmp r2, #0x16
    beq orrmarker
    bic r0, r5
    b cont
    
    orrmarker:
    orr r0, r5
    cont: 
    str r0, [r1]
    add r3, #0x1
    ldrb r2, [r3, #0x0]
    lsl r1, r2, #0x2
    add r1, r1, r7
    ldr r0, [r1] 
    mul r2, r4
    add r2, r2, r6
    ldrb r2, [r2, #0x0]
    cmp r2, #0x16
    beq orrmarker2
    bic r0, r5
    b cont2
    
    orrmarker2:
    orr r0, r5
    cont2: 
    str r0, [r1]
    pop {r0}
    bx r0
    Battle Script at YYYYYY:
    Code:
    F8 XX+1 XX XX 28 4E 69 1D 08
    At x1D82C6 insert YY YY YY 08 in reverse hex



    Role Play Adjust
    Spoiler:

    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    .global switchinabilitiesroleplay
    
    push {lr}
    ldr r6, =0x2023C04
    ldr r7, =0x2023DFC
    mov r5, #0x80
    lsl r5, r5, #0xC
    mov r4, #0x58
    ldr r3, =0x2023D6B
    ldrb r2, [r3, #0x0]
    lsl r1, r2, #0x2
    add r1, r1, r7
    ldr r0, [r1] 
    mul r2, r4
    add r2, r2, r6
    ldrb r2, [r2, #0x0]
    cmp r2, #0x16
    beq orrmarker
    bic r0, r5
    b cont
    
    orrmarker:
    orr r0, r5
    cont: 
    str r0, [r1]
    pop {r0}
    bx r0
    Battle Script at YYYYYY:
    Code:
    F8 XX+1 XX XX 28 4E 69 1D 08
    At x1D813D insert YY YY YY 08 in reverse hex



    Trace Adjust
    Spoiler:

    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    .global switchinabilitiestrace
    
    push {lr}
    ldr r6, =0x2023c04
    ldr r7, =0x2023DFC
    mov r5, #0x80
    lsl r5, r5, #0xC
    mov r4, #0x58
    ldr r3, =0x2023FDB
    ldrb r2, [r3, #0x0]
    lsl r1, r2, #0x2
    add r1, r1, r7
    ldr r0, [r1] 
    mul r2, r4
    add r2, r2, r6
    ldrb r2, [r2, #0x0]
    cmp r2, #0x16
    beq orrmarker
    bic r0, r5
    b cont
    
    orrmarker:
    orr r0, r5
    cont: 
    str r0, [r1]
    pop {r0}
    bx r0
    Battle Script at YYYYYY:
    Code:
    39 20 00 10 D0 00 12 40 00 F8 XX+1 XX XX 08 3F
    At x1BB18 insert YY YY YY 08 in reverse hex




    Reply With Quote