类 AbstractDeckStrategy

java.lang.Object
club.xiaojiawei.strategy.AbstractDeckStrategy
直接已知子类:
EvenNumberShamanDeckStrategy, FreeDeckStrategy, ZooDeckStrategy

public abstract class AbstractDeckStrategy extends Object
卡牌策略抽象类
  • 字段详细资料

    • mouseUtil

      protected MouseUtil mouseUtil
    • isPause

      protected AtomicReference<javafx.beans.property.BooleanProperty> isPause
    • scriptConfiguration

      protected Properties scriptConfiguration
    • FIRST_HAND_CARD_HORIZONTAL_TO_CENTER_RATION

      protected static final float[] FIRST_HAND_CARD_HORIZONTAL_TO_CENTER_RATION
    • HAND_CARD_HORIZONTAL_CLEARANCE_RATION

      protected static final float[] HAND_CARD_HORIZONTAL_CLEARANCE_RATION
    • HAND_CARD_VERTICAL_TO_BOTTOM_RATION

      protected static final float HAND_CARD_VERTICAL_TO_BOTTOM_RATION
      另请参阅:
    • RIVAL_HERO_VERTICAL_TO_BOTTOM_RATION

      protected static final float RIVAL_HERO_VERTICAL_TO_BOTTOM_RATION
      另请参阅:
    • MY_HERO_VERTICAL_TO_BOTTOM_RATION

      protected static final float MY_HERO_VERTICAL_TO_BOTTOM_RATION
      另请参阅:
    • PLAY_CARD_HORIZONTAL_CLEARANCE_RATION

      protected static final float PLAY_CARD_HORIZONTAL_CLEARANCE_RATION
      另请参阅:
    • MY_PLAY_CARD_VERTICAL_TO_BOTTOM_RATION

      protected static final float MY_PLAY_CARD_VERTICAL_TO_BOTTOM_RATION
      另请参阅:
    • RIVAL_PLAY_CARD_VERTICAL_TO_BOTTOM_RATION

      protected static final float RIVAL_PLAY_CARD_VERTICAL_TO_BOTTOM_RATION
      另请参阅:
    • POWER_VERTICAL_TO_BOTTOM_RATION

      protected static final float POWER_VERTICAL_TO_BOTTOM_RATION
      另请参阅:
    • POWER_HORIZONTAL_TO_CENTER_RATION

      protected static final float POWER_HORIZONTAL_TO_CENTER_RATION
      另请参阅:
    • TURN_OVER_BUTTON_VERTICAL_TO_BOTTOM_RATION

      protected static final float TURN_OVER_BUTTON_VERTICAL_TO_BOTTOM_RATION
      另请参阅:
    • TURN_OVER_BUTTON_HORIZONTAL_TO_CENTER_RATION

      protected static final float TURN_OVER_BUTTON_HORIZONTAL_TO_CENTER_RATION
      另请参阅:
    • CONFIRM_BUTTON_VERTICAL_TO_BOTTOM_RATION

      public static final float CONFIRM_BUTTON_VERTICAL_TO_BOTTOM_RATION
      另请参阅:
    • BLOOD_WEIGHT

      protected static double BLOOD_WEIGHT
    • ATC_WEIGHT

      protected static double ATC_WEIGHT
    • FREE_EAT_MAX

      protected static double FREE_EAT_MAX
    • myPlayArea

      protected PlayArea myPlayArea
    • rivalPlayArea

      protected PlayArea rivalPlayArea
    • myHandArea

      protected HandArea myHandArea
    • rivalHandArea

      protected HandArea rivalHandArea
    • me

      protected Player me
    • rival

      protected Player rival
    • myHandCards

      protected List<Card> myHandCards
    • myPlayCards

      protected List<Card> myPlayCards
    • rivalHandCards

      protected List<Card> rivalHandCards
    • rivalPlayCards

      protected List<Card> rivalPlayCards
    • ACTION_INTERVAL

      protected static final int ACTION_INTERVAL
      每次行动后停顿时间
      另请参阅:
  • 构造器详细资料

    • AbstractDeckStrategy

      public AbstractDeckStrategy()
  • 方法详细资料

    • changeCard

      public void changeCard()
    • outCard

      public void outCard()
    • discoverChooseCard

      public void discoverChooseCard(Card... cards)
    • executeChangeCard

      protected abstract boolean executeChangeCard(Card card, int index)
      执行换牌策略
      参数:
      card -
      返回:
      返回true表示换掉该牌
    • executeOutCard

      protected abstract void executeOutCard()
      执行出牌策略
    • executeDiscoverChooseCard

      protected abstract int executeDiscoverChooseCard(Card... cards)
      执行发现选牌
      参数:
      cards -
      返回:
      返回0~2的数字
    • calcMySpellPower

      protected int calcMySpellPower()
      计算我方场上法强
      返回:
    • calcCardBlood

      protected int calcCardBlood(Card card)
    • calcCardCount

      protected int calcCardCount(List<Card> cards, String cardId)
    • calcCardCount

      protected int calcCardCount(List<Card> cards, BaseCard card)
      计算指定卡的数量
      参数:
      cards -
      card -
      返回:
    • calcRivalHeroBlood

      protected int calcRivalHeroBlood()
      计算对方英雄血量
      返回:
    • calcMyHeroTotalAtc

      protected int calcMyHeroTotalAtc()
    • calcMyHeroBlood

      protected int calcMyHeroBlood()
    • calcMyPlayTotalAtc

      protected int calcMyPlayTotalAtc()
    • calcMyTotalAtc

      protected int calcMyTotalAtc()
    • calcTotalAtc

      protected int calcTotalAtc(List<Card> cards)
    • calcCardRaceCount

      protected int calcCardRaceCount(List<Card> cards, CardRaceEnum cardRace, boolean canMove)
      计算指定种族的数量
      参数:
      cards -
      cardRace -
      返回:
    • calcMyCardFreeEat

      protected int calcMyCardFreeEat(Card myPlayCard, boolean allowDeath)
      计算我的一个怪如何白吃对面一个怪
      参数:
      myPlayCard -
      allowDeath - 允许不白吃
      返回:
    • calcEatRivalCard

      protected List<Integer> calcEatRivalCard(Card rivalCard, int maxDeathCount, int subtractRivalBlood)
      计算我的多个怪如何吃对面一个怪
      参数:
      rivalCard -
      maxDeathCount -
      subtractRivalBlood - 需要减少的敌方怪的血量
      返回:
      储存下标的list,最后一位存储总攻击力
    • calcEatRivalCard

      protected List<Integer> calcEatRivalCard(Card rivalCard)
    • calcFreeEatRivalCard

      protected List<Integer> calcFreeEatRivalCard(Card rivalCard)
    • myHandPointToMyPlay

      protected boolean myHandPointToMyPlay(int handIndex)
    • myHandPointToMyPlay

      protected boolean myHandPointToMyPlay(int myHandIndex, int myPlayIndex)
    • myHandPointToMyPlayNoPlace

      protected boolean myHandPointToMyPlayNoPlace(int myHandIndex, int myPlayIndex)
    • myHandPointToRivalPlayNoPlace

      protected boolean myHandPointToRivalPlayNoPlace(int myHandIndex, int rivalPlayIndex)
    • myHandPointToRivalHeroNoPlace

      protected boolean myHandPointToRivalHeroNoPlace(int myHandIndex)
    • myHandPointToNoPlace

      protected boolean myHandPointToNoPlace(int myHandIndex)
    • myHeroPointToRivalHero

      protected boolean myHeroPointToRivalHero()
    • myHeroPointToRivalPlay

      protected boolean myHeroPointToRivalPlay(int rivalPlayIndex)
    • myPlayPointToRivalHero

      protected boolean myPlayPointToRivalHero(int myPlayIndex)
    • myPlayPointToRivalPlay

      protected boolean myPlayPointToRivalPlay(int myPlayIndex, int rivalPlayIndex)
      从我方战场指向对方战场
      参数:
      myPlayIndex -
      rivalPlayIndex -
    • clickPower

      protected boolean clickPower()
      点击我方技能
    • clickTurnOverButton

      protected void clickTurnOverButton()
      点击回合结束按钮
    • myHandPointToMyPlayThenPointToMyPlay

      protected boolean myHandPointToMyPlayThenPointToMyPlay(int myHandIndex, int myPlayIndex, int thenMyPlayIndex)
    • myHandPointToMyPlayThenPointToRivalPlay

      protected boolean myHandPointToMyPlayThenPointToRivalPlay(int myHandIndex, int myPlayIndex, int rivalPlayIndex)
    • myHandPointToMyPlayThenPointToRivalHero

      protected boolean myHandPointToMyPlayThenPointToRivalHero(int myHandIndex, int myPlayIndex)
    • clickFloatCard

      protected void clickFloatCard(float clearance, float firstCardPos, int floatCardIndex)
      点击悬浮卡牌,如发现,
      参数:
      clearance -
      firstCardPos -
      floatCardIndex - 0~2
    • existByCost

      protected boolean existByCost(List<Card> cards, int cost)
      是否存在指定费用的牌
      参数:
      cards -
      cost -
      返回:
    • findCountByBlood

      protected int findCountByBlood(List<Card> cards, int blood)
      寻找指定血量随从数量
      返回:
    • findMaxAtcByGEAtk

      protected int findMaxAtcByGEAtk(List<Card> cards, int atk)
      寻找在大于等于指定攻击力中攻击力最大的
      参数:
      cards -
      atk -
      返回:
    • findMaxAtcByGEAtkNotWindFury

      protected int findMaxAtcByGEAtkNotWindFury(List<Card> cards, int atcLine)
      参数:
      cards -
      atcLine -
      返回:
    • findCardByCardRace

      protected int findCardByCardRace(List<Card> cards, CardRaceEnum... cardRace)
    • findMaxAtcByBlood

      protected int findMaxAtcByBlood(List<Card> cards, int blood, int maxAtc, boolean canLTBlood)
      寻找在等于指定血量中攻击力最大的
      参数:
      cards -
      blood - 生命值减去伤害等得出
      返回:
    • findMaxAtcByBlood

      protected int findMaxAtcByBlood(List<Card> cards, int blood, boolean canLTBlood)
    • findCanMove

      protected int findCanMove(List<Card> cards)
      寻找能动的怪
      参数:
      cards -
      返回:
    • findByCost

      protected int findByCost(List<Card> cards, int cost)
      寻找指定费用的卡牌
      参数:
      cards -
      cost -
      返回:
    • findByLECost

      protected int findByLECost(List<Card> cards, int cost)
      寻找小于等于费用的卡牌
      参数:
      cards -
      cost -
      返回:
    • findByCardId

      protected int findByCardId(List<Card> cards, String cardId)
      寻找指定cardId的card
      参数:
      cards -
      cardId -
      返回:
    • findByCardId

      protected int findByCardId(List<Card> cards, Card card)
    • findByEntityId

      protected int findByEntityId(List<Card> cards, Card card)
    • findByEntityId

      protected int findByEntityId(List<Card> cards, String entityId)
    • findByCardId

      protected int findByCardId(List<Card> cards, BaseCard baseCard)
    • findAllByCost

      protected List<Card> findAllByCost(List<Card> cards, int cost)
      寻找所有指定费用的card
      参数:
      cards -
      cost -
      返回:
    • findTauntCard

      protected int findTauntCard(List<Card> cards)
      寻找第一个有嘲讽的随从
      参数:
      cards -
      返回:
    • findNotExhaustedCard

      protected int findNotExhaustedCard(List<Card> cards)
      寻找第一个非疲劳卡牌
      参数:
      cards -
      返回:
    • getMyUsableResource

      protected int getMyUsableResource()
      获取可用水晶数
      返回:
    • getFloatCardClearanceForFourCard

      protected float getFloatCardClearanceForFourCard()
    • getFloatCardClearanceForThreeCard

      protected float getFloatCardClearanceForThreeCard()
    • getFloatCardFirstCardPosForFourCard

      protected float getFloatCardFirstCardPosForFourCard()
    • getFloatCardFirstCardPosForThreeCard

      protected float getFloatCardFirstCardPosForThreeCard()
    • getMyHandCardPos

      protected int[] getMyHandCardPos(int size, int handIndex)
      获取指定手牌位置
      参数:
      size -
      handIndex -
      返回:
    • cardEquals

      protected boolean cardEquals(Card longCard, BaseCard shortCard)
      卡id是否相同
      参数:
      longCard -
      shortCard -
      返回:
    • canSpellPointedToRival

      protected boolean canSpellPointedToRival(Card card)
      能不能被对方法术指向
      参数:
      card -
      返回:
    • canSpellPointedToMe

      protected boolean canSpellPointedToMe(Card card)
      能不能被本方法术指向
      参数:
      card -
      返回:
    • canPointedToRival

      protected boolean canPointedToRival(Card card)
      能不能被对方指向
      参数:
      card -
      返回:
    • canPointedToMe

      protected boolean canPointedToMe(Card card)
      能不能被本方指向
      参数:
      card -
      返回:
    • isImmunityMagic

      protected boolean isImmunityMagic(Card card)
      是不是魔免
      参数:
      card -
      返回:
    • canMove

      protected boolean canMove(Card card)
      能不能动
      参数:
      card -
      返回: