Chacha Dinosaur

Adamant and adaptive dinosaur.

Age 24
Male
Seen March 4th, 2018
Posted September 8th, 2017
454 posts
6.1 Years
Freeze Dry
Spoiler:

Fire Red
Spoiler:

Routine I
.text
.align 2
.thumb
.thumb_func
.global freezedry1

Main:
  
  cmp r4, #0xB
  bne RegularChart
  ldr r1, .currMove
  ldrh r1, [r1]
  ldrh r0, .freezeDryIndex
  cmp r0, r1
  bne RegularChart
  mov r0, #0x14
  b Exit
  
RegularChart:
  add r0, r3, #0x2
  add r0, r0, r5
  ldrb r0, [r0, #0x0]
  str r2, [sp, #0x0]

Exit:
  ldr r1, =0x0801E979
  bx r1

.align 2
.currMove: .word 0x02023D4A
.freezeDryIndex: .hword 0x00B5

@1E970:  00 49 08 47 XX+1 XX XX 08
Routine II
.text
.align 2
.thumb
.thumb_func
.global freezedry2

Main:
  ldrb r0, [r0, #0x0]
  cmp r0, r4
  beq NextEntry
  cmp r4, #0xB
  bne RegularChart
  ldr r1, .currMove
  ldrb r1, [r1]
  ldrh r0, .freezeDryIndex
  cmp r0, r1
  bne RegularChart
  mov r0, #0x14
  ldr r1, =0x0801E9A1
  bx r1

RegularChart:  
  add r0, r3, #0x2
  ldr r1, =0x0801E99D
  bx r1

NextEntry:
  ldr r1, =0x0801E9A9
  bx r1

.align 2
.currMove: .word 0x02023D4A
.freezeDryIndex: .hword 0x00B5

@1E994:  00 49 08 47 XX+1 XX XX 08
Routine III
.text
.align 2
.thumb
.thumb_func
.global freezedryai1

Main:
  
  cmp r4, #0xB
  bne RegularChart
  ldr r1, .currMove
  ldrh r1, [r1]
  ldrh r0, .freezeDryIndex
  cmp r0, r1
  bne RegularChart
  mov r0, #0x14
  b Exit
  
RegularChart:
  mov r0, r8
  add r0, #0x2
  add r0, r0, r7
  ldrb r0, [r0]

Exit:
  ldr r1, =0x0801EEF9
  bx r1

.align 2
.currMove: .word 0x02023D4A
.freezeDryIndex: .hword 0x00B5

@1EEF0:  00 49 08 47 XX+1 XX XX 08
Routine IV
.text
.align 2
.thumb
.thumb_func
.global freezedryai2

Main:
  
  cmp r4, #0xB
  bne RegularChart
  ldr r1, .currMove
  ldrh r1, [r1]
  ldrh r0, .freezeDryIndex
  cmp r0, r1
  bne RegularChart
  mov r0, #0x14
  b Exit
  
RegularChart:
  mov r0, r8
  add r0, #0x2
  add r0, r0, r7
  ldrb r0, [r0]

Exit:
  ldr r1, =0x0801EF19
  bx r1

.align 2
.currMove: .word 0x02023D4A
.freezeDryIndex: .hword 0x00B5

@1EF10:  00 49 08 47 XX+1 XX XX 08


Emerald
Spoiler:

Routine I
.text
.align 2
.thumb
.thumb_func
.global freezedry1

Main:
  
  cmp r4, #0xB
  bne RegularChart
  ldr r1, .currMove
  ldrh r1, [r1]
  ldrh r0, .freezeDryIndex
  cmp r0, r1
  bne RegularChart
  mov r0, #0x14
  b Exit
  
RegularChart:
  add r0, r3, #0x2
  add r0, r0, r5
  ldrb r0, [r0, #0x0]
  str r2, [sp, #0x0]

Exit:
  ldr r1, =0x08047619
  bx r1

.align 2
.currMove: .word 0x020241EA
.freezeDryIndex: .hword 0x00B5

@47160:  00 49 08 47 XX+1 XX XX 08
Routine II
.text
.align 2
.thumb
.thumb_func
.global freezedry2

Main:
  ldrb r0, [r0, #0x0]
  cmp r0, r4
  beq NextEntry
  cmp r4, #0xB
  bne RegularChart
  ldr r1, .currMove
  ldrh r1, [r1]
  ldrh r0, .freezeDryIndex
  cmp r0, r1
  bne RegularChart
  mov r0, #0x14
  ldr r1, =0x08047191
  bx r1

RegularChart:  
  add r0, r3, #0x2
  ldr r1, =0x0804718D
  bx r1

NextEntry:
  ldr r1, =0x08047199
  bx r1

.align 2
.currMove: .word 0x020241EA
.freezeDryIndex: .hword 0x00B5

@47184:  00 49 08 47 XX+1 XX XX 08
Routine III
.text
.align 2
.thumb
.thumb_func
.global freezedryai1

Main:
  
  cmp r4, #0xB
  bne RegularChart
  ldr r1, .currMove
  ldrh r1, [r1]
  ldrh r0, .freezeDryIndex
  cmp r0, r1
  bne RegularChart
  mov r0, #0x14
  b Exit
  
RegularChart:
  mov r0, r8
  add r0, #0x2
  add r0, r0, r7
  ldrb r0, [r0]

Exit:
  ldr r1, =0x080476E9
  bx r1

.align 2
.currMove: .word 0x02024E1A
.freezeDryIndex: .hword 0x00B5

@476E0:  00 49 08 47 XX+1 XX XX 08
Routine IV
.text
.align 2
.thumb
.thumb_func
.global freezedryai2

Main:
  
  cmp r4, #0xB
  bne RegularChart
  ldr r1, .currMove
  ldrh r1, [r1]
  ldrh r0, .freezeDryIndex
  cmp r0, r1
  bne RegularChart
  mov r0, #0x14
  b Exit
  
RegularChart:
  mov r0, r8
  add r0, #0x2
  add r0, r0, r7
  ldrb r0, [r0]

Exit:
  ldr r1, =0x08047709
  bx r1

.align 2
.currMove: .word 0x02024E1A
.freezeDryIndex: .hword 0x00B5

@47700:  00 49 08 47 XX+1 XX XX 08


The routines hard code the move to be Super-Effective on Water type using the move ID. Replace 0x00B5 with the move ID of Freeze Dry (used Power Snow for testing purposes).
For the freezing chance, just set the move effect using a move editor.
The first 2 routines simulaty the freeze dry effect, while the last 2 routines make the AI smart in handling Freeze Dry.