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

Fix #59 weapon auto-equipping #62

Merged
merged 1 commit into from Jan 9, 2021
Merged

Fix #59 weapon auto-equipping #62

merged 1 commit into from Jan 9, 2021

Conversation

szapp
Copy link
Collaborator

@szapp szapp commented Jan 9, 2021

These changes should fix the bug #59. Quoting #59 for a minor issue:

A few words about the fix. It will prevent NPCs from equipping a weapon when they already have one of the type equipped. That means in particular:

  1. If an NPC is created with a melee weapon, they will stick to this weapon for the entire game, unless explicitly exchanged through the scripts.
  2. If an NPC is created without a ranged weapon, they will equip a ranged weapon should they ever acquire one (e.g. through trading with the player).

In short: An NPC willl auto-equip a ranged and a melee weapon if available - but only the first time.

So, you could argue the fix only works to a certain extend. In most cases, the first sold ranged weapon will be "lost" for most traders.

Originally posted by @szapp in #59 (comment)

@AmProsius AmProsius merged commit 5ce5f7e into master Jan 9, 2021
@szapp szapp deleted the bug059 branch January 15, 2021 19:42
@AmProsius AmProsius linked an issue Jan 17, 2021 that may be closed by this pull request
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

Successfully merging this pull request may close these issues.

Vendors equip strongest weapon
2 participants