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(poison): Reworked player poison implementation #1455

Merged
merged 8 commits into from
Mar 13, 2025

Conversation

pelippper
Copy link
Contributor

@pelippper pelippper commented Mar 12, 2025

Reworked poison to work more authentically. Instead of there being 2 variables, %poison and %antipoison, there is just one variable, %poison. This variable is negative if the player has poison immunity, and positive if the player is poisoned. In addition, added poison immunity to strange fruit to work as described by Ash https://archive.is/6SmRo.

if (%poison = 0) {
mes("You have been poisoned!");
}
settimer(poison, 30);
%poison = $severity;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be %poison = max(%poison, $severity)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, thanks!

@pelippper
Copy link
Contributor Author

Also updated each call to settimer(poison,30) to first check that the poison timer isn't already active

@pelippper
Copy link
Contributor Author

Fixed inequality mistake, removed antipoison logout/login procs, added proc for setting poison timer

@pelippper
Copy link
Contributor Author

fixed a few syntax errors I made, oopsie

@mark-b5
Copy link
Contributor

mark-b5 commented Mar 12, 2025

Needs the following

  • Call ~set_poison_timer proc when setting immunity
  • Don't call ~set_poison_timerr proc from inside poison timer
  • Change poison_damage to be a queue rather than a proc

@pelippper
Copy link
Contributor Author

Fixed the 3 issues raised by b5 above, tested in-game, working as intended

@mark-b5
Copy link
Contributor

mark-b5 commented Mar 12, 2025

Looks good to me

@pelippper pelippper changed the title fix(poison): Reworked poison implementation fix(poison): Reworked player poison implementation Mar 12, 2025
@Pazaz Pazaz merged commit 47ae115 into 2004Scape:main Mar 13, 2025
2 checks passed
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.

5 participants