[스팀몬스터] 특이한 카드들
카드가 만랩으로 가지고 있으면 큰 문제가 없지만 레벨이 낮은 경우에는 특정 stat이 없는 경우가 있습니다. 특히 기존 게임에서 팀 정보를 뽑는 경우에는 사용할 수 없는 카드가 포함된 경우가 있을 수도 있습니다.
예를들면 이런 친구들이죠. 레벨 3이상 부터 ranged stat이 있다보니, 레벨 1,2를 사용한 대전에서는 Crustacean King을 사용할 수 있는거죠. 이런 대전을 참고로 팀을 꾸렸는데, 현재 사용하는 카드가 레벨 3 이상이면 실격패를 당할 수 있습니다.
그래서 이런 종류의 카드를 뽑아내는 파이썬 코드를 만들어 보았습니다.
일전에 만든 카드 내역을 출력하는 함수를 조금 수정을 했습니다.
def print_card_info() :
get_card_detail_info()
mana= 0
summoner = 0
for card in CARDS :
try :
mana = card['stats']['mana'][0]
except :
mana = card['stats']['mana']
summoner = 1
if (1) : # stat 중 0 혹은 more가 있는 monster 출력
if summoner == 1 :
summoner = 0
continue
mn = card['stats']['mana']
if len(mn) > 1 :
checks = ['ranged', 'magic', 'attack']
for stat in checks :
lengh = len(card['stats'][stat])
# ranged, magic 중 0인 것이 있는지 확인
if card['stats'][stat][0] != card['stats'][stat][lengh-1] : # 기능이 있는 것
if card['stats'][stat][0] == 0 : # 점검할 친구들
sstr = '"'+str(card['id'])+'":["'+card['name']+'",'+str(card['rarity'])+','+ str(mana) + ',"'+ str(card['color']) + '"], '+stat
print(sstr)
continue
결과를 확인해보니 이런 특별한 친구가 많지는 않군요. 결과입니다.
"1":["Goblin Shaman",1,3,"Red"], magic
"14":["Crustacean King",1,3,"Blue"], ranged
"32":["Swamp Thing",3,2,"Green"], ranged
"34":["Divine Healer",1,3,"White"], magic
"52":["Undead Priest",2,2,"Black"], magic
"91":["Creeping Ooze",1,1,"Gray"], attack
"118":["Armorsmith",1,2,"White"], attack
"119":["Silvershield Bard",2,1,"White"], attack
"123":["Mermaid Healer",3,3,"Blue"], magic
"131":["Furious Chicken",2,0,"Gray"], attack
"217":["Baby Unicorn",1,3,"White"], attack
저랩에서 스몬 봇을 만드실 분은 참고하시기 바랍니다.
lucky2님이 tradingideas님의 이 포스팅에 따봉(7 SCT)을 하였습니다.
Hi @tradingideas!
Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 4.398 which ranks you at #2480 across all Steem accounts.
Your rank has not changed in the last three days.
In our last Algorithmic Curation Round, consisting of 85 contributions, your post is ranked at #40.
Evaluation of your UA score:
Feel free to join our @steem-ua Discord server
naha님이 tradingideas님의 이 포스팅에 따봉(20 SCT)을 하였습니다.