Skip to content

Commit

Permalink
New Card Layout
Browse files Browse the repository at this point in the history
  • Loading branch information
db0 committed Jul 8, 2021
1 parent 3f23a8f commit dd3ea8d
Show file tree
Hide file tree
Showing 30 changed files with 386 additions and 29 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Dreams: Changelog

## v0.4.0

* Added fresh card layout. Unfortunately its assets are under a properietary license.
* Converted tags into icons on card front to improve readability
* Increased overall card size by 25%

## v0.3.0

* Added randomized backgrounds
* Added art credits on Torment mouseover

## v0.2.4

* Added polygon-art for the laughing one (Credit to https://www.reddit.com/user/insomniac_lemon)
Expand Down
3 changes: 3 additions & 0 deletions assets/card_backs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The assets in this document are released under CC0

The only exception being TCG_vol12_back.png which is under a proprietary licence purchased for this game only. IT CANNOT BE REUSED by other projects.
35 changes: 35 additions & 0 deletions assets/card_front/64968999-tcg-card-design-vol-12-license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
LICENSE CERTIFICATE : Envato Market Item
==============================================

This document certifies the purchase of:
ONE REGULAR LICENSE
as defined in the standard terms and conditions on Envato Market.

Licensor's Author Username:
B-Gfx

Licensee:
Konstantinos Thoukydidis

Item Title:
TCG Card Design Vol 12

Item URL:
https://graphicriver.net/item/tcg-card-design-vol-12/25306310

Item ID:
25306310

Item Purchase Code:
55ab6163-c274-47d2-9676-0a617a4aff94

Purchase Date:
2021-07-08 14:47:21 UTC

For any queries related to this document or license please contact Help Team via https://help.market.envato.com

Envato Pty. Ltd. (ABN 11 119 159 741)
PO Box 16122, Collins Street West, VIC 8007, Australia

==== THIS IS NOT A TAX RECEIPT OR INVOICE ====

3 changes: 3 additions & 0 deletions assets/card_front/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The assets in this folder are under a proprietary licence purchased for this game only. THEY CANNOT BE REUSED by other projects.

See: 64968999-tcg-card-design-vol-12-license.txt
Binary file added assets/icons/concentration-orb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/icons/concentration-orb.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/concentration-orb.png-78d2688a3676f02a5a9bbbc0b74dedbd.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/icons/concentration-orb.png"
dest_files=[ "res://.import/concentration-orb.png-78d2688a3676f02a5a9bbbc0b74dedbd.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Binary file added assets/icons/crossed-chains.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/icons/crossed-chains.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/crossed-chains.png-5e74ab9b1fda2806533faa782c1382c1.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/icons/crossed-chains.png"
dest_files=[ "res://.import/crossed-chains.png-5e74ab9b1fda2806533faa782c1382c1.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Binary file added assets/icons/meditation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/icons/meditation.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/meditation.png-c3f9581ce1f20b8f1058f26ba91b1e0b.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/icons/meditation.png"
dest_files=[ "res://.import/meditation.png-c3f9581ce1f20b8f1058f26ba91b1e0b.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Binary file added assets/icons/sand-castle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/icons/sand-castle.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/sand-castle.png-ecdf6c670b4ce0c559ab24bfaf129d60.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/icons/sand-castle.png"
dest_files=[ "res://.import/sand-castle.png-ecdf6c670b4ce0c559ab24bfaf129d60.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Binary file added assets/icons/tightrope.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/icons/tightrope.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/tightrope.png-19ed694c932a6ee39aec360af3c4ac53.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/icons/tightrope.png"
dest_files=[ "res://.import/tightrope.png-19ed694c932a6ee39aec360af3c4ac53.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
5 changes: 5 additions & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,11 @@ debug={
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":true,"meta":false,"command":true,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
]
}
complete_battle={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":true,"meta":false,"command":true,"pressed":false,"scancode":90,"unicode":0,"echo":false,"script":null)
]
}

[physics]

Expand Down
2 changes: 2 additions & 0 deletions src/dreamscape/Board.gd
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ func game_over() -> void:
func _input(event):
if event.is_action_pressed("debug"):
_on_Debug_pressed()
if event.is_action_pressed("complete_battle"):
complete_battle()

func _on_Debug_pressed() -> void:
# warning-ignore:return_value_discarded
Expand Down
45 changes: 44 additions & 1 deletion src/dreamscape/CardFront.gd
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
extends CardFront

const TAG_ICONS := {
Terms.ACTIVE_EFFECTS.poison.name: preload("res://assets/icons/coma.png"),
Terms.ACTIVE_EFFECTS.disempower.name: preload("res://assets/icons/misdirection.png"),
Terms.ACTIVE_EFFECTS.vulnerable.name: preload("res://assets/icons/armor-downgrade.png"),
Terms.ACTIVE_EFFECTS.buffer.name: preload("res://assets/icons/star-struck.png"),
Terms.ACTIVE_EFFECTS.advantage.name: preload("res://assets/icons/crow-dive.png"),
Terms.ACTIVE_EFFECTS.empower.name: preload("res://assets/icons/extra-lucid.png"),
Terms.ACTIVE_EFFECTS.fortify.name: preload("res://assets/icons/beams-aura.png"),
Terms.ACTIVE_EFFECTS.impervious.name: preload("res://assets/icons/dodging.png"),
"Fleeting": preload("res://assets/icons/sand-castle.png"),
"Risky": preload("res://assets/icons/tightrope.png"),
"Chain": preload("res://assets/icons/crossed-chains.png"),
"Calm": preload("res://assets/icons/meditation.png"),
"Purpose": preload("res://assets/icons/concentration-orb.png"),
}


onready var cost_container := $CostContainer
onready var tag_container1 := $TagContainer1
onready var tag_container2 := $TagContainer2
onready var tag_icon1 := $TagContainer1/TagIcon
onready var tag_icon2 := $TagContainer2/TagIcon
onready var card_design := $CardDesign
onready var art := $Art

func _ready() -> void:
# text_expansion_multiplier = {
Expand All @@ -27,7 +46,7 @@ func _ready() -> void:
card_label_min_sizes["Name"] = Vector2(CFConst.CARD_SIZE.x - 4, 16)
card_label_min_sizes["Type"] = Vector2(CFConst.CARD_SIZE.x - 4, 14)
card_label_min_sizes["Tags"] = Vector2(CFConst.CARD_SIZE.x - 4, 10)
card_label_min_sizes["Abilities"] = Vector2(CFConst.CARD_SIZE.x - 25, 50)
card_label_min_sizes["Abilities"] = Vector2(CFConst.CARD_SIZE.x - 32, 50)
card_label_min_sizes["Cost"] = Vector2(30, 30)

# This is not strictly necessary, but it allows us to change
Expand Down Expand Up @@ -84,9 +103,33 @@ func scale_to(scale_multiplier: float) -> void:
Vector2(40,40) * scale_multiplier
$CostContainer.rect_position =\
Vector2(5, 5) * scale_multiplier
$TagContainer1.rect_position =\
Vector2(5, 174) * scale_multiplier
$TagContainer2.rect_position =\
Vector2(159, 174) * scale_multiplier
$TagContainer1/TagContainer.rect_min_size = \
Vector2(34,34) * scale_multiplier
$TagContainer1/TagIcon.rect_min_size = \
Vector2(22,22) * scale_multiplier
$TagContainer2/TagContainer.rect_min_size = \
Vector2(34,34) * scale_multiplier
$TagContainer2/TagIcon.rect_min_size = \
Vector2(22,22) * scale_multiplier
for l in card_labels:
if scaled_fonts.get(l) != scale_multiplier:
var label : Label = card_labels[l]
set_label_text(label, label.text)
scaled_fonts[l] = scale_multiplier

func set_tag_icon(tags: Array) -> void:
for tag in tags:
var tex = TAG_ICONS[tag]
var new_texture = ImageTexture.new();
var image = tex.get_data()
new_texture.create_from_image(image)
if not tag_container1.visible:
tag_icon1.texture = new_texture
tag_container1.visible = true
elif not tag_container2.visible:
tag_icon2.texture = new_texture
tag_container2.visible = true
10 changes: 4 additions & 6 deletions src/dreamscape/CardFront.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ margin_right = 200.0
margin_bottom = 261.0
rect_min_size = Vector2( 0, 61 )
mouse_filter = 2
custom_constants/margin_right = 10
custom_constants/margin_left = 10
custom_constants/margin_right = 15
custom_constants/margin_left = 15

[node name="Abilities" type="Label" parent="CardText/OutsideArt"]
margin_left = 10.0
margin_right = 190.0
margin_left = 15.0
margin_right = 185.0
margin_bottom = 61.0
rect_min_size = Vector2( 146, 50 )
size_flags_vertical = 3
Expand Down Expand Up @@ -228,7 +228,6 @@ texture = ExtResource( 10 )
expand = true

[node name="TagIcon" type="TextureRect" parent="TagContainer1"]
modulate = Color( 0.603922, 0.388235, 0.0941176, 1 )
margin_left = 9.0
margin_top = 9.0
margin_right = 31.0
Expand Down Expand Up @@ -259,7 +258,6 @@ texture = ExtResource( 10 )
expand = true

[node name="TagIcon" type="TextureRect" parent="TagContainer2"]
modulate = Color( 0.603922, 0.388235, 0.0941176, 1 )
margin_left = 9.0
margin_top = 9.0
margin_right = 31.0
Expand Down
6 changes: 6 additions & 0 deletions src/dreamscape/CardTemplate.gd
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ func _process(delta: float) -> void:
if shader_progress > 0.1:
card_front._card_text.visible = false
card_front.cost_container.visible = false
card_front.tag_container1.visible = false
card_front.tag_container2.visible = false
card_front.card_design.visible = false
card_front.art.visible = false
if shader_progress > 0.8:
if cfc.NMAP.board.mouse_pointer.current_focused_card == self:
cfc.NMAP.board.mouse_pointer.current_focused_card = null
Expand Down Expand Up @@ -70,6 +74,8 @@ func setup() -> void:
get_property("_rarity"), "Label")
var card_name_label : Label = card_front.card_labels["Name"]
card_name_label.add_color_override("font_color", label_color)
if get_parent().name != "Viewport":
card_front.set_tag_icon(get_property("Tags"))


# Sample code on how to figure out costs of a card
Expand Down
5 changes: 5 additions & 0 deletions src/dreamscape/CombatElements/CombatEffects/Empower.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ visible = false

[node name="Icon" parent="Signifier" index="1"]
texture = ExtResource( 3 )

[node name="Amount" parent="MC" index="0"]
margin_top = 24.0
margin_right = 32.0
margin_bottom = 38.0
Loading

0 comments on commit dd3ea8d

Please sign in to comment.