mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
Drana and Linvala - fixed game error on usage with same abilities from permanents (NPE error)
This commit is contained in:
parent
1dc5ee13a3
commit
a18dcd9911
2 changed files with 4 additions and 1 deletions
|
@ -124,8 +124,10 @@ class DranaAndLinvalaGainAbilitiesEffect extends ContinuousEffectImpl {
|
|||
|| ability.getAbilityType() == AbilityType.MANA)
|
||||
.collect(Collectors.toList())) {
|
||||
Ability addedAbility = perm.addAbility(ability, source.getSourceId(), game);
|
||||
if (addedAbility != null) {
|
||||
addedAbility.getEffects().setValue("dranaLinvalaFlag", true);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -211,6 +211,7 @@ public interface Permanent extends Card, Controllable {
|
|||
* @param ability
|
||||
* @param sourceId
|
||||
* @param game
|
||||
* @return can be null for exists abilities
|
||||
*/
|
||||
Ability addAbility(Ability ability, UUID sourceId, Game game);
|
||||
|
||||
|
|
Loading…
Reference in a new issue