bcsfe-wrapper-python 0.1.20__py3-none-any.whl → 0.1.21__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.
bcsfe_wrapper/wrapper.py CHANGED
@@ -83,7 +83,9 @@ class BCSFEWrapper:
83
83
 
84
84
  def unlock_cats(self, cat_ids: List[int]):
85
85
  for cid in cat_ids:
86
- cat = self.save_file.cats.get_cat_by_id(cid)
86
+ # ユーザーが指定したIDから1を引いて内部IDに変換
87
+ internal_id = cid - 1
88
+ cat = self.save_file.cats.get_cat_by_id(internal_id)
87
89
  if cat: cat.unlock(self.save_file)
88
90
  def unlock_all_cats(self):
89
91
  for cat in self.save_file.cats.cats: cat.unlock(self.save_file)
@@ -91,12 +93,14 @@ class BCSFEWrapper:
91
93
  # 新機能: 指定キャラ削除(未解放に戻す)
92
94
  def remove_cats(self, cat_ids: List[int]):
93
95
  for cid in cat_ids:
94
- cat = self.save_file.cats.get_cat_by_id(cid)
96
+ internal_id = cid - 1
97
+ cat = self.save_file.cats.get_cat_by_id(internal_id)
95
98
  if cat: cat.set_unlocked(False)
96
99
 
97
100
  def upgrade_cats(self, cat_ids: List[int], base: int = 19, plus: int = 0):
98
101
  for cid in cat_ids:
99
- cat = self.save_file.cats.get_cat_by_id(cid)
102
+ internal_id = cid - 1
103
+ cat = self.save_file.cats.get_cat_by_id(internal_id)
100
104
  if cat: cat.upgrade.base, cat.upgrade.plus = base, plus
101
105
  def upgrade_all_cats(self, base: Optional[int] = None, plus: Optional[int] = None):
102
106
  for cat in self.save_file.cats.cats:
@@ -106,7 +110,8 @@ class BCSFEWrapper:
106
110
  cat.upgrade.plus = plus if plus is not None else power_up.get_max_possible_plus()
107
111
  def set_cat_form(self, cat_ids: List[int], form: int = 2):
108
112
  for cid in cat_ids:
109
- cat = self.save_file.cats.get_cat_by_id(cid)
113
+ internal_id = cid - 1
114
+ cat = self.save_file.cats.get_cat_by_id(internal_id)
110
115
  if cat: cat.set_form(form)
111
116
  def true_form_all_cats(self):
112
117
  cats = self.save_file.cats.get_unlocked_cats()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bcsfe-wrapper-python
3
- Version: 0.1.20
3
+ Version: 0.1.21
4
4
  Summary: A Python wrapper for BCSFE-Python to easily interact with Battle Cats save files.
5
5
  Home-page: https://github.com/fieryhenry/BCSFE-Python
6
6
  Author: Manus AI
@@ -1,5 +1,5 @@
1
1
  bcsfe_wrapper/__init__.py,sha256=o2LbyVJjuRV1gap8wDbsv39kEUJM1rt8Lq49u1RYYXA,268
2
- bcsfe_wrapper/wrapper.py,sha256=OYddOUvlppQtk7YNJtmBx94Ka7fdqgHQU26WTIGpQqY,10191
2
+ bcsfe_wrapper/wrapper.py,sha256=zzd0OXdHHR7XmKipc24h7Hciyq2Koijilm4D1pRhjg0,10439
3
3
  bcsfe_wrapper/__pycache__/__init__.cpython-311.pyc,sha256=svMfcdHfIa6yhFBxIuraz6iCJ0ZuMsDRaOFR2NWWC6A,567
4
4
  bcsfe_wrapper/__pycache__/wrapper.cpython-311.pyc,sha256=ij4a4EzzZlilVhzc-SB8LHaQKWO3truExx2aGn-coMg,21944
5
5
  bcsfe_wrapper/bcsfe/__init__.py,sha256=vCHjSoJq5u684HLQXahhtA64MZWffNHFdhweP7RM0f4,144
@@ -310,7 +310,7 @@ bcsfe_wrapper/bcsfe/files/locales/vi/edits/treasures.properties,sha256=U9uKsF4y0
310
310
  bcsfe_wrapper/bcsfe/files/locales/vi/edits/user_rank.properties,sha256=FcldhzKM0UmuhmGzI3dGzxstuKcw-t-gkbmKLZT4VKg,603
311
311
  bcsfe_wrapper/bcsfe/files/themes/default.json,sha256=w8eqqd9ATIFwUcvOWTdJjyd1T3LGgUm3iVkJhT5wfEo,392
312
312
  bcsfe_wrapper/bcsfe/files/themes/discord.json,sha256=W1dtEev6tap_waHOxvSqENDcMRA9jfBvjW7t-ssdGs4,370
313
- bcsfe_wrapper_python-0.1.20.dist-info/METADATA,sha256=RXul2nuWrLi03taj_yNlIrOLj7Dt-UkHqPQApi81AIc,4518
314
- bcsfe_wrapper_python-0.1.20.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
315
- bcsfe_wrapper_python-0.1.20.dist-info/top_level.txt,sha256=kqyMKpAdNg39_kGGtqsxOSLPIb-qx7R1mQj1hReUsYM,14
316
- bcsfe_wrapper_python-0.1.20.dist-info/RECORD,,
313
+ bcsfe_wrapper_python-0.1.21.dist-info/METADATA,sha256=8bK_yvwx0Yv852ND7rlF-uwsRl0lQNbe-GrFv2bcux0,4518
314
+ bcsfe_wrapper_python-0.1.21.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
315
+ bcsfe_wrapper_python-0.1.21.dist-info/top_level.txt,sha256=kqyMKpAdNg39_kGGtqsxOSLPIb-qx7R1mQj1hReUsYM,14
316
+ bcsfe_wrapper_python-0.1.21.dist-info/RECORD,,