DrizzleRaine / wagic

Automatically exported from code.google.com/p/wagic
Other
0 stars 0 forks source link

AI can declare illegal attackers/blockers, and may miss legal ones #271

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Apparently the AI chooses its attackers/blockers 
based on the information available before the first 
attacker is actually declared. This means that the 
AI doesn't realize when the declaration of an 
attacker/blocker actually changes the availability 
of the others.

Example: Scarred Puma can only attack if a black or 
green creature attacks too. So at combatbegin it 
has a "cantattack" ability, and the AI won't 
select it as attacker. Now let's say the AI also 
has a Black Knight, and declares it as attacker. 
The Scarred Puma now becomes available as an 
attacker too, but the AI never realizes it and 
never attacks with it.

Example 2: Silent Arbiter gives all creatures the 
"cantattack" flag as soon as the first attacker has 
been declared. However, the AI doesn't realize 
that, and may simply declare all its creatures as 
attackers. The engine apparently trusts the AI to 
never declare an illegal attacker, and doesn't 
check for legality by itself.

Original issue reported on code.google.com by Psyyri...@gmail.com on 27 Dec 2009 at 10:05

GoogleCodeExporter commented 8 years ago
im not sure i consider this bug valid, the reason the bug exist is because that 
card uses a workaround. the way to correctly add support for these types of 
cards is adding it in the svn, not using a series of strange code combinations 
to try and create a viable emulation of the cards ability. i can promise you ai 
does not miss a valid attacker or blocker ever. it is that this workaround 
would have the cards attacking blocking statuses checked by ai AFTER its picked 
its attackers/blockers.

Original comment by omegabla...@gmail.com on 16 Apr 2011 at 7:31

GoogleCodeExporter commented 8 years ago
i will add, i can fix this by having ai choose attackers and blockers 
twice...before moving on...but to code such a dangerous line into the engine to 
add support for the workaround is a no go from me...i would rather add the 
ability itself.

Original comment by omegabla...@gmail.com on 16 Apr 2011 at 7:33

GoogleCodeExporter commented 8 years ago
I still think the AI misses some attackes, such as those that can't attack 
alone, etc...
as you say, it might be a consequence of something else rather than a bug, but 
the issue does exist

Original comment by wagic.the.homebrew@gmail.com on 17 Apr 2011 at 12:48

GoogleCodeExporter commented 8 years ago

Original comment by pank...@gmail.com on 28 Sep 2013 at 11:51