Skip to content
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

[MKC] Implement Redemption Arc #11842

Merged
merged 1 commit into from
Feb 24, 2024
Merged

Conversation

jimga150
Copy link
Contributor

@github-actions github-actions bot added the cards label Feb 23, 2024
effect.setOutcome(Outcome.Benefit);

Effect effect2 = new GoadAttachedEffect();
effect2.setOutcome(Outcome.Benefit);
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure about setting outcomes but only affects AI

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be honest, i dont fully understand how the value proposition of a play is made in terms of the AI. i should have set the goaded thing to detriment by my judgement (in a general case), but setting one effect to benefit and the other to detriment on the same card seems like a strange thing to hand the computer. Is there a place this is documented?

Copy link
Member

@JayDi85 JayDi85 Feb 24, 2024

Choose a reason for hiding this comment

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

If ability has multiple effects or different outcomes then you can use Ability::addCustomOutcome -- it will help AI with some decisions (see below about put to battlefield).

AI uses outcomes in few places like battle score calculation, targets selections, yes/no choices, etc. Basic logic:

  • player need make some choice;
  • AI look at effect's outcome and try make good choice: activate good effect/choice, ignore bad effect/choice
  • If AI need choose targets then it will try to choose own creatures for good effects and opponent's creatures for bad effects. It it possible to cancel on bad effect without opponent targets then it will cancel it. And so on.
  • Look in CopyAITest and GainControlAITest for some examples;

Also it used in some AI optimizations like activation of "put to battlefield" abilities before combat:
shot_240224_115617

// Enchanted creature has indestructible and is goaded.
Effect effect = new GainAbilityAttachedEffect(IndestructibleAbility.getInstance(),
AttachmentType.AURA, Duration.WhileOnBattlefield);
effect.setText("Enchanted creature has indestructible");
Copy link
Contributor

Choose a reason for hiding this comment

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

hm, is this not the generated text?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, i did not catch that.

@xenohedron xenohedron merged commit e7516aa into magefree:master Feb 24, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants