Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabaxi have Claws duplicated as a weapon #29

Closed
geckon opened this issue Aug 12, 2019 · 1 comment
Closed

Tabaxi have Claws duplicated as a weapon #29

geckon opened this issue Aug 12, 2019 · 1 comment

Comments

@geckon
Copy link
Contributor

geckon commented Aug 12, 2019

When a Tabaxi character is generated using create-character, the weapons line in the Python file looks e.g. like this:

weapons = ["Claws", "Shortbow", "Dagger", "Spear"]  # Example: ('shortsword', 'longsword')

And this is the respective section in the PDF:
screenshot_2019-08-12_2150_21:50RRR

After editing the Python file to this:

weapons = ["Shortbow", "Dagger", "Spear", "Claws"]  # Example: ('shortsword', 'longsword')

the PDF still contains the Claws in the first place:
screenshot_2019-08-12_2152_21:52RRR

Therefore, I assume that Claws are added automatically by makesheets no matter what the Python file contains which can cause trouble like in this case.

@PJBrs
Copy link
Contributor

PJBrs commented Jul 7, 2024

I think this same problem applies to the Lizardfolk bite attack and the Aarakocra talons attack (these get added in race.py, and to the Monk Unarmed attack:

dungeonsheets/character.py-        # Account for unarmed strike
dungeonsheets/character.py:        if len(my_weapons) == 0 or hasattr(self, "Monk"):
dungeonsheets/character.py-            my_weapons.append(weapons.Unarmed(wielder=self))

The issue is that create-character will add all weapons to the character sheet, which includes the above attacks, and then makesheets adds them again, causing duplicates. The solution would seem that create-character only adds the user's weapon choices:

diff --git a/dungeonsheets/create_character.py b/dungeonsheets/create_character.py
index 36ac473..0473e5a 100644
--- a/dungeonsheets/create_character.py
+++ b/dungeonsheets/create_character.py
@@ -693,9 +693,8 @@ class WeaponForm(LinkedListForm):
             new_weapons = tuple(s.lower() for s in new_weapons)
         else:
             new_weapons = ()
-        for wpn in new_weapons:
-            self.parentApp.character.wield_weapon(wpn)
-        log.debug(f"Weapons wielded: {new_weapons}")
+        self.parentApp.character.new_weapons = new_weapons
+        log.debug(f"Weapons added: {new_weapons}")
         super().to_next()
 
     def update_remaining(self, widget=None):
diff --git a/dungeonsheets/forms/empty_template.txt b/dungeonsheets/forms/empty_template.txt
index ce7f6ff..b992fcc 100644
--- a/dungeonsheets/forms/empty_template.txt
+++ b/dungeonsheets/forms/empty_template.txt
@@ -69,7 +69,7 @@ gp = 0
 pp = 0
 
 # TODO: Put your equipped weapons and armor here
-weapons = {{ char.weapons }}  # Example: ('shortsword', 'longsword')
+weapons = {{ char.new_weapons }}  # Example: ('shortsword', 'longsword')
 magic_items = ()  # Example: ('ring of protection',)
 armor = "{{ char.armor }}"  # Eg "leather armor"
 shield = "{{ char.shield }}"  # Eg "shield"

@canismarko I can add a patch for this too, somewhere anyway.

PJBrs added a commit to PJBrs/dungeon-sheets that referenced this issue Jul 7, 2024
Create-character will add all weapons to the character sheet,
includes various attacks that are added by default througgh
race.py and character.py. These weapons are Talons, Bite
claws, and, for Monk, Unarmed. Then makesheets adds these
again, causing duplicates.

The solution would seem that create-character only adds the
user's weapon choices, and not _all_ weapons for a character.

This fixes canismarko#29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants