Skip to content

Commit

Permalink
Merge pull request #24 from constellation39/main
Browse files Browse the repository at this point in the history
Fix 'ActionAnGangAddGang' message
  • Loading branch information
shinkuan authored Feb 5, 2024
2 parents 4dfa512 + cbf36d1 commit 3844053
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions majsoul2mjai.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,9 @@ def input(self, parse_msg: dict) -> dict | None:
actor = parse_msg['data']['data']['seat']
match parse_msg['data']['data']['type']:
case OperationAnGangAddGang.AnGang:
consumed = [MS_TILE_2_MJAI_TILE[parse_msg['data']['data']['tiles']].replace("r","")]*4
if parse_msg['data']['data']['tiles'][0] == '5' and parse_msg['data']['data']['tiles'][1] != 'z':
pai = MS_TILE_2_MJAI_TILE[parse_msg['data']['data']['tiles']]
consumed = [pai.replace("r", "")]*4
if pai[0] == '5' and pai[1] != 'z':
consumed[0] += 'r'
self.mjai_message.append(
{
Expand Down

0 comments on commit 3844053

Please sign in to comment.