[Ohrrpgce] SVN: teeemcee/10631 Fix atkq problems in turn-based mode when an attack has a negative delay

Ralph Versteegen teeemcee at gmail.com
Wed Sep 12 17:59:57 PDT 2018


Now wait a minute, you replied to this email three hours before it was
sent! Don't you know it's rude to disrespect causality? ;)

I found the attack queue stuff hard to understand because there was so much
code, and so many attack settings, shared between the two modes. That's
where the both-attacks-and-ticks bug came from.
I still don't understand how blocking status is meant to affect queued
attacks. There are a few functions which ignore non-blocking attacks, and
I'm not sure why. I think in one or two cases there are bugs there.
For example pending_attacks_for_this_turn ignores them, which I assume
means that if you chain to a non-blocking attack, then rather than happen
later during the same round/turn, it could happen in a later round even if
its turn delay is 0.
But if one combatant did a (blocking) attack with a big delay, to would
flush out all pending non-blocking attacks which otherwise wouldn't happen
during the current round.
Is that intentional?

Actually... if a non-blocking attack doesn't happen during the same round,
it might never happen! that would be the fault of the code I just checked
in, which will actually increase atkq .delays if there's an attack with a
negative .delay,
instead of always strictly decreasing them. I need to do something about
that...

On Thu, 13 Sep 2018 at 05:20, James Paige <Bob at hamsterrepublic.com> wrote:

> This fix is wonderful. I think you are getting at what I wanted when I
> first attempted this years ago :)
>
> Attack delay also happening in ticks was definitely my bug :)
>
> On Wednesday, September 12, 2018, <subversion at hamsterrepublic.com> wrote:
>
>> teeemcee
>> 2018-09-12 06:09:09 -0700 (Wed, 12 Sep 2018)
>> 839
>> Fix atkq problems in turn-based mode when an attack has a negative delay
>>
>> Active-time battles not affected
>>
>> This fixes a bug where attack delays were counted in attacks AND ticks:
>> a delay of 180 attacks would cause battle to pause for 10 seconds!
>>
>> Also, if multiple attacks had a negative or zero delay, it would pick the
>> first
>> one instead of the one with the lowest delay.
>>
>> Also, if there was an attack with zero delay (which is normally the case
>> for the
>> first attack in a round!) it would start even if one of the conditions in
>> turn_mode_time_passage tried to prevent the passage of time. I don't know
>> whather that was a problem or whether it indicates that those conditions
>> didn't
>> actually do anything!
>>
>> Instead of counting down delays by 1 each tick, delays of all attacks get
>> incremented or decremented so the next attack has delay 0.
>> ---
>> U   wip/bmod.rbas
>> _______________________________________________
>> Ohrrpgce mailing list
>> ohrrpgce at lists.motherhamster.org
>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20180913/6b4bd408/attachment.html>


More information about the Ohrrpgce mailing list