About the parrying skills of guards

Discuss PoP1 for DOS here.

Moderator: English Moderator Team

Post Reply
Falcury
Wise Scribe
Wise Scribe
Posts: 329
Joined: June 25th, 2009, 10:01 pm

About the parrying skills of guards

Post by Falcury » October 5th, 2016, 9:03 pm

You know how guards will always be hit if you block their attack, then strike immediately after waiting just a fraction of a second?
Or, similarly, how guards will never defend themselves if you keep hitting them in quick succession?

It looks like this is because of this code in parry():

Code: Select all

seg005:0EA5 81 7E FE 98 00                       cmp     [bp+opp_frame], 152
seg005:0EAA 75 25                                jnz     short return
C code (SDLPoP):

Code: Select all

if (opp_frame != frame_152_strike_2) return;
If this code is removed, guards suddenly become a lot more challenging!

Essentially, guards can only execute the parry maneuver while the kid's animation is on one specific frame (152); however, under some circumstances the animation will already be at frame 153, so the parry gets canceled and the guard never stands a chance...

All of this is independent of the "guard skill" (all guards are tragically handicapped like this...)

I tried to create an assembly hack using CusAsm, however I don't really understand Turbo Assembler yet...

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3140
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: About the parrying skills of guards

Post by Norbert » October 6th, 2016, 10:24 am

I'm guessing this requires a guard with a "Re-striking After Block Prob." and/or "Blocking Strike Prob." that's higher than 0?
Because I quickly tried this with the first guard in level 2, and there's no noticeable difference.
[Edit: Changed him to 9, but still no noticeable difference. I can push him into a wall and even if I give him 20+ hitpoints I can just "keep hitting them in quick succession".]

Falcury
Wise Scribe
Wise Scribe
Posts: 329
Joined: June 25th, 2009, 10:01 pm

Re: About the parrying skills of guards

Post by Falcury » October 6th, 2016, 8:53 pm

Norbert wrote:I'm guessing this requires a guard with a "Re-striking After Block Prob." and/or "Blocking Strike Prob." that's higher than 0?
Because I quickly tried this with the first guard in level 2, and there's no noticeable difference.
[Edit: Changed him to 9, but still no noticeable difference. I can push him into a wall and even if I give him 20+ hitpoints I can just "keep hitting them in quick succession".]
Sorry, I should have tested the assembly hack... :? I'll see if I can get it to work. The procedure needs to be prevented from returning immediately if [bp+opp_frame] does not equal 152. Perhaps changing that "jump if not zero" instruction to an unconditional jump (jmp) will do the trick.

Edit: I found a change that works for me:

Code: Select all

Turbo Debugger Log
CPU 80486
0E57:0E9D 837EF600       cmp    word ptr [bp-0A],0000       
0E57:0EA1 75C4           jne    0E67                        
0E57:0EA3 EB15           jmp    0EBA                        
0E57:0EA5 817EFE9800     cmp    word ptr [bp-02],0098       
0E57:0EAA EB0C           jmp    0EBA  ; <--- modified instruction
0E57:0EAC EB0C           jmp    0EBA                        
0E57:0EAE 817EFCA700     cmp    word ptr [bp-04],00A7       
0E57:0EB3 751C           jne    0ED1                        
0E57:0EB5 C746F83D00     mov    word ptr [bp-08],003D       
0E57:0EBA C606224301     mov    byte ptr [4322],01          
0E57:0EBF FF76F8         push   word ptr [bp-08]            
0E57:0EC2 0E             push   cs                          
0E57:0EC3 E844F1         call   000A                        
0E57:0EC6 837EFA00       cmp    word ptr [bp-06],0000  
For testing, the fat guard and Jaffar are good opponents :) The guard in level 8 should be tougher as well. Yeah, the change is most noticeable for guards that already have a high probability of blocking.

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3140
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: About the parrying skills of guards

Post by Norbert » October 8th, 2016, 1:12 am

Falcury wrote:Sorry, I should have tested the assembly hack... :?
Err, you wrote about the C code that if it's removed the guards behave differently.
That's what I tested and commented on. :)

_Zaphod_
Beylerbey
Beylerbey
Posts: 55
Joined: January 13th, 2006, 12:01 am
Location: USA

Re: About the parrying skills of guards

Post by _Zaphod_ » January 30th, 2017, 10:48 pm

I'm beginning to suspect this is intentional.

Main reason is Jafar battle in SNES version (a highly accurate port except for the extensions).

Jafar has 100% strike after parry and parries 100% if you restrike after parry. You cannot EVER counterstrike him. every other enemy in the game will eventually mess up an let your hit get through. Once i got into a counterstrike fight with him for an entire minute! you will not get through his guard that way.

the ONLY way to ever land a hit on him is to delayed strike or anticipate his strike and swing just before he does and hit first.

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3140
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: About the parrying skills of guards

Post by Norbert » January 31st, 2017, 1:12 pm

_Zaphod_ wrote:the ONLY way to ever land a hit on him is to delayed strike or anticipate his strike and swing just before he does and hit first.
Yes, the way I always defeat him is by constantly pressing up to parry (block) and every now and then in between all these parries I attack once.
This way Jaffar can never get a hit in and the attacks are random enough that they occasionally get through to him.

David
The Prince of Persia
The Prince of Persia
Posts: 1496
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: About the parrying skills of guards

Post by David » February 4th, 2017, 11:28 am

Falcury wrote:

Code: Select all

0E57:0EA5 817EFE9800     cmp    word ptr [bp-02],0098       
0E57:0EAA EB0C           jmp    0EBA  ; <--- modified instruction
0E57:0EAC EB0C           jmp    0EBA                        
JMP-s are relative, so your EB 0C at 0EAA can't be correct... It should be EB 0E.
Or just use 90 90 (2×NOP).

As for the differences: guard fights always seem random to me, so I can't really see any difference... :)

Post Reply