Skip to content

Commit bb2d1a3

Browse files
committed
Update
1 parent aaa3d23 commit bb2d1a3

File tree

13 files changed

+340
-3
lines changed

13 files changed

+340
-3
lines changed
78.6 KB
Binary file not shown.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[remap]
2+
3+
importer="font_data_dynamic"
4+
type="FontFile"
5+
uid="uid://ba4p1cf0easms"
6+
path="res://.godot/imported/Pixelout Personal Use Only.ttf-7f5bf12a0fe7219815f5b979810cc8f1.fontdata"
7+
8+
[deps]
9+
10+
source_file="res://ArtWork/Resources/Pixelout Personal Use Only.ttf"
11+
dest_files=["res://.godot/imported/Pixelout Personal Use Only.ttf-7f5bf12a0fe7219815f5b979810cc8f1.fontdata"]
12+
13+
[params]
14+
15+
Rendering=null
16+
antialiasing=1
17+
generate_mipmaps=false
18+
disable_embedded_bitmaps=true
19+
multichannel_signed_distance_field=false
20+
msdf_pixel_range=8
21+
msdf_size=48
22+
allow_system_fallback=true
23+
force_autohinter=false
24+
hinting=1
25+
subpixel_positioning=4
26+
keep_rounding_remainders=true
27+
oversampling=0.0
28+
Fallbacks=null
29+
fallbacks=[]
30+
Compress=null
31+
compress=true
32+
preload=[]
33+
language_support={}
34+
script_support={}
35+
opentype_features={}
565 Bytes
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://d33yyj7aolgj8"
6+
path="res://.godot/imported/Dice.png-deb52b274b09970734795e2446c2850a.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://ArtWork/Sprites/DuelExpansion/Dice.png"
14+
dest_files=["res://.godot/imported/Dice.png-deb52b274b09970734795e2446c2850a.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1
1.9 KB
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://c80k20l4ohcs3"
6+
path="res://.godot/imported/POKER.png-d35c773b205b989962c10f7eaa561cb1.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://ArtWork/Sprites/DuelExpansion/POKER.png"
14+
dest_files=["res://.godot/imported/POKER.png-d35c773b205b989962c10f7eaa561cb1.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1
173 Bytes
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://be2rk0vltq5im"
6+
path="res://.godot/imported/Boardgames_Dice_Cube_D6_Six_Pips_Dots.png-284c328a515ea73ee579627fdc19bc5f.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://ArtWork/Sprites/Extra/Boardgames_Dice_Cube_D6_Six_Pips_Dots.png"
14+
dest_files=["res://.godot/imported/Boardgames_Dice_Cube_D6_Six_Pips_Dots.png-284c328a515ea73ee579627fdc19bc5f.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1

herolab/Scenes/base.tscn

Lines changed: 141 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[gd_scene load_steps=80 format=3 uid="uid://3c47n7hfvkwm"]
1+
[gd_scene load_steps=86 format=3 uid="uid://3c47n7hfvkwm"]
22

33
[ext_resource type="Texture2D" uid="uid://fiwie3ekqjry" path="res://ArtWork/Sprites/UI - Back/empty_sheet4.png" id="1_1w1q6"]
44
[ext_resource type="Script" uid="uid://bavdhlrlrmc76" path="res://Scripts/GameManager/base.gd" id="1_h12cx"]
@@ -69,6 +69,9 @@
6969
[ext_resource type="PackedScene" uid="uid://dqlbmrdgyji17" path="res://Scenes/general_placer.tscn" id="53_b8lel"]
7070
[ext_resource type="PackedScene" uid="uid://dhred64qg45qk" path="res://Scenes/health_bar.tscn" id="55_imp4g"]
7171
[ext_resource type="Texture2D" uid="uid://cplm304r422li" path="res://ArtWork/Sprites/Extra/IconeLoja.png" id="57_d2mfo"]
72+
[ext_resource type="Script" uid="uid://stnt052epo2t" path="res://Scenes/dicey.gd" id="57_pyb3t"]
73+
[ext_resource type="Texture2D" uid="uid://d33yyj7aolgj8" path="res://ArtWork/Sprites/DuelExpansion/Dice.png" id="57_tyi7v"]
74+
[ext_resource type="Texture2D" uid="uid://c80k20l4ohcs3" path="res://ArtWork/Sprites/DuelExpansion/POKER.png" id="58_ubd63"]
7275
[ext_resource type="Texture2D" uid="uid://bewo0qana2msv" path="res://ArtWork/Sprites/Extra/Arrows_Pointer_Down_South.png" id="67_wlh3x"]
7376
[ext_resource type="Texture2D" uid="uid://cvqt6wb4v3pfl" path="res://ArtWork/Sprites/DuelExpansion/IconePokeBatalha.png" id="68_3c8jg"]
7477

@@ -113,6 +116,14 @@ _data = {
113116
&"idle": SubResource("Animation_mk4b3")
114117
}
115118

119+
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qax5u"]
120+
bg_color = Color(0.0196078, 0.0196078, 0.0196078, 0.788235)
121+
122+
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pyb3t"]
123+
bg_color = Color(0.6, 0.6, 0.6, 0)
124+
border_color = Color(1, 1, 1, 1)
125+
expand_margin_top = 6.0
126+
116127
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mk4b3"]
117128
bg_color = Color(0.0470588, 0.0470588, 0.0470588, 0.827451)
118129

@@ -135,6 +146,16 @@ border_width_right = 2
135146
border_width_bottom = 2
136147
border_color = Color(1, 1, 1, 1)
137148

149+
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ubd63"]
150+
content_margin_left = 5.0
151+
content_margin_top = 3.0
152+
bg_color = Color(0, 0, 0, 1)
153+
border_width_left = 2
154+
border_width_top = 2
155+
border_width_right = 2
156+
border_width_bottom = 2
157+
border_color = Color(1, 1, 1, 1)
158+
138159
[node name="Base" type="Control"]
139160
layout_mode = 3
140161
anchors_preset = 15
@@ -923,6 +944,109 @@ offset_right = -275.0
923944
offset_bottom = -234.0
924945
scale = Vector2(5.3, 5.3)
925946

947+
[node name="Dicey" type="Control" parent="."]
948+
anchors_preset = 0
949+
offset_right = 453.0
950+
offset_bottom = 770.0
951+
script = ExtResource("57_pyb3t")
952+
red = Color(0.734944, 0, 0.147582, 1)
953+
954+
[node name="Panel" type="Panel" parent="Dicey"]
955+
layout_mode = 1
956+
anchors_preset = 15
957+
anchor_right = 1.0
958+
anchor_bottom = 1.0
959+
offset_left = 3.0
960+
offset_top = 3.0
961+
offset_right = -3.0
962+
offset_bottom = -3.0
963+
grow_horizontal = 2
964+
grow_vertical = 2
965+
theme_override_styles/panel = SubResource("StyleBoxFlat_qax5u")
966+
967+
[node name="Fundo" type="TextureRect" parent="Dicey/Panel"]
968+
layout_mode = 1
969+
anchors_preset = 15
970+
anchor_right = 1.0
971+
anchor_bottom = 1.0
972+
grow_horizontal = 2
973+
grow_vertical = 2
974+
texture = ExtResource("58_ubd63")
975+
976+
[node name="LineEdit" type="LineEdit" parent="Dicey/Panel"]
977+
layout_mode = 1
978+
anchors_preset = 8
979+
anchor_left = 0.5
980+
anchor_top = 0.5
981+
anchor_right = 0.5
982+
anchor_bottom = 0.5
983+
offset_left = -169.5
984+
offset_top = 211.0
985+
offset_right = 6.5
986+
offset_bottom = 281.0
987+
grow_horizontal = 2
988+
grow_vertical = 2
989+
scale = Vector2(0.834584, 0.834584)
990+
theme = ExtResource("4_48and")
991+
theme_override_colors/font_color = Color(1, 1, 1, 1)
992+
theme_override_font_sizes/font_size = 64
993+
text = "15"
994+
placeholder_text = "100"
995+
alignment = 1
996+
max_length = 3
997+
998+
[node name="RichTextLabel" type="RichTextLabel" parent="Dicey/Panel"]
999+
layout_mode = 1
1000+
anchors_preset = 8
1001+
anchor_left = 0.5
1002+
anchor_top = 0.5
1003+
anchor_right = 0.5
1004+
anchor_bottom = 0.5
1005+
offset_left = -41.5
1006+
offset_top = 201.0
1007+
offset_right = 125.5
1008+
offset_bottom = 241.0
1009+
grow_horizontal = 2
1010+
grow_vertical = 2
1011+
mouse_filter = 2
1012+
theme = ExtResource("4_48and")
1013+
theme_override_font_sizes/normal_font_size = 16
1014+
text = "Insira a Percentagem"
1015+
horizontal_alignment = 1
1016+
1017+
[node name="RichTextLabel2" type="RichTextLabel" parent="Dicey/Panel"]
1018+
layout_mode = 1
1019+
anchors_preset = 8
1020+
anchor_left = 0.5
1021+
anchor_top = 0.5
1022+
anchor_right = 0.5
1023+
anchor_bottom = 0.5
1024+
offset_left = -148.5
1025+
offset_top = 14.0
1026+
offset_right = -35.5
1027+
offset_bottom = 46.0
1028+
grow_horizontal = 2
1029+
grow_vertical = 2
1030+
scale = Vector2(2.61708, 2.61708)
1031+
theme_override_colors/default_color = Color(1, 1, 1, 1)
1032+
theme_override_fonts/normal_font = ExtResource("5_8nfiu")
1033+
theme_override_font_sizes/normal_font_size = 32
1034+
text = "HIT"
1035+
fit_content = true
1036+
horizontal_alignment = 1
1037+
1038+
[node name="ButtonSearch" type="Button" parent="Dicey/Panel"]
1039+
layout_mode = 0
1040+
offset_left = 165.0
1041+
offset_top = 620.0
1042+
offset_right = 345.0
1043+
offset_bottom = 682.0
1044+
theme = ExtResource("4_48and")
1045+
theme_override_styles/normal = SubResource("StyleBoxFlat_pyb3t")
1046+
1047+
[node name="Timer" type="Timer" parent="Dicey"]
1048+
wait_time = 0.4
1049+
9261050
[node name="SettingsPanel" type="Control" parent="."]
9271051
visible = false
9281052
anchors_preset = 0
@@ -1094,7 +1218,7 @@ layout_mode = 0
10941218
offset_left = 785.0
10951219
offset_top = 7.0
10961220
offset_right = 847.0
1097-
offset_bottom = 191.0
1221+
offset_bottom = 250.0
10981222
theme_override_styles/panel = SubResource("StyleBoxFlat_imp4g")
10991223

11001224
[node name="ShopButton" type="Button" parent="SelectMenuPanel"]
@@ -1121,6 +1245,18 @@ icon = ExtResource("68_3c8jg")
11211245
icon_alignment = 1
11221246
expand_icon = true
11231247

1248+
[node name="DiceyButton" type="Button" parent="SelectMenuPanel"]
1249+
layout_mode = 0
1250+
offset_left = 3.0
1251+
offset_top = 183.0
1252+
offset_right = 59.0
1253+
offset_bottom = 240.0
1254+
theme = ExtResource("4_48and")
1255+
theme_override_styles/normal = SubResource("StyleBoxFlat_ubd63")
1256+
icon = ExtResource("57_tyi7v")
1257+
icon_alignment = 1
1258+
expand_icon = true
1259+
11241260
[node name="SelectModeButton" type="Button" parent="."]
11251261
layout_mode = 0
11261262
offset_left = 788.0
@@ -1156,6 +1292,8 @@ pitch_scale = 2.28
11561292
[connection signal="button_down" from="StatsPanel/Arrow" to="." method="_on_arrow_button_down"]
11571293
[connection signal="text_changed" from="Inventory/Money/MoneyInput" to="." method="_on_money_input_text_changed"]
11581294
[connection signal="button_down" from="Shop/Reload" to="Shop" method="_on_reload_button_down"]
1295+
[connection signal="button_down" from="Dicey/Panel/ButtonSearch" to="Dicey" method="_on_button_search_button_down"]
1296+
[connection signal="timeout" from="Dicey/Timer" to="Dicey" method="_on_timer_timeout"]
11591297
[connection signal="button_down" from="SettingsPanel/Panel/Audio" to="SettingsPanel" method="_on_audio_button_down"]
11601298
[connection signal="button_down" from="SettingsPanel/Panel/ClearEnemyCheck" to="SettingsPanel" method="_on_clear_enemy_check_button_down"]
11611299
[connection signal="button_down" from="SettingsPanel/Panel/ClearEnemyCheck2" to="SettingsPanel" method="_on_clear_enemy_check_2_button_down"]
@@ -1169,6 +1307,7 @@ pitch_scale = 2.28
11691307
[connection signal="button_down" from="TopPanel/Settings" to="SettingsPanel" method="_on_settings_button_down"]
11701308
[connection signal="button_down" from="SelectMenuPanel/ShopButton" to="Shop" method="_on_shop_button_button_down"]
11711309
[connection signal="button_down" from="SelectMenuPanel/DuelButton" to="SettingsPanel" method="_on_duel_button_button_down"]
1310+
[connection signal="button_down" from="SelectMenuPanel/DiceyButton" to="SettingsPanel" method="_on_dicey_button_button_down"]
11721311
[connection signal="button_down" from="SelectModeButton" to="SettingsPanel" method="_on_select_mode_button_button_down"]
11731312
[connection signal="dir_selected" from="LoadDialog" to="TopPanel/load" method="_on_load_dialog_dir_selected"]
11741313
[connection signal="file_selected" from="LoadDialog" to="TopPanel/load" method="_on_load_dialog_file_selected"]

herolab/Scenes/dicey.gd

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
extends Control
2+
3+
4+
5+
@export var green = Color(0.0, 0.587, 0.0)
6+
@export var red = Color(0.735, 0.0, 0.148)
7+
@export var white = Color(1.0, 1.0, 1.0)
8+
9+
@onready var hit_text = $Panel/RichTextLabel2
10+
@onready var timer = $Timer
11+
12+
var hit = false
13+
14+
func _ready() -> void:
15+
16+
hit_text.visible = false
17+
18+
func _on_button_search_button_down() -> void:
19+
var chance = int($Panel/LineEdit.text) #80
20+
21+
var resultado := randf() * 100
22+
23+
24+
print(resultado)
25+
26+
if resultado < chance:
27+
hit = true
28+
timer.start()
29+
else:
30+
hit = false
31+
timer.start()
32+
33+
34+
func _on_timer_timeout() -> void:
35+
hit_text.visible = true
36+
timer.stop()
37+
38+
if hit:
39+
hit_text.text = "HIT"
40+
hit_text.add_theme_color_override("default_color", green)
41+
else:
42+
hit_text.text = "MISS"
43+
hit_text.add_theme_color_override("default_color", red)

0 commit comments

Comments
 (0)