mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
StaticAbilityContinuous: fix AddType ChosenType
This commit is contained in:
committed by
Michael Kamensky
parent
22a6a72f12
commit
55ed4c1bc0
@@ -343,6 +343,17 @@ public final class StaticAbilityContinuous {
|
||||
}
|
||||
});
|
||||
addTypes.addAll(newTypes);
|
||||
|
||||
addTypes = Lists.transform(addTypes, new Function<String, String>() {
|
||||
@Override
|
||||
public String apply(String input) {
|
||||
if (hostCard.hasChosenType()) {
|
||||
input = input.replaceAll("ChosenType", hostCard.getChosenType());
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
if (layer == StaticAbilityLayer.TYPE && params.containsKey("RemoveType")) {
|
||||
|
||||
@@ -2158,6 +2158,7 @@ public class GameSimulatorTest extends SimulationTestCase {
|
||||
simGame.getPhaseHandler().devAdvanceToPhase(PhaseType.MAIN2);
|
||||
|
||||
assertEquals(21, simGame.getPlayers().get(0).getLife());
|
||||
assertEquals(true, simGoblin.isRed() && simGoblin.isBlack());
|
||||
assertEquals(true, simGoblin.getType().hasSubtype("Zombie"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user