Fixed EquipmentAttachedCount. Fixed Kemba, Kha Regent not working

This commit is contained in:
magenoxx 2012-06-29 12:03:08 +04:00
parent 900086fffc
commit 6e3ee0e6fe
2 changed files with 7 additions and 11 deletions

View file

@ -58,9 +58,7 @@ public class EquipmentAttachedCount implements DynamicValue {
@Override
public int calculate(Game game, Ability source) {
int count = 0;
Permanent equipment = game.getPermanent(source.getSourceId());
if (equipment != null) {
Permanent permanent = game.getPermanent(equipment.getAttachedTo());
Permanent permanent = game.getPermanent(source.getSourceId()); // don't change this - may affect other cards
if (permanent != null) {
List<UUID> attachments = permanent.getAttachments();
for (UUID attachmentId : attachments) {
@ -70,8 +68,6 @@ public class EquipmentAttachedCount implements DynamicValue {
}
}
}
}
return amount * count;
}

View file

@ -62,7 +62,7 @@ public class CreateTokenEffect extends OneShotEffect<CreateTokenEffect> {
public CreateTokenEffect(final CreateTokenEffect effect) {
super(effect);
this.amount = effect.amount;
this.amount = effect.amount.clone();
this.token = effect.token.copy();
}