mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- Fixed possible NPE's in doPayment functions.
This commit is contained in:
@@ -453,7 +453,7 @@ public class CostExile extends CostPartWithList {
|
||||
*/
|
||||
@Override
|
||||
protected void doPayment(SpellAbility ability, Card targetCard) {
|
||||
ability.getActivatingPlayer().getGame().getAction().exile(targetCard);
|
||||
targetCard.getGame().getAction().exile(targetCard);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -25,7 +25,7 @@ public class CostExileAndPay extends CostPartWithList {
|
||||
*/
|
||||
@Override
|
||||
protected void doPayment(SpellAbility ability, Card targetCard) {
|
||||
ability.getActivatingPlayer().getGame().getAction().exile(targetCard);
|
||||
targetCard.getGame().getAction().exile(targetCard);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -153,7 +153,7 @@ public class CostExiledMoveToGrave extends CostPartWithList {
|
||||
*/
|
||||
@Override
|
||||
protected void doPayment(SpellAbility ability, Card targetCard) {
|
||||
ability.getActivatingPlayer().getGame().getAction().moveToGraveyard(targetCard);
|
||||
targetCard.getGame().getAction().moveToGraveyard(targetCard);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -148,7 +148,7 @@ public class CostMill extends CostPartWithList {
|
||||
*/
|
||||
@Override
|
||||
protected void doPayment(SpellAbility ability, Card targetCard) {
|
||||
ability.getActivatingPlayer().getGame().getAction().moveToGraveyard(targetCard);
|
||||
targetCard.getGame().getAction().moveToGraveyard(targetCard);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -319,7 +319,7 @@ public class CostPutCardToLib extends CostPartWithList {
|
||||
*/
|
||||
@Override
|
||||
protected void doPayment(SpellAbility ability, Card targetCard) {
|
||||
ability.getActivatingPlayer().getGame().getAction().moveToLibrary(targetCard, Integer.parseInt(getLibPos()));
|
||||
targetCard.getGame().getAction().moveToLibrary(targetCard, Integer.parseInt(getLibPos()));
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -186,7 +186,7 @@ public class CostReturn extends CostPartWithList {
|
||||
*/
|
||||
@Override
|
||||
protected void doPayment(SpellAbility ability, Card targetCard) {
|
||||
ability.getActivatingPlayer().getGame().getAction().moveToHand(targetCard);
|
||||
targetCard.getGame().getAction().moveToHand(targetCard);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -215,7 +215,7 @@ public class CostReveal extends CostPartWithList {
|
||||
*/
|
||||
@Override
|
||||
protected void doPayment(SpellAbility ability, Card targetCard) {
|
||||
ability.getActivatingPlayer().getGame().getAction().reveal(Lists.newArrayList(targetCard), ability.getActivatingPlayer());
|
||||
targetCard.getGame().getAction().reveal(Lists.newArrayList(targetCard), ability.getActivatingPlayer());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ public class CostSacrifice extends CostPartWithList {
|
||||
|
||||
@Override
|
||||
protected void doPayment(SpellAbility ability, Card targetCard) {
|
||||
ability.getActivatingPlayer().getGame().getAction().sacrifice(targetCard, ability);
|
||||
targetCard.getGame().getAction().sacrifice(targetCard, ability);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
Reference in New Issue
Block a user