[M3C] Implement Ulalek, Fused Atrocity and new colorless hybrid mana (#12273)

* improved by (#12415)
* Added symbol downloads for new colorless hybrid
---------

Co-authored-by: Alexander Novotny <alexander_novo@mail.tmcc.edu>
Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
This commit is contained in:
Evan Kranzler 2024-06-06 15:43:45 -04:00 committed by GitHub
parent 1b2de47e78
commit 27bea843a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 306 additions and 28 deletions

View file

@ -1652,6 +1652,26 @@ public class ComputerPlayer extends PlayerImpl {
}
}
}
// pay colorless - more restrictive than hybrid (think of it like colored)
for (ActivatedManaAbilityImpl manaAbility : getManaAbilitiesSortedByManaCount(mageObject, game)) {
if (cost instanceof ColorlessManaCost) {
for (Mana netMana : manaAbility.getNetMana(game)) {
if (cost.testPay(netMana) || hasApprovingObject) {
if (netMana instanceof ConditionalMana
&& !((ConditionalMana) netMana).apply(ability, game, getId(), cost)) {
continue;
}
if (hasApprovingObject && !canUseAsThoughManaToPayManaCost(cost, ability, netMana,
manaAbility, mageObject, game)) {
continue;
}
if (activateAbility(manaAbility, game)) {
return true;
}
}
}
}
}
// then pay hybrid
for (ActivatedManaAbilityImpl manaAbility : getManaAbilitiesSortedByManaCount(mageObject, game)) {
if (cost instanceof HybridManaCost) {
@ -1670,9 +1690,9 @@ public class ComputerPlayer extends PlayerImpl {
}
}
}
// then pay mono hybrid
// then pay colorless hybrid - more restrictive than mono hybrid
for (ActivatedManaAbilityImpl manaAbility : getManaAbilitiesSortedByManaCount(mageObject, game)) {
if (cost instanceof MonoHybridManaCost) {
if (cost instanceof ColorlessHybridManaCost) {
for (Mana netMana : manaAbility.getNetMana(game)) {
if (cost.testPay(netMana) || hasApprovingObject) {
if (netMana instanceof ConditionalMana && !((ConditionalMana) netMana).apply(ability, game, getId(), cost)) {
@ -1688,9 +1708,9 @@ public class ComputerPlayer extends PlayerImpl {
}
}
}
// pay colorless
// then pay mono hybrid
for (ActivatedManaAbilityImpl manaAbility : getManaAbilitiesSortedByManaCount(mageObject, game)) {
if (cost instanceof ColorlessManaCost) {
if (cost instanceof MonoHybridManaCost) {
for (Mana netMana : manaAbility.getNetMana(game)) {
if (cost.testPay(netMana) || hasApprovingObject) {
if (netMana instanceof ConditionalMana && !((ConditionalMana) netMana).apply(ability, game, getId(), cost)) {