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

Part 9, consumable.py, LightningDamageConsumable #39

Closed
StultusTemporis opened this issue Aug 28, 2020 · 1 comment
Closed

Part 9, consumable.py, LightningDamageConsumable #39

StultusTemporis opened this issue Aug 28, 2020 · 1 comment

Comments

@StultusTemporis
Copy link

The Diff tab for LightningDamageConsumable does not match the Original tab for LightningDamageConsumable. Following the LightningDamageConsumable Diff tab's code will result in three errors/bugs:

First, the code will not recognize distance() as an attribute of consumer.distance(). This is solved by changing "consumer: Actor" to "action: actions.ItemAction" in the function's incoming variables.
Second, the code will raise a notimplementederror() when activating the item. This can be solved by changing the function's name from "consume" to "activate".
Finally, the item will not leave the inventory. This can be solved by adding "self.consume" after "target.fighter.take_damage(self.damage)".

All of these are implemented in the Original tab for LightningDamageConsumable. Perhaps the Diff tab is referencing an older version of the code?

@TStand90
Copy link
Owner

Sorry I somehow missed this. You're right, the "original" tab has the correct code, and I believe the "diff" version has an older implementation. This has been fixed on the website.

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