mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
Implemented Triumph of Anax
This commit is contained in:
parent
82c7337ec3
commit
9a3d085a81
5 changed files with 103 additions and 22 deletions
|
|
@ -14,11 +14,10 @@ import java.util.Set;
|
|||
*/
|
||||
public class Effects extends ArrayList<Effect> {
|
||||
|
||||
public Effects() {
|
||||
}
|
||||
|
||||
public Effects(Effect effect) {
|
||||
this.add(effect);
|
||||
public Effects(Effect... effects) {
|
||||
for (Effect effect : effects) {
|
||||
this.add(effect);
|
||||
}
|
||||
}
|
||||
|
||||
public Effects(final Effects effects) {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,19 @@
|
|||
|
||||
package mage.constants;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public enum SagaChapter {
|
||||
CHAPTER_I(1, "I"),
|
||||
CHAPTER_II(2, "II"),
|
||||
CHAPTER_III(3, "III");
|
||||
CHAPTER_III(3, "III"),
|
||||
CHAPTER_IV(4, "IV");
|
||||
|
||||
private static final Map<Integer, SagaChapter> chapterMap = new HashMap();
|
||||
|
||||
private final String text;
|
||||
private final int number;
|
||||
|
|
@ -28,15 +33,14 @@ public enum SagaChapter {
|
|||
}
|
||||
|
||||
public static SagaChapter getChapter(int number) {
|
||||
switch (number) {
|
||||
case 1:
|
||||
return CHAPTER_I;
|
||||
case 2:
|
||||
return CHAPTER_II;
|
||||
case 3:
|
||||
return CHAPTER_III;
|
||||
default:
|
||||
return null;
|
||||
initMap();
|
||||
return chapterMap.get(number);
|
||||
}
|
||||
|
||||
private static void initMap() {
|
||||
if (!chapterMap.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
Arrays.stream(SagaChapter.values()).forEach(sagaChapter -> chapterMap.put(sagaChapter.getNumber(), sagaChapter));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,11 +19,10 @@ public class Targets extends ArrayList<Target> {
|
|||
|
||||
private static final Logger logger = Logger.getLogger(Targets.class);
|
||||
|
||||
public Targets() {
|
||||
}
|
||||
|
||||
public Targets(Target target) {
|
||||
this.add(target);
|
||||
public Targets(Target... targets) {
|
||||
for (Target target : targets) {
|
||||
this.add(target);
|
||||
}
|
||||
}
|
||||
|
||||
public Targets(final Targets targets) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue