You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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.
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?
The text was updated successfully, but these errors were encountered: