investigate_card_pairを使う際の注意点について - aharalabMeiji/fireplaceAharaLab GitHub Wiki

ページの名前これでいいかな…?

いじる必要のある個所について

start.py

  • start.pyの64行目あたり、
#特定の2枚のカードのシナジーを調べる(idea by Maya)
#from card_pair import investigate_card_pair, find_card_pair
#investigate_card_pair()

のコメントを外します

fireplace/player.py

  • 32行目あたり、 def __init__(self,name,deck,hero) に引数_combos=[]を追加し、__init__内でself.combos=_combosとしておきます

  • 172行目あたり、 prepare_for_game内を

def prepare_for_game(self):
		self.summon(self.starting_hero)
		for item in self.combos:
			self.starting_deck.remove(item)
			pass
		insertIndex=random.randint(0,len(self.starting_deck)-1)
		self.starting_deck[insertIndex:insertIndex]=self.combos
		for id in self.starting_deck:
			self.card(id, zone=Zone.DECK)
		self.cthun = self.card("OG_280")
		self.playstate = PlayState.PLAYING

		# Draw initial hand (but not any more than what we have in the deck)
		hand_size = min(len(self.deck), self.start_hand_size)
		starting_hand = random.sample(self.deck, hand_size)
		# It's faster to move cards directly to the hand instead of drawing
		for card in starting_hand:
			card.zone = Zone.HAND

このようにしておきます。

  • ちなみに、カードが引かれるときはself.deckの後ろの方から引かれます

fireplace/game.py

class Game(MulliganRules, CoinRules, BaseGame):
	pass
  • のMulliganRulesを外します

  • (このプログラムはマリガンをした後にデッキをシャッフルするのでマリガンルールを入れているとせっかくカードが隣り合うようにしても無慈悲にシャッフルされます)