mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
Fix wrong source of damage for Chandra's Ignition
This commit is contained in:
parent
1e5a8e2a57
commit
859bfd9bf3
1 changed files with 6 additions and 6 deletions
|
|
@ -66,34 +66,34 @@ public class ChandrasIgnition extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
class ChandrasIgnitionEffect extends OneShotEffect {
|
class ChandrasIgnitionEffect extends OneShotEffect {
|
||||||
|
|
||||||
public ChandrasIgnitionEffect() {
|
public ChandrasIgnitionEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
this.staticText = "Target creature you control deals damage equal to its power to each other creature and each opponent";
|
this.staticText = "Target creature you control deals damage equal to its power to each other creature and each opponent";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChandrasIgnitionEffect(final ChandrasIgnitionEffect effect) {
|
public ChandrasIgnitionEffect(final ChandrasIgnitionEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ChandrasIgnitionEffect copy() {
|
public ChandrasIgnitionEffect copy() {
|
||||||
return new ChandrasIgnitionEffect(this);
|
return new ChandrasIgnitionEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
|
Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||||
if (targetCreature != null && targetCreature.getPower().getValue() > 0) {
|
if (targetCreature != null && targetCreature.getPower().getValue() > 0) {
|
||||||
for (Permanent creature : game.getState().getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), source.getSourceId(), game)) {
|
for (Permanent creature : game.getState().getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), source.getSourceId(), game)) {
|
||||||
if (!creature.getId().equals(targetCreature.getId())) {
|
if (!creature.getId().equals(targetCreature.getId())) {
|
||||||
creature.damage(targetCreature.getPower().getValue(), source.getSourceId(), game, false, true);
|
creature.damage(targetCreature.getPower().getValue(), targetCreature.getId(), game, false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(UUID opponentId : game.getOpponents(source.getControllerId())) {
|
for(UUID opponentId : game.getOpponents(source.getControllerId())) {
|
||||||
Player opponent = game.getPlayer(opponentId);
|
Player opponent = game.getPlayer(opponentId);
|
||||||
if (opponent != null) {
|
if (opponent != null) {
|
||||||
opponent.damage(targetCreature.getPower().getValue(), source.getSourceId(), game, false, true);
|
opponent.damage(targetCreature.getPower().getValue(), targetCreature.getId(), game, false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue