*Some code required for DB and SubAbility$ was apparently missed.

This commit is contained in:
jendave
2011-08-06 12:17:08 +00:00
parent a080c96aa2
commit b9e02a230e

View File

@@ -115,7 +115,7 @@ public class AbilityFactory_Token extends AbilityFactory {
@Override @Override
public String getStackDescription() { public String getStackDescription() {
return doStackDescription(); return doStackDescription(this);
} }
}; };
@@ -145,7 +145,7 @@ public class AbilityFactory_Token extends AbilityFactory {
@Override @Override
public String getStackDescription() { public String getStackDescription() {
return doStackDescription(); return doStackDescription(this);
} }
}; };
@@ -164,7 +164,7 @@ public class AbilityFactory_Token extends AbilityFactory {
@Override @Override
public String getStackDescription() { public String getStackDescription() {
return doStackDescription(); return doStackDescription(this);
} }
@Override @Override
@@ -177,7 +177,7 @@ public class AbilityFactory_Token extends AbilityFactory {
return dbDealDamage; return dbDealDamage;
} }
private String doStackDescription() { private String doStackDescription(SpellAbility sa) {
int finalPower,finalToughness,finalAmount; int finalPower,finalToughness,finalAmount;
if(tokenPower.matches("[0-9][0-9]?")) { if(tokenPower.matches("[0-9][0-9]?")) {
@@ -213,6 +213,11 @@ public class AbilityFactory_Token extends AbilityFactory {
sb.append("."); sb.append(".");
} }
if (hasSubAbAF){
subAbAF.setParent(sa);
sb.append(subAbAF.getStackDescription());
}
return sb.toString(); return sb.toString();
} }
@@ -293,5 +298,16 @@ public class AbilityFactory_Token extends AbilityFactory {
CardFactoryUtil.makeToken(tokenName, imageName, controller, cost, tokenTypes, finalPower, finalToughness, tokenKeywords); CardFactoryUtil.makeToken(tokenName, imageName, controller, cost, tokenTypes, finalPower, finalToughness, tokenKeywords);
} }
if (hasSubAbAF) {
if (subAbAF.getParent() == null)
subAbAF.setParent(sa);
subAbAF.resolve();
}
else if (hasSubAbStr){
CardFactoryUtil.doDrawBack(subAbStr, 0, AF.getHostCard().getController(),
AF.getHostCard().getController().getOpponent(), null, AF.getHostCard(), null, sa);
}
} }
} }