mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 12:22:10 -08:00
[MAT] Implement Animist's Might
This commit is contained in:
parent
7209e037e5
commit
907d07d175
3 changed files with 73 additions and 2 deletions
|
|
@ -13,20 +13,27 @@ import mage.players.Player;
|
|||
*/
|
||||
public class DamageWithPowerFromOneToAnotherTargetEffect extends OneShotEffect {
|
||||
|
||||
String firstTargetName;
|
||||
private final String firstTargetName;
|
||||
private final int multiplier;
|
||||
|
||||
public DamageWithPowerFromOneToAnotherTargetEffect() {
|
||||
this("");
|
||||
}
|
||||
|
||||
public DamageWithPowerFromOneToAnotherTargetEffect(String firstTargetName) {
|
||||
this(firstTargetName, 1);
|
||||
}
|
||||
|
||||
public DamageWithPowerFromOneToAnotherTargetEffect(String firstTargetName, int multiplier) {
|
||||
super(Outcome.Damage);
|
||||
this.firstTargetName = firstTargetName;
|
||||
this.multiplier = multiplier;
|
||||
}
|
||||
|
||||
public DamageWithPowerFromOneToAnotherTargetEffect(final DamageWithPowerFromOneToAnotherTargetEffect effect) {
|
||||
super(effect);
|
||||
this.firstTargetName = effect.firstTargetName;
|
||||
this.multiplier = effect.multiplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -64,6 +71,8 @@ public class DamageWithPowerFromOneToAnotherTargetEffect extends OneShotEffect {
|
|||
throw new IllegalStateException("It must have two targets, but found " + mode.getTargets().size());
|
||||
}
|
||||
|
||||
return (firstTargetName.isEmpty() ? mode.getTargets().get(0).getDescription() : firstTargetName) + " deals damage equal to its power to " + mode.getTargets().get(1).getDescription();
|
||||
return (firstTargetName.isEmpty() ? mode.getTargets().get(0).getDescription() : firstTargetName) +
|
||||
" deals damage equal to" + (multiplier == 2 ? " twice" : "") +
|
||||
" its power to " + mode.getTargets().get(1).getDescription();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue