pmdsky-debug-py 5.1.11__py3-none-any.whl → 5.1.13__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pmdsky_debug_py/na.py CHANGED
@@ -1037,9 +1037,9 @@ class NaArm9Functions:
1037
1037
  None,
1038
1038
  (
1039
1039
  "Call LoadFileInPack after looking up the global Pack archive by its"
1040
- " identifier\n\nr0: pack file identifier\nr1: [output] target buffer\nr2:"
1041
- " file index\nreturn: number of read bytes (identical to the length of the"
1042
- " pack from the Table of Content)"
1040
+ " identifier\n\nr0: pack file identifier\nr1: file index\nr2: [output]"
1041
+ " target buffer\nreturn: number of read bytes (identical to the length of"
1042
+ " the pack from the Table of Content)"
1043
1043
  ),
1044
1044
  )
1045
1045
 
@@ -2679,17 +2679,30 @@ class NaArm9Functions:
2679
2679
  [0x201D1DC],
2680
2680
  None,
2681
2681
  (
2682
- "Note: unverified, ported from Irdkwia's notes\n\nr0: wan_table_ptr\nr1:"
2682
+ "Always delete an entry if the file is allocated externally"
2683
+ " (file_externally_allocated is set), otherwise, decrease the reference"
2684
+ " counter. If it reach 0, delete the sprite.\n\nr0: wan_table_ptr\nr1:"
2683
2685
  " wan_id"
2684
2686
  ),
2685
2687
  )
2686
2688
 
2689
+ AllocateWanTableEntry = Symbol(
2690
+ None,
2691
+ None,
2692
+ None,
2693
+ (
2694
+ "Return the identifier to a free wan table entry (-1 if none are"
2695
+ " avalaible). The entry is zeroed.\n\nr0: wan_table_ptr\nreturn: the entry"
2696
+ " id in wan_table"
2697
+ ),
2698
+ )
2699
+
2687
2700
  FindWanTableEntry = Symbol(
2688
2701
  [0x1D2D4],
2689
2702
  [0x201D2D4],
2690
2703
  None,
2691
2704
  (
2692
- "Appears to search in the given table (in practice always seems to be"
2705
+ "Search in the given table (in practice always seems to be"
2693
2706
  " LOADED_WAN_TABLE_PTR) for an entry with the given file name.\n\nr0: table"
2694
2707
  " pointer\nr1: file name\nreturn: index of the found file, if found, or -1"
2695
2708
  " if not found"
@@ -2701,8 +2714,19 @@ class NaArm9Functions:
2701
2714
  [0x201D334],
2702
2715
  None,
2703
2716
  (
2704
- "wan_id = -1 if it is not loaded\n\nNote: unverified, ported from Irdkwia's"
2705
- " notes\n\nr0: wan_table_ptr\nr1: bin_file_id\nr2: file_id\nreturn: wan_id"
2717
+ "Look up a sprite with the provided pack_id and file_index in the wan"
2718
+ " table.\n\nr0: wan_table_ptr\nr1: pack_id\nr2: file_index\nreturn: sprite"
2719
+ " id in the wan table, -1 if not found"
2720
+ ),
2721
+ )
2722
+
2723
+ InitWanTable = Symbol(
2724
+ None,
2725
+ None,
2726
+ None,
2727
+ (
2728
+ "Initialize the input WAN table with 0x60 free entries (it needs a length"
2729
+ " of 0x1510 bytes)\n\nr0: wan_table_ptr"
2706
2730
  ),
2707
2731
  )
2708
2732
 
@@ -2718,6 +2742,32 @@ class NaArm9Functions:
2718
2742
  ),
2719
2743
  )
2720
2744
 
2745
+ LoadWanTableEntryFromPack = Symbol(
2746
+ None,
2747
+ None,
2748
+ None,
2749
+ (
2750
+ "Return an already allocated entry for this sprite if it exists, otherwise"
2751
+ " allocate a new one and load the optionally compressed sprite.\n\nr0:"
2752
+ " wan_table_ptr\nr1: pack_id\nr2: file_index\nr3: allocation"
2753
+ " flags\nstack[0]: compressed\nreturn: the entry id in wan_table"
2754
+ ),
2755
+ )
2756
+
2757
+ LoadWanTableEntryFromPackUseProvidedMemory = Symbol(
2758
+ None,
2759
+ None,
2760
+ None,
2761
+ (
2762
+ "Return an already allocated entry for this sprite if it exists, otherwise"
2763
+ " allocate a new one and load the optionally compressed sprite into the"
2764
+ " provided memory area. Mark the sprite as externally allocated.\n\nr0:"
2765
+ " wan_table_ptr\nr1: pack_id\nr2: file_index\nr3:"
2766
+ " sprite_storage_ptr\nstack[0]: compressed\nreturn: the entry id in"
2767
+ " wan_table"
2768
+ ),
2769
+ )
2770
+
2721
2771
  ReplaceWanFromBinFile = Symbol(
2722
2772
  [0x1D684],
2723
2773
  [0x201D684],
@@ -12971,6 +13021,16 @@ class NaOverlay10Data:
12971
13021
  ),
12972
13022
  )
12973
13023
 
13024
+ KECLEON_SHOP_BOOST_CHANCE_MULTIPLIER = Symbol(
13025
+ [0x7DCC],
13026
+ [0x22C484C],
13027
+ 0x4,
13028
+ (
13029
+ "The boosted kecleon shop spawn chance multiplier (~1.2) as a binary"
13030
+ " fixed-point number (8 fraction bits)."
13031
+ ),
13032
+ )
13033
+
12974
13034
  HIDDEN_STAIRS_SPAWN_CHANCE_MULTIPLIER = Symbol(
12975
13035
  [0x7DD0],
12976
13036
  [0x22C4850],
@@ -13659,8 +13719,10 @@ class NaOverlay11Functions:
13659
13719
  [0x22EBB40],
13660
13720
  None,
13661
13721
  (
13662
- "Note: unverified, ported from Irdkwia's notes\n\nr0: [output]"
13663
- " bg_attr_str\nr1: bg_id"
13722
+ "Open and read an entry from the MAP_BG/bg_list.dat\n\nDocumentation on"
13723
+ " this format can be found"
13724
+ " here:\nhttps://github.com/SkyTemple/skytemple-files/tree/55b3017631a8a1b0f106111ef91a901dc394c6df/skytemple_files/graphics/bg_list_dat\n\nr0:"
13725
+ " [output] The entry\nr1: background ID"
13664
13726
  ),
13665
13727
  )
13666
13728
 
@@ -13937,6 +13999,10 @@ class NaOverlay11Data:
13937
13999
 
13938
14000
  GROUND_STATE_MAP = Symbol([0x48A80], [0x2324CC0], None, "[Runtime]")
13939
14001
 
14002
+ GROUND_STATE_WEATHER = Symbol(
14003
+ None, None, None, "[Runtime] Same structure format as GROUND_STATE_MAP"
14004
+ )
14005
+
13940
14006
  GROUND_STATE_PTRS = Symbol(
13941
14007
  [0x48AB4],
13942
14008
  [0x2324CF4],
@@ -16958,6 +17024,127 @@ class NaOverlay29Functions:
16958
17024
  ),
16959
17025
  )
16960
17026
 
