mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
- Fixed spelling for Event.
This commit is contained in:
parent
989250c7f6
commit
772fff4f66
9 changed files with 13 additions and 12 deletions
|
|
@ -166,7 +166,7 @@ public class GameEvent implements Serializable {
|
|||
mana the mana added
|
||||
*/
|
||||
MANA_ADDED,
|
||||
/* MANA_PAYED
|
||||
/* MANA_PAID
|
||||
targetId id if the ability the mana was paid for (not the sourceId)
|
||||
sourceId sourceId of the mana source
|
||||
playerId controller of the ability the mana was paid for
|
||||
|
|
@ -174,7 +174,7 @@ public class GameEvent implements Serializable {
|
|||
flag indicates a special condition
|
||||
data originalId of the mana producing ability
|
||||
*/
|
||||
MANA_PAYED,
|
||||
MANA_PAID,
|
||||
LOSES, LOST, WINS,
|
||||
TARGET, TARGETED,
|
||||
/* TARGETS_VALID
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import java.util.UUID;
|
|||
import mage.ConditionalMana;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.ActivatedAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.ManaType;
|
||||
|
|
@ -118,7 +119,7 @@ public class ManaPool implements Serializable {
|
|||
return false;
|
||||
}
|
||||
if (autoPayment && autoPaymentRestricted && !wasManaAddedBeyondStock() && manaType != unlockedManaType) {
|
||||
// if automatic restricted payment and there is laready mana in the pool
|
||||
// if automatic restricted payment and there is already mana in the pool
|
||||
// and the needed mana type was not unlocked, nothing will be paid
|
||||
return false;
|
||||
}
|
||||
|
|
@ -146,7 +147,7 @@ public class ManaPool implements Serializable {
|
|||
continue;
|
||||
}
|
||||
if (mana.get(usableManaType) > 0) {
|
||||
GameEvent event = new GameEvent(GameEvent.EventType.MANA_PAYED, ability.getId(), mana.getSourceId(), ability.getControllerId(), 0, mana.getFlag());
|
||||
GameEvent event = new GameEvent(GameEvent.EventType.MANA_PAID, ability.getId(), mana.getSourceId(), ability.getControllerId(), 0, mana.getFlag());
|
||||
event.setData(mana.getOriginalId().toString());
|
||||
game.fireEvent(event);
|
||||
mana.remove(usableManaType);
|
||||
|
|
@ -424,7 +425,7 @@ public class ManaPool implements Serializable {
|
|||
for (ConditionalMana mana : getConditionalMana()) {
|
||||
if (mana.get(manaType) > 0 && mana.apply(ability, game, mana.getManaProducerId(), costToPay)) {
|
||||
mana.set(manaType, mana.get(manaType) - 1);
|
||||
GameEvent event = new GameEvent(GameEvent.EventType.MANA_PAYED, ability.getId(), mana.getManaProducerId(), ability.getControllerId(), 0, mana.getFlag());
|
||||
GameEvent event = new GameEvent(GameEvent.EventType.MANA_PAID, ability.getId(), mana.getManaProducerId(), ability.getControllerId(), 0, mana.getFlag());
|
||||
event.setData(mana.getManaProducerOriginalId().toString());
|
||||
game.fireEvent(event);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue