Exeggutor Teleport effect

This commit is contained in:
ElectroDeoxys
2020-05-11 00:25:17 +01:00
parent 467f016e40
commit c11acb74b4
4 changed files with 45 additions and 7 deletions
+4 -4
View File
@@ -161,10 +161,10 @@ OddishSproutEffectCommands:
db $00
ExeggutorTeleportEffectCommands:
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, $48ec
dbw EFFECTCMDTYPE_AFTER_DAMAGE, $491a
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, $48f7
dbw EFFECTCMDTYPE_UNKNOWN_08, $490f
dbw EFFECTCMDTYPE_INITIAL_EFFECT_1, TeleportEffect_CheckBench
dbw EFFECTCMDTYPE_AFTER_DAMAGE, TeleportEffect_SwitchEffect
dbw EFFECTCMDTYPE_REQUIRE_SELECTION, TeleportEffect_PlayerSelect
dbw EFFECTCMDTYPE_UNKNOWN_08, TeleportEffect_AISelect
db $00
ExeggutorBigEggsplosionEffectCommands:
+39 -1
View File
@@ -1056,7 +1056,45 @@ SproutEffect_PutInPlayArea: ; 2c8cc (b:48cc)
ret
; 0x2c8ec
INCROM $2c8ec, $2c925
; returns carry if no Pokemon on Bench
TeleportEffect_CheckBench: ; 2c8ec (b:48ec)
ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY_AREA
call GetTurnDuelistVariable
ldtx hl, ThereAreNoPokemonOnBenchText
cp 2
ret
; 0x2c8f7
TeleportEffect_PlayerSelect: ; 2c8f7 (b:48f7)
ldtx hl, SelectPkmnOnBenchToSwitchWithActiveText
call DrawWideTextBox_WaitForInput
bank1call HasAlivePokemonInBench
ld a, $01
ld [wcbd4], a
.loop
bank1call OpenPlayAreaScreenForSelection
jr c, .loop
ldh a, [hTempPlayAreaLocation_ff9d]
ldh [hTemp_ffa0], a
ret
; 0x2c90f
TeleportEffect_AISelect: ; 2c90f (b:490f)
ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY_AREA
call GetTurnDuelistVariable
call Random
ldh [hTemp_ffa0], a
ret
; 0x2c91a
TeleportEffect_SwitchEffect: ; 2c91a (b:491a)
ldh a, [hTemp_ffa0]
ld e, a
call SwapArenaWithBenchPokemon
xor a
ld [wDuelDisplayedScreen], a
ret
; 0x2c925
BigEggsplosion_AIEffect: ; 2c925 (b:4925)
ldh a, [hTempPlayAreaLocation_ff9d]
+1 -1
View File
@@ -981,7 +981,7 @@ Text00d1: ; 379ae (d:79ae)
text "Can only be used on the Bench."
done
Text00d2: ; 379ce (d:79ce)
ThereAreNoPokemonOnBenchText: ; 379ce (d:79ce)
text "There are no Pokémon on the Bench."
done
+1 -1
View File
@@ -211,7 +211,7 @@ TextOffsets:: ; 34000 (d:4000)
textpointer Text00cf ; 0x00cf
textpointer Text00d0 ; 0x00d0
textpointer Text00d1 ; 0x00d1
textpointer Text00d2 ; 0x00d2
textpointer ThereAreNoPokemonOnBenchText ; 0x00d2
textpointer Text00d3 ; 0x00d3
textpointer UnableDueToToxicGasText ; 0x00d4
textpointer Text00d5 ; 0x00d5