Lint: fix 'declarations should use interfaces instead of classes' bugs (#11082)

This commit is contained in:
arcox 2023-08-31 13:42:45 -04:00 committed by GitHub
parent e3229d7eab
commit 2f0c1d84c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 31 additions and 26 deletions

View file

@ -1534,7 +1534,7 @@ public abstract class PlayerImpl implements Player, Serializable {
* @param noMana
* @return
*/
public static LinkedHashMap<UUID, SpellAbility> getCastableSpellAbilities(Game game, UUID playerId, MageObject object, Zone zone, boolean noMana) {
public static Map<UUID, SpellAbility> getCastableSpellAbilities(Game game, UUID playerId, MageObject object, Zone zone, boolean noMana) {
// it uses simple check from spellCanBeActivatedRegularlyNow
// reason: no approved info here (e.g. forced to choose spell ability from cast card)
LinkedHashMap<UUID, SpellAbility> useable = new LinkedHashMap<>();
@ -1607,7 +1607,7 @@ public abstract class PlayerImpl implements Player, Serializable {
}
@Override
public LinkedHashMap<UUID, ActivatedAbility> getPlayableActivatedAbilities(MageObject object, Zone zone, Game game) {
public Map<UUID, ActivatedAbility> getPlayableActivatedAbilities(MageObject object, Zone zone, Game game) {
LinkedHashMap<UUID, ActivatedAbility> useable = new LinkedHashMap<>();
// stack abilities - can't activate anything
// spell ability - can activate additional abilities (example: "Lightning Storm")
@ -1634,7 +1634,7 @@ public abstract class PlayerImpl implements Player, Serializable {
return useable;
}
protected LinkedHashMap<UUID, ActivatedManaAbilityImpl> getUseableManaAbilities(MageObject object, Zone zone, Game game) {
protected Map<UUID, ActivatedManaAbilityImpl> getUseableManaAbilities(MageObject object, Zone zone, Game game) {
LinkedHashMap<UUID, ActivatedManaAbilityImpl> useable = new LinkedHashMap<>();
boolean canUse = !(object instanceof Permanent) || ((Permanent) object).canUseActivatedAbilities(game);
for (ActivatedManaAbilityImpl ability : object.getAbilities().getActivatedManaAbilities(zone)) {