mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +00:00
* Eternity Vessel - Fixed that the charge counters were not added while entering the battlefield.
This commit is contained in:
parent
816cec2764
commit
fa5a098a14
1 changed files with 13 additions and 10 deletions
|
@ -70,6 +70,7 @@ public class EternityVessel extends CardImpl {
|
|||
}
|
||||
|
||||
class EternityVesselEffect extends OneShotEffect {
|
||||
|
||||
public EternityVesselEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "with X charge counters on it, where X is your life total";
|
||||
|
@ -81,17 +82,18 @@ class EternityVesselEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent vessel = game.getPermanent(source.getSourceId());
|
||||
Player you = game.getPlayer(source.getControllerId());
|
||||
if (vessel != null && you != null) {
|
||||
int amount = you.getLife();
|
||||
Permanent vessel = game.getPermanentEntering(source.getSourceId());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (vessel != null && controller != null) {
|
||||
int amount = controller.getLife();
|
||||
if (amount > 0) {
|
||||
vessel.addCounters(CounterType.CHARGE.createInstance(amount), game);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EternityVesselEffect copy() {
|
||||
|
@ -100,6 +102,7 @@ class EternityVesselEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
class EternityVesselEffect2 extends OneShotEffect {
|
||||
|
||||
public EternityVesselEffect2() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "you may have your life total become the number of charge counters on {this}";
|
||||
|
@ -112,9 +115,9 @@ class EternityVesselEffect2 extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent vessel = game.getPermanent(source.getSourceId());
|
||||
Player you = game.getPlayer(source.getControllerId());
|
||||
if (vessel != null && you != null) {
|
||||
you.setLife(vessel.getCounters().getCount(CounterType.CHARGE), game);
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (vessel != null && controller != null) {
|
||||
controller.setLife(vessel.getCounters().getCount(CounterType.CHARGE), game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue