mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
*Fix for targeting triggered abilities.
This commit is contained in:
@@ -3230,9 +3230,17 @@ public class GameAction {
|
|||||||
public void playSpellAbility(SpellAbility sa) {
|
public void playSpellAbility(SpellAbility sa) {
|
||||||
sa.setActivatingPlayer(AllZone.HumanPlayer);
|
sa.setActivatingPlayer(AllZone.HumanPlayer);
|
||||||
|
|
||||||
if (sa.getPayCosts() != null){
|
if (sa.getPayCosts() != null || sa.getTarget() != null){
|
||||||
Target_Selection ts = new Target_Selection(sa.getTarget(), sa);
|
Target_Selection ts = new Target_Selection(sa.getTarget(), sa);
|
||||||
Cost_Payment payment = new Cost_Payment(sa.getPayCosts(), sa);
|
Cost_Payment payment = null;
|
||||||
|
if(sa.getPayCosts() == null)
|
||||||
|
{
|
||||||
|
payment = new Cost_Payment(new Ability_Cost("0",sa.getSourceCard().getName(),sa.isAbility()), sa);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
payment = new Cost_Payment(sa.getPayCosts(),sa);
|
||||||
|
}
|
||||||
|
|
||||||
payment.changeCost();
|
payment.changeCost();
|
||||||
|
|
||||||
@@ -3268,11 +3276,19 @@ public class GameAction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void playSpellAbility_NoStack(SpellAbility sa) {
|
public void playSpellAbility_NoStack(SpellAbility sa,boolean skipTargeting) {
|
||||||
sa.setActivatingPlayer(AllZone.HumanPlayer);
|
sa.setActivatingPlayer(AllZone.HumanPlayer);
|
||||||
|
|
||||||
if (sa.getPayCosts() != null){
|
if (sa.getPayCosts() != null){
|
||||||
Target_Selection ts = new Target_Selection(sa.getTarget(), sa);
|
Target_Selection ts = null;
|
||||||
|
if(skipTargeting)
|
||||||
|
{
|
||||||
|
ts = new Target_Selection(null, sa);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ts = new Target_Selection(sa.getTarget(),sa);
|
||||||
|
}
|
||||||
Cost_Payment payment = new Cost_Payment(sa.getPayCosts(), sa);
|
Cost_Payment payment = new Cost_Payment(sa.getPayCosts(), sa);
|
||||||
|
|
||||||
payment.changeCost();
|
payment.changeCost();
|
||||||
|
|||||||
@@ -726,7 +726,7 @@ public class TriggerHandler {
|
|||||||
//sa[0].resolve();
|
//sa[0].resolve();
|
||||||
if(sa[0].getSourceCard().getController().equals(AllZone.HumanPlayer))
|
if(sa[0].getSourceCard().getController().equals(AllZone.HumanPlayer))
|
||||||
{
|
{
|
||||||
AllZone.GameAction.playSpellAbility_NoStack(sa[0]);
|
AllZone.GameAction.playSpellAbility_NoStack(sa[0],true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user