It's Cow Game! Version 2.04!

This commit is contained in:
PajamaBee 2024-09-19 23:06:51 -05:00
commit a9e1ed9ddd
3148 changed files with 95332 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 918 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c3cg3cj6squn1"
path="res://.godot/imported/SandCastleSprite.png-287405f6640cd67bc8cf97c6d0767957.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Objects/SkillSpecific/Building/SandcastleBuilding/SandCastleSprite.png"
dest_files=["res://.godot/imported/SandCastleSprite.png-287405f6640cd67bc8cf97c6d0767957.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 918 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://uq5dcqmnqaql"
path="res://.godot/imported/SandCastleSprite1.png-54691a4cc9c89d3b1504496309ce36a5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Objects/SkillSpecific/Building/SandcastleBuilding/SandCastleSprite1.png"
dest_files=["res://.godot/imported/SandCastleSprite1.png-54691a4cc9c89d3b1504496309ce36a5.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bxtx623v3t51f"
path="res://.godot/imported/SandCastleSprite2.png-c7eefb999ed1fd307b6b1b8305ffec1b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Objects/SkillSpecific/Building/SandcastleBuilding/SandCastleSprite2.png"
dest_files=["res://.godot/imported/SandCastleSprite2.png-c7eefb999ed1fd307b6b1b8305ffec1b.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dtdjvhf5igqb0"
path="res://.godot/imported/SandCastleSprite3.png-745a2a20dfce4f8c57bae7152d11b47a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Objects/SkillSpecific/Building/SandcastleBuilding/SandCastleSprite3.png"
dest_files=["res://.godot/imported/SandCastleSprite3.png-745a2a20dfce4f8c57bae7152d11b47a.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cn27yxm81u1i6"
path="res://.godot/imported/SandCastleSprite4.png-dff1bc366c7a00306e80bcd5a12631d0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Objects/SkillSpecific/Building/SandcastleBuilding/SandCastleSprite4.png"
dest_files=["res://.godot/imported/SandCastleSprite4.png-dff1bc366c7a00306e80bcd5a12631d0.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dti4tf7wh63g6"
path="res://.godot/imported/SandCastleSprite5.png-a530521ff1fd212c1f3b3f4d8a584c6f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Objects/SkillSpecific/Building/SandcastleBuilding/SandCastleSprite5.png"
dest_files=["res://.godot/imported/SandCastleSprite5.png-a530521ff1fd212c1f3b3f4d8a584c6f.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://coscvhegqejkr"
path="res://.godot/imported/SandCastleSprite6.png-2ed72fac70324553c48041b8d2bee3d8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Objects/SkillSpecific/Building/SandcastleBuilding/SandCastleSprite6.png"
dest_files=["res://.godot/imported/SandCastleSprite6.png-2ed72fac70324553c48041b8d2bee3d8.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

View file

@ -0,0 +1,118 @@
extends "res://Objects/SkillSpecific/Building/BuildingZone.gd"
func _ready():
super._ready()
func _process(delta):
super._process(delta)
if complete:
take_damage(3 * delta)
$SelectionRegionIndicator.visible = false
var castleDeterioration = (1 - float(float(health)/float(maxHealth)))
var stepSize = float(1)/float(6)
var castleFrame = floori(castleDeterioration/stepSize)
if castleFrame > 5:
castleFrame = 5
$MainSprite.frame = castleFrame
else:
$SelectionRegionIndicator.visible = true
func experiencing_destruction(item):
LevelManager.get_skill("appreciating").experience_item(item, "washed away")
func drop_items(item):
pass
func get_stages_for_item(item:Item):
if item == null:
return 0
var stages = 0
if item.get_weight() <= 0:
stages = 4
elif item.get_weight() <= 0.2:
stages = 40
else:
stages = ceili(float(8)/float(item.get_weight()))
if item.get_name(false) == "Worm on a String" or item.get_name(false) == "Basket on a String":
stages = 8
return stages
func take_damage(damage, fireDamage = false):
health -= damage
if health <= 0:
experiencing_destruction(buildingMaterial)
unbuilt()
func get_stage_xp():
var difficulty = abs(buildingMaterial.get_hardness() - 30)
var xpReward = 1
xpReward += difficulty * 0.1
xpReward = floori(xpReward)
return xpReward
func get_completion_xp():
var difficulty = abs(buildingMaterial.get_hardness() - 30)
var xpReward = 48
xpReward += get_stages_for_item(buildingMaterial) * 3
xpReward += difficulty * 4
xpReward = floori(xpReward)
return xpReward
func get_success_chance(item:Item):
var chance = 100
var playerLevel = LevelManager.get_skill("building").currentLevel
var difficulty = abs(item.get_hardness() - 30)
var difficultyDif = difficulty - playerLevel - 10
if difficultyDif <= 0:
difficultyDif = 0
var difficultySteps = floori(difficultyDif/5)
chance -= difficultySteps * 5
chance -= difficultyDif * 2
if difficultyDif > 5:
chance -= 15
if difficultyDif > 10:
chance -= 10
if chance <= 1:
chance = 1
elif chance > 100:
chance = 100
return chance
func fully_built(loadedState = false):
if !loadedState:
LevelManager.get_skill("appreciating").experience_item(buildingMaterial, "castled")
maxHealth = get_max_health()
health = maxHealth
complete = true
if buildingMaterial.get_name(false) == "Worm on a String" or buildingMaterial.get_name(false) == "Basket on a String":
$MainSprite.self_modulate = Color.WHITE
$MainSprite.play("worm")
$MainSprite.visible = true
else:
$MainSprite.play("default")
$MainSprite.visible = true
set_visible_bridge_material(buildingMaterial)
if buildingMaterial.get_name(false) == "Dirt":
AchievementManager.complete_achievement("Hurt")
func set_visible_bridge_material(materialItem:Item):
var itemSprite = materialItem.get_sprite()
var unmodifiedSprite = materialItem.get_sprite(false)
var averageColor = SpriteGeneration.get_average_color(unmodifiedSprite.get_image())
$MainSprite.self_modulate = averageColor

View file

@ -0,0 +1,180 @@
[gd_scene load_steps=20 format=3 uid="uid://dkp3008p0m1ni"]
[ext_resource type="Script" path="res://Objects/SkillSpecific/Building/SandcastleBuilding/Sandcastle.gd" id="1_sh1by"]
[ext_resource type="Texture2D" uid="uid://c3cg3cj6squn1" path="res://Objects/SkillSpecific/Building/SandcastleBuilding/SandCastleSprite.png" id="3_4suqa"]
[ext_resource type="Texture2D" uid="uid://bbmlkil40xcbc" path="res://MiscArt/WhiteCircle.png" id="3_ev3yg"]
[ext_resource type="Texture2D" uid="uid://cjqngnhrbng5m" path="res://Objects/SkillSpecific/Building/SandcastleBuilding/WormCastleSprite.png" id="4_f1juh"]
[ext_resource type="PackedScene" uid="uid://bqibe7ha6r5ls" path="res://Interactions/Interactable/interactable.tscn" id="4_rkakq"]
[ext_resource type="Texture2D" uid="uid://bxtx623v3t51f" path="res://Objects/SkillSpecific/Building/SandcastleBuilding/SandCastleSprite2.png" id="4_tv006"]
[ext_resource type="Texture2D" uid="uid://dtdjvhf5igqb0" path="res://Objects/SkillSpecific/Building/SandcastleBuilding/SandCastleSprite3.png" id="5_4ni2r"]
[ext_resource type="PackedScene" uid="uid://cf3aqkjfurrjs" path="res://Interactions/Building/BuildingSpot/Buildable.tscn" id="5_b7e6r"]
[ext_resource type="PackedScene" uid="uid://b640j6bgsnyuq" path="res://UI/Building/SandcastlePlanningWindow.tscn" id="6_2q67m"]
[ext_resource type="Texture2D" uid="uid://cn27yxm81u1i6" path="res://Objects/SkillSpecific/Building/SandcastleBuilding/SandCastleSprite4.png" id="6_vrgeq"]
[ext_resource type="Script" path="res://Interactions/Building/BuildingSpot/SandcastleBuildable.gd" id="6_xrxsv"]
[ext_resource type="Texture2D" uid="uid://dti4tf7wh63g6" path="res://Objects/SkillSpecific/Building/SandcastleBuilding/SandCastleSprite5.png" id="7_2j531"]
[ext_resource type="Texture2D" uid="uid://coscvhegqejkr" path="res://Objects/SkillSpecific/Building/SandcastleBuilding/SandCastleSprite6.png" id="8_itbgy"]
[sub_resource type="SpriteFrames" id="SpriteFrames_h8fjf"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("3_4suqa")
}, {
"duration": 1.0,
"texture": ExtResource("4_tv006")
}, {
"duration": 1.0,
"texture": ExtResource("5_4ni2r")
}, {
"duration": 1.0,
"texture": ExtResource("6_vrgeq")
}, {
"duration": 1.0,
"texture": ExtResource("7_2j531")
}, {
"duration": 1.0,
"texture": ExtResource("8_itbgy")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("4_f1juh")
}, {
"duration": 1.0,
"texture": ExtResource("4_f1juh")
}, {
"duration": 1.0,
"texture": ExtResource("4_f1juh")
}, {
"duration": 1.0,
"texture": ExtResource("4_f1juh")
}, {
"duration": 1.0,
"texture": ExtResource("4_f1juh")
}],
"loop": true,
"name": &"worm",
"speed": 5.0
}]
[sub_resource type="CircleShape2D" id="CircleShape2D_ji20m"]
radius = 63.0317
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7gb4c"]
bg_color = Color(0.729412, 0.556863, 0.482353, 1)
border_width_left = 2
border_width_top = 2
border_width_right = 2
border_width_bottom = 2
border_color = Color(0, 0, 0, 1)
corner_radius_top_left = 6
corner_radius_top_right = 6
corner_radius_bottom_right = 6
corner_radius_bottom_left = 6
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ymita"]
bg_color = Color(0.211765, 0.313726, 0.968627, 1)
border_width_left = 2
border_width_top = 2
border_width_right = 2
border_width_bottom = 2
border_color = Color(0.8, 0.8, 0.8, 0)
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
anti_aliasing = false
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rwi2n"]
bg_color = Color(0.929412, 0.866667, 0.968627, 1)
border_width_left = 2
border_width_top = 2
border_width_right = 2
border_width_bottom = 2
border_color = Color(0, 0, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_33uhg"]
bg_color = Color(0.913725, 0, 0.172549, 1)
border_width_left = 2
border_width_top = 2
border_width_right = 2
border_width_bottom = 2
border_color = Color(0.8, 0.8, 0.8, 0)
[node name="Sandcastle" type="Node2D"]
script = ExtResource("1_sh1by")
savePrefix = null
[node name="SelectionRegionIndicator" type="Sprite2D" parent="."]
self_modulate = Color(0.341176, 1, 1, 0.564706)
z_index = -1
position = Vector2(-2, -8)
scale = Vector2(3.05167, 0.926667)
texture = ExtResource("3_ev3yg")
[node name="MainSprite" type="AnimatedSprite2D" parent="."]
position = Vector2(-2, -39)
sprite_frames = SubResource("SpriteFrames_h8fjf")
[node name="Interactable" parent="." instance=ExtResource("4_rkakq")]
[node name="Panel" parent="Interactable" index="1"]
offset_left = -93.0
offset_top = -37.0
offset_right = 90.0
offset_bottom = 20.0
[node name="Buildable" parent="." instance=ExtResource("5_b7e6r")]
position = Vector2(-2, 0)
script = ExtResource("6_xrxsv")
[node name="CollisionShape2D" parent="Buildable/InteractionArea" index="0"]
position = Vector2(4, -22)
shape = SubResource("CircleShape2D_ji20m")
[node name="PlanningWindow" parent="." instance=ExtResource("6_2q67m")]
visible = false
[node name="BuildingBar" type="ProgressBar" parent="."]
unique_name_in_owner = true
offset_left = -58.0
offset_top = -112.0
offset_right = 55.0
offset_bottom = -96.0
theme_override_styles/background = SubResource("StyleBoxFlat_7gb4c")
theme_override_styles/fill = SubResource("StyleBoxFlat_ymita")
show_percentage = false
[node name="HealthBar" type="ProgressBar" parent="."]
unique_name_in_owner = true
offset_left = -57.0
offset_top = -111.0
offset_right = 53.0
offset_bottom = -97.0
theme_override_styles/background = SubResource("StyleBoxFlat_rwi2n")
theme_override_styles/fill = SubResource("StyleBoxFlat_33uhg")
value = 40.0
show_percentage = false
[node name="StageCounter" type="Label" parent="."]
unique_name_in_owner = true
offset_left = -90.0
offset_top = -145.0
offset_right = 92.0
offset_bottom = -116.0
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 10
theme_override_font_sizes/font_size = 20
text = "Stages: 500/500"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Fires" type="Node2D" parent="."]
[editable path="Interactable"]
[editable path="Interactable/ActionMenu"]
[editable path="Buildable"]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cjqngnhrbng5m"
path="res://.godot/imported/WormCastleSprite.png-b6de59a71f8d9baa8c6685667a72031d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Objects/SkillSpecific/Building/SandcastleBuilding/WormCastleSprite.png"
dest_files=["res://.godot/imported/WormCastleSprite.png-b6de59a71f8d9baa8c6685667a72031d.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