17027
+ ApplyMudTrapEffect = Symbol(
17028
+ [0x1212C],
17029
+ [0x22EE36C],
17030
+ None,
17031
+ (
17032
+ "Randomly lowers attack, special attack, defense, or special defense of the"
17033
+ " defender by 3 stages.\n\nr0: attacker entity pointer\nr1: defender entity"
17034
+ " pointer"
17035
+ ),
17036
+ )
17037
+
17038
+ ApplyStickyTrapEffect = Symbol(
17039
+ [0x121F4],
17040
+ [0x22EE434],
17041
+ None,
17042
+ (
17043
+ "If the defender is the leader, randomly try to make something in the bag"
17044
+ " sticky. Otherwise, try to make the item the monster is holding"
17045
+ " sticky.\n\nr0: attacker entity pointer\nr1: defender entity pointer"
17046
+ ),
17047
+ )
17048
+
17049
+ ApplyGrimyTrapEffect = Symbol(
17050
+ [0x123EC],
17051
+ [0x22EE62C],
17052
+ None,
17053
+ (
17054
+ "If the defender is the leader, randomly try to turn food items in the"
17055
+ " toolbox into\ngrimy food. Otherwise, try to make the food item the"
17056
+ " monster is holding grimy food.\n\nr0: attacker entity pointer\nr1:"
17057
+ " defender entity pointer"
17058
+ ),
17059
+ )
17060
+
17061
+ ApplyPitfallTrapEffect = Symbol(
17062
+ [0x125E0],
17063
+ [0x22EE820],
17064
+ None,
17065
+ (
17066
+ "If the defender is the leader, end the current floor unless it has a"
17067
+ " rescue point.\nOtherwise, make the entity faint and ignore reviver seeds."
17068
+ " If not called by a random\ntrap, break the grate on the pitfall"
17069
+ " trap.\n\nr0: attacker entity pointer\nr1: defender entity pointer\nr2:"
17070
+ " tile pointer\nr3: bool caused by random trap"
17071
+ ),
17072
+ )
17073
+
17074
+ ApplySummonTrapEffect = Symbol(
17075
+ [0x12754],
17076
+ [0x22EE994],
17077
+ None,
17078
+ (
17079
+ "Randomly spawns 2-4 enemy monsters around the position. The entity is only"
17080
+ " used for\nlogging messages.\n\nr0: entity pointer\nr1: position"
17081
+ ),
17082
+ )
17083
+
17084
+ ApplyPpZeroTrapEffect = Symbol(
17085
+ [0x127F0],
17086
+ [0x22EEA30],
17087
+ None,
17088
+ (
17089
+ "Tries to reduce the PP of one of the defender's moves to 0.\n\nr0:"
17090
+ " attacker entity pointer\nr1: defender entity pointer"
17091
+ ),
17092
+ )
17093
+
17094
+ ApplyPokemonTrapEffect = Symbol(
17095
+ [0x128D8],
17096
+ [0x22EEB18],
17097
+ None,
17098
+ (
17099
+ "Turns item in the same room as the tile at the position (usually just the"
17100
+ " entities's\nposition) into monsters. If the position is in a hallway,"
17101
+ " convert items in a 3x3 area\ncentered on the position into"
17102
+ " monsters.\n\nr0: entity pointer\nr1: position"
17103
+ ),
17104
+ )
17105
+
17106
+ ApplyTripTrapEffect = Symbol(
17107
+ [0x12AEC],
17108
+ [0x22EED2C],
17109
+ None,
17110
+ (
17111
+ "Tries to drop the defender's item and places it on the floor.\n\nr0:"
17112
+ " attacker entity pointer\nr1: defender entity pointer"
17113
+ ),
17114
+ )
17115
+
17116
+ ApplyToxicSpikesTrapEffect = Symbol(
17117
+ [0x12CAC],
17118
+ [0x22EEEEC],
17119
+ None,
17120
+ (
17121
+ "Tries to inflict 10 damage on the defender and then tries to poison"
17122
+ " them.\n\nr0: attacker entity pointer\nr1: defender entity pointer"
17123
+ ),
17124
+ )
17125
+
17126
+ ApplyRandomTrapEffect = Symbol(
17127
+ [0x12D00],
17128
+ [0x22EEF40],
17129
+ None,
17130
+ (
17131
+ "Selects a random trap that isn't a wonder tile and isn't a random trap and"
17132
+ " calls\nApplyTrapEffect on all monsters that is different from the trap's"
17133
+ " team.\n\nr0: Triggered trap\nr1: User\nr2: Target, normally same as"
17134
+ " user\nr3: Tile that contains the trap\nstack[0]: position"
17135
+ ),
17136
+ )
17137
+
17138
+ ApplyGrudgeTrapEffect = Symbol(
17139
+ [0x12E34],
17140
+ [0x22EF074],
17141
+ None,
17142
+ (
17143
+ "Spawns several monsters around the position and gives all monsters on the"
17144
+ " floor the\ngrudge status condition.\n\nr0: entity pointer\nr1: position"
17145
+ ),
17146
+ )
17147
+
16961
17148
  ApplyTrapEffect = Symbol(
16962
17149
  [0x12F14],
16963
17150
  [0x22EF154],
@@ -16965,11 +17152,20 @@ class NaOverlay29Functions:
16965
17152
  (
16966
17153
  "Performs the effect of a triggered trap.\n\nThe trap's animation happens"
16967
17154
  " before this function is called.\n\nr0: Triggered trap\nr1: User\nr2:"
16968
- " Target, normally same as user\nr3: Tile that contains the trap\nreturn:"
16969
- " True if the trap should be destroyed after the effect is applied"
17155
+ " Target, normally same as user\nr3: Tile that contains the trap\nstack[0]:"
17156
+ " position\nstack[1]: trap ID\nstack[2]: bool caused by random"
17157
+ " trap\nreturn: True if the trap should be destroyed after the effect is"
17158
+ " applied"
16970
17159
  ),
16971
17160
  )
16972
17161
 
17162
+ RevealTrapsNearby = Symbol(
17163
+ [0x13398],
17164
+ [0x22EF5D8],
17165
+ None,
17166
+ "Reveals traps within the monster's viewing range.\n\nr0: entity pointer",
17167
+ )
17168
+
16973
17169
  DebugRecruitingEnabled = Symbol(
16974
17170
  [0x1382C],
16975
17171
  [0x22EFA6C],
@@ -17353,6 +17549,20 @@ class NaOverlay29Functions:
17353
17549
  ),
17354
17550
  )
17355
17551
 
17552
+ TryEndStatusWithAbility = Symbol(
17553
+ [0x1E59C],
17554
+ [0x22FA7DC],
17555
+ None,
17556
+ (
17557
+ "Checks if any of the defender's active abilities would end one of their"
17558
+ " current status\nconditions. For example, if the ability Own Tempo will"
17559
+ " stop confusion.\n\nCalled after changing a monster's ability with skill"
17560
+ " swap, role play, or trace to\nremove statuses the monster should no"
17561
+ " longer be affected by.\n\nr0: attacker entity pointer\nr1: defender"
17562
+ " entity pointer"
17563
+ ),
17564
+ )
17565
+
17356
17566
  ExclusiveItemEffectIsActive = Symbol(
17357
17567
  [
17358
17568
  0x1EA58,
@@ -19300,6 +19510,16 @@ class NaOverlay29Functions:
19300
19510
  ),
19301
19511
  )
19302
19512
 
19513
+ TryResetStatChanges = Symbol(
19514
+ [0x3D3E4],
19515
+ [0x2319624],
19516
+ None,
19517
+ (
19518
+ "Tries to reset the stat changes of the defender.\n\nr0: attacker entity"
19519
+ " pointer\nr1: defender entity pointer\nr3: bool to force animation"
19520
+ ),
19521
+ )
19522
+
19303
19523
  MirrorMoveIsActive = Symbol(
19304
19524
  [0x3D508],
19305
19525
  [0x2319748],
@@ -19595,14 +19815,28 @@ class NaOverlay29Functions:
19595
19815
  )
19596
19816
 
19597
19817
  TryExplosion = Symbol(
19598
- [0x44548],
19599
- [0x2320788],
19818
+ [0x44208],
19819
+ [0x2320448],
19600
19820
  None,
19601
19821
  (
19602
19822
  "Creates an explosion if possible.\n\nThe target monster is considered the"
19603
19823
  " source of the explosion.\n\nr0: user entity pointer\nr1: target entity"
19604
19824
  " pointer\nr2: coordinates where the explosion should take place"
19605
- " (unverified)\nr3: ?\nstack[0]: ?\nstack[1]: damage source (normally"
19825
+ " (center)\nr3: explosion radius (only works correctly with 1 and"
19826
+ " 2)\nstack[0]: damage type\nstack[1]: damage source"
19827
+ ),
19828
+ )
19829
+
19830
+ TryAftermathExplosion = Symbol(
19831
+ [0x44548],
19832
+ [0x2320788],
19833
+ None,
19834
+ (
19835
+ "Creates the explosion for the ability aftermath if possible.\n\nThe target"
19836
+ " monster is considered the source of the explosion.\n\nr0: user entity"
19837
+ " pointer\nr1: target entity pointer\nr2: coordinates where the explosion"
19838
+ " should take place (center)\nr3: explosion radius (only works correctly"
19839
+ " with 1 and 2)\nstack[0]: damage type\nstack[1]: damage source (normally"
19606
19840
  " DAMAGE_SOURCE_EXPLOSION)"
19607
19841
  ),
19608
19842
  )
@@ -21097,6 +21331,19 @@ class NaOverlay29Functions:
21097
21331
  ),
21098
21332
  )
21099
21333
 
21334
+ GetFinalKecleonShopSpawnChance = Symbol(
21335
+ [0x66C7C],
21336
+ [0x2342EBC],
21337
+ None,
21338
+ (
21339
+ "Gets the kecleon shop spawn chance for the floor.\n\nWhen"
21340
+ " dungeon::boost_kecleon_shop_spawn_chance is false, returns the same value"
21341
+ " as the input. When it's true, returns the input (chance * 1.2).\n\nr0:"
21342
+ " base kecleon shop spawn chance,"
21343
+ " floor_properties::kecleon_shop_spawn_chance\nreturn: int"
21344
+ ),
21345
+ )
21346
+
21100
21347
  ResetHiddenStairsSpawn = Symbol(
21101
21348
  [0x66CC8],
21102
21349
  [0x2342F08],