mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Fixed EquipmentAttachedCount. Fixed Kemba, Kha Regent not working
This commit is contained in:
parent
900086fffc
commit
6e3ee0e6fe
2 changed files with 7 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue