sIKE23 / Mage-Wars

Mage Wars for OCTGN
7 stars 5 forks source link

A creature with counterstrike should not counterstrike when attacking a Guard #296

Closed sIKE23 closed 8 years ago

sIKE23 commented 8 years ago

When a creature with a guard is attacked by a creature with counterstrike the counterstrike is happening

ACG8 commented 8 years ago

Hmmm.... line 917 should explicitly prevent this:

if attack.get('RangeType') == 'Melee':

(counterstrikes have a rangetype of "counterstrike")

Unless you mean counterstrike is happening when a attack that has the counterstrike trait is used as a regular attack (i.e. not as a counterstrike accessed through the special counterstrike attack menu), which I believe is allowed under the rules.

sIKE23 commented 8 years ago

A Hydra attacked a Guarding creature, who then initiated a Counterstrike, the Hydra then initiated a Counterstrike. Counterstrikes should not trigger other Counterstrikes.

//FC

On Mon, Sep 21, 2015 at 10:04 AM, Ananda notifications@github.com wrote:

Hmmm.... line 917 should explicitly prevent this:

if attack.get('RangeType') == 'Melee':

(counterstrikes have a rangetype of "counterstrike")

Unless you mean counterstrike is happening when a attack that has the counterstrike trait is used as a regular attack (i.e. not as a counterstrike accessed through the special counterstrike attack menu), which I believe is allowed under the rules.

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/296#issuecomment-142009034.

ACG8 commented 8 years ago

Right...it's just that that shouldn't happen, given the way the BC handles counterstrikes. It seems like quite a few things are breaking. I wonder if it is due to the recent OCTGN update somehow (can't really see how, though). But I need to rewrite the BC anyway.

sIKE23 commented 8 years ago

I don't think that a lot of things are breaking honestly, but we are getting into corner cases and less rarely seen things. The player just removed the Slam marker no harm no foul. I am not expecting any more in the 1.x line at all, this will all be as you noted be included in the 2.x release. Having the existing 1.x code and issue like this one should result in less spaghetti and faster code, at least that is my hope.

//FC

On Mon, Sep 21, 2015 at 10:16 AM, Ananda notifications@github.com wrote:

Right...it's just that just shouldn't happen, given the way the BC handles counterstrikes. It seems like quite a few things are breaking. I wonder if it is due to the recent OCTGN update somehow (can't really see how, though). But I need to rewrite the BC anyway.

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/296#issuecomment-142012364.

ACG8 commented 8 years ago

Found the problem. When generating the counterstrike attack, the OriginalAttack key is still pointing to the attack dictionary that had a melee rangetype. Working on a fix.

sIKE23 commented 8 years ago

This is fixed....