Protection prayers in PvP and PvM

PkHonor's work in progress and future updates will be posted here.
User avatar
Mike
Programmer
Posts: 5896
Joined: Sun Nov 01, 2009 8:00 pm
Location: PkHonor HQ

Protection prayers in PvP and PvM

Post by Mike » Sun Jan 10, 2021 4:53 pm

To the best of my knowledge, damage is calculated when an attack is initiated (that's why you see a combat XP drop when you launch an attack, rather than on hit). However, there is a lot of uncertainty about protection prayers which we need to settle and fix if needed.

For example, say you are fighting a monster. Said monster launches a ranged or magic attack at you. You activate your protection prayer. At what point should the game block the damage?
  1. If your protection prayer is active when the monster launches their attack. Activating protection prayer on hit does not protect you.
  2. If your protection prayer is active when the hit takes place (activating it when the NPC launches their attack has no effect).
  3. Either - if your protection prayer is active when the monster launches their attack, you will block it even if you disable your protection prayer when it hits. If your protection prayer is active when the hit takes place (but it was inactive when the attack was launched), you will also block it.
And the same question goes for PvP.

Similarly, I'm also wondering the same question for defensive prayer. Say you activate piety which gives a defensive bonus, at what point is determined that your defense is increased? When an attack is launched, or when it hits? And is this the same for PvP and PvM?

Elon musky
Premium Donator
Posts: 586
Joined: Sun May 26, 2013 12:26 pm

Re: Protection prayers in PvP and PvM

Post by Elon musky » Sun Jan 10, 2021 5:18 pm

Mike.

For the third option, can you please explain what would happen for projectiles and spells casts for the travel time?

Would activating and deactivating the protection while the attack is traveling to the player still protect you from the attack or would it have to stay activated when the attack lands?
Spoiler: show
Image

Guga69
Premium Donator
Posts: 9
Joined: Fri Aug 28, 2015 2:04 pm

Re: Protection prayers in PvP and PvM

Post by Guga69 » Sun Jan 10, 2021 5:43 pm

Actually I don't think that's a problem in the server or at least problem is not that. If I'm correct the prayer works the same way as it does in OSRS, prayer blocks the damage if you turn it on when the monster launches it's attack. (So A scenario)

The problem I believe is the delay between switching prayers. For example, if I'm praying mage and I click to pray range it takes a few ticks to switch. That delay is where pray flicking between the attacks becomes really hard, because you need to anticipate monster's attack and act before it attacks.

I'm not much of a PVP'er so I can't say how it should act in this regard, but I believe it should be the same. It would make harder for pvpers to kill pvmers in wild, because we could pray flick everything better. I don't know if that should be a thing in PVP, but I guess if you take off the delay from PVM it takes it off from PVP aswell.

P.S. maybe this problem only occurs to me (although I heard other people complain about it) because of the ping, so if that's the case please ignore this comment.

EDIT: I just saw on the other post, that this issue was talked about, so sorry for repeating

User avatar
Mike
Programmer
Posts: 5896
Joined: Sun Nov 01, 2009 8:00 pm
Location: PkHonor HQ

Re: Protection prayers in PvP and PvM

Post by Mike » Sun Jan 10, 2021 6:46 pm

Xsquire1 wrote:
Sun Jan 10, 2021 5:18 pm
Mike.

For the third option, can you please explain what would happen for projectiles and spells casts for the travel time?

Would activating and deactivating the protection while the attack is traveling to the player still protect you from the attack or would it have to stay activated when the attack lands?
Whatever happens between launch and hit is not taken into account in the server code. The only times when something can be calculated is either on the game tick when a projectile is being launched and the moment it lands. So if you switch a prayer on and off while a projectile is underway, it will not have any effect.

Right now, protection prayers are being taken into account when an NPC launches an attack, but not when a projectile hits. We have to determine if activating a prayer when a projectile hits should also be taken into account.

Guga69 wrote:
Sun Jan 10, 2021 5:43 pm
EDIT: I just saw on the other post, that this issue was talked about, so sorry for repeating
Sorry, what post are you referring to?

Guga69
Premium Donator
Posts: 9
Joined: Fri Aug 28, 2015 2:04 pm

Re: Protection prayers in PvP and PvM

Post by Guga69 » Sun Jan 10, 2021 7:01 pm

Mike wrote:
Sun Jan 10, 2021 6:46 pm
Guga69 wrote:
Sun Jan 10, 2021 5:43 pm
EDIT: I just saw on the other post, that this issue was talked about, so sorry for repeating
Sorry, what post are you referring to?
I'm referring to the recent prayer flicking post and comments from Respire, Brant and yourself about the delay being a getting this in-game mechanic right.

Will be ok2
Wise One
Posts: 603
Joined: Sun Sep 15, 2019 2:54 pm

Re: Protection prayers in PvP and PvM

Post by Will be ok2 » Sun Jan 10, 2021 7:35 pm

As far as I know there is typically a delay for pvm. I.e. Jad, on here there is a clear message in the chat box because if you wait for the jad to do the attack emote where u see the attack style it’ll be to late, I’m gonna guess for Pvm it would be 1 tic or .6seconds before the damage is taken off your hp? Maybe half a tic 0.3 seconds before its taken off your hp / you visually see the attack on you.

Edit:
It’s odd how you can’t pray jad if you wait to see the emote, however at the big red dog in TOB you can see the mage / range attack coming twords you and pray correctly / have time to switch prayers.
Image
#GGLSP

Raj
Moderator
Posts: 1178
Joined: Sun Dec 30, 2018 2:50 am

Re: Protection prayers in PvP and PvM

Post by Raj » Sun Jan 10, 2021 9:52 pm

Yeah so being American I personally have 0 issue with the way praying for projectile-based attacks works since the ping isn’t too bad and the game is extremely playable even with that small inconsistency between melee and mage/ranged but if it were changed for all our European brethren with 300 ms+ ping I’m sure it would be widely appreciated. Respire would also stop complaining about this “bug” which actually isn’t bugged so that would also be a plus.

Also, for the other prayers like rigour and piety, it should just be made consistent with whatever the result of this is. I.e if we decide to make overheads work when projectiles land, rigour and augury should also do their rolls when projectiles land. While I’d like to see what would happen if offensive prayers required praying at the attack, while overheads required praying as it hits, I think people would just get annoyed with the inconsistency and claim it’s another bug.

Elon musky
Premium Donator
Posts: 586
Joined: Sun May 26, 2013 12:26 pm

Re: Protection prayers in PvP and PvM

Post by Elon musky » Sun Jan 10, 2021 10:39 pm

Making all protection and stat improving prayers work at the time the attack lands would be more beneficial for PVP and PVM at this point in my opinion.
Spoiler: show
Image

Guga69
Premium Donator
Posts: 9
Joined: Fri Aug 28, 2015 2:04 pm

Re: Protection prayers in PvP and PvM

Post by Guga69 » Mon Jan 11, 2021 12:19 am

Will be ok2 wrote:
Sun Jan 10, 2021 7:35 pm
Edit:
It’s odd how you can’t pray jad if you wait to see the emote, however at the big red dog in TOB you can see the mage / range attack coming twords you and pray correctly / have time to switch prayers.
Interesting, because for me Jad works perfectly fine as it is. I don't really read chat and pray accordingly to the emote and it has never been too late for me. The same way it is with P3 Verzik. I believe these two bosses (maybe there are some other) are exception to the rule and you need to use overhead prayer until the projectile hits.

As of any other boss or monster – you need to pray before it uses the attack. Very good example is Zulrah's and Hydra's so called "Jad faces" or even Cerberus ghosts when you need to flick prayers around the time when the other styles attack is in the air. For example when the mage projectile is in the air you need to switch to the range prayer to protect for the upcoming missile and so on.

Because of that I don't agree with Xsquire, it should be left as it is and as it works in OSRS with some exceptions like Verzik or Jad.

User avatar
Iron adam
Event Coordinator
Posts: 10370
Joined: Sun Aug 24, 2014 6:07 am
Location: Monys
Contact:

Re: Protection prayers in PvP and PvM

Post by Iron adam » Mon Jan 11, 2021 12:21 am

On osrs, it is the same for pvp and pvm. For almost all monsters/weapons, the damage and accuracy is calculated at the start of the animation. This includes overhead prayers and other prayers (eg. piety). The damage/accuracy has already been calculated before the projectile hits its target. So, having an overhead prayer on when the projectile hits makes no difference.

There are a few exceptions, like Jad. The damage/accuracy/prayer rolls for his range and mage attacks are slightly delayed. I do not know if there are any other monsters like this as I don't play osrs anymore.

We should have the same mechanics as osrs. Which, as far as i can tell, we do.
❤️ Juntow ❤️ Thoby ❤️ Monys ❤️ Nazuths ❤️ Patel ❤️

Post Reply