Class MapleMiniGame

All Implemented Interfaces:
IMaplePlayerShop

public class MapleMiniGame extends AbstractPlayerStore
玩家對戰小遊戲攤位的伺服端實作,支援五目棋(Omok)與翻牌配對(Match Card)。

IMaplePlayerShop.OMOKIMaplePlayerShop.MATCH_CARD 型別標識, 固定兩人對弈(slots = 2)。主要特性如下:

  • 五目棋:維護 15×15 棋盤陣列(piece),每步呼叫 searchCombo 判定五連; 勝負透過 PlayerShopPacket.getMiniGameResult(MapleMiniGame, int, int) 廣播。
  • 翻牌配對:以 matchcards 清單配對牌組,局前透過 shuffleList 洗牌。
  • piecetype 決定比局制(0=6局、1=10局、2=15局),達標後由 checkWin 結算。
  • 勝負記錄同步至任務進度(MapleQuestStatus),可觸發五目棋/翻牌相關任務計數。
PlayerInteractionHandlerMINI_GAME_* opcode 驅動每一步落子;封包由 PlayerShopPacket 組裝。
  • Constructor Details

  • Method Details

    • reset

      public void reset()
    • setFirstSlot

      public void setFirstSlot(int type)
    • getFirstSlot

      public int getFirstSlot()
    • setPoints

      public void setPoints(int slot)
    • getPoints

      public int getPoints()
    • checkWin

      public void checkWin()
    • getOwnerPoints

      public int getOwnerPoints(int slot)
    • setPieceType

      public void setPieceType(int type)
    • getPieceType

      public int getPieceType()
    • setGameType

      public void setGameType()
    • shuffleList

      public void shuffleList()
    • getCardId

      public int getCardId(int slot)
    • getMatchesToWin

      public int getMatchesToWin()
    • setLoser

      public void setLoser(int type)
    • getLoser

      public int getLoser()
    • send

      public void send(MapleClient c)
    • setReady

      public void setReady(int slot)
    • isReady

      public boolean isReady(int slot)
    • setPiece

      public void setPiece(int move1, int move2, int type, MapleCharacter chr)
    • nextLoser

      public void nextLoser()
    • exit

      public void exit(MapleCharacter player)
    • isExitAfter

      public boolean isExitAfter(MapleCharacter player)
    • setExitAfter

      public void setExitAfter(MapleCharacter player)
    • checkExitAfterGame

      public void checkExitAfterGame()
    • searchCombo

      public boolean searchCombo(int x, int y, int type)
    • getScore

      public int getScore(MapleCharacter chr)
    • getShopType

      public byte getShopType()
    • getWins

      public int getWins(MapleCharacter chr)
    • getTies

      public int getTies(MapleCharacter chr)
    • getLosses

      public int getLosses(MapleCharacter chr)
    • setPoints

      public void setPoints(int i, int type)
    • getData

      public String getData(MapleCharacter chr)
    • getRequestedTie

      public int getRequestedTie()
    • setRequestedTie

      public void setRequestedTie(int t)
    • getTurn

      public int getTurn()
    • setTurn

      public void setTurn(int t)
    • closeShop

      public void closeShop(boolean s, boolean z)
    • buy

      public void buy(MapleClient c, int z, short i)