mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 11:49:56 -08:00
Merge
This commit is contained in:
commit
8fcd50042e
13 changed files with 41 additions and 33 deletions
|
|
@ -90,8 +90,8 @@ class MartialCoupEffect extends OneShotEffect<MartialCoupEffect> {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int amount = 0;
|
||||
if (source.getManaCosts().getVariableCosts().size() > 0) {
|
||||
amount = source.getManaCosts().getVariableCosts().get(0).getAmount();
|
||||
if (source.getManaCostsToPay().getVariableCosts().size() > 0) {
|
||||
amount = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
|
||||
}
|
||||
|
||||
if (amount > 4) {
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class EarthquakeEffect extends OneShotEffect<EarthquakeEffect> {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int amount = source.getManaCosts().getVariableCosts().get(0).getAmount();
|
||||
int amount = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
|
||||
|
||||
for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
|
||||
permanent.damage(amount, source.getId(), game, true, false);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class FireballEffect extends OneShotEffect<FireballEffect> {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int numTargets = source.getTargets().get(0).getTargets().size();
|
||||
int damage = source.getManaCosts().getVariableCosts().get(0).getAmount();
|
||||
int damage = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
|
||||
if (numTargets > 0) {
|
||||
int damagePer = damage/numTargets;
|
||||
if (damagePer > 0) {
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class MindSpringEffect extends OneShotEffect<MindSpringEffect> {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int amount = source.getManaCosts().getVariableCosts().get(0).getAmount();
|
||||
int amount = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
player.drawCards(amount, game);
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ public class ProteanHydra extends CardImpl<ProteanHydra> {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
int amount = source.getManaCosts().getVariableCosts().get(0).getAmount();
|
||||
int amount = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
|
||||
permanent.addCounters(new PlusOneCounter(amount));
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -102,8 +102,8 @@ class VengefulArchonEffect extends PreventionEffectImpl<VengefulArchonEffect> {
|
|||
@Override
|
||||
public void init(Ability source, Game game) {
|
||||
super.init(source, game);
|
||||
if (source.getManaCosts().getVariableCosts().size() > 0)
|
||||
amount = source.getManaCosts().getVariableCosts().get(0).getAmount();
|
||||
if (source.getManaCostsToPay().getVariableCosts().size() > 0)
|
||||
amount = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class ExsanguinateEffect extends OneShotEffect<ExsanguinateEffect> {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int loseLife = 0;
|
||||
int damage = source.getManaCosts().getVariableCosts().get(0).getAmount();
|
||||
int damage = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
|
||||
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
|
||||
loseLife += game.getPlayer(opponentId).loseLife(damage, game);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class SigilofDistinctionEffect extends OneShotEffect<SigilofDistinctionEffect> {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int amount = source.getManaCosts().getVariableCosts().get(0).getAmount();
|
||||
int amount = source.getManaCostsToPay().getVariableCosts().get(0).getAmount();
|
||||
Permanent p = game.getPermanent(source.getSourceId());
|
||||
if (p != null) {
|
||||
p.addCounters(CounterType.CHARGE.createInstance(amount));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue