mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 22:42:03 -08:00
* Skarrgan Firebird - Fixed that the condtion check of the activated ability was inverted.
This commit is contained in:
parent
4d6e7ce6a2
commit
5a5722b248
9 changed files with 145 additions and 64 deletions
|
|
@ -48,7 +48,7 @@ public class BloodthirstAbility extends EntersBattlefieldAbility {
|
|||
}
|
||||
|
||||
class BloodthirstEffect extends OneShotEffect {
|
||||
private int amount;
|
||||
private final int amount;
|
||||
|
||||
BloodthirstEffect(int amount) {
|
||||
super(Outcome.BoostCreature);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ package mage.game;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
|
@ -118,7 +117,9 @@ import mage.target.Target;
|
|||
import mage.target.TargetPermanent;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.util.functions.ApplyToPermanent;
|
||||
import mage.watchers.Watchers;
|
||||
import mage.watchers.common.BlockedAttackerWatcher;
|
||||
import mage.watchers.common.BloodthirstWatcher;
|
||||
import mage.watchers.common.CastSpellLastTurnWatcher;
|
||||
import mage.watchers.common.MorbidWatcher;
|
||||
import mage.watchers.common.PlayerDamagedBySourceWatcher;
|
||||
|
|
@ -884,15 +885,17 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
saveState(false);
|
||||
} while (!mulliganPlayers.isEmpty());
|
||||
getState().setChoosingPlayerId(null);
|
||||
// add watchers
|
||||
Watchers watchers = state.getWatchers();
|
||||
// add default watchers
|
||||
for (UUID playerId : state.getPlayerList(startingPlayerId)) {
|
||||
state.getWatchers().add(new PlayerDamagedBySourceWatcher(playerId));
|
||||
watchers.add(new PlayerDamagedBySourceWatcher(playerId));
|
||||
watchers.add(new BloodthirstWatcher(playerId));
|
||||
}
|
||||
state.getWatchers().add(new MorbidWatcher());
|
||||
state.getWatchers().add(new CastSpellLastTurnWatcher());
|
||||
state.getWatchers().add(new SoulbondWatcher());
|
||||
state.getWatchers().add(new PlayerLostLifeWatcher());
|
||||
state.getWatchers().add(new BlockedAttackerWatcher());
|
||||
watchers.add(new MorbidWatcher());
|
||||
watchers.add(new CastSpellLastTurnWatcher());
|
||||
watchers.add(new SoulbondWatcher());
|
||||
watchers.add(new PlayerLostLifeWatcher());
|
||||
watchers.add(new BlockedAttackerWatcher());
|
||||
|
||||
//20100716 - 103.5
|
||||
for (UUID playerId: state.getPlayerList(startingPlayerId)) {
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
this.payManaMode = false;
|
||||
this.setLife(game.getLife(), game);
|
||||
this.setReachedNextTurnAfterLeaving(false);
|
||||
game.getState().getWatchers().add(new BloodthirstWatcher(playerId));
|
||||
|
||||
this.castSourceIdWithAlternateMana = null;
|
||||
this.castSourceIdManaCosts = null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,9 +65,9 @@ public class AmountOfDamageAPlayerReceivedThisTurnWatcher extends Watcher {
|
|||
if (playerId != null) {
|
||||
Integer amount = amountOfDamageReceivedThisTurn.get(playerId);
|
||||
if (amount == null) {
|
||||
amount = Integer.valueOf(event.getAmount());
|
||||
amount = event.getAmount();
|
||||
} else {
|
||||
amount = Integer.valueOf(amount + event.getAmount());
|
||||
amount = amount + event.getAmount();
|
||||
}
|
||||
amountOfDamageReceivedThisTurn.put(playerId, amount);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public class SourceDidDamageWatcher extends Watcher {
|
||||
|
||||
public List<UUID> damageSources = new ArrayList<UUID>();
|
||||
public List<UUID> damageSources = new ArrayList<>();
|
||||
|
||||
public SourceDidDamageWatcher() {
|
||||
super("SourceDidDamageWatcher", WatcherScope.GAME);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue