mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Ability refactor: source improves, deprecated code removed;
This commit is contained in:
parent
8af43dc13a
commit
eea808d2d6
27 changed files with 37 additions and 39 deletions
|
|
@ -1267,7 +1267,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
//play a land that will allow us to play an unplayable
|
||||
for (Mana mana : unplayable.keySet()) {
|
||||
for (Card card : lands) {
|
||||
for (ActivatedManaAbilityImpl ability : card.getAbilities().getActivatedManaAbilities(Zone.BATTLEFIELD)) {
|
||||
for (ActivatedManaAbilityImpl ability : card.getAbilities(game).getActivatedManaAbilities(Zone.BATTLEFIELD)) {
|
||||
for (Mana netMana : ability.getNetMana(game)) {
|
||||
if (netMana.enough(mana)) {
|
||||
this.playLand(card, game, false);
|
||||
|
|
@ -1281,7 +1281,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
//play a land that will get us closer to playing an unplayable
|
||||
for (Mana mana : unplayable.keySet()) {
|
||||
for (Card card : lands) {
|
||||
for (ActivatedManaAbilityImpl ability : card.getAbilities().getActivatedManaAbilities(Zone.BATTLEFIELD)) {
|
||||
for (ActivatedManaAbilityImpl ability : card.getAbilities(game).getActivatedManaAbilities(Zone.BATTLEFIELD)) {
|
||||
for (Mana netMana : ability.getNetMana(game)) {
|
||||
if (mana.contains(netMana)) {
|
||||
this.playLand(card, game, false);
|
||||
|
|
@ -1362,7 +1362,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
}
|
||||
}
|
||||
for (Card card : graveyard.getCards(game)) {
|
||||
for (ActivatedAbility ability : card.getAbilities().getActivatedAbilities(Zone.GRAVEYARD)) {
|
||||
for (ActivatedAbility ability : card.getAbilities(game).getActivatedAbilities(Zone.GRAVEYARD)) {
|
||||
if (ability.canActivate(playerId, game).canActivate()) {
|
||||
ManaOptions abilityOptions = ability.getManaCosts().getOptions();
|
||||
if (abilityOptions.isEmpty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue