mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
fixed cost modification effects getting applied twice
This commit is contained in:
parent
dddca6ae32
commit
631308a5df
1 changed files with 0 additions and 10 deletions
|
@ -325,16 +325,6 @@ public class ContinuousEffects implements Serializable {
|
|||
* @return
|
||||
*/
|
||||
public void costModification ( Ability abilityToModify, Game game ) {
|
||||
for ( Permanent permanent : game.getBattlefield().getAllPermanents() ) {
|
||||
for ( Ability ability : permanent.getAbilities().getStaticAbilities(Zone.BATTLEFIELD) ) {
|
||||
for ( Effect effect : ability.getEffects(game, EffectType.COSTMODIFICATION) ) {
|
||||
CostModificationEffect rEffect = (CostModificationEffect)effect;
|
||||
if ( rEffect.applies(abilityToModify, ability, game) ) {
|
||||
rEffect.apply(game, ability, abilityToModify);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for ( CostModificationEffect effect : costModificationEffects ) {
|
||||
if ( effect.applies(abilityToModify, abilityMap.get(effect.getId()), game) ) {
|
||||
effect.apply(game, abilityMap.get(effect.getId()), abilityToModify);
|
||||
|
|
Loading…
Reference in a new issue