mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 21:42:07 -08:00
[KHM] fixed Old-Growth Troll - correct addAbility usage for permanents;
This commit is contained in:
parent
03979f77bb
commit
e941ce108b
3 changed files with 3 additions and 3 deletions
|
|
@ -40,7 +40,7 @@ public abstract class AsThoughEffectImpl extends ContinuousEffectImpl implements
|
|||
public boolean applies(UUID objectId, Ability affectedAbility, Ability source, Game game, UUID playerId) {
|
||||
// affectedControllerId = player to check (example: you can activate ability from opponent's card)
|
||||
// by default it applies to full object
|
||||
// if you AsThough effect type needs affected ability then override that method
|
||||
// if your AsThough effect type needs affected ability then override that method
|
||||
return applies(objectId, source, playerId, game);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ public class ContinuousEffects implements Serializable {
|
|||
// P.S. In theory a same AsThough effect can be applied to object or to ability, so if you really, really
|
||||
// need it then disable that check or add extra param to AsThoughEffectType like needAffectedAbilityOrFullObject
|
||||
if (!type.needAffectedAbility() && affectedAbility != null) {
|
||||
throw new IllegalArgumentException("ERROR, you can't call AsThough check to affected ability, call it empty affected ability instead: " + type);
|
||||
throw new IllegalArgumentException("ERROR, you can't call AsThough check to affected ability, call it with empty affected ability instead: " + type);
|
||||
}
|
||||
|
||||
List<AsThoughEffect> asThoughEffectsList = getApplicableAsThoughEffects(type, game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue