Cleanup: replace custom code with common classes, text fixes to abilities (#10304)

* Use common FirstCombatPhaseCondition on Raiyuu, Storm's Edge

* Use common ReturnFromExileForSourceEffect on Parallax Wave

* Use common exile effects on Prowling Geistcatcher (attempt to fix #9981)

* Fix text: Fading ability

* Fix text: Endangered Armodon

* Fix text: Nemata, Primeval Warden

* Fix text: Capitalization on alternative/additional costs other than mana
This commit is contained in:
xenohedron 2023-05-09 10:01:48 -04:00 committed by GitHub
parent 550d719498
commit 4c13b42dee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 41 additions and 111 deletions

View file

@ -1,6 +1,7 @@
package mage.abilities.costs;
import mage.abilities.costs.mana.VariableManaCost;
import mage.util.CardUtil;
/**
* @author LevelX2
@ -44,8 +45,8 @@ public class OptionalAdditionalCostImpl extends CostsImpl<Cost> implements Optio
}
/**
* Returns the complete text for the addional cost or if onlyCost is true
* only the pure text fore the included native cost
* Returns the complete text for the additional cost or if onlyCost is true
* only the pure text for the included native cost
*
* @param onlyCost
* @return
@ -55,7 +56,7 @@ public class OptionalAdditionalCostImpl extends CostsImpl<Cost> implements Optio
if (onlyCost) {
return getText();
} else {
return name + delimiter + getText();
return name + delimiter + getText() + (delimiter.equals("&mdash;") ? "." : "");
}
}
@ -68,7 +69,7 @@ public class OptionalAdditionalCostImpl extends CostsImpl<Cost> implements Optio
public String getReminderText() {
String replace = "";
if (reminderText != null && !reminderText.isEmpty()) {
replace = reminderText.replace("{cost}", this.getText(true));
replace = reminderText.replace("{cost}", CardUtil.getTextWithFirstCharLowerCase(this.getText(true)));
}
return replace;
}