List randoms at the end of trade requests
This commit is contained in:
parent
b946ad3dda
commit
696a1bfbbd
1 changed files with 9 additions and 1 deletions
10
tools.py
10
tools.py
|
@ -1456,6 +1456,14 @@ def maketrade():
|
|||
thein = sorted(inc + ins)
|
||||
theout = sorted(outc + outs)
|
||||
if randoms:
|
||||
realwant = []
|
||||
fakewant = []
|
||||
for card in theout:
|
||||
if card in theirwantlist:
|
||||
realwant.append(card)
|
||||
else:
|
||||
fakewant.append(card)
|
||||
theout = realwant + fakewant
|
||||
randomstotal = totalrandomch + totalrandomsp
|
||||
addsigs = input("Add signatures? [y/N] ")
|
||||
if addsigs == "y":
|
||||
|
@ -1465,7 +1473,7 @@ def maketrade():
|
|||
tradestring = "\nmy " + ", ".join(theout) + "\n\nfor your " + ", ".join(thein) + "?"
|
||||
if randoms:
|
||||
if randomstotal > 0:
|
||||
tradestring += "\n\n(" + str(len(thein)) + " cards, including " + str(randomstotal) + " randoms)"
|
||||
tradestring += "\n\n(" + str(len(thein)) + " cards, including " + str(randomstotal) + " randoms [end of list])"
|
||||
elif len(thein) > 19:
|
||||
tradestring += "\n\n(" + str(len(thein)) + " cards)"
|
||||
tradestring += "\n\n<img src=\"https://colors-tcg.eu/cards/" + ".gif\"><img src=\"https://colors-tcg.eu/cards/".join(theout) + ".gif\">"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue