类 AbstractDeckStrategy
java.lang.Object
club.xiaojiawei.strategy.AbstractDeckStrategy
卡牌策略抽象类
-
字段概要
字段修饰符和类型字段说明protected static final int
每次行动后停顿时间protected static double
protected static double
static final float
protected static final float[]
protected static double
protected static final float[]
protected static final float
protected AtomicReference<javafx.beans.property.BooleanProperty>
protected Player
protected MouseUtil
protected static final float
protected static final float
protected HandArea
protected PlayArea
protected static final float
protected static final float
protected static final float
protected Player
protected static final float
protected static final float
protected HandArea
protected PlayArea
protected Properties
protected static final float
protected static final float
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected int
calcCardBlood
(Card card) protected int
calcCardCount
(List<Card> cards, BaseCard card) 计算指定卡的数量protected int
calcCardCount
(List<Card> cards, String cardId) protected int
calcCardRaceCount
(List<Card> cards, CardRaceEnum cardRace, boolean canMove) 计算指定种族的数量calcEatRivalCard
(Card rivalCard) calcEatRivalCard
(Card rivalCard, int maxDeathCount, int subtractRivalBlood) 计算我的多个怪如何吃对面一个怪calcFreeEatRivalCard
(Card rivalCard) protected int
calcMyCardFreeEat
(Card myPlayCard, boolean allowDeath) 计算我的一个怪如何白吃对面一个怪protected int
protected int
protected int
protected int
计算我方场上法强protected int
protected int
计算对方英雄血量protected int
calcTotalAtc
(List<Card> cards) protected boolean
能不能动protected boolean
canPointedToMe
(Card card) 能不能被本方指向protected boolean
canPointedToRival
(Card card) 能不能被对方指向protected boolean
canSpellPointedToMe
(Card card) 能不能被本方法术指向protected boolean
canSpellPointedToRival
(Card card) 能不能被对方法术指向protected boolean
cardEquals
(Card longCard, BaseCard shortCard) 卡id是否相同void
protected void
clickFloatCard
(float clearance, float firstCardPos, int floatCardIndex) 点击悬浮卡牌,如发现,protected boolean
点击我方技能protected void
点击回合结束按钮void
discoverChooseCard
(Card... cards) protected abstract boolean
executeChangeCard
(Card card, int index) 执行换牌策略protected abstract int
executeDiscoverChooseCard
(Card... cards) 执行发现选牌protected abstract void
执行出牌策略protected boolean
existByCost
(List<Card> cards, int cost) 是否存在指定费用的牌findAllByCost
(List<Card> cards, int cost) 寻找所有指定费用的cardprotected int
findByCardId
(List<Card> cards, BaseCard baseCard) protected int
findByCardId
(List<Card> cards, Card card) protected int
findByCardId
(List<Card> cards, String cardId) 寻找指定cardId的cardprotected int
findByCost
(List<Card> cards, int cost) 寻找指定费用的卡牌protected int
findByEntityId
(List<Card> cards, Card card) protected int
findByEntityId
(List<Card> cards, String entityId) protected int
findByLECost
(List<Card> cards, int cost) 寻找小于等于费用的卡牌protected int
findCanMove
(List<Card> cards) 寻找能动的怪protected int
findCardByCardRace
(List<Card> cards, CardRaceEnum... cardRace) protected int
findCountByBlood
(List<Card> cards, int blood) 寻找指定血量随从数量protected int
findMaxAtcByBlood
(List<Card> cards, int blood, boolean canLTBlood) protected int
findMaxAtcByBlood
(List<Card> cards, int blood, int maxAtc, boolean canLTBlood) 寻找在等于指定血量中攻击力最大的protected int
findMaxAtcByGEAtk
(List<Card> cards, int atk) 寻找在大于等于指定攻击力中攻击力最大的protected int
findMaxAtcByGEAtkNotWindFury
(List<Card> cards, int atcLine) protected int
findNotExhaustedCard
(List<Card> cards) 寻找第一个非疲劳卡牌protected int
findTauntCard
(List<Card> cards) 寻找第一个有嘲讽的随从protected float
protected float
protected float
protected float
protected int[]
getMyHandCardPos
(int size, int handIndex) 获取指定手牌位置protected int
获取可用水晶数protected boolean
isImmunityMagic
(Card card) 是不是魔免protected boolean
myHandPointToMyPlay
(int handIndex) protected boolean
myHandPointToMyPlay
(int myHandIndex, int myPlayIndex) protected boolean
myHandPointToMyPlayNoPlace
(int myHandIndex, int myPlayIndex) protected boolean
myHandPointToMyPlayThenPointToMyPlay
(int myHandIndex, int myPlayIndex, int thenMyPlayIndex) protected boolean
myHandPointToMyPlayThenPointToRivalHero
(int myHandIndex, int myPlayIndex) protected boolean
myHandPointToMyPlayThenPointToRivalPlay
(int myHandIndex, int myPlayIndex, int rivalPlayIndex) protected boolean
myHandPointToNoPlace
(int myHandIndex) protected boolean
myHandPointToRivalHeroNoPlace
(int myHandIndex) protected boolean
myHandPointToRivalPlayNoPlace
(int myHandIndex, int rivalPlayIndex) protected boolean
protected boolean
myHeroPointToRivalPlay
(int rivalPlayIndex) protected boolean
myPlayPointToRivalHero
(int myPlayIndex) protected boolean
myPlayPointToRivalPlay
(int myPlayIndex, int rivalPlayIndex) 从我方战场指向对方战场void
outCard()
-
字段详细资料
-
mouseUtil
-
isPause
-
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
-
rivalPlayArea
-
myHandArea
-
rivalHandArea
-
me
-
rival
-
myHandCards
-
myPlayCards
-
rivalHandCards
-
rivalPlayCards
-
ACTION_INTERVAL
protected static final int ACTION_INTERVAL每次行动后停顿时间- 另请参阅:
-
-
构造器详细资料
-
AbstractDeckStrategy
public AbstractDeckStrategy()
-
-
方法详细资料
-
changeCard
public void changeCard() -
outCard
public void outCard() -
discoverChooseCard
-
executeChangeCard
执行换牌策略- 参数:
card
-- 返回:
- 返回true表示换掉该牌
-
executeOutCard
protected abstract void executeOutCard()执行出牌策略 -
executeDiscoverChooseCard
执行发现选牌- 参数:
cards
-- 返回:
- 返回0~2的数字
-
calcMySpellPower
protected int calcMySpellPower()计算我方场上法强- 返回:
-
calcCardBlood
-
calcCardCount
-
calcCardCount
计算指定卡的数量- 参数:
cards
-card
-- 返回:
-
calcRivalHeroBlood
protected int calcRivalHeroBlood()计算对方英雄血量- 返回:
-
calcMyHeroTotalAtc
protected int calcMyHeroTotalAtc() -
calcMyHeroBlood
protected int calcMyHeroBlood() -
calcMyPlayTotalAtc
protected int calcMyPlayTotalAtc() -
calcMyTotalAtc
protected int calcMyTotalAtc() -
calcTotalAtc
-
calcCardRaceCount
计算指定种族的数量- 参数:
cards
-cardRace
-- 返回:
-
calcMyCardFreeEat
计算我的一个怪如何白吃对面一个怪- 参数:
myPlayCard
-allowDeath
- 允许不白吃- 返回:
-
calcEatRivalCard
计算我的多个怪如何吃对面一个怪- 参数:
rivalCard
-maxDeathCount
-subtractRivalBlood
- 需要减少的敌方怪的血量- 返回:
- 储存下标的list,最后一位存储总攻击力
-
calcEatRivalCard
-
calcFreeEatRivalCard
-
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
是否存在指定费用的牌- 参数:
cards
-cost
-- 返回:
-
findCountByBlood
寻找指定血量随从数量- 返回:
-
findMaxAtcByGEAtk
寻找在大于等于指定攻击力中攻击力最大的- 参数:
cards
-atk
-- 返回:
-
findMaxAtcByGEAtkNotWindFury
- 参数:
cards
-atcLine
-- 返回:
-
findCardByCardRace
-
findMaxAtcByBlood
寻找在等于指定血量中攻击力最大的- 参数:
cards
-blood
- 生命值减去伤害等得出- 返回:
-
findMaxAtcByBlood
-
findCanMove
寻找能动的怪- 参数:
cards
-- 返回:
-
findByCost
寻找指定费用的卡牌- 参数:
cards
-cost
-- 返回:
-
findByLECost
寻找小于等于费用的卡牌- 参数:
cards
-cost
-- 返回:
-
findByCardId
寻找指定cardId的card- 参数:
cards
-cardId
-- 返回:
-
findByCardId
-
findByEntityId
-
findByEntityId
-
findByCardId
-
findAllByCost
寻找所有指定费用的card- 参数:
cards
-cost
-- 返回:
-
findTauntCard
寻找第一个有嘲讽的随从- 参数:
cards
-- 返回:
-
findNotExhaustedCard
寻找第一个非疲劳卡牌- 参数:
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
卡id是否相同- 参数:
longCard
-shortCard
-- 返回:
-
canSpellPointedToRival
能不能被对方法术指向- 参数:
card
-- 返回:
-
canSpellPointedToMe
能不能被本方法术指向- 参数:
card
-- 返回:
-
canPointedToRival
能不能被对方指向- 参数:
card
-- 返回:
-
canPointedToMe
能不能被本方指向- 参数:
card
-- 返回:
-
isImmunityMagic
是不是魔免- 参数:
card
-- 返回:
-
canMove
能不能动- 参数:
card
-- 返回:
-