Clean up berry_tree.inc and misc adjacent documentation

This commit is contained in:
GriffinR
2019-10-20 02:31:51 -04:00
committed by huderlem
parent cefc31dd1e
commit 0db188b487
14 changed files with 95 additions and 93 deletions

View File

@@ -199,7 +199,7 @@
"movement_range_y": 1,
"trainer_type": "0",
"trainer_sight_or_berry_tree_id": "0",
"script": "BattleFrontier_OutsideEast_EventScript_242CEA",
"script": "BattleFrontier_OutsideEast_EventScript_Sudowoodo",
"flag": "FLAG_HIDE_BATTLE_FRONTIER_SUDOWOODO"
},
{

View File

@@ -102,24 +102,24 @@ BattleFrontier_OutsideEast_EventScript_242CE1:: @ 8242CE1
msgbox BattleFrontier_OutsideEast_Text_243230, MSGBOX_NPC
end
BattleFrontier_OutsideEast_EventScript_242CEA:: @ 8242CEA
BattleFrontier_OutsideEast_EventScript_Sudowoodo:: @ 8242CEA
lock
faceplayer
waitse
playse 269
applymovement 14, BattleFrontier_OutsideEast_Movement_242D69
applymovement 14, BattleFrontier_OutsideEast_Movement_SudowoodoShake
waitmovement 0
release
end
BattleFrontier_OutsideEast_EventScript_242CFC:: @ 8242CFC
BattleFrontier_OutsideEast_EventScript_WaterSudowoodo:: @ 8242CFC
lock
faceplayer
special DoWateringBerryTreeAnim
waitstate
waitse
playse 269
applymovement 14, BattleFrontier_OutsideEast_Movement_242D69
playse SE_USSOKI
applymovement 14, BattleFrontier_OutsideEast_Movement_SudowoodoShake
waitmovement 0
msgbox gText_Sudowoodo_Attacked, MSGBOX_DEFAULT
closemessage
@@ -127,28 +127,28 @@ BattleFrontier_OutsideEast_EventScript_242CFC:: @ 8242CFC
playmoncry SPECIES_SUDOWOODO, 2
delay 40
waitmoncry
setvar VAR_LAST_TALKED, 14
setvar VAR_LAST_TALKED, 14 @ Sudowoodo object event id
setwildbattle SPECIES_SUDOWOODO, 40, ITEM_NONE
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
clearflag FLAG_SYS_CTRL_OBJ_DELETE
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_WON
goto_if_eq BattleFrontier_OutsideEast_EventScript_242D60
goto_if_eq BattleFrontier_OutsideEast_EventScript_RemoveSudowoodo
compare VAR_RESULT, B_OUTCOME_RAN
goto_if_eq BattleFrontier_OutsideEast_EventScript_242D60
goto_if_eq BattleFrontier_OutsideEast_EventScript_RemoveSudowoodo
compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
goto_if_eq BattleFrontier_OutsideEast_EventScript_242D60
goto_if_eq BattleFrontier_OutsideEast_EventScript_RemoveSudowoodo
setflag FLAG_DEFEATED_SUDOWOODO
release
end
BattleFrontier_OutsideEast_EventScript_242D60:: @ 8242D60
BattleFrontier_OutsideEast_EventScript_RemoveSudowoodo:: @ 8242D60
setflag FLAG_DEFEATED_SUDOWOODO
goto Common_EventScript_RemoveStaticPokemon
end
BattleFrontier_OutsideEast_Movement_242D69: @ 8242D69
BattleFrontier_OutsideEast_Movement_SudowoodoShake: @ 8242D69
face_right
delay_8
face_down

View File

@@ -1,16 +1,16 @@
BerryTreeScript:: @ 82742F9
special EventObjectInteractionGetBerryTreeData
switch VAR_0x8004
case 255, BerryTree_EventScript_27434F
case 0, BerryTree_EventScript_CheckSoil
case 1, BerryTree_EventScript_CheckBerryStage1
case 2, BerryTree_EventScript_CheckBerryStage2
case 3, BerryTree_EventScript_CheckBerryStage3
case 4, BerryTree_EventScript_CheckBerryStage4
case 5, BerryTree_EventScript_CheckBerryFullyGrown
case BERRY_STAGE_SPARKLING, BerryTree_EventScript_Sparkling
case BERRY_STAGE_NO_BERRY, BerryTree_EventScript_CheckSoil
case BERRY_STAGE_PLANTED, BerryTree_EventScript_CheckBerryStage1
case BERRY_STAGE_SPROUTED, BerryTree_EventScript_CheckBerryStage2
case BERRY_STAGE_TALLER, BerryTree_EventScript_CheckBerryStage3
case BERRY_STAGE_FLOWERING, BerryTree_EventScript_CheckBerryStage4
case BERRY_STAGE_BERRIES, BerryTree_EventScript_CheckBerryFullyGrown
end
BerryTree_EventScript_27434F:: @ 827434F
BerryTree_EventScript_Sparkling:: @ 827434F
lockall
message BerryTree_Text_ExclamationPoint
waitmessage
@@ -22,7 +22,7 @@ BerryTree_EventScript_CheckSoil:: @ 8274359
lock
faceplayer
specialvar VAR_RESULT, PlayerHasBerries
compare VAR_RESULT, 1
compare VAR_RESULT, TRUE
goto_if_eq BerryTree_EventScript_WantToPlant
message BerryTree_Text_ItsSoftLoamySoil
waitmessage
@@ -85,6 +85,8 @@ BerryTree_EventScript_CheckBerryStage4:: @ 82743E1
waitbuttonpress
goto BerryTree_EventScript_WantToWater
@ VAR_0x8005 here is the number of times watered
@ Buffered by EventObjectInteractionGetBerryTreeData
BerryTree_EventScript_GetCareAdverb:: @ 82743F6
compare VAR_0x8005, 0
goto_if_eq BerryTree_EventScript_SetAdverbPoor
@@ -101,6 +103,7 @@ BerryTree_EventScript_SetAdverbPoor:: @ 827441A
bufferstring 1, BerryTree_Text_CareAdverbPoor
return
@ VAR_0x8006 here is the number of berries
BerryTree_EventScript_CheckBerryFullyGrown:: @ 8274421
buffernumberstring 1, VAR_0x8006
lock
@@ -116,7 +119,7 @@ BerryTree_EventScript_PickBerry:: @ 8274448
special EventObjectInteractionPickBerryTree
compare VAR_0x8004, 0
goto_if_eq BerryTree_EventScript_BerryPocketFull
special sub_80EED34
special IncrementDailyPickedBerries
special EventObjectInteractionRemoveBerryTree
message BerryTree_Text_PickedTheBerry
playfanfare MUS_ME_KINOMI
@@ -143,7 +146,7 @@ BerryTree_EventScript_CancelPickingBerry:: @ 8274479
release
end
BerryTree_EventScript_274482:: @ 8274482
BerryTree_EventScript_ItemUsePlantBerry:: @ 8274482
lockall
special EventObjectInteractionGetBerryTreeData
call BerryTree_EventScript_PlantBerry
@@ -165,10 +168,9 @@ BerryTree_EventScript_DontWater:: @ 82744BE
releaseall
end
BerryTree_EventScript_2744C0:: @ 82744C0
BerryTree_EventScript_ItemUseWailmerPail:: @ 82744C0
special EventObjectInteractionGetBerryTreeData
lockall
BerryTree_EventScript_WaterBerry:: @ 82744C4
special EventObjectInteractionGetBerryName
message BerryTree_Text_WateredTheBerry
@@ -185,7 +187,7 @@ BerryTree_EventScript_WaterBerry:: @ 82744C4
BerryTree_EventScript_PlantBerry:: @ 82744DD
special EventObjectInteractionPlantBerryTree
incrementgamestat GAME_STAT_PLANTED_BERRIES
special sub_80EED10
special IncrementDailyPlantedBerries
special EventObjectInteractionGetBerryCountString
message BerryTree_Text_PlantedOneBerry
waitmessage

View File

@@ -358,8 +358,8 @@ gSpecials:: @ 81DBA64
def_special sub_80EE7C0
def_special ShowGlassWorkshopMenu
def_special PutFanClubSpecialOnTheAir
def_special sub_80EED10
def_special sub_80EED34
def_special IncrementDailyPlantedBerries
def_special IncrementDailyPickedBerries
def_special InitSecretBaseVars
def_special SetSecretBaseSecretsTvFlags_SandOrnament
def_special sub_80EB300