Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
116 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Mon Sep 08 10:27:23 EDT 2014 | ||
#Sun Jun 07 16:17:58 BST 2015 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-all.zip |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/hearthsim/card/classic/minion/legendary/FinkleEinhorn.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.hearthsim.card.classic.minion.legendary; | ||
|
||
import com.hearthsim.card.minion.Minion; | ||
|
||
/** | ||
* Created by oyachai on 6/7/15. | ||
*/ | ||
public class FinkleEinhorn extends Minion { | ||
|
||
public FinkleEinhorn() { | ||
super(); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/com/hearthsim/card/classic/minion/legendary/TheBeast.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.hearthsim.card.classic.minion.legendary; | ||
|
||
import com.hearthsim.card.minion.Minion; | ||
import com.hearthsim.event.deathrattle.DeathrattleSummonMinionAction; | ||
import com.hearthsim.model.PlayerSide; | ||
|
||
/** | ||
* Created by oyachai on 6/7/15. | ||
*/ | ||
public class TheBeast extends Minion { | ||
|
||
public TheBeast() { | ||
super(); | ||
|
||
deathrattleAction_ = new DeathrattleSummonMinionAction(FinkleEinhorn.class, 1, PlayerSide.WAITING_PLAYER); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
src/test/groovy/com/hearthsim/test/groovy/card/classic/minion/TheBeastSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package com.hearthsim.test.groovy.card.classic.minion | ||
|
||
import com.hearthsim.card.basic.minion.GoldshireFootman | ||
import com.hearthsim.card.basic.minion.WarGolem | ||
import com.hearthsim.card.basic.spell.ShadowWordDeath | ||
import com.hearthsim.card.classic.minion.legendary.FinkleEinhorn | ||
import com.hearthsim.card.classic.minion.legendary.TheBeast | ||
import com.hearthsim.model.BoardModel | ||
import com.hearthsim.test.groovy.card.CardSpec | ||
import com.hearthsim.test.helpers.BoardModelBuilder | ||
import com.hearthsim.util.tree.HearthTreeNode | ||
|
||
import static com.hearthsim.model.PlayerSide.CURRENT_PLAYER | ||
import static org.junit.Assert.assertFalse | ||
|
||
/** | ||
* Created by oyachai on 6/7/15. | ||
*/ | ||
class TheBeastSpec extends CardSpec { | ||
|
||
HearthTreeNode root | ||
BoardModel startingBoard | ||
|
||
def "killing The Beast summons a Finkle Einhorn"() { | ||
startingBoard = new BoardModelBuilder().make { | ||
currentPlayer { | ||
hand([ShadowWordDeath]) | ||
field([[minion:TheBeast]]) | ||
mana(9) | ||
} | ||
waitingPlayer { | ||
field([[minion: WarGolem], | ||
[minion: GoldshireFootman]]) | ||
mana(4) | ||
} | ||
} | ||
|
||
root = new HearthTreeNode(startingBoard) | ||
|
||
def copiedBoard = startingBoard.deepCopy() | ||
def theCard = root.data_.getCurrentPlayer().getHand().get(0) | ||
def ret = theCard.useOn(CURRENT_PLAYER, 1, root) | ||
|
||
expect: | ||
assertFalse(ret == null); | ||
|
||
assertBoardDelta(copiedBoard, ret.data_) { | ||
currentPlayer { | ||
removeCardFromHand(ShadowWordDeath) | ||
removeMinion(0) | ||
mana(6) | ||
numCardsUsed(1) | ||
} | ||
waitingPlayer { | ||
addMinionToField(FinkleEinhorn) | ||
} | ||
} | ||
|
||
} | ||
} |