Package smack.down

Examples of smack.down.Minion$StrengthBonus


  public NinjaMaster() {
    super("Ninja Master", Faction.Ninjas, 5);
  }
 
  public void play(final Base base, Callback callback) {
    Minion minion = callback.selectMinionInPlay(base);
   
    if (minion != null)
      minion.destroy();
  }
View Full Code Here


  public TigerAssassin() {
    super("Tiger Assassin", Faction.Ninjas, 4);
  }
 
  public void play(final Base base, Callback callback) {
    Minion minion = callback.selectMinionInPlay(base, 3);
   
    if (minion != null)
      minion.destroy();
  }
View Full Code Here

  public NaturalSelection() {
    super("Natural Selection", Faction.Dinosaurs, Target.Minion);
  }
 
  public void play(final Minion minion, Callback callback) {
    Minion target = callback.selectMinionInPlay(minion.getBase(), minion.getStrength() + 1);
    target.destroy();
  }
View Full Code Here

public class DinosuarsTest {

  @Test
  public void testAugmentation() {
    Player player1 = new Player("TestPlayer", new CardList(), new CardSet(), new CardSet());
    Minion m1 = new Minion("TestMinion", Faction.Aliens, 2);
    m1.setOwner(player1);
    Action action = new Augmentation();
    action.setOwner(player1);
   
    assertEquals(2, m1.getStrength());
   
    action.play(m1, new Callback(){});
   
    assertEquals(6, m1.getStrength());
   
    player1.endTurn(new Callback(){});
   
    assertEquals(2, m1.getStrength());
  }
View Full Code Here

  }
 
  @Test
  public void testHowl() {
    Player player1 = new Player("TestPlayer", new CardList(), new CardSet(), new CardSet());
    Minion m1 = new Minion("TestMinion1", Faction.Aliens, 2);
    m1.setOwner(player1);
    Minion m2 = new Minion("TestMinion2", Faction.Aliens, 5);
    m2.setOwner(player1);
    Minion m3 = new Minion("TestMinion3", Faction.Aliens, 7);
    m3.setOwner(player1);
    Minion m4 = new Minion("TestMinion4", Faction.Aliens, 3);
    m4.setOwner(player1);
    Minion m5 = new Minion("TestMinion5", Faction.Aliens, 6);
    m5.setOwner(player1);
    Base base1 = new Base("TestBase", Faction.Aliens, 50, 3, 2, 1);
    Base base2 = new Base("TestBase", Faction.Aliens, 40, 3, 2, 1);
    base1.addMinion(m1);
    base1.addMinion(m2);
    base1.addMinion(m5);
    base2.addMinion(m3);
    base2.addMinion(m4);
    Table table = new Table(Arrays.asList(player1), new ArrayList<Base>(), Arrays.asList(base1, base2));
    player1.setTable(table);
    Action action = new Howl();
    action.setOwner(player1);
   
    assertEquals(2, m1.getStrength());
    assertEquals(5, m2.getStrength());
    assertEquals(7, m3.getStrength());
    assertEquals(3, m4.getStrength());
    assertEquals(6, m5.getStrength());
   
    action.play(new Callback(){});
   
    assertEquals(3, m1.getStrength());
    assertEquals(6, m2.getStrength());
    assertEquals(8, m3.getStrength());
    assertEquals(4, m4.getStrength());
    assertEquals(7, m5.getStrength());
   
    player1.endTurn(new Callback(){});
   
    assertEquals(2, m1.getStrength());
    assertEquals(5, m2.getStrength());
    assertEquals(7, m3.getStrength());
    assertEquals(3, m4.getStrength());
    assertEquals(6, m5.getStrength());
  }
View Full Code Here

 
  @Test
  public void testWarRaptor() {
    Player player1 = new Player("TestPlayer", new CardList(), new CardSet(), new CardSet());
    Base base1 = new Base("TestBase", Faction.Aliens, 50, 3, 2, 1);
    Minion m1 = (Minion) new WarRaptor().setOwner(player1);
    Minion m2 = (Minion) new WarRaptor().setOwner(player1);
    Minion m3 = (Minion) new WarRaptor().setOwner(player1);
    Minion m4 = (Minion) new WarRaptor().setOwner(player1);
   
    assertEquals(2, m1.getStrength());
    assertEquals(2, m2.getStrength());
    assertEquals(2, m3.getStrength());
    assertEquals(2, m4.getStrength());
    assertEquals(0, base1.getTotalStrength(player1));
   
    base1.addMinion(m1);
    m1.setBase(base1);
   
    assertEquals(3, m1.getStrength());
    assertEquals(2, m2.getStrength());
    assertEquals(2, m3.getStrength());
    assertEquals(2, m4.getStrength());
    assertEquals(3, base1.getTotalStrength(player1));
   
    base1.addMinion(m2);
    m2.setBase(base1);
   
    assertEquals(4, m1.getStrength());
    assertEquals(4, m2.getStrength());
    assertEquals(2, m3.getStrength());
    assertEquals(2, m4.getStrength());
    assertEquals(8, base1.getTotalStrength(player1));
   
    base1.addMinion(m3);
    m3.setBase(base1);
   
    assertEquals(5, m1.getStrength());
    assertEquals(5, m2.getStrength());
    assertEquals(5, m3.getStrength());
    assertEquals(2, m4.getStrength());
    assertEquals(15, base1.getTotalStrength(player1));
   
    base1.addMinion(m4);
    m4.setBase(base1);
   
    assertEquals(6, m1.getStrength());
    assertEquals(6, m2.getStrength());
    assertEquals(6, m3.getStrength());
    assertEquals(6, m4.getStrength());
    assertEquals(24, base1.getTotalStrength(player1));
   
    base1.removeMinion(m1);
    m1.setBase(null);
   
    assertEquals(2, m1.getStrength());
    assertEquals(5, m2.getStrength());
    assertEquals(5, m3.getStrength());
    assertEquals(5, m4.getStrength());
    assertEquals(15, base1.getTotalStrength(player1));
  }
View Full Code Here

  public SaucyWench() {
    super("Saucy Wench", Faction.Pirates, 3);
  }
 
  public void play(final Base base, Callback callback) {
    Minion minion = callback.selectMinionInPlay(base, 2);
   
    if (minion != null)
      minion.destroy();
  }
View Full Code Here

  @Test
  public void testArmorStego() {
    Player player1 = new Player("TestPlayer1", new CardList(), new CardSet(), new CardSet());
    Player player2 = new Player("TestPlayer2", new CardList(), new CardSet(), new CardSet());
    Base base1 = new Base("TestBase", Faction.Aliens, 50, 3, 2, 1);
    Minion m1 = (Minion) new ArmorStego().setOwner(player1);
   
    Table table = new Table(Arrays.asList(player1, player2), new ArrayList<Base>(), Arrays.asList(base1));
    player1.setTable(table);
    player2.setTable(table);
   
    assertEquals(3, m1.getStrength());
   
    base1.addMinion(m1);
    m1.setBase(base1);
   
    assertEquals(3, m1.getStrength());
   
    table.nextPlayer();
   
    assertEquals(5, m1.getStrength());
   
    table.nextPlayer();
   
    assertEquals(3, m1.getStrength());
  }
View Full Code Here

  public Cannon() {
    super("Cannon", Faction.Pirates, Target.General);
  }
 
  public void play(Callback callback) {
    Minion target = callback.selectMinionInPlay(2);
   
    if (target == null)
      return;
   
    target.destroy();
   
    target = callback.selectMinionInPlay(2);
   
    if (target == null)
      return;
   
    target.destroy();
  }
View Full Code Here

    Player player2 = new Player("TestPlayer2", new CardList(), new CardSet(), new CardSet());
    Base base1 = new Base("TestBase", Faction.Aliens, 50, 3, 2, 1);
    Table table = new Table(Arrays.asList(player1, player2), new ArrayList<Base>(), Arrays.asList(base1));
    player1.setTable(table);
    player2.setTable(table);
    Minion m1 = (Minion) new Laseratops().setOwner(player1);
    final Minion m2 = (Minion) new Minion("TestMinion1", Faction.Aliens, 2).setOwner(player2);
    base1.addMinion(m2);
    m2.setBase(base1);
   
    assertEquals(1, base1.getMinions().size());
    assertTrue(base1.getMinions().contains(m2));
    assertFalse(player2.getDiscardPile().contains(m2));
   
View Full Code Here

TOP

Related Classes of smack.down.Minion$StrengthBonus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.