mirror of
https://github.com/correl/mage.git
synced 2025-03-30 17:00:10 -09:00
remove redundant null check
This commit is contained in:
parent
e36eb5782b
commit
be5305da90
2 changed files with 3 additions and 3 deletions
Mage/src/main/java/mage
|
@ -39,7 +39,7 @@ public class EntersBattlefieldWithXCountersEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent == null) {
|
||||
if (permanent == null && source.getAbilityType() == AbilityType.STATIC) {
|
||||
if (source.getAbilityType() == AbilityType.STATIC) {
|
||||
permanent = game.getPermanentEntering(source.getSourceId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1191,7 +1191,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
player.shuffleLibrary(null, this);
|
||||
int deduction = 1;
|
||||
if (freeMulligans > 0) {
|
||||
if (usedFreeMulligans != null && usedFreeMulligans.containsKey(player.getId())) {
|
||||
if (usedFreeMulligans.containsKey(player.getId())) {
|
||||
int used = usedFreeMulligans.get(player.getId());
|
||||
if (used < freeMulligans) {
|
||||
deduction = 0;
|
||||
|
@ -1424,7 +1424,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
} else {
|
||||
spellControllerId = spell.getControllerId(); // i.e. resolved spell is the target opponent's spell
|
||||
}
|
||||
if (commandedBy != null && spellControllerId != null) {
|
||||
if (spellControllerId != null) {
|
||||
Player turnController = getPlayer(commandedBy);
|
||||
if (turnController != null) {
|
||||
Player targetPlayer = getPlayer(spellControllerId);
|
||||
|
|
Loading…
Add table
Reference in a new issue