mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
[M10] various text fixes
This commit is contained in:
parent
1582321d26
commit
87a999ca0e
25 changed files with 167 additions and 250 deletions
|
|
@ -1,33 +1,27 @@
|
|||
|
||||
|
||||
package mage.game.permanent.token;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.dynamicvalue.common.ControllerLifeCount;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public final class AvatarToken extends TokenImpl {
|
||||
|
||||
public AvatarToken() {
|
||||
super("Avatar", "white Avatar creature token with \"This creature's power and toughness are each equal to your life total.\"");
|
||||
super("Avatar", "white Avatar creature token. It has \"This creature's power and toughness are each equal to your life total.\"");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add(SubType.AVATAR);
|
||||
color.setWhite(true);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AvatarTokenEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(new SetPowerToughnessSourceEffect(
|
||||
ControllerLifeCount.instance, Duration.WhileOnBattlefield,
|
||||
SubLayer.CharacteristicDefining_7a
|
||||
).setText("this creature's power and toughness are each equal to your life total")));
|
||||
}
|
||||
|
||||
public AvatarToken(final AvatarToken token) {
|
||||
|
|
@ -38,34 +32,3 @@ public final class AvatarToken extends TokenImpl {
|
|||
return new AvatarToken(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AvatarTokenEffect extends ContinuousEffectImpl {
|
||||
|
||||
public AvatarTokenEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.BoostCreature);
|
||||
}
|
||||
|
||||
public AvatarTokenEffect(final AvatarTokenEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AvatarTokenEffect copy() {
|
||||
return new AvatarTokenEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent token = game.getPermanent(source.getSourceId());
|
||||
if (token != null) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
token.getPower().setValue(controller.getLife());
|
||||
token.getToughness().setValue(controller.getLife());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue