From 41a72709df3cdeb279399a9a4e260e35c6ff3b5c Mon Sep 17 00:00:00 2001 From: Kenshia <73539778+Kenshia@users.noreply.github.com> Date: Sun, 26 Jan 2025 11:14:32 +0700 Subject: [PATCH 1/6] feat: card hover --- player_side.gd | 53 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/player_side.gd b/player_side.gd index aec31f2..1075011 100644 --- a/player_side.gd +++ b/player_side.gd @@ -23,6 +23,13 @@ var show_buttons: bool var signal_connected: bool var selected_card: Control +var hovering_cards_this_frame: Array[Control] = [] +var hovering_cards_duration: Dictionary = {} +const original_hover_position = 50 # hard coded idk what's a good way to find this value +const hover_animation_time = 0.1 +const hover_height_offset = -50 +const selected_height_offset = -100 + func attach(match_manager: MatchManager, show_buttons: bool = true): self.show_buttons = show_buttons self.match_manager = match_manager @@ -39,6 +46,7 @@ func _ready(): child.queue_free() func _on_update(transition): + hovering_cards_duration.clear() selected_card = null for child in deck.get_children(): @@ -87,6 +95,7 @@ func _on_update(transition): skip_btn.left_clicked.connect(func (): _pop_this_card(skip_btn) play_card.emit(null)) + skip_btn.hovering.connect(func (delta): _do_hover(skip_btn, delta)) deck.add_child(skip_btn) for card: Card in player.hand: @@ -118,6 +127,7 @@ func _on_update(transition): monster_card.left_clicked.connect(func (): _pop_this_card(monster_card) play_card.emit(card)) + monster_card.hovering.connect(func (delta): _do_hover(monster_card, delta)) deck.add_child(monster_card) elif card is SupportCard and card.type == "red": @@ -133,6 +143,7 @@ func _on_update(transition): btn.left_clicked.connect(func (): _pop_this_card(btn) play_card.emit(card)) + btn.hovering.connect(func (delta): _do_hover(btn, delta)) if rps_button_container: rps_button_container.visible = match_manager.phase == Match.Phase.RPS @@ -142,10 +153,48 @@ func _on_update(transition): func _pop_this_card(control: Control): if selected_card: - selected_card.size_flags_vertical = Control.SIZE_SHRINK_END + selected_card.position = Vector2(selected_card.position.x, original_hover_position) - control.size_flags_vertical = Control.SIZE_SHRINK_BEGIN selected_card = control + selected_card.position = Vector2(selected_card.position.x, original_hover_position + selected_height_offset) + +func _do_hover(control: Control, delta: float): + if control == selected_card: + if control in hovering_cards_duration: + hovering_cards_duration.erase(control) + return + + var duration: float + if control in hovering_cards_duration: + duration = hovering_cards_duration[control] + duration = clampf(duration + delta, 0, hover_animation_time) + hovering_cards_duration[control] = duration + else: + hovering_cards_duration[control] = delta + duration = delta + + var height = lerpf(0, hover_height_offset, duration / hover_animation_time) + original_hover_position + control.position = Vector2(control.position.x, height) + + hovering_cards_this_frame.append(control) + +func _process(delta): + for card in hovering_cards_duration.keys(): + if !card or card in hovering_cards_this_frame: + continue + + var duration = hovering_cards_duration[card] + duration = maxf(0, duration - delta) + + var height = lerpf(0, hover_height_offset, duration / hover_animation_time) + original_hover_position + card.position = Vector2(card.position.x, height) + + if duration == 0: + hovering_cards_duration.erase(card) + else: + hovering_cards_duration[card] = duration + + hovering_cards_this_frame.clear() func _on_kertas_button_button_down() -> void: From abd2feaab8f2f9de669d3b791b2540161a83045e Mon Sep 17 00:00:00 2001 From: istamarahsan Date: Sun, 26 Jan 2025 11:26:09 +0700 Subject: [PATCH 2/6] feat: win-lose-tie at game end --- demo_game.gd | 5 +++++ demo_game.tscn | 20 ++++++++++++++++++++ tcg/match/event/event_game_ended.gd | 7 +++++++ tcg/match/match_manager.gd | 5 +++++ 4 files changed, 37 insertions(+) create mode 100644 tcg/match/event/event_game_ended.gd diff --git a/demo_game.gd b/demo_game.gd index 10c92e5..b3d2308 100644 --- a/demo_game.gd +++ b/demo_game.gd @@ -13,6 +13,7 @@ signal opponent_played_rts(move: String) @onready var own_side = $Own @onready var opponent_side = $Opponent @onready var start_game_btn = $StartGameButton +@onready var win_lose_tie_label: Label = $"Win-Lose-Tie" var id_to_card: Dictionary = {} @@ -65,6 +66,10 @@ func _on_match_manager_state_transitioned(transition: PhaseTransition): start_game_btn.visible = match_manager.phase == Match.Phase.PREGAME transition_history.append(transition) _update_phase_info(transition.to) + if transition.to == Match.Phase.END: + var game_ended_event: EventGameEnded = transition.events.filter(func (it): return it is EventGameEnded)[0] + win_lose_tie_label.text = "TIE" if game_ended_event.winner_player_id == -1 else "YOU WON!" if game_ended_event.winner_player_id == id else "YOU LOST!" + win_lose_tie_label.visible = true print("Phase: ", Match.phase_to_str(transition.from), " -> ", Match.phase_to_str(transition.to)) func _on_start_game_button_button_up() -> void: diff --git a/demo_game.tscn b/demo_game.tscn index a76e523..65b3c81 100644 --- a/demo_game.tscn +++ b/demo_game.tscn @@ -338,6 +338,26 @@ theme = ExtResource("19_3iovu") theme_override_font_sizes/font_size = 24 text = "Support (2)" +[node name="Win-Lose-Tie" type="Label" parent="."] +visible = false +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -365.0 +offset_top = -215.0 +offset_right = 365.0 +offset_bottom = 215.0 +grow_horizontal = 2 +grow_vertical = 2 +theme = ExtResource("19_3iovu") +theme_override_font_sizes/font_size = 52 +text = "YOU WON!" +horizontal_alignment = 1 +vertical_alignment = 1 + [connection signal="play_card" from="Own" to="." method="_on_own_play_card"] [connection signal="rps_move" from="Own" to="." method="_on_own_rps_move"] [connection signal="button_down" from="Own/HBoxContainer/KertasButton" to="Own" method="_on_kertas_button_button_down"] diff --git a/tcg/match/event/event_game_ended.gd b/tcg/match/event/event_game_ended.gd new file mode 100644 index 0000000..f9db6cc --- /dev/null +++ b/tcg/match/event/event_game_ended.gd @@ -0,0 +1,7 @@ +extends Event +class_name EventGameEnded + +var winner_player_id: int + +func _init(winner_player_id: int) -> void: + self.winner_player_id = winner_player_id diff --git a/tcg/match/match_manager.gd b/tcg/match/match_manager.gd index f77d424..9a25959 100644 --- a/tcg/match/match_manager.gd +++ b/tcg/match/match_manager.gd @@ -172,6 +172,7 @@ func resolve(action_by_player_id: Dictionary) -> PhaseTransition: player.active_support_cards = player.active_support_cards.filter(func (card): return not card_expires_this_turn.call(card)) var players_without_monster = players.values().filter(func(player): return player.monster == null) + var players_without_monster_ids = players_without_monster.map(func (it): return it.id) if players_without_monster.size() == 0: phase = Match.Phase.SUPPORT_1 elif players_without_monster.all( @@ -179,7 +180,11 @@ func resolve(action_by_player_id: Dictionary) -> PhaseTransition: ): phase = Match.Phase.SUMMON else: + var player_1_lost = players_without_monster_ids.has(player_1.id) + var player_2_lost = players_without_monster_ids.has(player_2.id) + var winner_id = -1 if player_1_lost and player_2_lost else player_1.id if player_2_lost else player_2.id phase = Match.Phase.END + events.append(EventGameEnded.new(winner_id)) _: pass var transition = PhaseTransition.new(events, initial_phase, phase) From 7b6be434a86f5e55b7c5405e598187e1d2fbac6f Mon Sep 17 00:00:00 2001 From: kennetha123 Date: Sun, 26 Jan 2025 11:30:35 +0700 Subject: [PATCH 3/6] feat: add card images --- assets/card_base/illust bg 1.png | 3 +++ assets/card_base/illust bg 1.png.import | 34 ++++++++++++++++++++++++ assets/monster/Goldfish 2.png | 3 +++ assets/monster/Goldfish 2.png.import | 34 ++++++++++++++++++++++++ assets/monster/axolotl 3.png | 3 +++ assets/monster/axolotl 3.png.import | 34 ++++++++++++++++++++++++ assets/monster/capybara 1.png | 3 +++ assets/monster/capybara 1.png.import | 34 ++++++++++++++++++++++++ assets/monster/cat 3.png | 3 +++ assets/monster/cat 3.png.import | 34 ++++++++++++++++++++++++ assets/monster/duck 1.png | 3 +++ assets/monster/duck 1.png.import | 34 ++++++++++++++++++++++++ assets/monster/jellyfish 2.png | 3 +++ assets/monster/jellyfish 2.png.import | 34 ++++++++++++++++++++++++ assets/monster/penguing 2.png | 3 +++ assets/monster/penguing 2.png.import | 34 ++++++++++++++++++++++++ assets/monster/rabbit 1.png | 3 +++ assets/monster/rabbit 1.png.import | 34 ++++++++++++++++++++++++ assets/monster/whale 2.png | 3 +++ assets/monster/whale 2.png.import | 34 ++++++++++++++++++++++++ assets/support/Invisibility.png | 3 +++ assets/support/Invisibility.png.import | 34 ++++++++++++++++++++++++ assets/support/absorb.png | 3 +++ assets/support/absorb.png.import | 34 ++++++++++++++++++++++++ assets/support/all out attack.png | 3 +++ assets/support/all out attack.png.import | 34 ++++++++++++++++++++++++ assets/support/energy booster.png | 3 +++ assets/support/energy booster.png.import | 34 ++++++++++++++++++++++++ assets/support/insurance.png | 3 +++ assets/support/insurance.png.import | 34 ++++++++++++++++++++++++ assets/support/lifesteal.png | 3 +++ assets/support/lifesteal.png.import | 34 ++++++++++++++++++++++++ assets/support/potion.png | 3 +++ assets/support/potion.png.import | 34 ++++++++++++++++++++++++ assets/support/reflection.png | 3 +++ assets/support/reflection.png.import | 34 ++++++++++++++++++++++++ assets/support/sword mastery.png | 3 +++ assets/support/sword mastery.png.import | 34 ++++++++++++++++++++++++ assets/support/tanker.png | 3 +++ assets/support/tanker.png.import | 34 ++++++++++++++++++++++++ data/cards/monster/axoluna.tres | 6 ++--- data/cards/monster/bunnaut.tres | 4 ++- data/cards/monster/capytain.tres | 4 ++- data/cards/monster/cattogato.tres | 4 ++- data/cards/monster/gilli.tres | 4 ++- data/cards/monster/jellova.tres | 4 ++- data/cards/monster/orcava.tres | 4 ++- data/cards/monster/prankie.tres | 4 ++- data/cards/monster/quackle.tres | 4 ++- data/cards/support/absorb.tres | 4 ++- data/cards/support/all_out_attack.tres | 4 ++- data/cards/support/energy_booster.tres | 4 ++- data/cards/support/insurance.tres | 4 ++- data/cards/support/invisibility.tres | 5 ++-- data/cards/support/lifesteal.tres | 4 ++- data/cards/support/potion.tres | 4 ++- data/cards/support/reflection.tres | 5 ++-- data/cards/support/sword_mastery.tres | 4 ++- data/cards/support/tanker.tres | 5 ++-- demo_game.tscn | 10 ++++++- ui/card_template/support_card_green.tscn | 25 ++++++++--------- 61 files changed, 819 insertions(+), 37 deletions(-) create mode 100644 assets/card_base/illust bg 1.png create mode 100644 assets/card_base/illust bg 1.png.import create mode 100644 assets/monster/Goldfish 2.png create mode 100644 assets/monster/Goldfish 2.png.import create mode 100644 assets/monster/axolotl 3.png create mode 100644 assets/monster/axolotl 3.png.import create mode 100644 assets/monster/capybara 1.png create mode 100644 assets/monster/capybara 1.png.import create mode 100644 assets/monster/cat 3.png create mode 100644 assets/monster/cat 3.png.import create mode 100644 assets/monster/duck 1.png create mode 100644 assets/monster/duck 1.png.import create mode 100644 assets/monster/jellyfish 2.png create mode 100644 assets/monster/jellyfish 2.png.import create mode 100644 assets/monster/penguing 2.png create mode 100644 assets/monster/penguing 2.png.import create mode 100644 assets/monster/rabbit 1.png create mode 100644 assets/monster/rabbit 1.png.import create mode 100644 assets/monster/whale 2.png create mode 100644 assets/monster/whale 2.png.import create mode 100644 assets/support/Invisibility.png create mode 100644 assets/support/Invisibility.png.import create mode 100644 assets/support/absorb.png create mode 100644 assets/support/absorb.png.import create mode 100644 assets/support/all out attack.png create mode 100644 assets/support/all out attack.png.import create mode 100644 assets/support/energy booster.png create mode 100644 assets/support/energy booster.png.import create mode 100644 assets/support/insurance.png create mode 100644 assets/support/insurance.png.import create mode 100644 assets/support/lifesteal.png create mode 100644 assets/support/lifesteal.png.import create mode 100644 assets/support/potion.png create mode 100644 assets/support/potion.png.import create mode 100644 assets/support/reflection.png create mode 100644 assets/support/reflection.png.import create mode 100644 assets/support/sword mastery.png create mode 100644 assets/support/sword mastery.png.import create mode 100644 assets/support/tanker.png create mode 100644 assets/support/tanker.png.import diff --git a/assets/card_base/illust bg 1.png b/assets/card_base/illust bg 1.png new file mode 100644 index 0000000..712628d --- /dev/null +++ b/assets/card_base/illust bg 1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4f66245934d9cb584395b647eab454b3e74351c3086b720bfaf3837c95d1dd2 +size 1744521 diff --git a/assets/card_base/illust bg 1.png.import b/assets/card_base/illust bg 1.png.import new file mode 100644 index 0000000..22253c2 --- /dev/null +++ b/assets/card_base/illust bg 1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://6trhu2r7h6g3" +path="res://.godot/imported/illust bg 1.png-7d6e961f3fef1ad5d8dcf698718d9c23.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/card_base/illust bg 1.png" +dest_files=["res://.godot/imported/illust bg 1.png-7d6e961f3fef1ad5d8dcf698718d9c23.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/monster/Goldfish 2.png b/assets/monster/Goldfish 2.png new file mode 100644 index 0000000..ec6bc6e --- /dev/null +++ b/assets/monster/Goldfish 2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53c37fd23a318f64cdc2951918f4f4b06fa3a4d05ddb2b15c9fc722e4f217519 +size 108879 diff --git a/assets/monster/Goldfish 2.png.import b/assets/monster/Goldfish 2.png.import new file mode 100644 index 0000000..e14f3bd --- /dev/null +++ b/assets/monster/Goldfish 2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b0f5rg5eqyym1" +path="res://.godot/imported/Goldfish 2.png-20495c3132cec5d0b0f2eb9e1b6f168f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/monster/Goldfish 2.png" +dest_files=["res://.godot/imported/Goldfish 2.png-20495c3132cec5d0b0f2eb9e1b6f168f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/monster/axolotl 3.png b/assets/monster/axolotl 3.png new file mode 100644 index 0000000..940328c --- /dev/null +++ b/assets/monster/axolotl 3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe4eaa932ae0e0f7363269bd39412aaaa3796dfcbcf2e5054b9d6f9d2aa4b8b8 +size 116315 diff --git a/assets/monster/axolotl 3.png.import b/assets/monster/axolotl 3.png.import new file mode 100644 index 0000000..8658cea --- /dev/null +++ b/assets/monster/axolotl 3.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://wdyu7txs2ijg" +path="res://.godot/imported/axolotl 3.png-66300d813b5cc2dfc432414b14c1f8bc.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/monster/axolotl 3.png" +dest_files=["res://.godot/imported/axolotl 3.png-66300d813b5cc2dfc432414b14c1f8bc.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/monster/capybara 1.png b/assets/monster/capybara 1.png new file mode 100644 index 0000000..8eeddf2 --- /dev/null +++ b/assets/monster/capybara 1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae0ced57dd24cc221bd9f4b161aef907bf17962294167e6817e60017d484f76e +size 130901 diff --git a/assets/monster/capybara 1.png.import b/assets/monster/capybara 1.png.import new file mode 100644 index 0000000..74346a4 --- /dev/null +++ b/assets/monster/capybara 1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c72q2py2vj6j4" +path="res://.godot/imported/capybara 1.png-98187c93d8c784ac26a4fe6cdc81e3f0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/monster/capybara 1.png" +dest_files=["res://.godot/imported/capybara 1.png-98187c93d8c784ac26a4fe6cdc81e3f0.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/monster/cat 3.png b/assets/monster/cat 3.png new file mode 100644 index 0000000..dcf2e11 --- /dev/null +++ b/assets/monster/cat 3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ad0cffd46c57d81ee56f43a2adf5d9a6e154a6dc9b76ed7a876ebd5bf19ef3d +size 123755 diff --git a/assets/monster/cat 3.png.import b/assets/monster/cat 3.png.import new file mode 100644 index 0000000..9b1df2e --- /dev/null +++ b/assets/monster/cat 3.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bcusdaqfhlv1b" +path="res://.godot/imported/cat 3.png-a083e2d16032d32908b04a46259e2c6a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/monster/cat 3.png" +dest_files=["res://.godot/imported/cat 3.png-a083e2d16032d32908b04a46259e2c6a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/monster/duck 1.png b/assets/monster/duck 1.png new file mode 100644 index 0000000..e4710d0 --- /dev/null +++ b/assets/monster/duck 1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4db0c8f285a1523ea1d3fa2e3e18c834d70b215930f7139fee3efa25ac4aeedd +size 100811 diff --git a/assets/monster/duck 1.png.import b/assets/monster/duck 1.png.import new file mode 100644 index 0000000..86cfcf2 --- /dev/null +++ b/assets/monster/duck 1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ujke0x73f77b" +path="res://.godot/imported/duck 1.png-e7d6d398a984b9ae6ba8f33dfe27e9dd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/monster/duck 1.png" +dest_files=["res://.godot/imported/duck 1.png-e7d6d398a984b9ae6ba8f33dfe27e9dd.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/monster/jellyfish 2.png b/assets/monster/jellyfish 2.png new file mode 100644 index 0000000..04ae99f --- /dev/null +++ b/assets/monster/jellyfish 2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bfd0f4cab6a3ed737816635416c9bb822e2b53028e35ea5cd79ba7e226a216ce +size 81602 diff --git a/assets/monster/jellyfish 2.png.import b/assets/monster/jellyfish 2.png.import new file mode 100644 index 0000000..6cd471a --- /dev/null +++ b/assets/monster/jellyfish 2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cstwubbj8l8fr" +path="res://.godot/imported/jellyfish 2.png-d36c6543a46308145decdddd5ae9a63d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/monster/jellyfish 2.png" +dest_files=["res://.godot/imported/jellyfish 2.png-d36c6543a46308145decdddd5ae9a63d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/monster/penguing 2.png b/assets/monster/penguing 2.png new file mode 100644 index 0000000..2598f19 --- /dev/null +++ b/assets/monster/penguing 2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a328047682a27c1b548405a2adf82738093c9a842e0c76defd7970cd178a5ac +size 101016 diff --git a/assets/monster/penguing 2.png.import b/assets/monster/penguing 2.png.import new file mode 100644 index 0000000..8f8858f --- /dev/null +++ b/assets/monster/penguing 2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://deneyvmke3qyl" +path="res://.godot/imported/penguing 2.png-80094e4bcdb64d08cfd28547f5dd45c7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/monster/penguing 2.png" +dest_files=["res://.godot/imported/penguing 2.png-80094e4bcdb64d08cfd28547f5dd45c7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/monster/rabbit 1.png b/assets/monster/rabbit 1.png new file mode 100644 index 0000000..023327d --- /dev/null +++ b/assets/monster/rabbit 1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:415cbcdf4136ad6a07b63f5aa055f84443f8909876858667708e0229b4795b68 +size 93375 diff --git a/assets/monster/rabbit 1.png.import b/assets/monster/rabbit 1.png.import new file mode 100644 index 0000000..ac94ff9 --- /dev/null +++ b/assets/monster/rabbit 1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cu0ivvtvryq64" +path="res://.godot/imported/rabbit 1.png-53666927d04c30fffb92370a7482b673.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/monster/rabbit 1.png" +dest_files=["res://.godot/imported/rabbit 1.png-53666927d04c30fffb92370a7482b673.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/monster/whale 2.png b/assets/monster/whale 2.png new file mode 100644 index 0000000..cbf8df0 --- /dev/null +++ b/assets/monster/whale 2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a704a38238c3991e1f0f3e250a988430393aa4b506ff7c72122a516c6dc0b139 +size 67821 diff --git a/assets/monster/whale 2.png.import b/assets/monster/whale 2.png.import new file mode 100644 index 0000000..29f0c19 --- /dev/null +++ b/assets/monster/whale 2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dw8cnu3lfblig" +path="res://.godot/imported/whale 2.png-8dca9b32eca20cb2feb31734e55de3f6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/monster/whale 2.png" +dest_files=["res://.godot/imported/whale 2.png-8dca9b32eca20cb2feb31734e55de3f6.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/support/Invisibility.png b/assets/support/Invisibility.png new file mode 100644 index 0000000..1c77364 --- /dev/null +++ b/assets/support/Invisibility.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f65e230ede853aeba1650e8d569220585f3aa3a9d27f006e5a82ae300877b92b +size 135764 diff --git a/assets/support/Invisibility.png.import b/assets/support/Invisibility.png.import new file mode 100644 index 0000000..39e7e7a --- /dev/null +++ b/assets/support/Invisibility.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b8hkgi1r8wpri" +path="res://.godot/imported/Invisibility.png-b1f5b6e24b6db1d63402e75c2d90b9f4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/support/Invisibility.png" +dest_files=["res://.godot/imported/Invisibility.png-b1f5b6e24b6db1d63402e75c2d90b9f4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/support/absorb.png b/assets/support/absorb.png new file mode 100644 index 0000000..fc4ee91 --- /dev/null +++ b/assets/support/absorb.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22ec3e0529bc2fef18223f893b2960a87b9b9ce827871a9d1440c9ac2d30d462 +size 238847 diff --git a/assets/support/absorb.png.import b/assets/support/absorb.png.import new file mode 100644 index 0000000..9a60646 --- /dev/null +++ b/assets/support/absorb.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cv5hjphfixv3o" +path="res://.godot/imported/absorb.png-e8458d89a69818053d3209e7228c83cd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/support/absorb.png" +dest_files=["res://.godot/imported/absorb.png-e8458d89a69818053d3209e7228c83cd.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/support/all out attack.png b/assets/support/all out attack.png new file mode 100644 index 0000000..f6eeb9e --- /dev/null +++ b/assets/support/all out attack.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06c2538f1c5f8a0e101f4b00a729279baa211ebfdc99707880135a02360f776f +size 177931 diff --git a/assets/support/all out attack.png.import b/assets/support/all out attack.png.import new file mode 100644 index 0000000..3e0cb0c --- /dev/null +++ b/assets/support/all out attack.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bpmr8pa8cq3w0" +path="res://.godot/imported/all out attack.png-2872fd363fbff1bf0b089ac317139b0e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/support/all out attack.png" +dest_files=["res://.godot/imported/all out attack.png-2872fd363fbff1bf0b089ac317139b0e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/support/energy booster.png b/assets/support/energy booster.png new file mode 100644 index 0000000..9d8ff7f --- /dev/null +++ b/assets/support/energy booster.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae23af87934d3d3057e00f7bc7e1576a87416bbe7a499048add4d9acbe9bc5b8 +size 88074 diff --git a/assets/support/energy booster.png.import b/assets/support/energy booster.png.import new file mode 100644 index 0000000..786ca67 --- /dev/null +++ b/assets/support/energy booster.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cd1mxacc3gfcy" +path="res://.godot/imported/energy booster.png-f846d83c962a9e077788e0d0ed5252dd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/support/energy booster.png" +dest_files=["res://.godot/imported/energy booster.png-f846d83c962a9e077788e0d0ed5252dd.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/support/insurance.png b/assets/support/insurance.png new file mode 100644 index 0000000..e92bb13 --- /dev/null +++ b/assets/support/insurance.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0e2ff619969c6fff98cecbd63ec954010298e434a5079c06d81e0afa5fd4d5e +size 213996 diff --git a/assets/support/insurance.png.import b/assets/support/insurance.png.import new file mode 100644 index 0000000..88ac73a --- /dev/null +++ b/assets/support/insurance.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bwo6dfe1kpxhe" +path="res://.godot/imported/insurance.png-fa2ae7ef8a239dc0e4a4bd2c8f0b477b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/support/insurance.png" +dest_files=["res://.godot/imported/insurance.png-fa2ae7ef8a239dc0e4a4bd2c8f0b477b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/support/lifesteal.png b/assets/support/lifesteal.png new file mode 100644 index 0000000..74f4fb4 --- /dev/null +++ b/assets/support/lifesteal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa02a72c7208802bcf5882d4925add9707c281b0420ef823302674468b522ada +size 133540 diff --git a/assets/support/lifesteal.png.import b/assets/support/lifesteal.png.import new file mode 100644 index 0000000..ecf73eb --- /dev/null +++ b/assets/support/lifesteal.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bni2wr2vrg0fe" +path="res://.godot/imported/lifesteal.png-1fcf74a2a74d8a4381ce6310ccb999d8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/support/lifesteal.png" +dest_files=["res://.godot/imported/lifesteal.png-1fcf74a2a74d8a4381ce6310ccb999d8.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/support/potion.png b/assets/support/potion.png new file mode 100644 index 0000000..1072f04 --- /dev/null +++ b/assets/support/potion.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2c6b61399220a4d5ed8a702737654d1465b1c1e1d02cdc015702575002f6c5b +size 271057 diff --git a/assets/support/potion.png.import b/assets/support/potion.png.import new file mode 100644 index 0000000..b7657e2 --- /dev/null +++ b/assets/support/potion.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://48hblv72emyr" +path="res://.godot/imported/potion.png-1339ae9737d6625a795e518c852db261.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/support/potion.png" +dest_files=["res://.godot/imported/potion.png-1339ae9737d6625a795e518c852db261.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/support/reflection.png b/assets/support/reflection.png new file mode 100644 index 0000000..bc699d4 --- /dev/null +++ b/assets/support/reflection.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22ca0b3919d5eb76eac7e7437285d3bbc508be3f354a9a310fb1727c7c5fae69 +size 217825 diff --git a/assets/support/reflection.png.import b/assets/support/reflection.png.import new file mode 100644 index 0000000..bf38332 --- /dev/null +++ b/assets/support/reflection.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b3uq5b2x2oacn" +path="res://.godot/imported/reflection.png-2ae705bc1d7282dacca1272db53a447a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/support/reflection.png" +dest_files=["res://.godot/imported/reflection.png-2ae705bc1d7282dacca1272db53a447a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/support/sword mastery.png b/assets/support/sword mastery.png new file mode 100644 index 0000000..8c14dd4 --- /dev/null +++ b/assets/support/sword mastery.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee9f3905c0ba6be4b0d609157d8008435c393b5529dfae45290cc69ce65fae88 +size 102278 diff --git a/assets/support/sword mastery.png.import b/assets/support/sword mastery.png.import new file mode 100644 index 0000000..a420ef0 --- /dev/null +++ b/assets/support/sword mastery.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ha5p3vpqn5jv" +path="res://.godot/imported/sword mastery.png-67026928e9b242f46437e6cfb6d95bee.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/support/sword mastery.png" +dest_files=["res://.godot/imported/sword mastery.png-67026928e9b242f46437e6cfb6d95bee.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/support/tanker.png b/assets/support/tanker.png new file mode 100644 index 0000000..c9edcbb --- /dev/null +++ b/assets/support/tanker.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:487368fdb954eae97166906014ab24f92e100e4f34bf7498395ae5dd99ea8d54 +size 295201 diff --git a/assets/support/tanker.png.import b/assets/support/tanker.png.import new file mode 100644 index 0000000..361c8d1 --- /dev/null +++ b/assets/support/tanker.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://hiswkj2stt4l" +path="res://.godot/imported/tanker.png-de127e279370081587c7a5243fff4d1c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/support/tanker.png" +dest_files=["res://.godot/imported/tanker.png-de127e279370081587c7a5243fff4d1c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/cards/monster/axoluna.tres b/data/cards/monster/axoluna.tres index 1743622..a6f88da 100644 --- a/data/cards/monster/axoluna.tres +++ b/data/cards/monster/axoluna.tres @@ -1,6 +1,6 @@ -[gd_resource type="Resource" script_class="MonsterCard" load_steps=3 format=3 uid="uid://deo8mj887rfx1"] +[gd_resource type="Resource" script_class="MonsterCard" load_steps=3 format=3 uid="uid://di76avwc0gn8e"] -[ext_resource type="Texture2D" uid="uid://b8accn4e2ojau" path="res://assets/monster/froggo 1.png" id="1_dyw44"] +[ext_resource type="Texture2D" uid="uid://wdyu7txs2ijg" path="res://assets/monster/axolotl 3.png" id="1_j0l6n"] [ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_s0p53"] [resource] @@ -12,4 +12,4 @@ energy_cost = 1 base_health = 120 name = "Axoluna" description = "Cute wanderer of the tank, Axoluna" -icon = ExtResource("1_dyw44") +icon = ExtResource("1_j0l6n") diff --git a/data/cards/monster/bunnaut.tres b/data/cards/monster/bunnaut.tres index 6d478e3..a70008a 100644 --- a/data/cards/monster/bunnaut.tres +++ b/data/cards/monster/bunnaut.tres @@ -1,6 +1,7 @@ -[gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://tgju8eodyuk1"] +[gd_resource type="Resource" script_class="MonsterCard" load_steps=3 format=3 uid="uid://tgju8eodyuk1"] [ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_3jfyg"] +[ext_resource type="Texture2D" uid="uid://cu0ivvtvryq64" path="res://assets/monster/rabbit 1.png" id="1_xibsw"] [resource] script = ExtResource("1_3jfyg") @@ -11,3 +12,4 @@ energy_cost = 1 base_health = 50 name = "Bunnaut" description = "Run faster than tortoise." +icon = ExtResource("1_xibsw") diff --git a/data/cards/monster/capytain.tres b/data/cards/monster/capytain.tres index d11bf4d..712ab1e 100644 --- a/data/cards/monster/capytain.tres +++ b/data/cards/monster/capytain.tres @@ -1,5 +1,6 @@ -[gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://cs7q8i7bvohmj"] +[gd_resource type="Resource" script_class="MonsterCard" load_steps=3 format=3 uid="uid://cs7q8i7bvohmj"] +[ext_resource type="Texture2D" uid="uid://c72q2py2vj6j4" path="res://assets/monster/capybara 1.png" id="1_mulam"] [ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_n3oql"] [resource] @@ -11,3 +12,4 @@ energy_cost = 3 base_health = 170 name = "Capytain" description = "A big, hungry capybara" +icon = ExtResource("1_mulam") diff --git a/data/cards/monster/cattogato.tres b/data/cards/monster/cattogato.tres index 7fee1c0..7b4e72c 100644 --- a/data/cards/monster/cattogato.tres +++ b/data/cards/monster/cattogato.tres @@ -1,6 +1,7 @@ -[gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://bmst884k0myvd"] +[gd_resource type="Resource" script_class="MonsterCard" load_steps=3 format=3 uid="uid://bmst884k0myvd"] [ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_hblhq"] +[ext_resource type="Texture2D" uid="uid://bcusdaqfhlv1b" path="res://assets/monster/cat 3.png" id="1_xles7"] [resource] script = ExtResource("1_hblhq") @@ -11,3 +12,4 @@ energy_cost = 3 base_health = 80 name = "Cattogato" description = "Lovely cat wandering in the space." +icon = ExtResource("1_xles7") diff --git a/data/cards/monster/gilli.tres b/data/cards/monster/gilli.tres index 30da6af..fe574ca 100644 --- a/data/cards/monster/gilli.tres +++ b/data/cards/monster/gilli.tres @@ -1,6 +1,7 @@ -[gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://myxgsyerrdla"] +[gd_resource type="Resource" script_class="MonsterCard" load_steps=3 format=3 uid="uid://myxgsyerrdla"] [ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_1j36c"] +[ext_resource type="Texture2D" uid="uid://b0f5rg5eqyym1" path="res://assets/monster/Goldfish 2.png" id="1_62dnj"] [resource] script = ExtResource("1_1j36c") @@ -11,3 +12,4 @@ energy_cost = 1 base_health = 120 name = "Gilli" description = "There is a huge monster looking at me everyday." +icon = ExtResource("1_62dnj") diff --git a/data/cards/monster/jellova.tres b/data/cards/monster/jellova.tres index df0e747..ef9567f 100644 --- a/data/cards/monster/jellova.tres +++ b/data/cards/monster/jellova.tres @@ -1,5 +1,6 @@ -[gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://425ipxdapg8o"] +[gd_resource type="Resource" script_class="MonsterCard" load_steps=3 format=3 uid="uid://425ipxdapg8o"] +[ext_resource type="Texture2D" uid="uid://cstwubbj8l8fr" path="res://assets/monster/jellyfish 2.png" id="1_t6381"] [ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_yvmeg"] [resource] @@ -11,3 +12,4 @@ energy_cost = 2 base_health = 110 name = "Jellova" description = "I'm gonna whip you till' you .. nevermind." +icon = ExtResource("1_t6381") diff --git a/data/cards/monster/orcava.tres b/data/cards/monster/orcava.tres index b1c212e..b45cafd 100644 --- a/data/cards/monster/orcava.tres +++ b/data/cards/monster/orcava.tres @@ -1,5 +1,6 @@ -[gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://cakkx0o8mifmn"] +[gd_resource type="Resource" script_class="MonsterCard" load_steps=3 format=3 uid="uid://cakkx0o8mifmn"] +[ext_resource type="Texture2D" uid="uid://dw8cnu3lfblig" path="res://assets/monster/whale 2.png" id="1_4dsvt"] [ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_xcdwy"] [resource] @@ -11,3 +12,4 @@ energy_cost = 2 base_health = 200 name = "Orcava" description = "Human try to communicate with me. I simply block them." +icon = ExtResource("1_4dsvt") diff --git a/data/cards/monster/prankie.tres b/data/cards/monster/prankie.tres index 5cea32c..4d64b66 100644 --- a/data/cards/monster/prankie.tres +++ b/data/cards/monster/prankie.tres @@ -1,6 +1,7 @@ -[gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://shri5ne51s74"] +[gd_resource type="Resource" script_class="MonsterCard" load_steps=3 format=3 uid="uid://shri5ne51s74"] [ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_70s4q"] +[ext_resource type="Texture2D" uid="uid://deneyvmke3qyl" path="res://assets/monster/penguing 2.png" id="1_75ppb"] [resource] script = ExtResource("1_70s4q") @@ -11,3 +12,4 @@ energy_cost = 2 base_health = 100 name = "Prankie" description = "I'm not pranking anyone. Yet." +icon = ExtResource("1_75ppb") diff --git a/data/cards/monster/quackle.tres b/data/cards/monster/quackle.tres index f774842..0fe4658 100644 --- a/data/cards/monster/quackle.tres +++ b/data/cards/monster/quackle.tres @@ -1,5 +1,6 @@ -[gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://dnf3gpji5prlr"] +[gd_resource type="Resource" script_class="MonsterCard" load_steps=3 format=3 uid="uid://dnf3gpji5prlr"] +[ext_resource type="Texture2D" uid="uid://ujke0x73f77b" path="res://assets/monster/duck 1.png" id="1_4f7pv"] [ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_a8rjn"] [resource] @@ -11,3 +12,4 @@ energy_cost = 1 base_health = 70 name = "Quackle" description = "Quack! Quack! No one notice me." +icon = ExtResource("1_4f7pv") diff --git a/data/cards/support/absorb.tres b/data/cards/support/absorb.tres index ef6568c..72c5c4a 100644 --- a/data/cards/support/absorb.tres +++ b/data/cards/support/absorb.tres @@ -1,7 +1,8 @@ -[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=3 format=3 uid="uid://be01tdq1fxlct"] +[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=4 format=3 uid="uid://be01tdq1fxlct"] [ext_resource type="Script" path="res://tcg/card/support_card_effect_instance.gd" id="1_mhxdy"] [ext_resource type="Script" path="res://tcg/card/implemented_support_card.gd" id="2_f6hay"] +[ext_resource type="Texture2D" uid="uid://cv5hjphfixv3o" path="res://assets/support/absorb.png" id="2_i2lgf"] [resource] script = ExtResource("2_f6hay") @@ -10,3 +11,4 @@ type = "red" effects = Array[ExtResource("1_mhxdy")]([]) name = "Absorb" description = "Enemy damage converted to heal your Active Monster Field HP during this turn." +icon = ExtResource("2_i2lgf") diff --git a/data/cards/support/all_out_attack.tres b/data/cards/support/all_out_attack.tres index 35814a9..0269e6f 100644 --- a/data/cards/support/all_out_attack.tres +++ b/data/cards/support/all_out_attack.tres @@ -1,7 +1,8 @@ -[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=3 format=3 uid="uid://dgxcvdo6x6kst"] +[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=4 format=3 uid="uid://dgxcvdo6x6kst"] [ext_resource type="Script" path="res://tcg/card/support_card_effect_instance.gd" id="1_fd50n"] [ext_resource type="Script" path="res://tcg/card/implemented_support_card.gd" id="2_61mgn"] +[ext_resource type="Texture2D" uid="uid://bpmr8pa8cq3w0" path="res://assets/support/all out attack.png" id="2_a1iip"] [resource] script = ExtResource("2_61mgn") @@ -10,3 +11,4 @@ type = "green" effects = Array[ExtResource("1_fd50n")]([null]) name = "All-Out Attack" description = "Combine all Rock Paper Scissor during this turn, and got additional damage from the lowest Rock Paper Scissor you got." +icon = ExtResource("2_a1iip") diff --git a/data/cards/support/energy_booster.tres b/data/cards/support/energy_booster.tres index bf64881..7a16144 100644 --- a/data/cards/support/energy_booster.tres +++ b/data/cards/support/energy_booster.tres @@ -1,7 +1,8 @@ -[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=3 format=3 uid="uid://c0grh1y65e0f3"] +[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=4 format=3 uid="uid://c0grh1y65e0f3"] [ext_resource type="Script" path="res://tcg/card/support_card_effect_instance.gd" id="1_pkc1x"] [ext_resource type="Script" path="res://tcg/card/implemented_support_card.gd" id="2_iq88n"] +[ext_resource type="Texture2D" uid="uid://cd1mxacc3gfcy" path="res://assets/support/energy booster.png" id="2_lxctl"] [resource] script = ExtResource("2_iq88n") @@ -10,3 +11,4 @@ type = "green" effects = Array[ExtResource("1_pkc1x")]([null]) name = "Energy Booster" description = "Add 1 additional Energy." +icon = ExtResource("2_lxctl") diff --git a/data/cards/support/insurance.tres b/data/cards/support/insurance.tres index e63e98f..f9211a0 100644 --- a/data/cards/support/insurance.tres +++ b/data/cards/support/insurance.tres @@ -1,7 +1,8 @@ -[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=3 format=3 uid="uid://dfocg5yfh22e8"] +[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=4 format=3 uid="uid://dfocg5yfh22e8"] [ext_resource type="Script" path="res://tcg/card/support_card_effect_instance.gd" id="1_gtyqr"] [ext_resource type="Script" path="res://tcg/card/implemented_support_card.gd" id="2_3ixor"] +[ext_resource type="Texture2D" uid="uid://bwo6dfe1kpxhe" path="res://assets/support/insurance.png" id="2_f7jjv"] [resource] script = ExtResource("2_3ixor") @@ -10,3 +11,4 @@ type = "red" effects = Array[ExtResource("1_gtyqr")]([null]) name = "Insurance" description = "If your monster supposed to be dead in this turn, keep it alive at 10 HP." +icon = ExtResource("2_f7jjv") diff --git a/data/cards/support/invisibility.tres b/data/cards/support/invisibility.tres index 2b917fb..3fb4c4e 100644 --- a/data/cards/support/invisibility.tres +++ b/data/cards/support/invisibility.tres @@ -1,13 +1,14 @@ -[gd_resource type="Resource" script_class="SimpleSupportCard" load_steps=3 format=3 uid="uid://by4yg81uqti3u"] +[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=4 format=3 uid="uid://by4yg81uqti3u"] [ext_resource type="Script" path="res://tcg/card/support_card_effect_instance.gd" id="1_5tnpm"] [ext_resource type="Script" path="res://tcg/card/implemented_support_card.gd" id="2_6c2xo"] +[ext_resource type="Texture2D" uid="uid://b8hkgi1r8wpri" path="res://assets/support/Invisibility.png" id="2_6occh"] [resource] script = ExtResource("2_6c2xo") scope = "turn" -magnitude = 0 type = "green" effects = Array[ExtResource("1_5tnpm")]([null]) name = "Invisibility" description = "Ignore any damage to your monster in this turn." +icon = ExtResource("2_6occh") diff --git a/data/cards/support/lifesteal.tres b/data/cards/support/lifesteal.tres index 79a4497..2a0d994 100644 --- a/data/cards/support/lifesteal.tres +++ b/data/cards/support/lifesteal.tres @@ -1,6 +1,7 @@ -[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=3 format=3 uid="uid://bcrlaam8uq6xt"] +[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=4 format=3 uid="uid://bcrlaam8uq6xt"] [ext_resource type="Script" path="res://tcg/card/support_card_effect_instance.gd" id="1_b33y4"] +[ext_resource type="Texture2D" uid="uid://bni2wr2vrg0fe" path="res://assets/support/lifesteal.png" id="2_arrkb"] [ext_resource type="Script" path="res://tcg/card/implemented_support_card.gd" id="2_khaf1"] [resource] @@ -10,3 +11,4 @@ type = "green" effects = Array[ExtResource("1_b33y4")]([null]) name = "Lifesteal" description = "During this turn your attack also heals your HP." +icon = ExtResource("2_arrkb") diff --git a/data/cards/support/potion.tres b/data/cards/support/potion.tres index 926535b..36ea162 100644 --- a/data/cards/support/potion.tres +++ b/data/cards/support/potion.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=5 format=3 uid="uid://4eod3m0vc5a8"] +[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=6 format=3 uid="uid://4eod3m0vc5a8"] [ext_resource type="Script" path="res://tcg/card/support_card_effect_instance.gd" id="1_ujm0o"] [ext_resource type="Resource" uid="uid://cvu0rtt5nggf" path="res://data/support_effects/heal.tres" id="2_k1cnl"] [ext_resource type="Script" path="res://tcg/card/implemented_support_card.gd" id="3_at5nt"] +[ext_resource type="Texture2D" uid="uid://48hblv72emyr" path="res://assets/support/potion.png" id="3_hk8kx"] [sub_resource type="Resource" id="Resource_88lmk"] script = ExtResource("1_ujm0o") @@ -16,3 +17,4 @@ type = "green" effects = Array[ExtResource("1_ujm0o")]([SubResource("Resource_88lmk")]) name = "Potion" description = "Heal 30 HP" +icon = ExtResource("3_hk8kx") diff --git a/data/cards/support/reflection.tres b/data/cards/support/reflection.tres index b87a630..2e6e1eb 100644 --- a/data/cards/support/reflection.tres +++ b/data/cards/support/reflection.tres @@ -1,13 +1,14 @@ -[gd_resource type="Resource" script_class="SimpleSupportCard" load_steps=3 format=3 uid="uid://c1gsrru1wa6ao"] +[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=4 format=3 uid="uid://c1gsrru1wa6ao"] [ext_resource type="Script" path="res://tcg/card/support_card_effect_instance.gd" id="1_mk2or"] [ext_resource type="Script" path="res://tcg/card/implemented_support_card.gd" id="2_igbok"] +[ext_resource type="Texture2D" uid="uid://b3uq5b2x2oacn" path="res://assets/support/reflection.png" id="2_jrr8g"] [resource] script = ExtResource("2_igbok") scope = "turn" -magnitude = 0 type = "red" effects = Array[ExtResource("1_mk2or")]([null]) name = "Reflection" description = "Enemy got the same amount of damage as our monster in this turn." +icon = ExtResource("2_jrr8g") diff --git a/data/cards/support/sword_mastery.tres b/data/cards/support/sword_mastery.tres index fdb68c0..1eb0399 100644 --- a/data/cards/support/sword_mastery.tres +++ b/data/cards/support/sword_mastery.tres @@ -1,8 +1,9 @@ -[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=5 format=3 uid="uid://2xeb6keaoabo"] +[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=6 format=3 uid="uid://2xeb6keaoabo"] [ext_resource type="Script" path="res://tcg/card/support_card_effect_instance.gd" id="1_y6yvj"] [ext_resource type="Resource" uid="uid://bs4i85slalkgd" path="res://data/support_effects/sword_mastery.tres" id="2_omhdb"] [ext_resource type="Script" path="res://tcg/card/implemented_support_card.gd" id="3_37rh4"] +[ext_resource type="Texture2D" uid="uid://ha5p3vpqn5jv" path="res://assets/support/sword mastery.png" id="3_rrvpt"] [sub_resource type="Resource" id="Resource_wwv02"] script = ExtResource("1_y6yvj") @@ -16,3 +17,4 @@ type = "green" effects = Array[ExtResource("1_y6yvj")]([SubResource("Resource_wwv02")]) name = "Sword Mastery" description = "Permanently add 20 damage for all Rock Paper Scissor to 1 Active Monster." +icon = ExtResource("3_rrvpt") diff --git a/data/cards/support/tanker.tres b/data/cards/support/tanker.tres index 7a207b4..817bd89 100644 --- a/data/cards/support/tanker.tres +++ b/data/cards/support/tanker.tres @@ -1,13 +1,14 @@ -[gd_resource type="Resource" script_class="SimpleSupportCard" load_steps=3 format=3 uid="uid://dsmrqyxt8mdp5"] +[gd_resource type="Resource" script_class="ImplementedSupportCard" load_steps=4 format=3 uid="uid://dsmrqyxt8mdp5"] [ext_resource type="Script" path="res://tcg/card/support_card_effect_instance.gd" id="1_1fvcb"] [ext_resource type="Script" path="res://tcg/card/implemented_support_card.gd" id="2_d0adk"] +[ext_resource type="Texture2D" uid="uid://hiswkj2stt4l" path="res://assets/support/tanker.png" id="2_hqv06"] [resource] script = ExtResource("2_d0adk") scope = "turn" -magnitude = 0 type = "red" effects = Array[ExtResource("1_1fvcb")]([null]) name = "Tanker" description = "Add your HP with your selected (Rock Paper Scissor) during this turn, and reduce to max HP if current HP higher than max HP." +icon = ExtResource("2_hqv06") diff --git a/demo_game.tscn b/demo_game.tscn index 7f9d67d..22935eb 100644 --- a/demo_game.tscn +++ b/demo_game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=22 format=3 uid="uid://bgc0u117jqyr1"] +[gd_scene load_steps=23 format=3 uid="uid://bgc0u117jqyr1"] [ext_resource type="Script" path="res://demo_game.gd" id="1_jn16u"] [ext_resource type="Script" path="res://player_side.gd" id="2_w4tnt"] @@ -18,6 +18,7 @@ [ext_resource type="Resource" uid="uid://c0grh1y65e0f3" path="res://data/cards/support/energy_booster.tres" id="10_3rg8q"] [ext_resource type="Resource" uid="uid://2xeb6keaoabo" path="res://data/cards/support/sword_mastery.tres" id="11_seakd"] [ext_resource type="Resource" uid="uid://bmst884k0myvd" path="res://data/cards/monster/cattogato.tres" id="12_xqqfn"] +[ext_resource type="Texture2D" uid="uid://6trhu2r7h6g3" path="res://assets/card_base/illust bg 1.png" id="13_bdgfp"] [ext_resource type="Texture2D" uid="uid://b0pclmv0j0r12" path="res://assets/card_base/kertas.png" id="18_gwpy8"] [ext_resource type="Texture2D" uid="uid://ch04c20lkis6j" path="res://assets/card_base/gunting.png" id="19_clnw6"] [ext_resource type="Texture2D" uid="uid://bywa8qlwvcksd" path="res://assets/card_base/batu.png" id="20_672ya"] @@ -33,6 +34,13 @@ script = ExtResource("1_jn16u") player_1_deck = Array[ExtResource("2_xuft0")]([ExtResource("3_we1tk"), ExtResource("4_kkhfk"), ExtResource("5_3cm5x"), ExtResource("6_potm8"), ExtResource("7_nvv8k"), ExtResource("8_ewr4v"), ExtResource("9_ga5hf"), ExtResource("10_3rg8q"), ExtResource("11_seakd")]) player_2_deck = Array[ExtResource("2_xuft0")]([ExtResource("12_xqqfn"), ExtResource("4_kkhfk"), ExtResource("6_potm8"), ExtResource("7_nvv8k"), ExtResource("8_ewr4v"), ExtResource("9_ga5hf"), ExtResource("10_3rg8q"), ExtResource("11_seakd"), ExtResource("5_3cm5x")]) +[node name="TextureRect" type="TextureRect" parent="."] +layout_mode = 0 +offset_right = 1804.0 +offset_bottom = 1224.0 +scale = Vector2(1.1, 1.1) +texture = ExtResource("13_bdgfp") + [node name="Own" type="Control" parent="." node_paths=PackedStringArray("deck", "energy_label", "rps_button_container")] layout_mode = 1 anchor_top = 0.5 diff --git a/ui/card_template/support_card_green.tscn b/ui/card_template/support_card_green.tscn index a367d4b..39569c0 100644 --- a/ui/card_template/support_card_green.tscn +++ b/ui/card_template/support_card_green.tscn @@ -6,9 +6,9 @@ [ext_resource type="Texture2D" uid="uid://crgrple0uik7x" path="res://assets/card_base/Stroke.png" id="3_qajq3"] [ext_resource type="Texture2D" uid="uid://blejyda8mendg" path="res://assets/card_base/InnerFill.png" id="4_pgomu"] [ext_resource type="Texture2D" uid="uid://by7ws88pn4tvb" path="res://assets/card_base/Separator.png" id="5_501uu"] +[ext_resource type="Texture2D" uid="uid://bwo6dfe1kpxhe" path="res://assets/support/insurance.png" id="6_bpwac"] [ext_resource type="Texture2D" uid="uid://0gxplli5krq2" path="res://assets/card_base/Pill.png" id="6_ce7hm"] -[ext_resource type="Theme" path="res://cards.tres" id="7_va1d7"] -[ext_resource type="Texture2D" uid="uid://rh3aswb0p7ri" path="res://assets/energy.png" id="8_4yq42"] +[ext_resource type="Theme" uid="uid://is34t82g4jg" path="res://cards.tres" id="7_va1d7"] [ext_resource type="FontFile" uid="uid://08q3kkwmd4u6" path="res://assets/Inter-Regular.otf" id="10_c2ugn"] [node name="CardBase" type="Control" node_paths=PackedStringArray("card_name_label", "card_desc_label", "icon_rect")] @@ -77,6 +77,17 @@ grow_vertical = 2 texture = ExtResource("4_pgomu") expand_mode = 1 +[node name="Icon" type="TextureRect" parent="MarginContainer"] +layout_mode = 0 +offset_left = 2.0 +offset_top = 63.0 +offset_right = 209.0 +offset_bottom = 203.0 +pivot_offset = Vector2(304.286, 120.143) +texture = ExtResource("6_bpwac") +expand_mode = 1 +stretch_mode = 6 + [node name="InnerStroke" type="NinePatchRect" parent="MarginContainer"] layout_mode = 1 anchors_preset = 15 @@ -147,16 +158,6 @@ text = "Green card" horizontal_alignment = 1 vertical_alignment = 1 -[node name="Icon" type="TextureRect" parent="MarginContainer"] -layout_mode = 0 -offset_left = 26.0 -offset_top = 74.0 -offset_right = 169.0 -offset_bottom = 179.0 -texture = ExtResource("8_4yq42") -expand_mode = 1 -stretch_mode = 6 - [node name="DescriptionLabel" type="Label" parent="MarginContainer"] layout_mode = 0 offset_left = 11.0 From 728d848e5bda90f1b7d1ff38fb12362de35cb804 Mon Sep 17 00:00:00 2001 From: istamarahsan Date: Sun, 26 Jan 2025 11:32:17 +0700 Subject: [PATCH 4/6] feat: damage incoming -> HP +- --- demo_game.tscn | 22 ++++++++++------------ player_side.gd | 2 +- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/demo_game.tscn b/demo_game.tscn index 65b3c81..3269b11 100644 --- a/demo_game.tscn +++ b/demo_game.tscn @@ -146,13 +146,12 @@ layout_mode = 1 anchors_preset = 5 anchor_left = 0.5 anchor_right = 0.5 -offset_left = -83.5 -offset_top = 300.0 -offset_right = 83.5 -offset_bottom = 323.0 +offset_left = 84.0 +offset_top = 24.0 +offset_right = 251.0 +offset_bottom = 47.0 grow_horizontal = 2 -text = "Incoming Damage: 0" -horizontal_alignment = 1 +text = "HP: +0" [node name="HBoxContainer" type="HBoxContainer" parent="Own"] visible = false @@ -268,14 +267,13 @@ anchor_left = 0.5 anchor_top = 1.0 anchor_right = 0.5 anchor_bottom = 1.0 -offset_left = -83.5 -offset_top = -325.0 -offset_right = 83.5 -offset_bottom = -302.0 +offset_left = 84.0 +offset_top = -52.0 +offset_right = 251.0 +offset_bottom = -29.0 grow_horizontal = 2 grow_vertical = 0 -text = "Incoming Damage: 0" -horizontal_alignment = 1 +text = "HP: +0" [node name="StartGameButton" type="Button" parent="."] layout_mode = 1 diff --git a/player_side.gd b/player_side.gd index 1075011..169c355 100644 --- a/player_side.gd +++ b/player_side.gd @@ -80,7 +80,7 @@ func _on_update(transition): if monster: monster_card_ui.visible = true monster_card_ui.show_monster(monster) - incoming_damage_label.text = "Incoming Damage: " + str(monster.health_delta) + incoming_damage_label.text = "HP " + ("+0" if monster.health_delta == 0 else str(monster.health_delta)) else: monster_card_ui.visible = false From 72a14189149fdcba3b7a0f8f3ac20465d9e5d8c7 Mon Sep 17 00:00:00 2001 From: istamarahsan Date: Sun, 26 Jan 2025 11:36:53 +0700 Subject: [PATCH 5/6] fix: all out attack scope fix: HP placeholder --- data/cards/support/all_out_attack.tres | 2 +- demo_game.tscn | 6 +++--- player_side.gd | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/data/cards/support/all_out_attack.tres b/data/cards/support/all_out_attack.tres index 0269e6f..660a217 100644 --- a/data/cards/support/all_out_attack.tres +++ b/data/cards/support/all_out_attack.tres @@ -6,7 +6,7 @@ [resource] script = ExtResource("2_61mgn") -scope = "instant" +scope = "turn" type = "green" effects = Array[ExtResource("1_fd50n")]([null]) name = "All-Out Attack" diff --git a/demo_game.tscn b/demo_game.tscn index ee48333..b4261af 100644 --- a/demo_game.tscn +++ b/demo_game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=23 format=3 uid="uid://bgc0u117jqyr1"] +[gd_scene load_steps=24 format=3 uid="uid://bgc0u117jqyr1"] [ext_resource type="Script" path="res://demo_game.gd" id="1_jn16u"] [ext_resource type="Script" path="res://player_side.gd" id="2_w4tnt"] @@ -159,7 +159,7 @@ offset_top = 24.0 offset_right = 251.0 offset_bottom = 47.0 grow_horizontal = 2 -text = "HP: +0" +text = "HP +0" [node name="HBoxContainer" type="HBoxContainer" parent="Own"] visible = false @@ -281,7 +281,7 @@ offset_right = 251.0 offset_bottom = -29.0 grow_horizontal = 2 grow_vertical = 0 -text = "HP: +0" +text = "HP +0" [node name="StartGameButton" type="Button" parent="."] layout_mode = 1 diff --git a/player_side.gd b/player_side.gd index 169c355..291f1a7 100644 --- a/player_side.gd +++ b/player_side.gd @@ -42,12 +42,14 @@ func _ready(): support1_green.visible = false support2_green.visible = false support2_red.visible = false + incoming_damage_label.visible = false for child in deck.get_children(): child.queue_free() func _on_update(transition): hovering_cards_duration.clear() selected_card = null + incoming_damage_label.visible = true for child in deck.get_children(): child.queue_free() From 83df3047f7d46f9443395ad428202c9f220f36ee Mon Sep 17 00:00:00 2001 From: Kenshia <73539778+Kenshia@users.noreply.github.com> Date: Sun, 26 Jan 2025 11:49:25 +0700 Subject: [PATCH 6/6] feat: card zoom --- player_side.gd | 23 +++++++++++++++++++++-- ui/card_template/card_base.gd | 14 ++++++-------- ui/card_template/monster_card.gd | 14 ++++++-------- 3 files changed, 33 insertions(+), 18 deletions(-) diff --git a/player_side.gd b/player_side.gd index 1075011..ad2df07 100644 --- a/player_side.gd +++ b/player_side.gd @@ -22,6 +22,7 @@ var match_manager: MatchManager var show_buttons: bool var signal_connected: bool var selected_card: Control +var focused_card: Control var hovering_cards_this_frame: Array[Control] = [] var hovering_cards_duration: Dictionary = {} @@ -128,6 +129,8 @@ func _on_update(transition): _pop_this_card(monster_card) play_card.emit(card)) monster_card.hovering.connect(func (delta): _do_hover(monster_card, delta)) + monster_card.right_clicked.connect(func(): _do_zoom(monster_card)) + monster_card.un_right_clicked.connect(_do_unzoom) deck.add_child(monster_card) elif card is SupportCard and card.type == "red": @@ -144,13 +147,29 @@ func _on_update(transition): _pop_this_card(btn) play_card.emit(card)) btn.hovering.connect(func (delta): _do_hover(btn, delta)) + btn.right_clicked.connect(func(): _do_zoom(btn)) + btn.un_right_clicked.connect(_do_unzoom) if rps_button_container: rps_button_container.visible = match_manager.phase == Match.Phase.RPS for button: TextureButton in rps_button_container.get_children(): button.modulate = rps_grayed_color - - + +func _do_zoom(card: Control): + if focused_card: + _do_unzoom() + + var new_card: Control = card.duplicate() + get_parent().add_child(new_card) + new_card.set_anchors_and_offsets_preset(Control.PRESET_CENTER) + new_card.scale = Vector2(2,2) + focused_card = new_card + +func _do_unzoom(): + if focused_card: + focused_card.queue_free() + focused_card = null + func _pop_this_card(control: Control): if selected_card: selected_card.position = Vector2(selected_card.position.x, original_hover_position) diff --git a/ui/card_template/card_base.gd b/ui/card_template/card_base.gd index 96bc2d1..2e623c6 100644 --- a/ui/card_template/card_base.gd +++ b/ui/card_template/card_base.gd @@ -3,6 +3,7 @@ class_name CardBase signal left_clicked signal right_clicked +signal un_right_clicked signal hovering(delta: float) @export var card_name_label: Label @@ -25,20 +26,17 @@ func _update(card: SupportCard): func _process(delta): var mouse_position = get_global_mouse_position() var rect = get_global_rect() - if rect.has_point(mouse_position): + if rect.has_point(mouse_position) and get_window().has_focus(): hovering.emit(delta) func _input(event): if event is InputEventMouseButton: - if !event.is_pressed(): - return - var mouse_position = get_global_mouse_position() var rect = get_global_rect() - if not rect.has_point(mouse_position): - return - if event.button_index == MOUSE_BUTTON_LEFT: + if rect.has_point(mouse_position) and event.button_index == MOUSE_BUTTON_LEFT and event.is_pressed() and get_window().has_focus(): left_clicked.emit() - elif event.button_index == MOUSE_BUTTON_RIGHT: + elif rect.has_point(mouse_position) and event.button_index == MOUSE_BUTTON_RIGHT and event.is_pressed() and get_window().has_focus(): right_clicked.emit() + elif event.button_index == MOUSE_BUTTON_RIGHT and !event.is_pressed(): + un_right_clicked.emit() diff --git a/ui/card_template/monster_card.gd b/ui/card_template/monster_card.gd index 8c1ca87..1c154f6 100644 --- a/ui/card_template/monster_card.gd +++ b/ui/card_template/monster_card.gd @@ -3,6 +3,7 @@ class_name MonsterCardUI signal left_clicked signal right_clicked +signal un_right_clicked signal hovering(delta: float) @export var name_label : Label @@ -37,20 +38,17 @@ func show_monster(monster: MatchMonster): func _process(delta): var mouse_position = get_global_mouse_position() var rect = get_global_rect() - if rect.has_point(mouse_position): + if rect.has_point(mouse_position) and get_window().has_focus(): hovering.emit(delta) func _input(event): if event is InputEventMouseButton: - if !event.is_pressed(): - return - var mouse_position = get_global_mouse_position() var rect = get_global_rect() - if not rect.has_point(mouse_position): - return - if event.button_index == MOUSE_BUTTON_LEFT: + if rect.has_point(mouse_position) and event.button_index == MOUSE_BUTTON_LEFT and event.is_pressed() and get_window().has_focus(): left_clicked.emit() - elif event.button_index == MOUSE_BUTTON_RIGHT: + elif rect.has_point(mouse_position) and event.button_index == MOUSE_BUTTON_RIGHT and event.is_pressed() and get_window().has_focus(): right_clicked.emit() + elif event.button_index == MOUSE_BUTTON_RIGHT and !event.is_pressed(): + un_right_clicked.emit()