From 353910ef48e6229b62049a0ab84fe03fee43edeb Mon Sep 17 00:00:00 2001
From: reimannsum
Date: Tue, 14 Jun 2016 13:16:01 -0400
Subject: [PATCH] add getter
added getter function for field_cost.get_colors()
also added code to add a "back to top" link to each card
---
lib/cardlib.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/cardlib.py b/lib/cardlib.py
index 8a8b881..c1836f8 100644
--- a/lib/cardlib.py
+++ b/lib/cardlib.py
@@ -747,7 +747,7 @@ class Card:
#force for_html to false to create tootip with forum spoiler
outstr += ('[F] '
+ self.format(gatherer=gatherer, for_forum=for_forum, for_html=False, vdump=vdump).replace('\n', '
')
- + '
')
+ + '
back to top')
outstr += linebreak
@@ -1026,5 +1026,8 @@ class Card:
return outstr
+ def get_colors(self):
+ return self.__dict__[field_cost].get_colors()
+