When I first thought of this project I cynically said "Geomancy? For what? The three types of cave that you visit endlessly through the game?" And though there are a Lot of caves, there's also a fair amount of other dungeon types with different backgrounds, so I decided to take advantage of it.
Geomancy has been flawlessly included into FFIV! This command replaces Peep and uses every last byte Peep had to offer to make it work. This command, as true to Geomancy in FFIII NES, reads the battle background and will use an ability in correspondence. Because of space limitations several backgrounds share the same Geomancy effect unfortunately. The majority of moves are enemy only spells, but this patch also adds in two new spells. CalmWind for the Field and AirBlade for Forests, Deserts, Beaches, and Mountains. Like FFIII however there is a 35% chance upon use that it will Backfire, self destructing the User and dealing the User's HP damage to the enemies.
$03/E153 20 8B 85 JSR $858B [$03:858B] A:0003 X:0028 Y:0000 P:envMxdizc - Generate Random Number
$03/E156 C9 28 CMP #$28 A:0027 X:0000 Y:0000 P:envMxdizc - Is it 35 or less?
$03/E158 B0 04 BCS $04 [$E15E] A:0027 X:0000 Y:0000 P:eNvMxdizc - If not, branch to Field Check
$03/E15A A9 91 LDA #$91 A:0027 X:0000 Y:0000 P:eNvMxdizc - Load Backfire into A.
$03/E15C 80 49 BRA $49 [$E1A7] A:0091 X:0000 Y:0000 P:eNvMxdizc - Branch to End
-------------------------------------------------------------------------------------------------------------------------------
$03/E15E AD 02 18 LDA $1802 [$7E:1802] A:0039 X:0000 Y:0000 P:envMxdizC - Load battle background into A.
$03/E161 D0 04 BNE $04 [$E167] A:0000 X:0000 Y:0000 P:envMxdiZC - If not 00 branch to next Field Check. (Field)
$03/E163 A9 5F LDA #$5F A:0000 X:0000 Y:0000 P:envMxdiZC - Load CalmWind into A.
$03/E165 80 40 BRA $40 [$E1A7] A:005F X:0000 Y:0000 P:envMxdizC - Branch to End
--------------------------------------------------------------------------------------------------------------------------------
$03/E167 C9 04 CMP #$04 A:0001 X:0000 Y:0000 P:envMxdizC - Is it Forest, Mountain, or Indoors?
$03/E169 B0 04 BCS $04 [$E16F] A:0001 X:0000 Y:0000 P:eNvMxdizc - If not, branch to next Field Check.
$03/E16B A9 60 LDA #$60 A:0001 X:0000 Y:0000 P:eNvMxdizc - Load AirBlade into A.
$03/E16D 80 38 BRA $38 [$E1A7] A:0060 X:0000 Y:0000 P:envMxdizc - Branch to End.
---------------------------------------------------------------------------------------------------------------------------
$03/E16F C9 07 CMP #$07 A:0004 X:0000 Y:0000 P:envMxdiZC - Is it Cave with Rivers, Moon, or On Board Ship?
$03/E171 B0 04 BCS $04 [$E177] A:0004 X:0000 Y:0000 P:eNvMxdizc - If not, branch to next Field Check
$03/E173 A9 74 LDA #$74 A:0004 X:0000 Y:0000 P:eNvMxdizc - Load ColdMist into A.
$03/E175 80 30 BRA $30 [$E1A7] A:0074 X:0000 Y:0000 P:envMxdizc - Branch to End.
-------------------------------------------------------------------------------------------------------------------------------
$03/E177 C9 07 CMP #$07 A:0007 X:0000 Y:0000 P:envMxdiZC - Is it Watery Caves?
$03/E179 D0 04 BNE $04 [$E17F] A:0007 X:0000 Y:0000 P:envMxdiZC - If not, branch to next Field Check.
$03/E17B A9 9B LDA #$9B A:0007 X:0000 Y:0000 P:envMxdiZC - Load Big Wave into A.
$03/E17D 80 28 BRA $28 [$E1A7] A:009B X:0000 Y:0000 P:eNvMxdizC - Branch to End.
--------------------------------------------------------------------------------------------------------------------------------
$03/E17F C9 08 CMP #$08 A:0008 X:0000 Y:0000 P:envMxdizC - Is it Cave Background?
$03/E181 D0 04 BNE $04 [$E187] A:0008 X:0000 Y:0000 P:envMxdiZC - If not, branch to next Field Check.
$03/E183 A9 A1 LDA #$A1 A:0008 X:0000 Y:0000 P:envMxdiZC - Load (Enemy) Quake into A.
$03/E185 80 20 BRA $20 [$E1A7] A:00A1 X:0000 Y:0000 P:eNvMxdizC - Branch to End.
----------------------------------------------------------------------------------------------------------------------------------
$03/E187 C9 0B CMP #$0B A:0009 X:0000 Y:0000 P:envMxdizC - Is it Desert or Beach?
$03/E189 B0 02 BCS $02 [$E18D] A:0009 X:0000 Y:0000 P:eNvMxdizc - If not, branch to next Field Check.
$03/E18B 80 DE BRA $DE [$E16B] A:0009 X:0000 Y:0000 P:eNvMxdizc - Loop back to AirBlade Routine.
----------------------------------------------------------------------------------------------------------------------------------
$03/E18D C9 0B CMP #$0B A:000B X:0000 Y:0000 P:envMxdiZC - Is it Sylph Cave/Feymarch?
$03/E18F D0 04 BNE $04 [$E195] A:000B X:0000 Y:0000 P:envMxdiZC - If not, branch to next Field Check.
$03/E191 A9 6F LDA #$6F A:000B X:0000 Y:0000 P:envMxdiZC - Load Breath into A.
$03/E193 80 12 BRA $12 [$E1A7] A:006F X:0000 Y:0000 P:envMxdizC - Branch to End.
--------------------------------------------------------------------------------------------------------------------------------------
$03/E195 C9 0D CMP #$0D A:000D X:0000 Y:0000 P:envMxdizC - Is it Technological Background, Lunar Caverns?
$03/E197 B0 04 BCS $04 [$E19D] A:000D X:0000 Y:0000 P:eNvMxdizc -If not, branch to Random Choice.
$03/E199 A9 99 LDA #$99 A:000C X:0000 Y:0000 P:eNvMxdizc - Load Thunder into A.
$03/E19B 80 0A BRA $0A [$E1A7] A:0099 X:0000 Y:0000 P:eNvMxdizc - Branch to End.
-----------------------------------------------------------------------------------------------------------------------------------------
$03/E19D A2 00 00 LDX #$0000 A:000D X:0000 Y:0000 P:envMxdiZC - Load 0000 into X
$03/E1A0 A9 0D LDA #$0D A:000D X:0000 Y:0000 P:envMxdiZC - Load 0D into A
$03/E1A2 20 79 83 JSR $8379 [$03:8379] A:000D X:0000 Y:0000 P:envMxdizC - Jump to RNG.
$03/E1A5 80 BA BRA $BA [$E161] A:0001 X:0000 Y:0000 P:eNvMxdizc - Loop back to first Field Check.
------------------------------------------------------------------------------------------------------------------------------------------
$03/E1A7 8D D2 26 STA $26D2 [$7E:26D2] A:0091 X:0000 Y:0000 P:eNvMxdizc - Store A in Next Action to take
$03/E1AA 4C 46 CC JMP $CC46 [$03:CC46] A:0091 X:0000 Y:0000 P:eNvMxdizc - Jump to Magic Routine
I think this is probably one of my finest crafted routines, I used every bit of space meticulously and cannot think of a way to shorten it at all.
Now what you can expect from this patch... Rydia will be given the Geomancy skill in this patch in replacement of White Magic and will have it throughout the game. This was a difficult decision. I wanted to give Geomancy to a character with staying power, my initial thought was Rosa, but she's not with you in one or two Geomancy unique areas (Watery Caves comes to mind) my other thought was Cecil, but that just seemed a bit out of character for him, so in the end I went with Rydia. Aside from Rosa she is with Cecil for the most time, Kain has large gaps of being gone and Edge joins pretty late into the fray.


The battlefields that represent which effect will be used are as follows.
CalmWind (Puts all enemies to sleep) - Field
AirBlade (Deals Wind Elemental Damage) - Forests, Mountains, Indoors, Beach, Desert
ColdMist (Deals Low Ice Elemental Damage) - Caves with Rivers, Moon, On Board Ship
Big Wave (Deals 1/4 of target's life to target.) - Watery Caves
(Enemy) Quake (Deals High Damage)- Caves with Holes
Breath (Causes a multitude of stats effects) - Sylph Cave/Feymarch
Thunder (Deals 1/4 of target's life to target. Lightning Elemental) - Towers and Giant
Random Choice - Lunar Caverns, Lunar Core, Underworld, Zeromus, Night Battle (in case a hacker wanted to give Edward Geo.)
And that is that! As always, please give me your thoughts on these.