FANDOM


The Tonberry is an enemy from Final Fantasy IX found in Ipsen's Castle. They are always seen in trios. They can't be encountered when Zidane heads back to rescue Amarant.

StatsEdit

Battle Edit

Tonberry retains its signature moves from previous games in the series. They slowly approach the player party, and upon reaching them, unleash either Knife attacks against a party member for 9,999 HP damage, or Everyone's Grudge, which deals damage based on the number of defeated Tonberries. After using Knife, they teleport out of the battle.

Strategy Edit

The best way to defeat the Tonberries is to use attacks that deal fixed damage, such as Quina's Frog Drop or Zidane's Thievery, because they take little damage from physical attacks.


AI Script Edit

Using general variable General_TonberryCounter
Using global variable hplimitdeath
Using global variable dummyindex
Using global variable allescapestep
Using global variable linelist
Using global variable rowlist
Using global variable counteringbitflags
Using global variable obstacle1stepahead
Using global variable obstacle2stepahead
Using global variable tonberryaheadindex
Using global variable obstacleleft
Using global variable obstacleright

Function Tonberry_Loop
   if ( !battlestate )
      set SV_FunctionEnemy[PLAY_ANIM] = 3
      if ( SV_FunctionEnemy == 16 )
         set tonberryindex = 0
      elseif ( SV_FunctionEnemy == 32 )
         set tonberryindex = 1
      elseif ( SV_FunctionEnemy == 64 )
         set tonberryindex = 2
      else
         set tonberryindex = 3
      if ( !tonberryindex )
         set dummyindex = GetRandom & 3
         set linelist = 0x3210
         set rowlist = 0x3333
         if ( !General_TonberryCounter )
            set General_TonberryCounter = 1
      if ( tonberryindex == dummyindex )
         set SV_FunctionEnemy[MODEL_OFF] = 65535L
         set SV_FunctionEnemy[SHADOW] = 0
         set linelist |= 0xF << ( tonberryindex * 4 )
         set rowlist |= 0xF << ( tonberryindex * 4 )
         set hplimitdeath = 65535L - SV_FunctionEnemy[HP]
         if ( hplimitdeath < 10000 )
            set hplimitdeath = 10000
         if ( #SV_PlayerTeam == 4 )
            while ( GetBattleState != 1 )
               Wait( 1 )
            RunBattleCode( Enable ATB )
         else
            set SV_FunctionEnemy[PRESENCE_OFF] = 1
            return
      else
         if ( #SV_PlayerTeam != 4 )
            if ( dummyindex == 0 )
               set allescapestep = 1
            if ( tonberryindex == 0 )
            set SV_Target = SV_FunctionEnemy
               AttackSpecial( Disappear2 )
               while ( IsAttacking == 0 )
                  Wait( 1 )
               while ( IsAttacking != 0 )
                  Wait( 1 )
               set allescapestep = 1
               if ( dummyindex == 1 )
                  set allescapestep = 2
               return
            if ( tonberryindex == 1 )
               while ( allescapestep != 1 )
                  Wait( 1 )
            set SV_Target = SV_FunctionEnemy
               AttackSpecial( Disappear2 )
               while ( IsAttacking == 0 )
                  Wait( 1 )
               while ( IsAttacking != 0 )
                  Wait( 1 )
               set allescapestep = 2
               if ( dummyindex == 2 )
                  set allescapestep = 3
               return
            if ( tonberryindex == 2 )
               while ( allescapestep != 2 )
                  Wait( 1 )
            set SV_Target = SV_FunctionEnemy
               AttackSpecial( Disappear2 )
               while ( IsAttacking == 0 )
                  Wait( 1 )
               while ( IsAttacking != 0 )
                  Wait( 1 )
               set allescapestep = 3
               if ( dummyindex == 3 )
                  RunBattleCode( End Battle, Escape )
               return
            while ( allescapestep != 3 )
               Wait( 1 )
         set SV_Target = SV_FunctionEnemy
            AttackSpecial( Disappear2 )
            while ( IsAttacking == 0 )
               Wait( 1 )
            while ( IsAttacking != 0 )
               Wait( 1 )
            RunBattleCode( End Battle, Escape )
            return
         set SV_FunctionEnemy[MAX_HP] = 65535L
         set SV_FunctionEnemy[HP] = 65535L
      set battlestate++
   elseif ( battlestate == 1 )
      if ( tonberryindex == dummyindex )
         while ( IsAttacking != 0 )
            Wait( 1 )
         set SV_FunctionEnemy[PRESENCE_OFF] = 1
         return
      while ( GetBattleState != 4 )
         Wait( 1 )
      set battlestate++
   set SV_FunctionEnemy[ATB] = SV_FunctionEnemy[MAX_ATB]
   Wait( 1 )
   loop


Function Tonberry_ATB
   if ( knifeflag )
      set SV_Target = SV_FunctionEnemy
      Attack( Disappear )
   set currentline = ( linelist >> ( tonberryindex * 4 ) ) & 0xF
   set currentrow = ( rowlist >> ( tonberryindex * 4 ) ) & 0xF
   if ( currentrow == 10 )
      set knifeflag = TRUE
      set SV_Target = 1 << currentline
      Attack( Knife )
   set obstacle1stepahead = FALSE
   set obstacle2stepahead = FALSE
   set tonberryaheadindex = 0
   set obstacleleft = FALSE
   set obstacleright = FALSE
   set index = 0
   while ( index < 4 )
      set line = ( linelist >> ( index * 4 ) ) & 0xF
      set row = ( rowlist >> ( index * 4 ) ) & 0xF
      if ( ( index != tonberryindex ) && ( line != 0xF ) )
         if ( currentline == line )
            if ( currentrow + 1 == row )
               set obstacle1stepahead = TRUE
            elseif ( currentrow + 2 == row )
               set obstacle2stepahead = TRUE
            elseif ( currentrow - 1 == row )
               set tonberryaheadindex = index
            elseif ( currentrow - 2 == row )
               set tonberryaheadindex = index
         elseif ( currentline + 1 == line )
            if ( currentrow == row )
               set obstacleright = TRUE
         elseif ( currentline - 1 == line )
            if ( currentrow == row )
               set obstacleleft = TRUE
      set index++
   if ( currentrow == 9 )
      set obstacle2stepahead = TRUE
   elseif ( currentrow == 10 )
      set obstacle1stepahead = TRUE
   if ( !obstacle1stepahead )
      set SV_Target = SV_FunctionEnemy
      Attack( March )
   else
      set SV_Target = SV_PlayerTeam
      Attack( Everyone’s Grudge )


Function Tonberry_Counter
   if ( ( GetAttackCommandId == Skill ) && ( GetAttackId == What's That?! ) )
      return
   if ( SV_FunctionEnemy[HP] < hplimitdeath )
      set linelist |= 0xF << ( tonberryindex * 4 )
      set rowlist |= 0xF << ( tonberryindex * 4 )
      if ( General_TonberryCounter < 254 )
         set General_TonberryCounter += 2
      set SV_FunctionEnemy[HP] = 0
      return
   set currentline = ( linelist >> ( tonberryindex * 4 ) ) & 0xF
   set currentrow = ( rowlist >> ( tonberryindex * 4 ) ) & 0xF
   if ( currentrow == 10 )
      if ( !knifeflag )
         set knifeflag = TRUE
         set SV_Target = 1 << currentline
         Attack( Knife )
      return
   SetupObstacleVariables( obstacle1stepahead, obstacle2stepahead, tonberryaheadindex, obstacleleft, obstacleright )
   set attackerline = 255
   set tmpcharacter = GetAttacker
   if ( #tmpcharacter )
      set attackerline = tmpcharacter[COLUMN]
   set SV_Target = SV_FunctionEnemy
   set counteringbitflags |= 1 << ( tonberryindex * 4 )
   if ( attackerline == currentline )
      if ( obstacle1stepahead )
         Attack( Bump forward )
      elseif ( obstacle2stepahead )
         set rowlist += 1 << ( tonberryindex * 4 )
         Attack( March )
      set rowlist += 2 << ( tonberryindex * 4 )
      Attack( Marching2 )
   elseif ( attackerline < currentline )
      if ( obstacleleft )
         Attack( Bump right )
      set linelist -= 1 << ( tonberryindex * 4 )
      Attack( Move left )
   else
      if ( obstacleright )
         Attack( Bump left )
      set linelist += 1 << ( tonberryindex * 4 )
      Attack( Move right )


Function Tonberry_CounterEx
   if ( SV_FunctionEnemy[HP] < hplimitdeath )
      set SV_FunctionEnemy[HP] = hplimitdeath
   if ( GetAttacker == SV_FunctionEnemy )
      if ( GetAttackId == Disappear )
         set tonberrycount = 0
         set index = 0
         while ( index < 4 )
            set line = ( linelist >> ( index * 4 ) ) & 0xF
            if ( line != 0xF )
               set tonberrycount++
            set index++
         set linelist |= 0xF << ( tonberryindex * 4 )
         set rowlist |= 0xF << ( tonberryindex * 4 )
         while ( IsAttacking != 0 )
            Wait( 1 )
         if ( tonberrycount <= 1 )
            RunBattleCode( Disable ATB )
            while ( GetBattleState != 1 )
               Wait( 1 )
            if ( GetExpGain )
               RunBattleCode( End Battle, Victory )
            else
               RunBattleCode( End Battle, Escape )
         set SV_FunctionEnemy[PRESENCE_OFF] = 1
      if ( ( counteringbitflags >> ( tonberryindex * 4 ) ) & 1 )
         set counteringbitfilter = 0xF << ( tonberryindex * 4 )
         set counteringbitflags &= ~counteringbitfilter
      elseif ( GetAttackId == March )
         set rowlist += 1 << ( tonberryindex * 4 )
      elseif ( GetAttackId == Marching2 )
         set rowlist += 2 << ( tonberryindex * 4 )
      set currentline = ( linelist >> ( tonberryindex * 4 ) ) & 0xF
      set currentrow = ( rowlist >> ( tonberryindex * 4 ) ) & 0xF
      SetupObstacleVariables( obstacle1stepahead, obstacle2stepahead, tonberryaheadindex, obstacleleft, obstacleright )
      if ( tonberryaheadindex )
         if ( !( ( counteringbitflags >> ( tonberryaheadindex * 4 ) ) & 1 ) )
            set tmpcharacter = 1 << ( 4 + tonberryaheadindex )
            if ( #( NotMatching(SV_EnemyTeam[STATUS_CURRENT], PETRIFY | VENOM | DEATH | STOP) & tmpcharacter ) )
               set tmpcharacter[PREVENT_ATTACK] = 1
      if ( obstacle1stepahead )
         if ( ( 10 <= currentrow ) && ( GetAttackId != March ) && ( GetAttackId != Marching2 ) )
            return
         set SV_FunctionEnemy[PREVENT_ATTACK] = 1

Tetra Master Edit

Tetra Master
Card046
#046
Location: Treno, Card Stadium "Straight Shooter Shak", Black Mage No. 33 (Black Mage Village - Choco Hut)


Gallery Edit