diff options
| author | realtradam <[email protected]> | 2022-11-12 06:18:38 -0500 |
|---|---|---|
| committer | realtradam <[email protected]> | 2022-11-12 06:18:38 -0500 |
| commit | beb954b74929633da599803c5b0e89548511e155 (patch) | |
| tree | 5638ce53832bf28229a9becd92c605c096facc4e /cards/card.rb | |
| parent | 42345b253b3708e0792bb3c3e36cfe5f70c6adcc (diff) | |
| download | Plore-Tabletop-Game-beb954b74929633da599803c5b0e89548511e155.tar.gz Plore-Tabletop-Game-beb954b74929633da599803c5b0e89548511e155.zip | |
fleshed out many of the base weapons
Diffstat (limited to 'cards/card.rb')
| -rw-r--r-- | cards/card.rb | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/cards/card.rb b/cards/card.rb index 2d53fdc..f40cdf5 100644 --- a/cards/card.rb +++ b/cards/card.rb @@ -16,6 +16,42 @@ class Card @actions ||= [] end + def initialize( + title:, + color:, + attrib_top_right: nil, + attrib_top_right_icon: '🩸', + blood: nil, + attrib_top_left: nil, + attrib_top_left_icon: '🛡️', + attrib_bottom_right: nil, + attrib_bottom_right_icon: '🎲', + reposte: nil, + attrib_bottom_left: nil, + attrib_bottom_left_icon: '⚔️', + damage: nil, + actions: [], + flavour: nil, + type: nil + ) + attrib_top_right ||= blood.to_s unless blood.nil? + attrib_bottom_right ||= reposte.to_s unless reposte.nil? + attrib_bottom_left ||= damage.to_s unless damage.nil? + self.title = title + self.color = color + self.attrib_top_left = attrib_top_left + self.attrib_top_left_icon = attrib_top_left_icon + self.attrib_top_right = attrib_top_right + self.attrib_top_right_icon = attrib_top_right_icon + self.attrib_bottom_right = attrib_bottom_right + self.attrib_bottom_right_icon = attrib_bottom_right_icon + self.attrib_bottom_left = attrib_bottom_left + self.attrib_bottom_left_icon = attrib_bottom_left_icon + self.actions.push *actions + self.flavour = flavour + self.type = type + end + class Action attr_accessor :content, :symbol, :seperator @@ -31,9 +67,9 @@ class Card Paggio.html do |_| _.head do _.style do - #rule 'body' do - # height 100.% - #end + rule 'body' do + background color: '#1e1e1e' + end rule 'p' do margin 0 end |
