Page 1 of 1

hasSecondStrike()

PostPosted: 16 Nov 2009, 05:06
by DennisBergkamp
Zerker,

I was having some trouble with your new hasSecondStrike() method. For some reason, normal combat damage does not happen when using this method. If I replace them with the old (not so elegant) :

Code: Select all
if(!att.get(i).hasFirstStrike() || (att.get(i).hasFirstStrike() && att.get(i).hasDoubleStrike()) )
and
Code: Select all
if(!attacking.get(i).hasFirstStrike() || (attacking.get(i).hasFirstStrike() && attacking.get(i).hasDoubleStrike() )){
Stuff works again. I'm confused though, why wouldn't it work with hasSecondStrike()?

Re: hasSecondStrike()

PostPosted: 16 Nov 2009, 05:55
by zerker2000
Huh? That IS the secondStrike code...

Re: hasSecondStrike()

PostPosted: 16 Nov 2009, 06:01
by DennisBergkamp
Yes, exactly!

Which is why I'm so confused #-o

Re: hasSecondStrike()

PostPosted: 16 Nov 2009, 07:50
by Marek14
I wonder - does the code work correctly if a creature gains or loses first strike after first strike damage?