[MID] Implemented Silver Bolt

This commit is contained in:
Evan Kranzler 2021-09-12 08:58:52 -04:00
parent 1a5f15751d
commit e9d78fc5ac
4 changed files with 89 additions and 0 deletions

View file

@ -125,6 +125,8 @@ public interface Permanent extends Card, Controllable {
int getDamage();
int damage(int damage, Ability source, Game game);
int damage(int damage, UUID attackerId, Ability source, Game game);
int damage(int damage, UUID attackerId, Ability source, Game game, boolean combat, boolean preventable);
@ -168,6 +170,8 @@ public interface Permanent extends Card, Controllable {
MageObject getBasicMageObject(Game game);
boolean destroy(Ability source, Game game);
boolean destroy(Ability source, Game game, boolean noRegen);
/**

View file

@ -840,6 +840,11 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
return this.damage;
}
@Override
public int damage(int damage, Ability source, Game game) {
return damage(damage, source.getSourceId(), source, game);
}
@Override
public int damage(int damage, UUID attackerId, Ability source, Game game) {
return doDamage(damage, attackerId, source, game, true, false, false, null);
@ -1165,6 +1170,11 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
return true;
}
@Override
public boolean destroy(Ability source, Game game) {
return destroy(source, game, false);
}
@Override
public boolean destroy(Ability source, Game game, boolean noRegen) {
// Only permanets on the battlefield can be destroyed