mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
added a method getParamOrDefault (to save all that hasParam with subsequent call to getParam)
This commit is contained in:
@@ -468,6 +468,10 @@ public abstract class SpellAbility implements ISpellAbility {
|
|||||||
return this.originalHost;
|
return this.originalHost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getParamOrDefault(String key, String defaultValue) {
|
||||||
|
return params == null || !params.containsKey(key) ? defaultValue : params.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
public String getParam(String key) {
|
public String getParam(String key) {
|
||||||
return params == null ? null : params.get(key);
|
return params == null ? null : params.get(key);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user