added a new weapon fireswirl that gets triggered by two apples and a grape
parent
832d2dbd70
commit
190d4cf8bf
Binary file not shown.
|
After Width: | Height: | Size: 73 KiB |
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://behle58yb3fve"
|
||||||
|
path="res://.godot/imported/Blue Effect Bullet Impact Explosion 32x32.png-f0477fc79fb56c3b1406bffa0357891d.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/Free Effect Bullet Impact Explosion 32x32 V1/Blue Effect Bullet Impact Explosion 32x32.png"
|
||||||
|
dest_files=["res://.godot/imported/Blue Effect Bullet Impact Explosion 32x32.png-f0477fc79fb56c3b1406bffa0357891d.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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: 75 KiB |
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bsxqyx4crsger"
|
||||||
|
path="res://.godot/imported/Green Effect Bullet Impact Explosion 32x32.png-30f4653fdcae4ed319ac333a3d24a45c.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/Free Effect Bullet Impact Explosion 32x32 V1/Green Effect Bullet Impact Explosion 32x32.png"
|
||||||
|
dest_files=["res://.godot/imported/Green Effect Bullet Impact Explosion 32x32.png-30f4653fdcae4ed319ac333a3d24a45c.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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: 73 KiB |
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c50u48fy7jtd"
|
||||||
|
path="res://.godot/imported/Purple Effect Bullet Impact Explosion 32x32.png-c366ae7198142725dd42be174aeb6238.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/Free Effect Bullet Impact Explosion 32x32 V1/Purple Effect Bullet Impact Explosion 32x32.png"
|
||||||
|
dest_files=["res://.godot/imported/Purple Effect Bullet Impact Explosion 32x32.png-c366ae7198142725dd42be174aeb6238.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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: 74 KiB |
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bfajrlukma2jh"
|
||||||
|
path="res://.godot/imported/Red Effect Bullet Impact Explosion 32x32.png-6142da249c4b73cc49c00e3495e89a6f.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/Free Effect Bullet Impact Explosion 32x32 V1/Red Effect Bullet Impact Explosion 32x32.png"
|
||||||
|
dest_files=["res://.godot/imported/Red Effect Bullet Impact Explosion 32x32.png-6142da249c4b73cc49c00e3495e89a6f.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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: 74 KiB |
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cgmjx70e5vja"
|
||||||
|
path="res://.godot/imported/Yellow Effect Bullet Impact Explosion 32x32.png-12fc2ee16f98c6d6e0a63035c3fc9f3c.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/Free Effect Bullet Impact Explosion 32x32 V1/Yellow Effect Bullet Impact Explosion 32x32.png"
|
||||||
|
dest_files=["res://.godot/imported/Yellow Effect Bullet Impact Explosion 32x32.png-12fc2ee16f98c6d6e0a63035c3fc9f3c.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
[gd_scene format=3 uid="uid://chwkodefhiokk"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cqpqdrqsyvhy8" path="res://scripts/fire_swirl.gd" id="1_aisr6"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bfajrlukma2jh" path="res://assets/Free Effect Bullet Impact Explosion 32x32 V1/Red Effect Bullet Impact Explosion 32x32.png" id="2_ei2s2"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_aisr6"]
|
||||||
|
atlas = ExtResource("2_ei2s2")
|
||||||
|
region = Rect2(352, 64, 32, 32)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ei2s2"]
|
||||||
|
atlas = ExtResource("2_ei2s2")
|
||||||
|
region = Rect2(384, 64, 32, 32)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_kcq6k"]
|
||||||
|
atlas = ExtResource("2_ei2s2")
|
||||||
|
region = Rect2(416, 64, 32, 32)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_i8qo8"]
|
||||||
|
atlas = ExtResource("2_ei2s2")
|
||||||
|
region = Rect2(448, 64, 32, 32)
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id="SpriteFrames_rhlq0"]
|
||||||
|
animations = [{
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_aisr6")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ei2s2")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_kcq6k")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_i8qo8")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"default",
|
||||||
|
"speed": 10.0
|
||||||
|
}]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_chw8e"]
|
||||||
|
radius = 13.0
|
||||||
|
|
||||||
|
[node name="FireSwirl" type="Area2D" unique_id=1663800654]
|
||||||
|
script = ExtResource("1_aisr6")
|
||||||
|
metadata/_custom_type_script = "uid://bc8v4tndw5t1l"
|
||||||
|
|
||||||
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=820748596]
|
||||||
|
texture_filter = 1
|
||||||
|
sprite_frames = SubResource("SpriteFrames_rhlq0")
|
||||||
|
autoplay = "default"
|
||||||
|
frame_progress = 0.81040704
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=422398155]
|
||||||
|
visible = false
|
||||||
|
shape = SubResource("CircleShape2D_chw8e")
|
||||||
|
|
@ -75,7 +75,9 @@ func brew(fruits):
|
||||||
is_brewing = true
|
is_brewing = true
|
||||||
var unique = get_unique_fruits()
|
var unique = get_unique_fruits()
|
||||||
await ignite_cauldrons()
|
await ignite_cauldrons()
|
||||||
if unique.has(2) and unique.size() == 1:
|
if fruits == [2, 2, 4]:
|
||||||
|
witch.shoot_fire_swirl()
|
||||||
|
elif unique.has(2) and unique.size() == 1:
|
||||||
witch.shoot_fireballs()
|
witch.shoot_fireballs()
|
||||||
elif unique.has(4) and unique.size() == 1:
|
elif unique.has(4) and unique.size() == 1:
|
||||||
witch.shoot_shuriken()
|
witch.shoot_shuriken()
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
extends ProjectileBase
|
||||||
|
|
||||||
|
var _is_spread_child := false
|
||||||
|
|
||||||
|
const DIRS := [
|
||||||
|
Vector2(1, 0),
|
||||||
|
Vector2(0.707107, 0.707107),
|
||||||
|
Vector2(0, 1),
|
||||||
|
Vector2(-0.707107, 0.707107),
|
||||||
|
Vector2(-1, 0),
|
||||||
|
Vector2(-0.707107, -0.707107),
|
||||||
|
Vector2(0, -1),
|
||||||
|
Vector2(0.707107, -0.707107),
|
||||||
|
]
|
||||||
|
|
||||||
|
func _on_body_entered(body: Node2D) -> void:
|
||||||
|
if body.is_in_group("enemies"):
|
||||||
|
body.hit()
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
if _is_spread_child:
|
||||||
|
super()
|
||||||
|
return
|
||||||
|
var spawn_pos = global_position
|
||||||
|
for dir in DIRS:
|
||||||
|
var bullet = duplicate()
|
||||||
|
bullet._is_spread_child = true
|
||||||
|
get_parent().add_child(bullet)
|
||||||
|
bullet.global_position = spawn_pos
|
||||||
|
bullet.launch(spawn_pos + dir * 1000)
|
||||||
|
queue_free()
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
uid://cqpqdrqsyvhy8
|
||||||
|
|
@ -4,37 +4,37 @@ var enemies_hit = 0
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
speed = 500
|
speed = 500
|
||||||
super()
|
super()
|
||||||
var first = get_nearest_enemy(global_position)
|
var first = get_nearest_enemy(global_position)
|
||||||
if first == null:
|
if first == null:
|
||||||
queue_free()
|
queue_free()
|
||||||
return
|
return
|
||||||
launch(first.global_position)
|
launch(first.global_position)
|
||||||
|
|
||||||
func _on_body_entered(body: Node2D) -> void:
|
func _on_body_entered(body: Node2D) -> void:
|
||||||
if body.is_in_group("enemies") and not body.is_hurt and not body.is_dying:
|
if body.is_in_group("enemies") and not body.is_hurt and not body.is_dying:
|
||||||
enemies_hit += 1
|
enemies_hit += 1
|
||||||
body.hit()
|
body.hit()
|
||||||
if enemies_hit == 20:
|
if enemies_hit == 20:
|
||||||
queue_free()
|
queue_free()
|
||||||
else:
|
else:
|
||||||
var next = get_nearest_enemy(global_position, body)
|
var next = get_nearest_enemy(global_position, body)
|
||||||
if next == null:
|
if next == null:
|
||||||
queue_free()
|
queue_free()
|
||||||
else:
|
else:
|
||||||
launch(next.global_position)
|
launch(next.global_position)
|
||||||
|
|
||||||
func get_nearest_enemy(from: Vector2, exclude: Node = null) -> Node:
|
func get_nearest_enemy(from: Vector2, exclude: Node = null) -> Node:
|
||||||
var nearest = null
|
var nearest = null
|
||||||
var min_distance = INF
|
var min_distance = INF
|
||||||
for enemy in get_tree().get_nodes_in_group("enemies"):
|
for enemy in get_tree().get_nodes_in_group("enemies"):
|
||||||
if enemy == exclude or enemy.is_dying or enemy.is_hurt:
|
if enemy == exclude or enemy.is_dying or enemy.is_hurt:
|
||||||
continue
|
continue
|
||||||
var dist = from.distance_to(enemy.global_position)
|
var dist = from.distance_to(enemy.global_position)
|
||||||
if dist < min_distance:
|
if dist < min_distance:
|
||||||
min_distance = dist
|
min_distance = dist
|
||||||
nearest = enemy
|
nearest = enemy
|
||||||
return nearest
|
return nearest
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ var camera
|
||||||
var is_casting = false
|
var is_casting = false
|
||||||
var fireball = preload("res://scenes/fireball.tscn")
|
var fireball = preload("res://scenes/fireball.tscn")
|
||||||
var shuriken = preload("res://scenes/shuriken.tscn")
|
var shuriken = preload("res://scenes/shuriken.tscn")
|
||||||
|
var fire_swirl = preload("res://scenes/fire_swirl.tscn")
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
$CauldronBar.witch = self
|
$CauldronBar.witch = self
|
||||||
|
|
@ -28,6 +29,12 @@ func shoot_fireballs():
|
||||||
fb.launch(enemy.global_position)
|
fb.launch(enemy.global_position)
|
||||||
camera.shake(0.3,0.8)
|
camera.shake(0.3,0.8)
|
||||||
|
|
||||||
|
func shoot_fire_swirl():
|
||||||
|
var fs = fire_swirl.instantiate()
|
||||||
|
fs.global_position = global_position
|
||||||
|
get_parent().add_child(fs)
|
||||||
|
camera.shake(0.3, 0.8)
|
||||||
|
|
||||||
func shoot_shuriken():
|
func shoot_shuriken():
|
||||||
var sh = shuriken.instantiate()
|
var sh = shuriken.instantiate()
|
||||||
sh.global_position = global_position
|
sh.global_position = global_position
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue