-
Notifications
You must be signed in to change notification settings - Fork 595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aura Spells have internal Attach Spell for multiple Enchant Keywords #6996
base: master
Are you sure you want to change the base?
Conversation
@tool4ever i don't know why " Incremental Growth " fails ... that isn't even an Aura?
|
@Agetian can you look at the failing test case why the AI has problem with Incremental Growth? |
Hmm, not sure about Incremental Growth (and why it isn't targeting correctly in one of the tests) yet, but the immediate failing test for me is testPlayingSorceryPumpSpellsBeforeBlocks, which fails at line 609 of SpellAbilityPickerSimulationTest. What's happening there is the AI is playing a Dwarven Trader and then tries to make the AI decide on playing Furor of the Bitten on it, which is what line 609 is asserting. Furor of the Bitten is indeed affected by this MR, since it uses the new AI SVar for the aura attach. Possibly the SVar isn't accounted for somewhere in the AI code yet? Please let me know if you're able to figure this one out, we can take a look at Incremental Growth next if that causes issues once this immediate test case is fixed. |
AttachAILogic is just turned into AILogic by this, so that shouldn't be the problem. if (c.hasSVar("AttachAILogic")) {
extra += " | AILogic$ " + c.getSVar("AttachAILogic");
} I think the AI needs better logic what it can target with |
Yeah, agree about the AI logic improvements, sounds like a good thing to implement 👍 |
tests are green, and i did some hard wire that |
yea that's what I meant |
I don't know? Like this? You can try it if you want? |
@tool4ever can you check why the last change does break the tests again?
Found it! |
CanBeEnchantedBy in ValidTgts
Already handled by ValidTgt and getTargetableCards
Already handled by getValidCardsToTarget
Already handled by validTgts
Already handled by SA.canTarget
fix missing Player.CanBeEnchantedBy
2b4e107
to
fa9a193
Compare
@tool4ever the MR should be clean now? |
Hopefully yes, but if you can tell me some test cases for that, I can give it a shot and test/trace it in action :) |
@Agetian it is mostly the problem that |
@@ -551,11 +552,7 @@ private static Card attachAIReanimatePreference(final SpellAbility sa, final Lis | |||
final Player ai = sa.getActivatingPlayer(); | |||
final Card attachSourceLki = CardCopyService.getLKICopy(attachSource); | |||
attachSourceLki.setLastKnownZone(ai.getZone(ZoneType.Battlefield)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this branch tested?
I have doubts it still works now...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It got tested by GameSimulationTest.testEpochrasite
Or should we do another Test case for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's not how the tests work, they are only to check engine and won't use AI api for the most parts
this code wouldn't be reached and such changes need to be confirmed manually ingame
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why resolve when it's been broken? :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tool4ever you or @Agetian could try to add an extra Animate Dead
Test that uses AI parts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we have a precedent for that...? So we'd need to add some framework parts there first.
Anyway to fix the logic here I suggest you try using AnimateAi.becomeAnimated
so the new Aura is able to pass the check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tool4ever i will need to look at Weekend how to change the new Aura
I agree that it's important to come up with some in-game board states that would be good to check how this works in practice, it's a bit difficult for me to figure out what would be good test cases tbh, but yeah, the automated tests won't help since they use the simulation AI which is a completely different thing in itself :) |
@Agetian @tool4ever, something unrelated, that ticked me off before: forge/forge-gui-desktop/src/test/java/forge/ai/simulation/SpellAbilityPickerSimulationTest.java Line 827 in 53fca12
still shows this in the Log:
i know the spell should not be able to cast, but the Stack Message should still not appear there? |
Hmm yeah, not sure what's happening there, probably needs looking into, yes. I'll see if I can figure it out on the upcoming weekend. |
Closes #169
I can't add the AI flags into the Keyword because of
Tallowisp
,so i added Svars instead.
canBeAttached