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

[ACR] Implement Ezio Auditore da Firenze #13067

Merged
merged 3 commits into from
Nov 17, 2024

Conversation

Kr4u7
Copy link
Contributor

@Kr4u7 Kr4u7 commented Nov 17, 2024

@github-actions github-actions bot added the cards label Nov 17, 2024
@Kr4u7 Kr4u7 changed the title [ACR] Add Ezio Auditore Da Firenze [ACR] Implement Ezio Auditore Da Firenze Nov 17, 2024
@Kr4u7 Kr4u7 changed the title [ACR] Implement Ezio Auditore Da Firenze [ACR] Implement Ezio Auditore da Firenze Nov 17, 2024
Copy link
Contributor

@Grath Grath left a comment

Choose a reason for hiding this comment

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

Mostly minor comments that should be quick to address.


static {
filter.add(SubType.ASSASSIN.getPredicate());
filter.add(Predicates.not(new AbilityPredicate(FreerunningAbility.class))); // So there are not redundant copies being added to each card
Copy link
Contributor

Choose a reason for hiding this comment

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

Ezio's granted Freerunning is the only {B}{B} Freerunning, so you still need to add it to all Assassins because Brotherhood Ambushers and Achilles Davenport have more expensive or differently-restrictive costs than {B}{B}. Having redundant copies of things like this are fine.

Comment on lines 62 to 66
//Phage this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new LoseGameTargetPlayerEffect(), false, true));

//this.addAbility(new ConditionalTriggeredAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new EzioAuditoreDaFirenzeEffect(), true, true)), new LifeLossOtherFromCombatWatcher());
//this.addAbility(new ConditionalTriggeredAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DoIfAnyNumberCostPaid(new EzioAuditoreDaFirenzeEffect(),new ManaCostsImpl<>("{W}{U}{B}{R}{G}")), true, true),condition, "pay {W}{U}{B}{R}{G} if that player has 10 or less life. When you do, that player loses the game."));
//Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DoIfCostPaid(new EzioAuditoreDaFirenzeEffect(), new ManaCostsImpl<>("{W}{U}{B}{R}{G}")), true, true)
Copy link
Contributor

Choose a reason for hiding this comment

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

Clean these commented-out attempts up.

this.toughness = new MageInt(2);

// Menace
this.addAbility(new MenaceAbility(), makeWatcher());
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. MenaceAbility(false) because Ezio doesn't have the reminder text of Menace.
  2. Menace doesn't need the watcher, don't add it here (add it to the ability that uses it)

new DoIfCostPaid(
new LoseGameTargetPlayerEffect(),new ManaCostsImpl<>("{W}{U}{B}{R}{G}")
), false, true
),EzioAuditoreDaFirenzeWatcher::checkPermanent, "Whenever {this} deals combat damage to a player, you may pay {W}{U}{B}{R}{G} if that player has 10 or less life. When you do, that player loses the game."
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to be a Watcher, or is there something more static that could determine if the targeted player is below 10 life? Is it that the DealsCombatDamageToAPlayerTriggeredAbility doesn't set the player target until after ConditionalTriggeredAbility checks the condition? To be clear, I'm not objecting to this, just wondering if the complication of a Watcher is necessary.

Also, as long as the watcher is necessary, add new EzioAuditoreDaFirenzeWatcher() after the close of ConditionalTriggeredAbility in this addAbility.

Comment on lines 88 to 90
public static Watcher makeWatcher(){
return new EzioAuditoreDaFirenzeWatcher();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Other cards use this function so that when ~2-3 cards need the same watcher but it's not frequent enough to be a Common watcher, you can use makeWatcher to share it. Since nothing else uses this watcher, you can just add it to the ability directly and remove this makeWatcher until something else needs it.

@Kr4u7
Copy link
Contributor Author

Kr4u7 commented Nov 17, 2024

Thank you for the feedback @Grath! I implemented the changes you proposed.
I tried a lot of other things to access the current life of the damaged player, but I couldn't find a card that has a similar restriction in their oracle text on scryfall, so I couldn't find a good example.
I tried a few approaches of cards that pop up with this search o:"damage" o:"if that player has", but the thing that worked at the end was the watcher idea I stole from Vessel of the All-Consuming.
If you have a better idea, it would be much appreciated, since I also think that this way is a bit convoluted. At least it works tho 👍

Swap from Watcher to a Condition
@Grath
Copy link
Contributor

Grath commented Nov 17, 2024

I didn't know how to guide you into doing it, but I pulled down the code and swapped it over to a Condition instead of a Watcher, and tested to make sure it works right with the Condition.

@Kr4u7
Copy link
Contributor Author

Kr4u7 commented Nov 17, 2024

Thank you! It was this line UUID playerId = source.getEffects().get(0).getTargetPointer().getFirst(game, source); that I for the life of me couldn't figure out!

@Grath Grath merged commit 7c29b76 into magefree:master Nov 17, 2024
2 checks passed
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledSpellsEffect(new FreerunningAbility("{B}{B}"), filter)));
// Whenever Ezio deals combat damage to a player, you may pay {W}{U}{B}{R}{G} if that player has 10 or less life. When you do, that player loses the game.
this.addAbility(
new ConditionalTriggeredAbility(
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't quite right. The condition needs to be checked on resolution, not on trigger. And it's a reflexive trigger.

You want a DoWhenCostPaid inside a ConditionalOneShotEffect.

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