Skip to content

Commit

Permalink
Equip all skills for Tower/Raid pals
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisCris committed Apr 16, 2024
1 parent 27b3b52 commit da87e35
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/palworld_pal_editor/core/pal_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ def CharacterID(self, value: str) -> None:
self.remove_unique_attacks()

self.learn_attacks()
if self.IsTower or self.IsRAID:
self.equip_all_pal_attacks()

self.heal_pal()
self.clear_worker_sick()
if maxHP := self.ComputedMaxHP:
Expand Down Expand Up @@ -869,6 +872,14 @@ def learn_attacks(self):
for atk in DataProvider.get_attacks_to_learn(self.DataAccessKey, self.Level or 1):
if atk not in (self.MasteredWaza or []):
self.add_MasteredWaza(atk)

def equip_all_pal_attacks(self):
atks = DataProvider.get_attacks_to_learn(self.DataAccessKey, self.Level or 1)
if not atks: return
(self.EquipWaza or []).clear()
for atk in atks:
if atk not in (self.EquipWaza or []):
self.add_EquipWaza(atk, True)

def remove_unique_attacks(self):
if self.MasteredWaza is None:
Expand Down

0 comments on commit da87e35

Please sign in to comment.