mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 06:22:01 -08:00
* Added Animate Dead (not finished yet).
This commit is contained in:
parent
8412515be0
commit
169835dbea
10 changed files with 550 additions and 10 deletions
|
|
@ -35,7 +35,6 @@ import mage.constants.Zone;
|
|||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.abilities.mana.ManaAbility;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
* Represents a collection of {@link Ability Abilities}. This is the top most
|
||||
|
|
|
|||
|
|
@ -45,12 +45,13 @@ public class LoseAbilitySourceEffect extends ContinuousEffectImpl{
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source){
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if(permanent != null){
|
||||
while(permanent.getAbilities().contains(ability)){
|
||||
if (!permanent.getAbilities().remove(ability)) {
|
||||
logger.warn("ability" + ability.getRule() + "couldn't be removed.");
|
||||
}
|
||||
}
|
||||
if (permanent != null){
|
||||
permanent.getAbilities().remove(ability);
|
||||
// while(permanent.getAbilities().contains(ability)){
|
||||
// if (!permanent.getAbilities().remove(ability)) {
|
||||
// logger.warn("ability " + ability.getRule() + " couldn't be removed.");
|
||||
// }
|
||||
// }
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue