Package mage.abilities.costs

Examples of mage.abilities.costs.Cost.copy()


                splicedAbility.setSourceId(abilityToModify.getSourceId());
                spell.addSpellAbility(splicedAbility);
                for (Iterator it = ((SpliceOntoArcaneAbility) source).getSpliceCosts().iterator(); it.hasNext();) {
                    Cost cost = (Cost) it.next();
                    if (cost instanceof ManaCostsImpl) {
                        spell.getSpellAbility().getManaCostsToPay().add((ManaCostsImpl) cost.copy());
                    } else {
                        spell.getSpellAbility().getCosts().add(cost.copy());
                    }
                }
            }
View Full Code Here


                for (Iterator it = ((SpliceOntoArcaneAbility) source).getSpliceCosts().iterator(); it.hasNext();) {
                    Cost cost = (Cost) it.next();
                    if (cost instanceof ManaCostsImpl) {
                        spell.getSpellAbility().getManaCostsToPay().add((ManaCostsImpl) cost.copy());
                    } else {
                        spell.getSpellAbility().getCosts().add(cost.copy());
                    }
                }
            }
            return true;
        }
View Full Code Here

                                        xManaValue = game.getPlayer(this.controllerId).announceXMana(varCosts.get(0).getMinX(), Integer.MAX_VALUE, "Announce kicker value for " + varCosts.get(0).getText(), game, this);
                                        // kicker variable X costs handled internally as multikicker with {1} cost (no multikicker on card)
                                        game.informPlayers(new StringBuilder(game.getPlayer(this.controllerId).getName()).append(" announced a value of ").append(xManaValue).append(" for ").append(" kicker X ").toString());
                                        ability.getManaCostsToPay().add(new GenericManaCost(xManaValue));
                                    } else {
                                        ability.getManaCostsToPay().add((ManaCostsImpl) cost.copy());                                       
                                    }
                                } else {
                                    ability.getCosts().add(cost.copy());
                                }
                            }
View Full Code Here

                                        ability.getManaCostsToPay().add(new GenericManaCost(xManaValue));
                                    } else {
                                        ability.getManaCostsToPay().add((ManaCostsImpl) cost.copy());                                       
                                    }
                                } else {
                                    ability.getCosts().add(cost.copy());
                                }
                            }
                           
                            again = kickerCost.isRepeatable();
                        } else {
View Full Code Here

                        ability.getManaCostsToPay().clear();
                        ability.getCosts().clear();
                        for (Iterator it = this.alternateCosts.iterator(); it.hasNext();) {
                            Cost cost = (Cost) it.next();
                            if (cost instanceof ManaCost) {
                                ability.getManaCostsToPay().add((ManaCost)cost.copy());
                            } else {
                                ability.getCosts().add(cost.copy());
                            }
                        }
                        // change spell colors
View Full Code Here

                        for (Iterator it = this.alternateCosts.iterator(); it.hasNext();) {
                            Cost cost = (Cost) it.next();
                            if (cost instanceof ManaCost) {
                                ability.getManaCostsToPay().add((ManaCost)cost.copy());
                            } else {
                                ability.getCosts().add(cost.copy());
                            }
                        }
                        // change spell colors
                        ObjectColor spellColor = spell.getColor();
                        spellColor.setBlack(false);
View Full Code Here

                    if (player.chooseUse(Outcome.Benefit,new StringBuilder("Pay ").append(additionalCost.getText(false)).append(" ?").toString(), game)) {
                        additionalCost.activate();
                        for (Iterator it = ((Costs) additionalCost).iterator(); it.hasNext();) {
                            Cost cost = (Cost) it.next();
                            if (cost instanceof ManaCostsImpl) {
                                ability.getManaCostsToPay().add((ManaCostsImpl) cost.copy());
                            } else {
                                ability.getCosts().add(cost.copy());
                            }
                        }
                        ability.getModes().setMinModes(2);
View Full Code Here

                        for (Iterator it = ((Costs) additionalCost).iterator(); it.hasNext();) {
                            Cost cost = (Cost) it.next();
                            if (cost instanceof ManaCostsImpl) {
                                ability.getManaCostsToPay().add((ManaCostsImpl) cost.copy());
                            } else {
                                ability.getCosts().add(cost.copy());
                            }
                        }
                        ability.getModes().setMinModes(2);
                        ability.getModes().setMaxModes(2);
                    }
View Full Code Here

                        ability.getManaCostsToPay().clear();
                        ability.getCosts().clear();
                        for (Iterator it = ((Costs) prowlCost).iterator(); it.hasNext();) {
                            Cost cost = (Cost) it.next();
                            if (cost instanceof ManaCostsImpl) {
                                ability.getManaCostsToPay().add((ManaCostsImpl) cost.copy());
                            } else {
                                ability.getCosts().add(cost.copy());
                            }
                        }
                    }
View Full Code Here

                        for (Iterator it = ((Costs) prowlCost).iterator(); it.hasNext();) {
                            Cost cost = (Cost) it.next();
                            if (cost instanceof ManaCostsImpl) {
                                ability.getManaCostsToPay().add((ManaCostsImpl) cost.copy());
                            } else {
                                ability.getCosts().add(cost.copy());
                            }
                        }
                    }
                }
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.