mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
everything from the default package moved to package forge. the default package contains classes Deck and QuestData_State to keep compatibility with old files that store serialized objects of these classes if you find other classes that are stored in the res directory through serialization, create a class for it in the default package or tell me. about QuestData_State: i'm getting a NullPointerException when trying to create/resume quest. Maybe the quest files on SVN are simply out of date. otherwise, that seems hard. easy fix would of course be to replace null by a new Map
47 lines
1.4 KiB
Java
47 lines
1.4 KiB
Java
package forge;
|
|
public class Input_Attack_Planeswalker extends Input
|
|
{
|
|
private static final long serialVersionUID = 5738375759147611797L;
|
|
|
|
public void showMessage()
|
|
{
|
|
ButtonUtil.enableOnlyOK();
|
|
AllZone.Display.showMessage("Planeswalker Declare Attackers:\r\nSelect creatures that you want to attack " +AllZone.pwCombat.getPlaneswalker());
|
|
}
|
|
public void selectButtonOK()
|
|
{
|
|
|
|
//AllZone.Phase.nextPhase();
|
|
//for debugging: System.out.println("need to nextPhase(Input_Attack_Planeswalker.selectButtonOK) = true; Note, this has not been tested, did it work?");
|
|
AllZone.Phase.setNeedToNextPhase(true);
|
|
this.stop();
|
|
}
|
|
public void selectCard(Card card, PlayerZone zone)
|
|
{
|
|
if(zone.is(Constant.Zone.Play, Constant.Player.Human) &&
|
|
card.isCreature() &&
|
|
card.isUntapped() &&
|
|
CombatUtil.canAttack(card)
|
|
)
|
|
{
|
|
if(! card.getKeyword().contains("Vigilance"))
|
|
{
|
|
card.tap();
|
|
|
|
//otherwise cards stay untapped, not sure why this is needed but it works
|
|
AllZone.Human_Play.updateObservers();
|
|
}
|
|
AllZone.pwCombat.addAttacker(card);
|
|
|
|
//for Castle Raptors, since it gets a bonus if untapped
|
|
for (String effect : AllZone.StateBasedEffects.getStateBasedMap().keySet() ) {
|
|
Command com = GameActionUtil.commands.get(effect);
|
|
com.execute();
|
|
}
|
|
|
|
GameActionUtil.executeCardStateEffects();
|
|
|
|
CombatUtil.showCombat();
|
|
}
|
|
}//selectCard()
|
|
} |