-
Notifications
You must be signed in to change notification settings - Fork 808
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
Conversation
effect.setOutcome(Outcome.Benefit); | ||
|
||
Effect effect2 = new GoadAttachedEffect(); | ||
effect2.setOutcome(Outcome.Benefit); |
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.
not sure about setting outcomes but only affects AI
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.
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?
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.
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
andGainControlAITest
for some examples;
Also it used in some AI optimizations like activation of "put to battlefield" abilities before combat:
// Enchanted creature has indestructible and is goaded. | ||
Effect effect = new GainAbilityAttachedEffect(IndestructibleAbility.getInstance(), | ||
AttachmentType.AURA, Duration.WhileOnBattlefield); | ||
effect.setText("Enchanted creature has indestructible"); |
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.
hm, is this not the generated text?
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.
ah, i did not catch that.
#11669