It's Cow Game! Version 2.04!
This commit is contained in:
commit
a9e1ed9ddd
3148 changed files with 95332 additions and 0 deletions
67
NPCs/Beach/Ambrose/Ambrose.dialogue
Normal file
67
NPCs/Beach/Ambrose/Ambrose.dialogue
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
~ start
|
||||
|
||||
if get_save_value("ambiQuestComplete", false):
|
||||
Ambrose: Meowdy!
|
||||
Ambrose: You can change the baskets out meow if you'd like.
|
||||
Ambrose: I just needed to see them in formation once :3
|
||||
Ambrose: Thank you myah.
|
||||
=> END
|
||||
|
||||
if not get_save_value("ambiQuestStarted", false):
|
||||
Ambrose: meoww could you help me set up the basket spots here?
|
||||
- sure => startQuest
|
||||
- sorry no => declineQuest
|
||||
|
||||
if not DialogueBoxManager.currentSpeaker.notes_check():
|
||||
Ambrose: Hi you uh need to find some of my notes still meow.
|
||||
if not DialogueBoxManager.currentSpeaker.note_check_1():
|
||||
Ambrose: I saw a page fly off towards the Snak Shak.
|
||||
if not DialogueBoxManager.currentSpeaker.note_check_2():
|
||||
Ambrose: I saw a page fly off towards the rocky island.
|
||||
if not DialogueBoxManager.currentSpeaker.note_check_3():
|
||||
Ambrose: I sensed that a page flew north and got stuck in a log.
|
||||
Ambrose: Good luck nyaa~
|
||||
=> END
|
||||
|
||||
~ checkRules
|
||||
if not DialogueBoxManager.currentSpeaker.rules_check():
|
||||
Ambrose: Hi I think something's not right meow.
|
||||
if not DialogueBoxManager.currentSpeaker.basket_rule_check_1():
|
||||
Ambrose: ummm maybe look at note 1 again.
|
||||
if not DialogueBoxManager.currentSpeaker.basket_rule_check_2():
|
||||
Ambrose: myaa I think note 2 needs to be looked at.
|
||||
if not DialogueBoxManager.currentSpeaker.basket_rule_check_3():
|
||||
Ambrose: meowww note 3 is a tricky one, it doesn't feel like the baskets follow it well enough.
|
||||
Ambrose: Good luck nyaa~
|
||||
=> END
|
||||
else:
|
||||
Ambrose: OwO it's perfect!!!
|
||||
Ambrose: Thank you so much!!!
|
||||
Ambrose: I will teach you my secret technique :3
|
||||
Ambrose: *Ambrose imbues you with a deep basketing secret*
|
||||
Ambrose: *You can now put an infinite amount of an item into a basket made from it*
|
||||
Ambrose: Have fun basketing meow!
|
||||
do set_save_value("ambiQuestComplete", true)
|
||||
do QuestManager.complete_quest("Constellation of Baskets")
|
||||
=> END
|
||||
|
||||
~ startQuest
|
||||
if not LevelManager.skill_check("basketWeaving", 22) or not LevelManager.skill_check("scavenging", 15):
|
||||
Ambrose: mmmyahh I think you need a little more practice first though. (Requires level 22 Basket Weaving and level 15 Scavenging)
|
||||
=> END
|
||||
Ambrose: Thank you! Here one moment I have some notes on how the baskets should be placed.
|
||||
Ambrose: [Dexterity DC 3] Result: 1
|
||||
Ambrose: *Ambrose fumbles with his pages and 3 of them fly off into the distance*
|
||||
do set_save_value("ambiQuestStarted", true)
|
||||
Ambrose: myaaaaaaahhhh oh no the pages all flew away!
|
||||
Ambrose: I saw one fly off towards the Snak Shak.
|
||||
Ambrose: And another go towards the rocky island.
|
||||
Ambrose: [Perception DC 15] Result: 20
|
||||
Ambrose: And I sense that a page flew north and got stuck in a log.
|
||||
Ambrose: Please go get them and set up the baskets for me myah.
|
||||
=> END
|
||||
|
||||
~ declineQuest
|
||||
Ambrose: Ok let me know if you have time later nyah~
|
||||
|
||||
=> END
|
||||
15
NPCs/Beach/Ambrose/Ambrose.dialogue.import
Normal file
15
NPCs/Beach/Ambrose/Ambrose.dialogue.import
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[remap]
|
||||
|
||||
importer="dialogue_manager_compiler_11"
|
||||
type="Resource"
|
||||
uid="uid://cyyl6ijg5du0k"
|
||||
path="res://.godot/imported/Ambrose.dialogue-70c169caccb9132e6e7d41ce0a57b22f.tres"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://NPCs/Beach/Ambrose/Ambrose.dialogue"
|
||||
dest_files=["res://.godot/imported/Ambrose.dialogue-70c169caccb9132e6e7d41ce0a57b22f.tres"]
|
||||
|
||||
[params]
|
||||
|
||||
defaults=true
|
||||
210
NPCs/Beach/Ambrose/Ambrose.gd
Normal file
210
NPCs/Beach/Ambrose/Ambrose.gd
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
extends NPC
|
||||
|
||||
var meowDelay = 0
|
||||
|
||||
func _ready():
|
||||
MessageManager.messageSent.connect(messageSpoken)
|
||||
dialogueResource = load("res://NPCs/Beach/Ambrose/Ambrose.dialogue")
|
||||
pronouns = "he/they"
|
||||
|
||||
func _process(delta):
|
||||
if meowDelay > 0:
|
||||
meowDelay -= delta
|
||||
|
||||
func messageSpoken(message:String):
|
||||
if meowDelay > 0:
|
||||
return
|
||||
|
||||
if GameVariables.player.global_position.distance_to(global_position) > 900:
|
||||
return
|
||||
|
||||
var responseMessages = ["you're a cute kitty", "your a cute kitty", "cute kitty", "meow"]
|
||||
message = message.to_lower().strip_edges()
|
||||
|
||||
for responseMessage in responseMessages:
|
||||
if message.contains(responseMessage):
|
||||
meowDelay = 0.5
|
||||
MessageManager.addMessage("meow :3", self, "Ambrose", Color.YELLOW)
|
||||
break
|
||||
|
||||
func notes_check():
|
||||
if !note_check_1():
|
||||
return false
|
||||
if !note_check_2():
|
||||
return false
|
||||
if !note_check_3():
|
||||
return false
|
||||
|
||||
return true
|
||||
|
||||
func note_check_1():
|
||||
if InventoryManager.get_item_count_by_name("Basket Plan 1", "keyItems") > 0:
|
||||
return true
|
||||
return false
|
||||
|
||||
func note_check_2():
|
||||
if InventoryManager.get_item_count_by_name("Basket Plan 2", "keyItems") > 0:
|
||||
return true
|
||||
return false
|
||||
|
||||
func note_check_3():
|
||||
if InventoryManager.get_item_count_by_name("Basket Plan 3", "keyItems") > 0:
|
||||
return true
|
||||
return false
|
||||
|
||||
func rules_check():
|
||||
if !basket_rule_check_1():
|
||||
return false
|
||||
if !basket_rule_check_2():
|
||||
return false
|
||||
if !basket_rule_check_3():
|
||||
return false
|
||||
|
||||
return true
|
||||
|
||||
#Rule 1: Sort the baskets from highest to lowest edibility, left to right then top to bottom
|
||||
func basket_rule_check_1():
|
||||
var baskets = get_basket_items()
|
||||
|
||||
var highest = 500000
|
||||
for basket in baskets:
|
||||
if basket == null:
|
||||
continue
|
||||
|
||||
if basket.get_edibility() > highest:
|
||||
return false
|
||||
else:
|
||||
highest = basket.get_edibility()
|
||||
|
||||
return true
|
||||
|
||||
#Rule 2: The top row baskets must be edible and the bottom row must be inedible
|
||||
func basket_rule_check_2():
|
||||
var baskets = get_basket_items()
|
||||
|
||||
var index = 0
|
||||
for basket in baskets:
|
||||
if basket == null:
|
||||
continue
|
||||
|
||||
if index <= 2:
|
||||
if basket.get_edibility() < 50:
|
||||
return false
|
||||
else:
|
||||
if basket.get_edibility() >= 50:
|
||||
return false
|
||||
index += 1
|
||||
|
||||
return true
|
||||
|
||||
#Rule 3: One collumn must be very red, one collumn very green, and one collumn very blue
|
||||
func basket_rule_check_3():
|
||||
var baskets = get_basket_items()
|
||||
|
||||
var colorsLeft = ["red", "green", "blue"]
|
||||
|
||||
var collumnOneColor = get_main_color(baskets[0])
|
||||
if collumnOneColor == "none":
|
||||
return false
|
||||
if get_main_color(baskets[3]) != collumnOneColor:
|
||||
return false
|
||||
colorsLeft.erase(collumnOneColor)
|
||||
|
||||
var collumnTwoColor = get_main_color(baskets[1])
|
||||
if collumnTwoColor == "none" or !(collumnTwoColor in colorsLeft):
|
||||
return false
|
||||
if get_main_color(baskets[4]) != collumnTwoColor:
|
||||
return false
|
||||
colorsLeft.erase(collumnTwoColor)
|
||||
|
||||
var collumnThreeColor = get_main_color(baskets[2])
|
||||
if collumnThreeColor == "none" or !(collumnThreeColor in colorsLeft):
|
||||
return false
|
||||
if get_main_color(baskets[5]) != collumnThreeColor:
|
||||
return false
|
||||
|
||||
return true
|
||||
|
||||
func get_main_color(basket:Item):
|
||||
if basket == null:
|
||||
return "none"
|
||||
|
||||
var color:Color = basket.get_average_color()
|
||||
|
||||
if color.r > color.g and color.r > color.b:
|
||||
return red_check(color)
|
||||
elif color.g > color.r and color.g > color.b:
|
||||
return green_check(color)
|
||||
elif color.b > color.r and color.b > color.g:
|
||||
return blue_check(color)
|
||||
else:
|
||||
return "none"
|
||||
|
||||
func red_check(color:Color):
|
||||
var otherColor = color.g + color.b
|
||||
var red = color.r
|
||||
|
||||
if color.g > 0.2:
|
||||
return "none"
|
||||
|
||||
if red <= 0.156:
|
||||
return "none"
|
||||
if red <= 0.25:
|
||||
if otherColor <= 0.06:
|
||||
return "red"
|
||||
else:
|
||||
return "none"
|
||||
if red <= 0.39:
|
||||
if otherColor <= 0.12:
|
||||
return "red"
|
||||
else:
|
||||
return "none"
|
||||
if red <= 0.58:
|
||||
if color.g <= 0.20 and color.b <= 0.20:
|
||||
return "red"
|
||||
else:
|
||||
return "none"
|
||||
|
||||
if otherColor <= 0.36:
|
||||
return "red"
|
||||
else:
|
||||
return "none"
|
||||
|
||||
func green_check(color:Color):
|
||||
var otherColor = color.r + color.b
|
||||
var green = color.g
|
||||
|
||||
if green <= 0.156:
|
||||
return "none"
|
||||
|
||||
if otherColor < green + 0.2:
|
||||
return "green"
|
||||
else:
|
||||
return "none"
|
||||
|
||||
func blue_check(color:Color):
|
||||
var red = color.r
|
||||
var blue = color.b
|
||||
|
||||
if blue <= 0.156:
|
||||
return "none"
|
||||
|
||||
if red <= float(blue/float(2.5)):
|
||||
return "blue"
|
||||
else:
|
||||
return "none"
|
||||
|
||||
func get_basket_items():
|
||||
var basketInvNames = ["BeachBasket1Basket", "BeachBasket2Basket", "BeachBasket3Basket",
|
||||
"BeachBasket4Basket", "BeachBasket5Basket", "BeachBasket6Basket"]
|
||||
|
||||
var baskets = []
|
||||
for basketInvName in basketInvNames:
|
||||
var basketHoldingInv = InventoryManager.get_inventory(basketInvName)
|
||||
if basketHoldingInv.items.size() > 0:
|
||||
baskets.append(basketHoldingInv.items[0])
|
||||
else:
|
||||
baskets.append(null)
|
||||
|
||||
return baskets
|
||||
|
||||
BIN
NPCs/Beach/Ambrose/Ambrose.png
Normal file
BIN
NPCs/Beach/Ambrose/Ambrose.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
34
NPCs/Beach/Ambrose/Ambrose.png.import
Normal file
34
NPCs/Beach/Ambrose/Ambrose.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cm078afincttk"
|
||||
path="res://.godot/imported/Ambrose.png-120bce5e66f898eb8e1bb2c2e03ff62d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://NPCs/Beach/Ambrose/Ambrose.png"
|
||||
dest_files=["res://.godot/imported/Ambrose.png-120bce5e66f898eb8e1bb2c2e03ff62d.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
|
||||
62
NPCs/Beach/Ambrose/Ambrose.tscn
Normal file
62
NPCs/Beach/Ambrose/Ambrose.tscn
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://ch786b3mdbxld"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://doqfsp7yxools" path="res://NPCs/NPC.tscn" id="1_n3mwl"]
|
||||
[ext_resource type="Script" path="res://NPCs/Beach/Ambrose/Ambrose.gd" id="2_bufsh"]
|
||||
[ext_resource type="Texture2D" uid="uid://cm078afincttk" path="res://NPCs/Beach/Ambrose/Ambrose.png" id="3_66xfq"]
|
||||
[ext_resource type="Texture2D" uid="uid://bh5y3lcrdavrs" path="res://NPCs/Beach/Ambrose/Blanket.png" id="4_1d11h"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_82e8e"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("3_66xfq")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_wndef"]
|
||||
radius = 24.0208
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_d1c1k"]
|
||||
radius = 8.0
|
||||
height = 46.0
|
||||
|
||||
[node name="Ambrose" instance=ExtResource("1_n3mwl")]
|
||||
script = ExtResource("2_bufsh")
|
||||
|
||||
[node name="Sprite" parent="." index="0"]
|
||||
position = Vector2(6, -26)
|
||||
sprite_frames = SubResource("SpriteFrames_82e8e")
|
||||
|
||||
[node name="Interactable" parent="." index="1"]
|
||||
position = Vector2(0, -43)
|
||||
|
||||
[node name="Panel" parent="Interactable" index="1"]
|
||||
offset_left = -27.0
|
||||
offset_top = -25.0
|
||||
offset_right = 26.0
|
||||
offset_bottom = 60.0
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="Talkable" parent="." index="2"]
|
||||
position = Vector2(1, -15)
|
||||
|
||||
[node name="CollisionShape2D" parent="Talkable/InteractionArea" index="0"]
|
||||
position = Vector2(-1, 13)
|
||||
shape = SubResource("CircleShape2D_wndef")
|
||||
|
||||
[node name="CollisionShape2D" parent="." index="3"]
|
||||
position = Vector2(1, 7)
|
||||
rotation = 1.5708
|
||||
shape = SubResource("CapsuleShape2D_d1c1k")
|
||||
|
||||
[node name="Blanket" type="Sprite2D" parent="." index="4"]
|
||||
z_index = -1
|
||||
position = Vector2(-34, 8)
|
||||
texture = ExtResource("4_1d11h")
|
||||
|
||||
[editable path="Interactable"]
|
||||
[editable path="Interactable/ActionMenu"]
|
||||
[editable path="Talkable"]
|
||||
BIN
NPCs/Beach/Ambrose/Blanket.png
Normal file
BIN
NPCs/Beach/Ambrose/Blanket.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
34
NPCs/Beach/Ambrose/Blanket.png.import
Normal file
34
NPCs/Beach/Ambrose/Blanket.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bh5y3lcrdavrs"
|
||||
path="res://.godot/imported/Blanket.png-6b2b593346e9ee89f6298a01b0a1f27f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://NPCs/Beach/Ambrose/Blanket.png"
|
||||
dest_files=["res://.godot/imported/Blanket.png-6b2b593346e9ee89f6298a01b0a1f27f.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
|
||||
Loading…
Add table
Add a link
Reference in a new issue