mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Add emblems into the int.txt file 'emblem:Human:ElspethSunsChampionEmblem:1' for example
This commit is contained in:
parent
0b7a50e48f
commit
b467ff2080
2 changed files with 14 additions and 0 deletions
|
@ -87,6 +87,8 @@ public final class SystemUtil {
|
|||
gameZone = Zone.LIBRARY;
|
||||
} else if ("token".equalsIgnoreCase(zone)) {
|
||||
gameZone = Zone.BATTLEFIELD;
|
||||
} else if ("emblem".equalsIgnoreCase(zone)) {
|
||||
gameZone = Zone.COMMAND;
|
||||
} else {
|
||||
continue; // go parse next line
|
||||
}
|
||||
|
@ -103,6 +105,17 @@ public final class SystemUtil {
|
|||
Object token = cons.newInstance();
|
||||
if (token != null && token instanceof mage.game.permanent.token.Token) {
|
||||
((mage.game.permanent.token.Token) token).putOntoBattlefield(amount, game, null, player.getId(), false, false);
|
||||
continue;
|
||||
}
|
||||
} else if ("emblem".equalsIgnoreCase(zone)) {
|
||||
// eg: emblem:Human:ElspethSunsChampionEmblem:1
|
||||
Class<?> c = Class.forName("mage.game.command.emblems." + cardName);
|
||||
Constructor<?> cons = c.getConstructor();
|
||||
Object emblem = cons.newInstance();
|
||||
if (emblem != null && emblem instanceof mage.game.command.Emblem) {
|
||||
((mage.game.command.Emblem) emblem).setControllerId(player.getId());
|
||||
game.addEmblem((mage.game.command.Emblem) emblem, null, player.getId());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
logger.warn("Couldn't find a card: " + cardName);
|
||||
|
|
|
@ -48,6 +48,7 @@ public class ElspethSunsChampionEmblem extends Emblem {
|
|||
|
||||
public ElspethSunsChampionEmblem() {
|
||||
this.setName("Emblem Elspeth");
|
||||
this.setExpansionSetCodeForImage("THS");
|
||||
Ability ability = new SimpleStaticAbility(Zone.COMMAND, new BoostControlledEffect(2, 2, Duration.EndOfGame, filter, false));
|
||||
ability.addEffect(new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.EndOfGame, filter));
|
||||
this.getAbilities().add(ability);
|
||||
|
|
Loading…
Reference in a new issue