Use generics to ensure the correct class types stored inside the costs tags.

This commit is contained in:
Steven Knipe 2023-11-17 02:37:06 -08:00
parent 193a19104c
commit 660288dfd7
12 changed files with 26 additions and 29 deletions

View file

@ -19,7 +19,7 @@ public enum GetKickerXValue implements DynamicValue {
public int calculate(Game game, Ability sourceAbility, Effect effect) {
// Currently identical logic to the Manacost X value
// which should be fine since you can only have one X at a time
return (int) CardUtil.getSourceCostsTag(game, sourceAbility, "X", 0);
return CardUtil.getSourceCostsTag(game, sourceAbility, "X", 0);
}
@Override

View file

@ -14,7 +14,7 @@ public enum GetXLoyaltyValue implements DynamicValue {
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
return (int) CardUtil.getSourceCostsTag(game, sourceAbility, "X", 0);
return CardUtil.getSourceCostsTag(game, sourceAbility, "X", 0);
}
@Override

View file

@ -14,7 +14,7 @@ public enum GetXValue implements DynamicValue {
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
return (int) CardUtil.getSourceCostsTag(game, sourceAbility, "X", 0);
return CardUtil.getSourceCostsTag(game, sourceAbility, "X", 0);
}
@Override

View file

@ -16,7 +16,7 @@ public enum ManacostVariableValue implements DynamicValue {
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
return (int) CardUtil.getSourceCostsTag(game, sourceAbility, "X", 0);
return CardUtil.getSourceCostsTag(game, sourceAbility, "X", 0);
}
@Override