Esempio n. 1
0
 public static Set get() {
   if (set == null) {
     Set ret = new Set();
     for (Class<? extends Card> card : org.rnd.jmagic.CardLoader.getAllCards()) {
       Name name = card.getAnnotation(Name.class);
       if (name != null)
         // when naming cards for meddling mage, you name one
         // side of a split card, not both sides.
         java.util.Arrays.stream(name.value().split(" // ")).forEach(n -> ret.add(n));
     }
     set = new Set.Unmodifiable(ret);
   }
   return set;
 }
Esempio n. 2
0
  public StaticPTChange(
      GameState state,
      SetGenerator who,
      String whoText,
      int power,
      int toughness,
      Class<?> ability,
      boolean plural) {
    super(
        state,
        whoText
            + (plural ? " get " : " gets ")
            + ptString(power, toughness)
            + (plural ? " and have " : " and has ")
            + ability.getAnnotation(Name.class).value().toLowerCase()
            + ".");
    this.who = who;
    this.whoText = whoText;
    this.power = power;
    this.toughness = toughness;
    this.ability = ability;
    this.plural = plural;

    this.addEffectPart(modifyPowerAndToughness(who, power, toughness));

    this.addEffectPart(addAbilityToObject(who, ability));
  }