Skip to content

Conversation

@CTimmerman
Copy link
Contributor

@CTimmerman CTimmerman commented Jan 12, 2026

Fixes #9123 by checking for Shanid, Sleepers' Scourge's life loss and card draw before playing legendary lands or casting legendary spells.

if (card.getType().isLegendary() && wouldLoseWithShanid()) {
return AiPlayDecision.CurseEffects;
}
return canPlaySpellOrLandBasic(card, sa);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're pretty close to the right util methods already:

damage = ComputerUtil.getDamageForPlaying(player, sa);
if (damage >= player.getLife()) {
// TODO even if it doesn't kill AI lower the score
return AiPlayDecision.CurseEffects;
}
}
if (card.isPermanent() && !sa.isMutate()) {
damage += ComputerUtil.getDamageFromETB(player, card);

please modify those instead:
that way you should also be able to leverage findSubAbilityByType and avoid ugly hardcoded logic

Copy link
Contributor Author

@CTimmerman CTimmerman Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So add lifeloss to getDamageForPlaying or make a new similar function and also for drawing? getLossForDrawing?

Copy link
Contributor

@tool4ever tool4ever Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Jetz72 Jetz72 added the AI General AI tag label Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI General AI tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI unalives self with Shanid

3 participants