mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Fix NPE with Starforged Sword (#6188)
* Fix NPE * Fix The Lord of Pain --------- Co-authored-by: TRT <>
This commit is contained in:
@@ -64,7 +64,7 @@ public abstract class SpellAbilityEffect {
|
||||
// prelude for when this is root ability
|
||||
if (!(sa instanceof AbilitySub)) {
|
||||
sb.append(sa.getHostCard()).append(" -");
|
||||
if (sa.getHostCard().hasPromisedGift()) {
|
||||
if (sa.getHostCard().hasPromisedGift() && sa.hasAdditionalAbility("GiftAbility")) {
|
||||
sb.append(" Gift ").
|
||||
append(sa.getAdditionalAbility("GiftAbility").getParam("GiftDescription")).
|
||||
append(" to ").append(sa.getHostCard().getPromisedGift()).append(". ");
|
||||
|
||||
@@ -24,11 +24,11 @@ public class PlayerProperty {
|
||||
|
||||
public static boolean playerHasProperty(Player player, String property, Player sourceController, Card source, CardTraitBase spellAbility) {
|
||||
Game game = player.getGame();
|
||||
if (property.endsWith("Activator")) {
|
||||
sourceController = spellAbility.getHostCard().getController();
|
||||
property = property.substring(0, property.length() - 9);
|
||||
}
|
||||
if (property.equals("You")) {
|
||||
if (property.equals("Activator")) {
|
||||
if (!player.equals(spellAbility.getHostCard().getController())) {
|
||||
return false;
|
||||
}
|
||||
} else if (property.equals("You")) {
|
||||
if (!player.equals(sourceController)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user