mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fixed damage sourceId in various places.
This commit is contained in:
parent
f62fe42973
commit
ed4584cbe8
8 changed files with 13 additions and 13 deletions
|
@ -101,7 +101,7 @@ class EarthquakeEffect extends OneShotEffect<EarthquakeEffect> {
|
|||
for (UUID playerId: game.getPlayer(source.getControllerId()).getInRange()) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null)
|
||||
player.damage(amount, source.getId(), game, false, true);
|
||||
player.damage(amount, source.getSourceId(), game, false, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ public class BurntheImpure extends CardImpl<BurntheImpure> {
|
|||
if (permanent.getAbilities().contains(InfectAbility.getInstance())) {
|
||||
Player controller = game.getPlayer(permanent.getControllerId());
|
||||
if (controller != null) {
|
||||
controller.damage(amount, source.getId(), game, true, false);
|
||||
controller.damage(amount, source.getSourceId(), game, true, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -102,11 +102,11 @@ class ArcTrailEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
if (permanent != null) {
|
||||
applied |= (permanent.damage( damage, source.getId(), game, false, true ) > 0);
|
||||
applied |= (permanent.damage( damage, source.getSourceId(), game, false, true ) > 0);
|
||||
}
|
||||
Player player = game.getPlayer(target);
|
||||
if (player != null) {
|
||||
applied |= (player.damage( damage, source.getId(), game, false, true ) > 0);
|
||||
applied |= (player.damage( damage, source.getSourceId(), game, false, true ) > 0);
|
||||
}
|
||||
|
||||
twoDamageDone = true;
|
||||
|
|
|
@ -129,7 +129,7 @@ class EmbersmithEffect extends OneShotEffect<EmbersmithEffect> {
|
|||
}
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
if (player != null) {
|
||||
player.damage(1, source.getId(), game, false, true);
|
||||
player.damage(1, source.getSourceId(), game, false, true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -94,7 +94,7 @@ class SpikeshotElderEffect extends OneShotEffect<SpikeshotElderEffect> {
|
|||
}
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
if (sourcePermanent != null && player != null) {
|
||||
player.damage(sourcePermanent.getPower().getValue(), source.getId(), game, false, true);
|
||||
player.damage(sourcePermanent.getPower().getValue(), source.getSourceId(), game, false, true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -100,7 +100,7 @@ class FlameblastDragonEffect extends OneShotEffect<FlameblastDragonEffect> {
|
|||
}
|
||||
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
||||
if (targetPlayer != null) {
|
||||
targetPlayer.damage(costX, source.getId(), game, true, false);
|
||||
targetPlayer.damage(costX, source.getSourceId(), game, true, false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -129,18 +129,18 @@ class SearingBlazeEffect extends OneShotEffect<SearingBlazeEffect> {
|
|||
Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (watcher != null && watcher.conditionMet()) {
|
||||
if (player != null) {
|
||||
player.damage(3, source.getId(), game, false, true);
|
||||
player.damage(3, source.getSourceId(), game, false, true);
|
||||
}
|
||||
if (creature != null) {
|
||||
creature.damage(3, source.getId(), game, true, false);
|
||||
creature.damage(3, source.getSourceId(), game, true, false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (player != null) {
|
||||
player.damage(1, source.getId(), game, false, true);
|
||||
player.damage(1, source.getSourceId(), game, false, true);
|
||||
}
|
||||
if (creature != null) {
|
||||
creature.damage(1, source.getId(), game, true, false);
|
||||
creature.damage(1, source.getSourceId(), game, true, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -73,12 +73,12 @@ public class DamageTargetEffect extends OneShotEffect<DamageTargetEffect> {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
permanent.damage(amount, source.getId(), game, preventable, false);
|
||||
permanent.damage(amount, source.getSourceId(), game, preventable, false);
|
||||
return true;
|
||||
}
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
if (player != null) {
|
||||
player.damage(amount, source.getId(), game, false, preventable);
|
||||
player.damage(amount, source.getSourceId(), game, false, preventable);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue