mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Fixed a possible NPE if the activator for a cost is not set.
This commit is contained in:
@@ -113,6 +113,11 @@ public class Cost_Payment {
|
|||||||
Player activator = ability.getActivatingPlayer();
|
Player activator = ability.getActivatingPlayer();
|
||||||
final Card card = ability.getSourceCard();
|
final Card card = ability.getSourceCard();
|
||||||
|
|
||||||
|
if(activator == null) {
|
||||||
|
activator = card.getController();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for(CostPart part : cost.getCostParts()){
|
for(CostPart part : cost.getCostParts()){
|
||||||
if (!part.canPay(ability, card, activator, cost))
|
if (!part.canPay(ability, card, activator, cost))
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user