diff --git a/src/.import/childgoblin.png-52693613a47c98bbd4848f6fe1ef405e.md5 b/src/.import/childgoblin.png-52693613a47c98bbd4848f6fe1ef405e.md5 new file mode 100644 index 0000000..4ca82ec --- /dev/null +++ b/src/.import/childgoblin.png-52693613a47c98bbd4848f6fe1ef405e.md5 @@ -0,0 +1,3 @@ +source_md5="0bedc1d25bfff077eb5d914e5fe7fa8a" +dest_md5="374fee1e0587a208f29cf85f1eb05c75" + diff --git a/src/.import/childgoblin.png-52693613a47c98bbd4848f6fe1ef405e.stex b/src/.import/childgoblin.png-52693613a47c98bbd4848f6fe1ef405e.stex new file mode 100644 index 0000000..3170b2f Binary files /dev/null and b/src/.import/childgoblin.png-52693613a47c98bbd4848f6fe1ef405e.stex differ diff --git a/src/.import/femalegoblin.png-f44fc70f53f37230a14ae479b9f64794.md5 b/src/.import/femalegoblin.png-f44fc70f53f37230a14ae479b9f64794.md5 new file mode 100644 index 0000000..a5073a1 --- /dev/null +++ b/src/.import/femalegoblin.png-f44fc70f53f37230a14ae479b9f64794.md5 @@ -0,0 +1,3 @@ +source_md5="4db5daf13756b95d9c203459208e7bec" +dest_md5="7c18b747384a6c7769d1231884831fb7" + diff --git a/src/.import/femalegoblin.png-f44fc70f53f37230a14ae479b9f64794.stex b/src/.import/femalegoblin.png-f44fc70f53f37230a14ae479b9f64794.stex new file mode 100644 index 0000000..48b8430 Binary files /dev/null and b/src/.import/femalegoblin.png-f44fc70f53f37230a14ae479b9f64794.stex differ diff --git a/src/.import/goblinvsgoblin.ogg-7247a807efb05a6b9f4125abfb71486c.md5 b/src/.import/goblinvsgoblin.ogg-7247a807efb05a6b9f4125abfb71486c.md5 new file mode 100644 index 0000000..c5b9600 --- /dev/null +++ b/src/.import/goblinvsgoblin.ogg-7247a807efb05a6b9f4125abfb71486c.md5 @@ -0,0 +1,3 @@ +source_md5="60deaaf6d89e345ccbdd27a7b0a69080" +dest_md5="b94aec6d467f1ee050e7badffb98610d" + diff --git a/src/.import/goblinvsgoblin.ogg-7247a807efb05a6b9f4125abfb71486c.oggstr b/src/.import/goblinvsgoblin.ogg-7247a807efb05a6b9f4125abfb71486c.oggstr new file mode 100644 index 0000000..319c72a Binary files /dev/null and b/src/.import/goblinvsgoblin.ogg-7247a807efb05a6b9f4125abfb71486c.oggstr differ diff --git a/src/.import/pregnantgoblin.png-e12305e67719f26568156597e178b74d.md5 b/src/.import/pregnantgoblin.png-e12305e67719f26568156597e178b74d.md5 new file mode 100644 index 0000000..7124d68 --- /dev/null +++ b/src/.import/pregnantgoblin.png-e12305e67719f26568156597e178b74d.md5 @@ -0,0 +1,3 @@ +source_md5="2184eb3cff7df95cd01dcc9b94756557" +dest_md5="185a0384fd8901adb5c098cb99e4bc0a" + diff --git a/src/.import/pregnantgoblin.png-e12305e67719f26568156597e178b74d.stex b/src/.import/pregnantgoblin.png-e12305e67719f26568156597e178b74d.stex new file mode 100644 index 0000000..8a8ef6e Binary files /dev/null and b/src/.import/pregnantgoblin.png-e12305e67719f26568156597e178b74d.stex differ diff --git a/src/Audio/Hits/goblinvsgoblin.ogg b/src/Audio/Hits/goblinvsgoblin.ogg new file mode 100644 index 0000000..96b8647 Binary files /dev/null and b/src/Audio/Hits/goblinvsgoblin.ogg differ diff --git a/src/Audio/Hits/goblinvsgoblin.ogg.import b/src/Audio/Hits/goblinvsgoblin.ogg.import new file mode 100644 index 0000000..357c360 --- /dev/null +++ b/src/Audio/Hits/goblinvsgoblin.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/goblinvsgoblin.ogg-7247a807efb05a6b9f4125abfb71486c.oggstr" + +[deps] + +source_file="res://Audio/Hits/goblinvsgoblin.ogg" +dest_files=[ "res://.import/goblinvsgoblin.ogg-7247a807efb05a6b9f4125abfb71486c.oggstr" ] + +[params] + +loop=false +loop_offset=0 diff --git a/src/NPCs/childgoblin.png b/src/NPCs/childgoblin.png new file mode 100644 index 0000000..fa52ab5 --- /dev/null +++ b/src/NPCs/childgoblin.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f44e75ae6fcebde9c80442d60c190a93d9b40ebef95093f329d0e6d5be1defc2 +size 4313 diff --git a/src/NPCs/childgoblin.png.import b/src/NPCs/childgoblin.png.import new file mode 100644 index 0000000..09e350f --- /dev/null +++ b/src/NPCs/childgoblin.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/childgoblin.png-52693613a47c98bbd4848f6fe1ef405e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://NPCs/childgoblin.png" +dest_files=[ "res://.import/childgoblin.png-52693613a47c98bbd4848f6fe1ef405e.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/src/NPCs/femalegoblin.gd b/src/NPCs/femalegoblin.gd index f81f665..0f40d54 100644 --- a/src/NPCs/femalegoblin.gd +++ b/src/NPCs/femalegoblin.gd @@ -24,6 +24,7 @@ func _physics_process(_delta): age = age + 1 if pregnancy == 100: + $goblin.texture = load("res://NPCs/femalegoblin.png") pregnancy = 0 var female = load("res://NPCs/femalegoblin.tscn") var male = load("res://NPCs/malegoblin.tscn") @@ -47,6 +48,7 @@ func _on_death_finished(): func _on_Romance_area_entered(area): if area.is_in_group("malegoblin") and pregnancy == 0 and age > 2500: pregnancy = 1 + $goblin.texture = load("res://NPCs/pregnantgoblin.png") func find_free_position(start, skip = 0): var direction = randi() % 4 diff --git a/src/NPCs/femalegoblin.png b/src/NPCs/femalegoblin.png new file mode 100644 index 0000000..b22fef0 --- /dev/null +++ b/src/NPCs/femalegoblin.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca534fa5dddbb70d36089198e3855b0f364bba01f565eca91060ac979692969f +size 4313 diff --git a/src/NPCs/femalegoblin.png.import b/src/NPCs/femalegoblin.png.import new file mode 100644 index 0000000..5c82d41 --- /dev/null +++ b/src/NPCs/femalegoblin.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/femalegoblin.png-f44fc70f53f37230a14ae479b9f64794.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://NPCs/femalegoblin.png" +dest_files=[ "res://.import/femalegoblin.png-f44fc70f53f37230a14ae479b9f64794.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/src/NPCs/femalegoblin.tscn b/src/NPCs/femalegoblin.tscn index 9953698..cfbe951 100644 --- a/src/NPCs/femalegoblin.tscn +++ b/src/NPCs/femalegoblin.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=8 format=2] -[ext_resource path="res://NPCs/goblin.png" type="Texture" id=1] +[ext_resource path="res://NPCs/femalegoblin.png" type="Texture" id=1] [ext_resource path="res://Audio/Hits/goblininjured.ogg" type="AudioStream" id=2] [ext_resource path="res://NPCs/femalegoblin.gd" type="Script" id=3] diff --git a/src/NPCs/malegoblin.gd b/src/NPCs/malegoblin.gd index dedfbea..d93e807 100644 --- a/src/NPCs/malegoblin.gd +++ b/src/NPCs/malegoblin.gd @@ -30,3 +30,11 @@ func _on_Hurtbox_area_entered(_area): func _on_death_finished(): queue_free() + +func _on_Romance_area_entered(area): + if area.is_in_group("malegoblin"): + if randi() % 100 < 20: + $Romance/fight.play() + +func _on_fight_finished(): + queue_free() diff --git a/src/NPCs/malegoblin.tscn b/src/NPCs/malegoblin.tscn index da2a4a0..251c803 100644 --- a/src/NPCs/malegoblin.tscn +++ b/src/NPCs/malegoblin.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=9 format=2] [ext_resource path="res://NPCs/goblin.png" type="Texture" id=1] [ext_resource path="res://Audio/Hits/goblininjured.ogg" type="AudioStream" id=2] [ext_resource path="res://NPCs/malegoblin.gd" type="Script" id=3] +[ext_resource path="res://Audio/Hits/goblinvsgoblin.ogg" type="AudioStream" id=4] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 3.90875, 3.7602 ) @@ -59,7 +60,12 @@ shape = SubResource( 3 ) collision_layer = 128 collision_mask = 128 +[node name="fight" type="AudioStreamPlayer" parent="Romance"] +stream = ExtResource( 4 ) + [node name="CollisionShape2D" type="CollisionShape2D" parent="Romance"] shape = SubResource( 4 ) [connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"] [connection signal="finished" from="Hurtbox/death" to="." method="_on_death_finished"] +[connection signal="area_entered" from="Romance" to="." method="_on_Romance_area_entered"] +[connection signal="finished" from="Romance/fight" to="." method="_on_fight_finished"] diff --git a/src/NPCs/ooze.gd b/src/NPCs/ooze.gd index 9d37cb9..bb3b1bc 100644 --- a/src/NPCs/ooze.gd +++ b/src/NPCs/ooze.gd @@ -50,3 +50,16 @@ func find_free_position(start, skip = 0): direction = (direction + 1) % 4 pos = start + MOVEMENT_VECTORS[direction]*11 return pos + + +func _on_Romance_area_entered(area): + if immunity == 0: + # Ooze with smaller ID creates bigger ooze + if get_instance_id() < area.get_parent().get_instance_id() : + yield(get_tree().create_timer(2.0),"timeout") + var ooze = load("res://NPCs/big_ooze.tscn") + var instance = ooze.instance() + instance.position = position + rootnode.add_child(instance) + queue_free() + diff --git a/src/NPCs/ooze.tscn b/src/NPCs/ooze.tscn index de63871..bde973d 100644 --- a/src/NPCs/ooze.tscn +++ b/src/NPCs/ooze.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=8 format=2] [ext_resource path="res://NPCs/ooze.png" type="Texture" id=1] [ext_resource path="res://NPCs/ooze.gd" type="Script" id=2] @@ -13,6 +13,9 @@ extents = Vector2( 5, 5 ) [sub_resource type="RectangleShape2D" id=3] extents = Vector2( 5, 5 ) +[sub_resource type="RectangleShape2D" id=4] +extents = Vector2( 6.05606, 6.68265 ) + [node name="ooze" type="KinematicBody2D"] script = ExtResource( 2 ) @@ -49,6 +52,14 @@ stream = ExtResource( 3 ) "ooze", ]] shape = SubResource( 3 ) + +[node name="Romance" type="Area2D" parent="."] +collision_layer = 2147484672 +collision_mask = 1024 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Romance"] +shape = SubResource( 4 ) [connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"] [connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"] [connection signal="finished" from="Hurtbox/death" to="." method="_on_death_finished"] +[connection signal="area_entered" from="Romance" to="." method="_on_Romance_area_entered"] diff --git a/src/NPCs/pregnantgoblin.png b/src/NPCs/pregnantgoblin.png new file mode 100644 index 0000000..0872173 --- /dev/null +++ b/src/NPCs/pregnantgoblin.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b18759097278a7c707a8ee0adc3bb8746e5d0f1e7ec2c6d0b0f835a472b52fb8 +size 4311 diff --git a/src/NPCs/pregnantgoblin.png.import b/src/NPCs/pregnantgoblin.png.import new file mode 100644 index 0000000..ad0d00e --- /dev/null +++ b/src/NPCs/pregnantgoblin.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/pregnantgoblin.png-e12305e67719f26568156597e178b74d.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://NPCs/pregnantgoblin.png" +dest_files=[ "res://.import/pregnantgoblin.png-e12305e67719f26568156597e178b74d.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/src/NPCs/smallooze.gd b/src/NPCs/smallooze.gd index 6a340ab..406c5ef 100644 --- a/src/NPCs/smallooze.gd +++ b/src/NPCs/smallooze.gd @@ -35,3 +35,16 @@ func _on_Hitbox_area_entered(_area): rootnode.add_child(instance) queue_free() + + +func _on_Romance_area_entered(area): + if immunity == 0: + # Ooze with smaller ID creates bigger ooze + if get_instance_id() < area.get_parent().get_instance_id() : + yield(get_tree().create_timer(2.0),"timeout") + var ooze = load("res://NPCs/ooze.tscn") + var instance = ooze.instance() + instance.position = position + rootnode.add_child(instance) + queue_free() + diff --git a/src/NPCs/smallooze.tscn b/src/NPCs/smallooze.tscn index 64b4d93..a4dcd83 100644 --- a/src/NPCs/smallooze.tscn +++ b/src/NPCs/smallooze.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=8 format=2] [ext_resource path="res://NPCs/ooze.png" type="Texture" id=1] [ext_resource path="res://NPCs/smallooze.gd" type="Script" id=2] @@ -13,6 +13,9 @@ extents = Vector2( 2.59128, 2.50916 ) [sub_resource type="RectangleShape2D" id=3] extents = Vector2( 2.51253, 2.35167 ) +[sub_resource type="RectangleShape2D" id=4] +extents = Vector2( 3.8512, 3.69034 ) + [node name="small_ooze" type="KinematicBody2D"] script = ExtResource( 2 ) @@ -51,6 +54,14 @@ stream = ExtResource( 3 ) ]] position = Vector2( -0.0787458, 0.0787449 ) shape = SubResource( 3 ) + +[node name="Romance" type="Area2D" parent="."] +collision_layer = 2048 +collision_mask = 2048 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Romance"] +shape = SubResource( 4 ) [connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"] [connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"] [connection signal="finished" from="Hurtbox/death" to="." method="_on_death_finished"] +[connection signal="area_entered" from="Romance" to="." method="_on_Romance_area_entered"] diff --git a/src/World.tscn b/src/World.tscn index 0332f0e..5f38a0b 100644 --- a/src/World.tscn +++ b/src/World.tscn @@ -222,7 +222,6 @@ position = Vector2( 132, 132 ) current = true zoom = Vector2( 4, 4 ) script = ExtResource( 8 ) -max_zoom = 8.0 [node name="Tween" type="Tween" parent="Camera2D"]