mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08: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,7 +124,9 @@ class DranaAndLinvalaGainAbilitiesEffect extends ContinuousEffectImpl {
|
||||||
|| ability.getAbilityType() == AbilityType.MANA)
|
|| ability.getAbilityType() == AbilityType.MANA)
|
||||||
.collect(Collectors.toList())) {
|
.collect(Collectors.toList())) {
|
||||||
Ability addedAbility = perm.addAbility(ability, source.getSourceId(), game);
|
Ability addedAbility = perm.addAbility(ability, source.getSourceId(), game);
|
||||||
addedAbility.getEffects().setValue("dranaLinvalaFlag", true);
|
if (addedAbility != null) {
|
||||||
|
addedAbility.getEffects().setValue("dranaLinvalaFlag", true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -211,6 +211,7 @@ public interface Permanent extends Card, Controllable {
|
||||||
* @param ability
|
* @param ability
|
||||||
* @param sourceId
|
* @param sourceId
|
||||||
* @param game
|
* @param game
|
||||||
|
* @return can be null for exists abilities
|
||||||
*/
|
*/
|
||||||
Ability addAbility(Ability ability, UUID sourceId, Game game);
|
Ability addAbility(Ability ability, UUID sourceId, Game game);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue