見出し画像

HeartOfCrown ONLINE攻略



➛どんなゲーム?

ドミニオンライクなゲームらしいです(ドミニオンやったことない)
イラストが可愛いです(大事

中央からカードを選んでいってデッキを育てながら、姫を擁立して即位を目指します。

この手のゲームは戦術が固定してしまってつまらなくなることが多いんですが、その辺がとても工夫されていてデッキや姫によって戦略が大きく変わるのが面白いです。

steamで今なら1762円!安い!買うしかない!
元々は紙版のゲームのようですが、最近steamで発売されました。
微妙にカードプールは異なるみたいで、紙版は遊んだことないので今回はsteam版について触れていきます。

➛理想的な回し方

初期の段階ではデッキに要らないカードが10枚入っている。
「1ドロー 1コイン」7枚と「1ドロー 0コイン」3枚
この状況ではほとんど3-4コインしか確保できない。

一方で、このゲームは5コスト以上のバリューが非常に高い。
錬金術師は2ドローのぶっ壊れカードであり、
6コインには3コインの辺境伯や大都市がある。
更に上がりを見据えると8コインの公爵はかかせない。

となると、いかに早く平均5-6コインを稼げるようになるか
そこから大都市や錬金術師を買って、平均8コインを稼ぎ公爵を大量に確保するか(あるいは冒険者で大都市を切り捨てまくって公爵にするか)
が重要になる。

なので最初はコインを稼ぐカードがとても重要。都市、商人、銀行など。
初期から都市を3枚買うと1ドローの期待値が1コインになり平均5コインを稼ぐことができるようになる。コインを稼ぎつつドローもできて、終盤まで価値を損なわないのみ市や交易船なんかもいい。
ここで都市開発や寄付など終盤を見据えたカードを買ってしまうといつまでたっても平均5コインに到達できずデッキが弱いままという事になってしまう。

●圧縮について

しかし、デッキに要らないカードが10枚もあるといくらいいカードを入れても安定しないうえに、1ドローの価値もなかなか増えない。序盤で持っているゴミカードをロスにならないように除去してデッキを「圧縮」する必要がある。
呪いがない環境で一番理想的な動きは序盤で農村(or果樹園)3枚で擁立すること。行動しながら要らないカードを3枚も捨ててくれる。さらにそこでフラマリアなどで強力なカードを仕入れられたらデッキは一気に強くなる。
中盤で見習い侍女が被って手札が弱くなったら思い切って見習い侍女を継承につけてしまおう。
さらに三枚まで要らないカードが捨てられる。ただし欲しいカードをとられてしまったら元も子もないので拘り過ぎないのが重要。このゲームの「継承-2」はとても重いのでむやみやたらにやるものではないが、「圧縮」にはそれを挽回できるだけの価値がある。
そこにドローソースを重ねてデッキを1周できるようになれば勝利は目の前。帝都や王冠などの強力なカードを手に入れて一気に奪還しよう。

しかし、このムーブにも弱点はある。即位したターンや見習い侍女を継承したターンは動けず、たいていは果樹園だけで擁立はできず擁立に都市を持っていかれるので一時的にデッキが弱くなり、取り戻すためにターンを要する。さらに、妨害で呪いが大量に混ぜられるような状況では圧縮は効果をなさない。
圧縮にこだわり過ぎず素直に大都市を買いまくって第一皇女、第二皇女や双子でゴールを目指す方が有効なときもある。

いずれにせよやみくもにドローカードばかりをとるのではなく、平均5-6ゴールド以上を稼いでいく意識が重要。


➛擁立する姫の候補

●序盤型

早い段階で擁立して農村(果樹園)を除去しつつ、5コストカードをデッキに混ぜられる「圧縮」ムーブが非常に強力。見習い侍女も継承にセットすれば最大6枚の不要カードを除外できる。
さらに強力な5コストカードを次のターンに使えるというのが非常に強い。
錬金術師取れたら当然強い。
補給部隊+冒険者で要らないカードを除外しつつ圧縮を目指すムーブも強い。

~3ターン クラムクラム(フラマリア)のやり方~
初手3点か4点→都市などの2コインカードを2回連続で買う
その後、農村7枚都市2枚侍女3枚の中から6点以上取る(30%らしい)
※歩兵大隊が飛んでくる環境ではできない

まず、カードの総数は3枚の0点カード、7枚の1点カード、2枚の2点カードで合計12枚です。

5枚のカードを引くときに6点以上になる組み合わせを考えます:
1. 2点のカードを2枚(4点)、1点のカードを2枚(2点)を引き、さらに何点でも良いカードを1枚引く(現在の点数は6点以上)。
2. 2点のカードを1枚(2点)、1点のカードを4枚(4点)を引く(現在の点数は6点以上)。

これらの組み合わせの確率をそれぞれ計算します:
1. (2C2 * 7C2 * 8C1) / 12C5 = (1 * 21 * 8) / 792 = 168 / 792
2. (2C1 * 7C4) / 12C5 = (2 * 35) / 792 = 70 / 792
これらの確率を合計すると、5枚のカードを引いて6点以上になる確率は (168 + 70) / 792 = 238 / 792 = 約30% 

購入コストー1は非常に強力であるものの
・早い段階でないと優位性が薄い
・3-4T目で擁立できる確率は決して高くはない
・勝ち筋が明確でない → カードを買うタイミングと継承カードを集めるタイミングを自分で切り替えていかないといけない
・デッキ枚数が多くなりがち
 → 終盤になってデッキに居れた継承権カードが回ってこず、小競り合いに勝ちにくい
など弱点も多く結構ピーキーな性能。

一応、擁立が早ければその分早くからカードのキープができることは利点
低コストカードが強く、ドロソが多くて回しやすいデッキで狙う。
低コストの強力なドローソースである交易船がある環境で強いかもしれない(うまく確保できれば…。
錬金術師がある環境だとフラマリアとの選択が難しい。
初手で都市開発などを選んだのであれば別の姫にした方が無難。(そもそも初手都市開発自体が悪手でした)

●中盤型

無難にめちゃくちゃ強い
「公爵を買う→張り付ける」の2ターン分の動きをロスなくできるので実質2ターン分のパワーを持つ

呪いや除去札が少ない状況で非常に強力
捨て札が無いと腐るので、カードを捨てられる星読みの魔女などがあるとなおよい。
強力な5コスト行動カードを使いまわしたい。使いまわすカードとして都市計画、銀行、錬金術師冒険者、補給部隊などなどが有望

●終盤型

なんと10ポイント分の継承カードを一気にゲットできる。
反面、デッキに継承権カードが大量に混ぜられるので擁立後はほぼ継承しかできなくなる。
このため、他の姫と違い、擁立前に継承権10ポイント準備をしておくのがよい
たまたま公爵(+メイド2枚)が確保できたときに、9T目に擁立するのが理想(大体シャッフル前になる)
願いの泉などのドローソースでデッキをぶん回せるならそれ以降でもいい(それなら他の姫の方がいい気もするが)が、この姫の性質上、きっちり20ポイントを狙う形になり延長戦になると弱い。

除去や都市計画、ドローリソースなどを集めてデッキを思いっきり強くした状況で2連続行動してゲームを終わらせに掛かる。
フィールドにあるカードという表現はわかりにくいが、要するに手持ちのデッキの総数(捨て札+手札+山札)+レオン&シオンの1枚分

とても強力な効果だが
・擁立したターンには双子カウンターが使えない。
・隠れ家や護符がない限りは、継承権カードを買ったとしてもデッキが1週しないと手元にこない。
・双子カウンターは1回ずつしか使えない。
という事に注意。周りが上がりそうな状況で擁立しても手遅れ。
また、双子カウンターが3個たまる状況だと遅すぎて捲れないことが多いので注意。

➛サプライセットの種類

1つのゲームで使われるサプライセットはある程度固定化されています。
現在9パターン確認しています。

①呪い(呪詛の魔女)あり

見習い侍女を追放しながら対戦相手に呪いをばらまく強カード
寄付や聖水、護符でしか除去できないお邪魔カード
デッキ枚数が少ないほど被害を受ける

「呪い」という不要なリソースがデッキに大量に混ぜられるため1ドローの価値が大幅に下がってしまい、戦術を大きく見直す必要が出てきます。
魔女をさっさととって呪いが枯れるまで相手に押し付けまくると強いですが相手も分かってるのでなかなかうまくできない。
教えてもらったのですが、ドローや攻撃、成長系のカードに目もくれず、ひたすら都市→大都市・辺境伯→公爵とゴールドを生み出すカードをとり続けることで1ドロー当たりのドロー期待値を挙げる「逆圧縮」という戦法が有効のようです。
この戦法をとるなら、双子姫やラオリリなどの終盤型の姫が有力になってきます。

「寄付」→なんでも除去
「冒険者」→災い(=呪い)以外を成長
「呪詛の魔女」→見習い侍女を除去
「都市開発」→農村を成長させられる
大量に除去がある
リンク2本もちが「のみ市」しかないことに要注意。魔女が腐りやすい
都市開発で大都市を作ってから冒険者で公爵にするコンボが可能
逆に4コストカードが少ないため、4⇒6の動きはしにくい

キープと願いの泉の使いかたが重要になる、泉などの2コストカードを直轄地にためておいて呪いが来て手札が事故った時に一掃しよう。

3Tフラマリアで補給部隊+魔女をとり、一方的に呪いをばらまくか
上記の逆圧縮を行い、ラオリリや双子などで勝負するのがいいようです。

「魔法の護符」→呪いを除去
「呪詛の魔女」→見習い侍女を除去
農村は除去・成長できない。 → 都市購入が大事
★ドローがいっぱいあるが、きちんと除去&都市購入しないとドローの価値が低いので注意
早めに護符を抑えておくのが硬い。
魔女も集めたいが、リンクシンボル2個が4コストと重い「のみ市」と「補給部隊」しかない点に注意。
ドローが多いのできちんと護符を抑えられて適宜呪いを除去できれば「圧縮」戦法も可能
ベルガモットやフラマリアなどで錬金術師を使いまわせると強い

都市開発のみ
呪いが除去できず、ドローソースも乏しく一番厳しい
とにかくデッキが育たない
それでいながら冒険者や錬金術師などの強力な5コストカードもなくスローペースになりがち。

第一・第二皇女・ベルガモットが有望。
ベルガモットで呪いを有効活用するのはいいが、呪いをばらまい多跡が問題。魔女を使っても2ドローで呪い2枚引いて踏んだり蹴ったりになりがち。大人しく商人・辺境伯などを引っ張ってくるのがいいだろう。
「逆圧縮」ができれば双子も有力

対戦相手に呪いをばらまけばその分自分に来る呪いは減る
即位したら呪い対策に願いの泉をキープしておくといい、辺境伯がキーを握るが6コストが重い、、、
素直に都市などをとるムーブが重要
願いの泉が鍵を握る。圧縮ができないので最速で擁立するよりも都市3枚とかで擁立してストックをきちんと埋めた方がいい

➁歩兵大隊あり

農村絶対潰すマン

歩兵大隊による妨害が大量に飛んでくるので大体デッキ4枚で勝負することになる。大抵は除去が豊富なのでデッキを強くして、双子姫のアディショナルターンで5枚の手札を使って一気に決め切る戦術が可能

ドローソースが豊富。
農村を都市開発で成長させ、足りない手札をドローソースで補うスタンダードな戦術が可能。
歩兵大隊によって捨てられた領地カードを拾える城壁も強力
見習い侍女が除去できないので、見習い侍女をセットして継承ポイントを犠牲に圧縮してしまうのもあり。
テンポが速くなりがち。
最速でフラマリアを擁立して錬金術師を確保しながらデッキを圧縮するムーブが強力

よろず屋・冒険者が万能除去
都市開発がないので農村の成長が難しい
魔女や歩兵が飛び交うので農村や見習い侍女が囮に使える=無理に除去しきらなくてもいい
星読み、錬金術師などのドローソースが重要
強力な5コストが多いのでマーケット次第でフラマリアもあり。それか、クラムクラムを早期で決めてしまうか、錬金があるのでベルガモットなど。

寄付・冒険者・よろず屋  万能除去
都市開発    農村が成長できるが、手札が4枚しかないので使いにくい
2ドローがないので手札はほぼほぼ4枚
全く手札が回らないので、除去をとりすぎると手札が事故る
一方で除去をきちんとしないと4枚では戦えないのでバランスが大事。
11コストを狙うのはほぼ無理。公爵すら厳しい。わりとスローペースになる。
都市や銀行を確保していこう。斥候・星読み・冒険者も強いが序盤で優先しすぎないように。寄付と願いの泉は擁立するまでは罠になりがち。
大都市をとってから、冒険者で大都市→公爵を作るのが一番強い。

フラマリアで補給部隊(or星詠み)→冒険者とできると一気に加速する。
第二皇女で細かくポイントを重ねるのも有効そうだが手札が少ないので時間がかかる。第一皇女が無難に強い。

なぜか呪いもないのに護符がある。
城壁や護符、交易船など、地味なドローソースあり。リンクシンボルがないカードが多いが、早馬などもあるのでバランスはいい。
圧縮札は冒険者のみ
強力な5コストが冒険者しかなく、低コストが多いのでクラムクラムが一番刺さりそう。フラマリアで補給部隊→冒険者も強い

③妨害無し

上と同じ。並びが違う。

都市開発 → 農村成長
冒険者 → なんでも成長
都市開発、冒険者があってドローソースも多いためデッキを大幅に成長できる
冠も狙える。かなりペースが速いので双子は乗り遅れることがしばしば。

都市開発を確保してデッキを成長させまくりたいが正直そんな悠長なことをしている余裕もない。無難にフラマリアやクラムクラムで強力なカードを買い占めに走った方がよさそう。

都市開発 → 農村成長
妨害がなく都市開発があるのでスタンダードな戦術が可能
見習い侍女は除去できないのでセットして圧縮しまおう
もちろんペースは速い


●デッキトラッカー

cursorが30分で作ってくれたので公開しておきます。
.py形式で保存して、コマンドプロンプトからpython ~~.pyで起動してください。

import pygame
import sys

pygame.init()

# ゲームウィンドウの設定
screen_width = 360
screen_height = 900
screen = pygame.display.set_mode((screen_width, screen_height))
pygame.display.set_caption("ハートオブクラウン デッキトラッカー")

# フォントの設定
font = pygame.font.Font("ShipporiMincho-Regular.ttf", 24)

gold_y = 310
point_y = 790

# 色の定義
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
GRAY = (200, 200, 200)

# 初期値の設定
def reset_to_initial_state():
    global village, city, large_city, undraw_source, deck_total, sum_gold, maid, stop_card, two_way_card, congressman, duke, frontier, tower, crown,  draw_1_card, draw_2_card, city_development, current_turn, point, gomi, noroi
    deck_total = 10
    village = 7
    city = 0
    large_city = 0
    undraw_source = 10


    noroi = 0
    gomi = 3
    maid = 0
    stop_card = 0
    two_way_card = 0
    congressman = 0
    duke = 0
    frontier = 0
    tower = 0
    crown = 0
    draw_1_card = 0
    draw_2_card = 0
    city_development = 0
    current_turn = 1
    point = 0
    sum_gold = 7

reset_to_initial_state()


def draw_text(text, x, y):
    text_surface = font.render(text, True, BLACK)
    screen.blit(text_surface, (x, y))

def draw_button(text, x, y, width, height, action=None):
    pygame.draw.rect(screen, GRAY, (x, y, width, height))
    text_surface = font.render(text, True, BLACK)
    text_rect = text_surface.get_rect(center=(x + width // 2, y + height // 2))
    screen.blit(text_surface, text_rect)
    return pygame.Rect(x, y, width, height)

def update_inheritance_points():
    global maid, congressman, duke, tower
    inheritance_points = maid * 2 + congressman * 3 + duke * 6 + tower * 6 + frontier * 3 + crown * 14 + point
    draw_text(f"継承ポイント: {point}/{inheritance_points}", 10, point_y)

def update_gold():
    global sum_gold, deck_total
    draw_text(f"合計ゴールド: {sum_gold}", 10, gold_y)
    draw_gold = (sum_gold * 10//undraw_source)/10
    draw_text(f"1ドロー期待値: {draw_gold}  ({draw_gold*5})", 10, gold_y + 40)

def update_sources(value):
    global undraw_source
    undraw_source += value


def initial_deck_selection():
    global deck_type

    # 画面を白く
    screen.fill(WHITE)

    button_width = 300
    button_height = 75
    start_x = 30
    start_y = 10
    spacing_y = 85


    deck_buttons = []
    deck_label = [
        "魔女&寄付",
        "魔女&護符",
        "魔女&騎士団",
        "歩兵&斥候",
        "歩兵&魅了",
        "歩兵&万屋",
        "願い錬金",
        "願い辺境",
        "歩兵&護符",
        "早馬のみ市",
    ]
    for i in range(len(deck_label)):
        button_x = start_x 
        button_y = start_y + i * spacing_y
        # deck_label = chr(65 + i)  # ASCII 'A' starts at 65
        deck_button = draw_button(deck_label[i], button_x, button_y, button_width, button_height, action=lambda: select_deck(deck_label))
        deck_buttons.append(deck_button)


    pygame.display.flip()

    selected = False
    while not selected:
        for event in pygame.event.get():
            if event.type == pygame.MOUSEBUTTONDOWN:
                mouse_pos = pygame.mouse.get_pos()
                for button in deck_buttons:
                    if button.collidepoint(mouse_pos):
                        select_deck(deck_buttons.index(button))
                        pygame.display.set_caption(f"{deck_label[deck_buttons.index(button)]}")
                        selected = True
                        break
            elif event.type == pygame.QUIT:
                pygame.quit()
                sys.exit()
            if selected:
                break

    return deck_buttons

def select_deck(deck_label):
    global deck_type, deck_cards
    deck_type = deck_label
    print(deck_type)

    deck_cards = [{} for _ in range(10)]

    if deck_type == 0:
        # Define the properties for each deck type
        deck_properties = {
            "寄付": {"label": "寄付", "gold": 0, "drow": 0, "direction": 1, "count":0},
            "隠れ家": {"label": "隠れ家", "gold": 1, "drow": 0, "direction": 1, "count":0},
            "願い": {"label": "願い", "gold": 0, "drow": 1, "direction": 1, "count":0},
            "都開発": {"label": "都開発", "gold": 0, "drow": 0, "direction": 1, "count":0},
            "商人": {"label": "商人", "gold": 2, "drow": 0, "direction": 1, "count":0},
            "のみ市": {"label": "のみ市", "gold": 1, "drow": 1, "direction": 2, "count":0},
            "呪詛": {"label": "呪詛", "gold": 0, "drow": 2, "direction": 0, "count":0},
            "舞踏会": {"label": "舞踏会", "gold": 1, "drow": 1, "direction": 1, "count":0},
            "冒険者": {"label": "冒険者", "gold": 0, "drow": 0, "direction": 0, "count":0},
            "辺境伯": {"label": "辺境伯", "gold": 3, "drow": 0, "direction": 0, "count":0}
        }


    elif deck_type == 1:
        # Define the properties for each deck type
        deck_properties = {
            "呪詛": {"label": "呪詛", "gold": 0, "drow": 2, "direction": 0, "count":0},
            "隠れ家": {"label": "隠れ家", "gold": 1, "drow": 0, "direction": 1, "count":0},
            "補給": {"label": "補給", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "護符": {"label": "護符", "gold": 2, "drow": 1, "direction": 0, "count":0},
            "魅了": {"label": "魅了", "gold": 0, "drow": 1, "direction": 1, "count":0},
            "城壁": {"label": "城壁", "gold": 1, "drow": 1, "direction": 1, "count":0},
            "のみ市": {"label": "のみ市", "gold": 1, "drow": 1, "direction": 2, "count":0},
            "商人": {"label": "商人", "gold": 2, "drow": 0, "direction": 1, "count":0},
            "錬金": {"label": "錬金", "gold": 0, "drow": 2, "direction": 1, "count":0},
            "辺境伯": {"label": "辺境伯", "gold": 3, "drow": 0, "direction": 0, "count":0}
        }

    elif deck_type == 2:
        # Define the properties for each deck type
        deck_properties = {
            "城壁": {"label": "城壁", "gold": 1, "drow": 1, "direction": 1, "count":0},
            "早馬": {"label": "早馬", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "願い": {"label": "願い", "gold": 0, "drow": 1, "direction": 1, "count":0},
            "商人": {"label": "商人", "gold": 2, "drow": 0, "direction": 1, "count":0},
            "都開発": {"label": "都開発", "gold": 0, "drow": 0, "direction": 1, "count":0},
            "補給": {"label": "補給", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "隠れ家": {"label": "隠れ家", "gold": 1, "drow": 0, "direction": 1, "count":0},
            "魅了": {"label": "魅了", "gold": 0, "drow": 1, "direction": 1, "count":0},
            "城壁": {"label": "城壁", "gold": 1, "drow": 1, "direction": 1, "count":0},
            "辺境伯": {"label": "辺境伯", "gold": 3, "drow": 0, "direction": 0, "count":0},
            "騎士団": {"label": "騎士団", "gold": 2, "drow": 0, "direction": 0, "count":0},
        }

    elif deck_type == 3:
        # Define the properties for each deck type
        deck_properties = {
            "斥候": {"label": "斥候", "gold": 0, "drow": 1, "direction": 1, "count":0},
            "早馬": {"label": "早馬", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "願い": {"label": "願い", "gold": 0, "drow": 1, "direction": 1, "count":0},
            "城壁": {"label": "城壁", "gold": 1, "drow": 1, "direction": 1, "count":0},
            "のみ市": {"label": "のみ市", "gold": 1, "drow": 1, "direction": 2, "count":0},
            "交易船": {"label": "交易船", "gold": 2, "drow": 2, "direction": 0, "count":0},
            "商人": {"label": "商人", "gold": 2, "drow": 0, "direction": 1, "count":0},
            "都開発": {"label": "都開発", "gold": 0, "drow": 0, "direction": 1, "count":0},
            "歩兵": {"label": "歩兵", "gold": 2, "drow": 0, "direction": 0, "count":0},
            "錬金": {"label": "錬金", "gold": 0, "drow": 2, "direction": 1, "count":0}
        }


    elif deck_type == 4:
        # Define the properties for each deck type
        deck_properties = {
            "城壁": {"label": "城壁", "gold": 1, "drow": 1, "direction": 1, "count":0},
            "早馬": {"label": "早馬", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "よろず": {"label": "よろず", "gold": 1, "drow": 0, "direction": 0, "count":0},
            "星詠み": {"label": "星詠み", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "銀行": {"label": "銀行", "gold": 2, "drow": 0, "direction": 0, "count":0},
            "補給": {"label": "補給", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "歩兵": {"label": "歩兵", "gold": 2, "drow": 0, "direction": 0, "count":0},
            "錬金": {"label": "錬金", "gold": 0, "drow": 2, "direction": 1, "count":0},
            "冒険者": {"label": "冒険者", "gold": 0, "drow": 0, "direction": 0, "count":0},
            "魅了": {"label": "魅了", "gold": 0, "drow": 1, "direction": 1, "count":0},
        }

    elif deck_type == 5:
        # Define the properties for each deck type
        deck_properties = {
            "都開発": {"label": "都開発", "gold": 0, "drow": 0, "direction": 1, "count":0},
            "寄付": {"label": "寄付", "gold": 0, "drow": 0, "direction": 1, "count":0},
            "冒険者": {"label": "冒険者", "gold": 0, "drow": 0, "direction": 0, "count":0},
            "斥候": {"label": "斥候", "gold": 0, "drow": 1, "direction": 1, "count":0},
            "星詠み": {"label": "星詠み", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "補給": {"label": "補給", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "願い": {"label": "願い", "gold": 0, "drow": 1, "direction": 1, "count":0},
            "歩兵": {"label": "歩兵", "gold": 2, "drow": 0, "direction": 0, "count":0},
            "銀行": {"label": "銀行", "gold": 2, "drow": 0, "direction": 0, "count":0},
            "よろず": {"label": "よろず", "gold": 1, "drow": 0, "direction": 0, "count":0},
        }

    elif deck_type == 6:
        # Define the properties for each deck type
        deck_properties = {
            "願い": {"label": "願い", "gold": 0, "drow": 1, "direction": 1, "count":0},
            "早馬": {"label": "早馬", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "交易船": {"label": "交易船", "gold": 2, "drow": 2, "direction": 0, "count":0},
            "商人": {"label": "商人", "gold": 2, "drow": 0, "direction": 1, "count":0},
            "のみ市": {"label": "のみ市", "gold": 1, "drow": 1, "direction": 2, "count":0},
            "銀行": {"label": "銀行", "gold": 2, "drow": 0, "direction": 0, "count":0},
            "都開発": {"label": "都開発", "gold": 0, "drow": 0, "direction": 1, "count":0},
            "補給": {"label": "補給", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "冒険者": {"label": "冒険者", "gold": 0, "drow": 0, "direction": 0, "count":0},
            "錬金": {"label": "錬金", "gold": 0, "drow": 2, "direction": 1, "count":0}
        }
    elif deck_type == 7:
        # Define the properties for each deck type
        deck_properties = {
            "願い": {"label": "願い", "gold": 0, "drow": 1, "direction": 1, "count":0},
            "早馬": {"label": "早馬", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "斥候": {"label": "斥候", "gold": 0, "drow": 1, "direction": 1, "count":0},
            "商人": {"label": "商人", "gold": 2, "drow": 0, "direction": 1, "count":0},
            "都開発": {"label": "都開発", "gold": 0, "drow": 0, "direction": 1, "count":0},
            "交易船": {"label": "交易船", "gold": 2, "drow": 2, "direction": 0, "count":0},
            "銀行": {"label": "銀行", "gold": 2, "drow": 0, "direction": 0, "count":0},
            "のみ市": {"label": "のみ市", "gold": 1, "drow": 1, "direction": 2, "count":0},
            "錬金": {"label": "錬金", "gold": 0, "drow": 2, "direction": 1, "count":0},
            "辺境伯": {"label": "辺境伯", "gold": 3, "drow": 0, "direction": 0, "count":0}
        }

    elif deck_type == 8:
        deck_properties = {
            "早馬": {"label": "早馬", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "斥候": {"label": "斥候", "gold": 0, "drow": 1, "direction": 1, "count":0},
            "城壁": {"label": "城壁", "gold": 1, "drow": 1, "direction": 1, "count":0},
            "交易船": {"label": "交易船", "gold": 2, "drow": 2, "direction": 0, "count":0},
            "護符": {"label": "護符", "gold": 2, "drow": 1, "direction": 0, "count":0},
            "星詠み": {"label": "星詠み", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "のみ市": {"label": "のみ市", "gold": 1, "drow": 1, "direction": 2, "count":0},
            "歩兵": {"label": "歩兵", "gold": 2, "drow": 0, "direction": 0, "count":0},
            "補給": {"label": "補給", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "冒険者": {"label": "冒険者", "gold": 0, "drow": 0, "direction": 0, "count":0},
        }

    elif deck_type == 9:
        deck_properties = {
            "早馬": {"label": "早馬", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "願い": {"label": "願い", "gold": 0, "drow": 1, "direction": 1, "count":0},
            "交易船": {"label": "交易船", "gold": 2, "drow": 2, "direction": 0, "count":0},
            "商人": {"label": "商人", "gold": 2, "drow": 0, "direction": 1, "count":0},
            "都開発": {"label": "都開発", "gold": 0, "drow": 0, "direction": 1, "count":0},
            "補給": {"label": "補給", "gold": 0, "drow": 1, "direction": 2, "count":0},
            "銀行": {"label": "銀行", "gold": 2, "drow": 0, "direction": 0, "count":0},
            "冒険者": {"label": "冒険者", "gold": 0, "drow": 0, "direction": 0, "count":0},
            "錬金": {"label": "錬金", "gold": 0, "drow": 2, "direction": 1, "count":0},
            "のみ市": {"label": "のみ市", "gold": 1, "drow": 1, "direction": 2, "count":0},
        }






    # hopulate deck_cards based on deck_type
    for i, deck in enumerate(deck_properties):
        deck_cards[i] = deck_properties[deck]


# ゲームループ
initial_deck_selection()

# ゲームループ
while True:
    screen.fill(WHITE)

    # テキストの描画
    vil_y = 10
    draw_text(f"村: {village}", 20, vil_y)
    draw_text(f"都市: {city}", 120, vil_y)
    draw_text(f"大都市: {large_city}", 240, vil_y)

    # ボタンの描画
    village_minus_button = draw_button("-", 20, vil_y + 35, 30, 30)
    village_plus_button = draw_button("+", 50, vil_y + 35, 30, 30)

    city_minus_button = draw_button("-", 130, vil_y + 35, 30, 30)
    city_plus_button = draw_button("+", 160, vil_y + 35, 30, 30)

    large_city_minus_button = draw_button("-", 240, vil_y + 35, 30, 30)
    large_city_plus_button = draw_button("+", 270, vil_y + 35, 30, 30)

    village_to_city_button = draw_button("→", 90, vil_y, 30, 30)
    city_to_large_city_button = draw_button("→", 210, vil_y, 30, 30)


    x_position = 10
    y_position = 90
    cards_minus_button = []
    cards_plus_button = []
    for i, card in enumerate(deck_cards):
        draw_text(f"{card['label']}: {card['count']}", x_position, y_position)
        cards_minus_button.append(draw_button("-", x_position + 105, y_position, 30, 30))
        cards_plus_button.append(draw_button("+", x_position + 135, y_position, 30, 30))

        y_position += 40
        if i == 4:
            x_position = 190
            y_position -= 40 * 5

    draw_text(f"総数{deck_total}枚 : ⓪-{undraw_source} ①-{draw_1_card} ②-{draw_2_card}", 50, gold_y + 80)
    draw_text(f"STOP: {stop_card} 2WAY: {two_way_card}", 50, gold_y + 120)


    draw_text(f"呪い: {noroi}", 40, point_y - 320)
    draw_text(f"侍女(-2): {gomi}", 40, point_y - 280)
    draw_text(f"メイド(2): {maid}", 40, point_y - 240)
    draw_text(f"議員(3): {congressman}", 40, point_y - 200)
    draw_text(f"公爵(6): {duke}", 40, point_y - 160)
    draw_text(f"辺境伯(3): {frontier}", 40, point_y - 120)
    draw_text(f"帝都(6): {tower}", 40, point_y - 80)
    draw_text(f"王冠(14): {crown}", 40, point_y - 40)

    noroi_minus_button = draw_button("-", 210, point_y - 320, 30, 30)
    noroi_plus_button = draw_button("+", 240, point_y - 320, 30, 30)

    gomi_minus_button = draw_button("-", 210, point_y - 280, 30, 30)
    gomi_plus_button = draw_button("+", 240, point_y - 280, 30, 30)
    maid_minus_button = draw_button("-", 210, point_y - 240, 30, 30)
    maid_plus_button = draw_button("+", 240, point_y - 240, 30, 30)
    congressman_minus_button = draw_button("-", 210, point_y - 200, 30, 30)
    congressman_plus_button = draw_button("+", 240, point_y - 200, 30, 30)
    duke_minus_button = draw_button("-", 210, point_y - 160, 30, 30)
    duke_plus_button = draw_button("+", 240, point_y - 160, 30, 30)
    frontier_minus_button = draw_button("-", 210, point_y - 120, 30, 30)
    frontier_plus_button = draw_button("+", 240, point_y - 120, 30, 30)
    tower_minus_button = draw_button("-", 210, point_y - 80, 30, 30)
    tower_plus_button = draw_button("+", 240, point_y - 80, 30, 30)
    crown_minus_button = draw_button("-", 210, point_y - 40, 30, 30)
    crown_plus_button = draw_button("+", 240, point_y - 40, 30, 30)


    gomi_to_point_button = draw_button("↓", 270, point_y - 280, 30, 30)
    maid_to_point_button = draw_button("↓", 270, point_y - 240, 30, 30)
    congressman_to_point_button = draw_button("↓", 270, point_y - 200, 30, 30)
    duke_to_point_button = draw_button("↓", 270, point_y - 160, 30, 30)
    frontier_to_point_button = draw_button("↓", 270, point_y - 120, 30, 30)
    tower_to_point_button = draw_button("↓", 270, point_y - 80, 30, 30)
    crown_to_point_button = draw_button("↓", 270, point_y - 40, 30, 30)

    point_minus_button = draw_button("-", 270, point_y, 30, 30)
    point_plus_button = draw_button("+", 300, point_y, 30, 30)

    gold_minus_button = draw_button("-", 270, gold_y, 30, 30)
    gold_plus_button = draw_button("+", 300, gold_y, 30, 30)
    
    reset_button = draw_button("Restart", 30, 850, 300, 40)



    update_inheritance_points()
    update_gold()

    # イベント処理
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
            sys.exit()
        elif event.type == pygame.MOUSEBUTTONDOWN:


            if village_minus_button.collidepoint(event.pos):
                if village > 0:
                    village -= 1
                    deck_total -= 1
                    update_sources(-1)
                    sum_gold -= 1
            elif village_plus_button.collidepoint(event.pos):
                village += 1
                deck_total += 1
                update_sources(1)
                sum_gold += 1
            elif city_minus_button.collidepoint(event.pos):
                if city > 0:
                    city -= 1
                    deck_total -= 1
                    update_sources(-1)
                    sum_gold -= 2
            elif city_plus_button.collidepoint(event.pos):
                city += 1
                deck_total += 1
                update_sources(1)
                sum_gold += 2
            elif large_city_minus_button.collidepoint(event.pos):
                if large_city > 0:
                    large_city -= 1
                    deck_total -= 1
                    update_sources(-1)
                    sum_gold -= 3
            elif large_city_plus_button.collidepoint(event.pos):
                large_city += 1
                deck_total += 1
                update_sources(1)
                sum_gold += 3

            elif village_to_city_button.collidepoint(event.pos):
                if village > 0:
                    village -= 1
                    city += 1
                    sum_gold += 1

            elif city_to_large_city_button.collidepoint(event.pos):
                if city > 0:
                    city -= 1
                    large_city += 1
                    sum_gold += 1
            elif noroi_minus_button.collidepoint(event.pos):
                if noroi > 0:
                    noroi -= 1
                    deck_total -= 1
                    update_sources(-1)
            elif noroi_plus_button.collidepoint(event.pos):
                noroi += 1
                deck_total += 1
                update_sources(1)

            elif gomi_minus_button.collidepoint(event.pos):
                if gomi > 0:
                    gomi -= 1
                    deck_total -= 1
                    update_sources(-1)
            elif gomi_plus_button.collidepoint(event.pos):
                gomi += 1
                deck_total += 1
                update_sources(1)
            elif maid_minus_button.collidepoint(event.pos):
                if maid > 0:
                    maid -= 1
                    deck_total -= 1
                    update_sources(-1)
            elif maid_plus_button.collidepoint(event.pos):
                maid += 1
                deck_total += 1
                update_sources(1)
            elif congressman_minus_button.collidepoint(event.pos):
                if congressman > 0:
                    congressman -= 1
                    deck_total -= 1
                    update_sources(-1)
            elif congressman_plus_button.collidepoint(event.pos):
                congressman += 1
                deck_total += 1
                update_sources(1)
            elif duke_minus_button.collidepoint(event.pos):
                if duke > 0:
                    duke -= 1
                    deck_total -= 1
                    update_sources(-1)
            elif duke_plus_button.collidepoint(event.pos):
                duke += 1
                deck_total += 1
                update_sources(1)

            elif tower_minus_button.collidepoint(event.pos):
                if tower > 0:
                    tower -= 1
                    deck_total -= 1
                    update_sources(-1)
                    sum_gold -= 3
            elif tower_plus_button.collidepoint(event.pos):
                tower += 1
                deck_total += 1
                update_sources(1)
                sum_gold += 3

            elif frontier_minus_button.collidepoint(event.pos):
                if frontier > 0:
                    frontier -= 1
                    deck_total -= 1
                    update_sources(-1)
                    sum_gold -= 3
            elif frontier_plus_button.collidepoint(event.pos):
                frontier += 1
                deck_total += 1
                update_sources(1)
                sum_gold += 3

            elif crown_minus_button.collidepoint(event.pos):
                if crown > 0:
                    crown -= 1
                    deck_total -= 1
                    update_sources(-1)
            elif crown_plus_button.collidepoint(event.pos):
                crown += 1
                deck_total += 1
                update_sources(1)
            
            
            elif point_minus_button.collidepoint(event.pos):
                point -= 1
            elif point_plus_button.collidepoint(event.pos):
                point += 1


            elif gomi_to_point_button.collidepoint(event.pos):
                if gomi > 0:
                    gomi -= 1
                    deck_total -= 1
                    update_sources(-1)
                    point -= 2
            elif maid_to_point_button.collidepoint(event.pos):
                if maid > 0:
                    maid -= 1
                    deck_total -= 1
                    update_sources(-1)
                    point += 2
            elif congressman_to_point_button.collidepoint(event.pos):
                if congressman > 0:
                    congressman -= 1
                    deck_total -= 1
                    update_sources(-1)
                    point += 3
            elif duke_to_point_button.collidepoint(event.pos):
                if duke > 0:
                    duke -= 1
                    deck_total -= 1
                    update_sources(-1)
                    point += 6
            elif tower_to_point_button.collidepoint(event.pos):
                if tower > 0:
                    tower -= 1
                    deck_total -= 1
                    update_sources(-1)
                    point += 6
                    sum_gold -= 3
            elif frontier_to_point_button.collidepoint(event.pos):
                if frontier > 0:
                    frontier -= 1
                    deck_total -= 1
                    update_sources(-1)
                    point += 3
                    sum_gold -= 3
            elif crown_to_point_button.collidepoint(event.pos):
                if crown > 0:
                    crown -= 1
                    deck_total -= 1
                    update_sources(-1)
                    point += 14

            elif gold_minus_button.collidepoint(event.pos):
                if sum_gold > 0:
                    sum_gold -= 1
            elif gold_plus_button.collidepoint(event.pos):
                sum_gold += 1

            elif reset_button.collidepoint(event.pos):
                reset_to_initial_state()
                initial_deck_selection()

            for i, bt in enumerate(cards_plus_button):
                if bt.collidepoint(event.pos):
                    deck_cards[i]["count"] += 1
                    deck_total += 1
                    sum_gold += deck_cards[i]["gold"]
                    if deck_cards[i]["direction"] == 0:
                        stop_card += 1
                    elif deck_cards[i]["direction"] == 2:
                        two_way_card += 1

                    if deck_cards[i]["drow"] == 0:
                        update_sources(1)
                    elif deck_cards[i]["drow"] == 1:
                        draw_1_card += 1
                    elif deck_cards[i]["drow"] == 2:
                        draw_2_card += 1


            for i, bt in enumerate(cards_minus_button):
                if bt.collidepoint(event.pos):
                    deck_cards[i]["count"] -= 1
                    deck_total -= 1
                    sum_gold -= deck_cards[i]["gold"]
                    if deck_cards[i]["direction"] == 0:
                        stop_card -= 1
                    elif deck_cards[i]["direction"] == 2:
                        two_way_card -= 1

                    if deck_cards[i]["drow"] == 0:
                        update_sources(-1)
                    elif deck_cards[i]["drow"] == 1:
                        draw_1_card -= 1
                    elif deck_cards[i]["drow"] == 2:
                        draw_2_card -= 1



    pygame.display.flip()

この記事が気に入ったらサポートをしてみませんか?