mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Added Djinn Illuminatus.
This commit is contained in:
parent
0e4de763d8
commit
5a4c9b3a4c
5 changed files with 250 additions and 5 deletions
|
|
@ -192,9 +192,9 @@ class ReplicateTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (event.getSourceId().equals(this.sourceId)) {
|
||||
StackObject spell = game.getStack().getStackObject(this.sourceId);
|
||||
if (spell instanceof Spell) {
|
||||
Card card = game.getCard(spell.getSourceId());
|
||||
Card card = ((Spell) spell).getCard();
|
||||
if (card != null) {
|
||||
for (Ability ability : card.getAbilities()) {
|
||||
for (Ability ability : card.getAbilities(game)) {
|
||||
if (ability instanceof ReplicateAbility) {
|
||||
if (((ReplicateAbility) ability).isActivated()) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
|
|
@ -237,7 +237,7 @@ class ReplicateCopyEffect extends OneShotEffect {
|
|||
// reset replicate now so the copies don't report x times Replicate
|
||||
Card card = game.getCard(spell.getSourceId());
|
||||
if (card != null) {
|
||||
for (Ability ability : card.getAbilities()) {
|
||||
for (Ability ability : card.getAbilities(game)) {
|
||||
if (ability instanceof ReplicateAbility) {
|
||||
if (((ReplicateAbility) ability).isActivated()) {
|
||||
((ReplicateAbility) ability).resetReplicate();
|
||||
|
|
@ -253,7 +253,7 @@ class ReplicateCopyEffect extends OneShotEffect {
|
|||
game.getStack().push(copy);
|
||||
copy.chooseNewTargets(game, source.getControllerId());
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayers(new StringBuilder(controller.getLogName()).append(copy.getActivatedMessage(game)).toString());
|
||||
game.informPlayers(controller.getLogName() + copy.getActivatedMessage(game));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -869,8 +869,20 @@ public class GameState implements Serializable, Copyable<GameState> {
|
|||
* @param ability
|
||||
*/
|
||||
public void addOtherAbility(Card attachedTo, Ability ability) {
|
||||
addOtherAbility(attachedTo, ability, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the ability to continuous or triggered abilities
|
||||
*
|
||||
* @param attachedTo
|
||||
* @param ability
|
||||
* @param copyAbility copies non MageSingleton abilities before adding to
|
||||
* state
|
||||
*/
|
||||
public void addOtherAbility(Card attachedTo, Ability ability, boolean copyAbility) {
|
||||
Ability newAbility;
|
||||
if (ability instanceof MageSingleton) {
|
||||
if (ability instanceof MageSingleton || !copyAbility) {
|
||||
newAbility = ability;
|
||||
} else {
|
||||
newAbility = ability.copy();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue