mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
AbilityActivated: need to be cloneable too
This commit is contained in:
@@ -35,7 +35,7 @@ import forge.util.collect.FCollectionView;
|
|||||||
* @author Forge
|
* @author Forge
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public abstract class AbilityActivated extends SpellAbility implements java.io.Serializable {
|
public abstract class AbilityActivated extends SpellAbility implements java.io.Serializable, Cloneable {
|
||||||
/** Constant <code>serialVersionUID=1L</code>. */
|
/** Constant <code>serialVersionUID=1L</code>. */
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@@ -140,4 +140,14 @@ public abstract class AbilityActivated extends SpellAbility implements java.io.S
|
|||||||
return false; //TODO: allow showing prompt based on whether ability has cost that requires user input and possible "misclick protection" setting
|
return false; //TODO: allow showing prompt based on whether ability has cost that requires user input and possible "misclick protection" setting
|
||||||
//return !this.isManaAbility(); //prompt user for non-mana activated abilities even is only possible ability
|
//return !this.isManaAbility(); //prompt user for non-mana activated abilities even is only possible ability
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
|
@Override
|
||||||
|
public final Object clone() {
|
||||||
|
try {
|
||||||
|
return super.clone();
|
||||||
|
} catch (final Exception ex) {
|
||||||
|
throw new RuntimeException("AbilityActivated : clone() error, " + ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user