austinm327 / wagic

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

canattack vs cantattack #662

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I played moat 
2. AI was stuck with a non flying creature that couldn't attack unless another 
creature was present. During 2 turns, it didn't attack 
3. AI played another creature and immediately attacked with the non flying 
creature.

I was using r3669 on linux 64 bits, Qt version.

Original issue reported on code.google.com by Xawot...@gmail.com on 16 May 2011 at 9:52

GoogleCodeExporter commented 8 years ago
AI was stuck with a non flying creature that couldn't attack unless another 
creature was present?

it would really help to have this cards name.
as i don't think it has anything to do with moat.

Original comment by omegabla...@gmail.com on 17 May 2011 at 1:48

GoogleCodeExporter commented 8 years ago
this bug is tricky, 
last release i added a abilities= word "canattack" as a rules correction..where 
defenders are not supposed to lose defender simply because it suddenly "can 
attack"
and cards which "cant attack unless" dont lose this condition when suddenly it 
"can attack"

i did not foresee that it would stack in a way that would make the moats 
cantattack useless...
this is tricky because if we change this we might have to create a new ability 
to allow attacking instead of an abilities= word...you know i might just do 
that...we need a force attack mode ability for other unsupported cards...

this is not an extreme bug...as only 3 cards i think actually use this 
"canattack"...

Original comment by omegabla...@gmail.com on 17 May 2011 at 2:05

GoogleCodeExporter commented 8 years ago
we could do the following i think to correct this without code changes...
on cards which are supposed to have a continuous effect....like moat...add 
another lord line...
auto=lord(creature[-canattack]) -canattack
this should correct it i think in almost all cases.

Original comment by omegabla...@gmail.com on 17 May 2011 at 2:22

GoogleCodeExporter commented 8 years ago
opps typo in that
auto=lord(creature[canattack]) -canattack
this is the line we want to add.

Original comment by omegabla...@gmail.com on 17 May 2011 at 2:22

GoogleCodeExporter commented 8 years ago
It was "Blind-Spot Giant"

Original comment by Xawot...@gmail.com on 17 May 2011 at 7:23

GoogleCodeExporter commented 8 years ago
This is the same issue we've been having for ages because we do not handle the 
P/T layer rules correctly. A good portion of our unresolved issues are related 
to that.

Here is an article about the P/T layer:
http://www.wizards.com/magic/magazine/article.aspx?x=judge/article/20091105a

I am strongly against the idea of introducing half-assed hacks everytime we run 
into an issue related to this. We need to implement the Layer system once and 
for all, who's up to the task?

closing as a duplicate of issue 175
http://code.google.com/p/wagic/issues/detail?id=175

Original comment by wagic.the.homebrew@gmail.com on 20 May 2011 at 2:06

GoogleCodeExporter commented 8 years ago
that is a hell of a task that will require alot of changes to the current wagic 
systems, this however is not related to that, it is different, it deals with a 
difficult to emulate issue where some cards "canattack" as tho they were "blah 
blah"..
i intend to revisit "canattack" and think of a better solution for these cards. 
basically we have a few states for cards...
it "cant attack" because its a wall, but "can attack" if a condition is met..
then you have cards that "cant attack" because they are under the effect of a 
controlling card/effect. it's kind of hard to fully explain...

think of this issue, which is similar...
lifelink vs "whenever this creature deals damage you gain life"
they do the same thing, however creatures with the 2nd wording or enchanted by 
cards such as "spirit link" multiply the effect, infact you can have for 
exsample 4 spiritlinks and 1 lifelink on a single creature, and when it attacks 
you gain 5 times the life back.

so its a issue with emulating ability effects vs status effect vs card wording.

going to reopen as a reminder to rethink "canattack" there is a workaround as i 
posted in this thread, but you are right, it is half assed to do this, the 
check should be automatically done by the engine to determine if it "can or 
cant" attack...

Original comment by omegabla...@gmail.com on 9 Jul 2011 at 11:23