Fix AI unalives self with Shanid (#9123)#9496
Fix AI unalives self with Shanid (#9123)#9496CTimmerman wants to merge 1 commit intoCard-Forge:masterfrom
Conversation
| if (card.getType().isLegendary() && wouldLoseWithShanid()) { | ||
| return AiPlayDecision.CurseEffects; | ||
| } | ||
| return canPlaySpellOrLandBasic(card, sa); |
There was a problem hiding this comment.
you're pretty close to the right util methods already:
forge/forge-ai/src/main/java/forge/ai/AiController.java
Lines 1003 to 1010 in a3b6b15
please modify those instead:
that way you should also be able to leverage findSubAbilityByType and avoid ugly hardcoded logic
There was a problem hiding this comment.
So add lifeloss to getDamageForPlaying or make a new similar function and also for drawing? getLossForDrawing?
There was a problem hiding this comment.
check both methods, you'll see lifeloss is already handled there
and there is no loss for drawing here, better not mix up too much or you risk making things hard to merge again
There was a problem hiding this comment.
You told me not to rebase, and I've only added one commit to an existing MR of mine. Keep your vagueness and DIY. It works for me now and my branch works for my decks. I'm tired of waiting for even approved MRs.
Fixes #9123 by checking for Shanid, Sleepers' Scourge's life loss and card draw before playing legendary lands or casting legendary spells.