mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Merge branch 'foul' into 'master'
Foul Emissary: Fix NPE See merge request core-developers/forge!4739
This commit is contained in:
@@ -80,11 +80,15 @@ public class TriggerSacrificed extends Trigger {
|
|||||||
|
|
||||||
// When cast with Emerge, the cost instance is there
|
// When cast with Emerge, the cost instance is there
|
||||||
IndividualCostPaymentInstance currentPayment = (IndividualCostPaymentInstance) runParams.get(AbilityKey.IndividualCostPaymentInstance);
|
IndividualCostPaymentInstance currentPayment = (IndividualCostPaymentInstance) runParams.get(AbilityKey.IndividualCostPaymentInstance);
|
||||||
SpellAbility sa = currentPayment.getPayment().getAbility();
|
|
||||||
|
|
||||||
if (sa != null && sa.getHostCard() != null) {
|
SpellAbility sa;
|
||||||
if (sa.isSpell() && sa.getHostCard().hasStartOfUnHiddenKeyword(keyword)) {
|
if (currentPayment != null) {
|
||||||
withKeyword = true;
|
sa = currentPayment.getPayment().getAbility();
|
||||||
|
|
||||||
|
if (sa != null && sa.getHostCard() != null) {
|
||||||
|
if (sa.isSpell() && sa.getHostCard().hasStartOfUnHiddenKeyword(keyword)) {
|
||||||
|
withKeyword = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user