mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[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:
parent
1b2de47e78
commit
27bea843a3
13 changed files with 306 additions and 28 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue