Adjusted Item Spawnrates + Boss HP
This commit is contained in:
parent
7265c16a2f
commit
28a6e98d3d
25 changed files with 32 additions and 38 deletions
|
|
@ -45,7 +45,7 @@ scale = Vector2(2.49, 3.1)
|
|||
|
||||
[node name="ItemSpawn" parent="EnemyList" instance=ExtResource("7_sr858")]
|
||||
position = Vector2(149, -645)
|
||||
rarity_bonus = 2
|
||||
rarity_bonus = 0.5
|
||||
|
||||
[node name="MorningStar" parent="EnemyList" instance=ExtResource("8_ta0fd")]
|
||||
position = Vector2(39, -552)
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ collision_layer = 41
|
|||
|
||||
[node name="ItemSpawn" parent="EnemyList" instance=ExtResource("7_crruu")]
|
||||
position = Vector2(137, -329)
|
||||
rarity_bonus = 1
|
||||
rarity_bonus = 0.25
|
||||
|
||||
[node name="BearTrap" parent="EnemyList" instance=ExtResource("8_fkxmk")]
|
||||
position = Vector2(465, -301)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ extends CharacterBody2D
|
|||
var moves = ["slam", "wave", "water_rise", "splash"]
|
||||
@export var big_blob : PackedScene
|
||||
@onready var water : Water = get_tree().get_root().get_node("main/Water")
|
||||
@onready var next_move = choose_next_move()
|
||||
|
||||
var risen = 0
|
||||
var attack_ready = true
|
||||
|
|
@ -17,10 +16,10 @@ var dead = false
|
|||
signal grounded
|
||||
|
||||
func choose_next_move() -> String:
|
||||
if $EnemyHurtbox.hp < 2 * $EnemyHurtbox.max_hp / 3 and risen == 0:
|
||||
if $EnemyHurtbox.hp <= 3 * $EnemyHurtbox.max_hp / 4 and risen == 0:
|
||||
risen += 1
|
||||
return "water_rise"
|
||||
if $EnemyHurtbox.hp < $EnemyHurtbox.max_hp / 3 and risen == 1:
|
||||
if $EnemyHurtbox.hp <= $EnemyHurtbox.max_hp / 2 and risen == 1:
|
||||
risen += 1
|
||||
return "water_rise"
|
||||
|
||||
|
|
@ -36,8 +35,7 @@ func _physics_process(delta: float) -> void:
|
|||
up_direction = earthaligner.global_from_local(Vector2.UP)
|
||||
if attack_ready:
|
||||
attack_ready = false
|
||||
call(next_move)
|
||||
next_move = choose_next_move()
|
||||
call(choose_next_move())
|
||||
|
||||
if(is_on_floor()):
|
||||
grounded.emit()
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ texture = ExtResource("3_opohk")
|
|||
[node name="EnemyHurtbox" parent="." node_paths=PackedStringArray("canvasItem") instance=ExtResource("2_skx2t")]
|
||||
collision_layer = 16
|
||||
collision_mask = 32
|
||||
max_hp = 600
|
||||
max_hp = 800
|
||||
canvasItem = NodePath("..")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="EnemyHurtbox"]
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@ class_name ItemSpawn extends Node2D
|
|||
@export var rare_items : Array[PackedScene]
|
||||
static var unique_items : Array[PackedScene] = []
|
||||
|
||||
@export var rarity_bonus = 0
|
||||
@export var rarity_bonus : float = 0
|
||||
@export var guarantee_rare : bool = false
|
||||
|
||||
@export var unique_base_chance = .03
|
||||
@export var rare_base_chance = .2
|
||||
@export var unique_base_chance = .02
|
||||
@export var rare_base_chance = .04
|
||||
@export var unique_bonus_multiplier = .025
|
||||
@export var rare_bonus_multiplier = .1
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ var remove_after_spawn = false
|
|||
|
||||
func choose_pool() -> Array[PackedScene]:
|
||||
var unique_chance = unique_base_chance + unique_bonus_multiplier * rarity_bonus
|
||||
var rare_chance = unique_base_chance + unique_bonus_multiplier * rarity_bonus
|
||||
var rare_chance = rare_base_chance + rare_bonus_multiplier * rarity_bonus
|
||||
|
||||
var random = randf()
|
||||
if random < unique_chance && unique_items.size() > 0:
|
||||
|
|
@ -38,8 +38,8 @@ func _ready():
|
|||
|
||||
static func refill_unique_item_pool():
|
||||
unique_items = [
|
||||
load("res://items/permanent_items/backslash.tscn"),
|
||||
load("res://items/permanent_items/high_jump.tscn"),
|
||||
load("res://items/permanent_items/upslash.tscn"),
|
||||
load("res://items/permanent_items/backslash/backslash.tscn"),
|
||||
load("res://items/permanent_items/high_jump/high_jump.tscn"),
|
||||
load("res://items/permanent_items/upslash/upslash.tscn"),
|
||||
load("res://items/active_items/horizontal_dash/horizontal_dash.tscn")
|
||||
]
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://gwctb2xqsbj" path="res://items/immediate_items/healthup/healthup.tscn" id="3_yi7ag"]
|
||||
[ext_resource type="PackedScene" uid="uid://ddn025xnjngko" path="res://items/active_items/bow/bow.tscn" id="4_v0ua0"]
|
||||
[ext_resource type="PackedScene" uid="uid://ewe36lqcjojk" path="res://items/active_items/updash/updash.tscn" id="5_uitgx"]
|
||||
[ext_resource type="PackedScene" uid="uid://wc7kgtomy6xm" path="res://items/permanent_items/extrajump.tscn" id="6_xqgya"]
|
||||
[ext_resource type="PackedScene" uid="uid://wc7kgtomy6xm" path="res://items/permanent_items/extrajump/extrajump.tscn" id="6_xqgya"]
|
||||
|
||||
[node name="ItemSpawn" type="Node2D"]
|
||||
script = ExtResource("1_ms6tn")
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c7mrm8uel7r36"
|
||||
path="res://.godot/imported/backslash.png-149a372aa6b01851fbdc2c6a7a2e54db.ctex"
|
||||
path="res://.godot/imported/backslash.png-627b3c40a1c8a6f83dc2a8bbc2d29adb.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://items/permanent_items/backslash.png"
|
||||
dest_files=["res://.godot/imported/backslash.png-149a372aa6b01851fbdc2c6a7a2e54db.ctex"]
|
||||
source_file="res://items/permanent_items/backslash/backslash.png"
|
||||
dest_files=["res://.godot/imported/backslash.png-627b3c40a1c8a6f83dc2a8bbc2d29adb.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://bbpf28ohayd8n"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://blg876atd71cg" path="res://items/permanent_items/backslash.gd" id="1_s4bdx"]
|
||||
[ext_resource type="Script" uid="uid://blg876atd71cg" path="res://items/permanent_items/backslash/backslash.gd" id="1_s4bdx"]
|
||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="2_kiuxs"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3e3kuyeh6mr1" path="res://player/sword.tscn" id="2_u6vk4"]
|
||||
[ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/ItemShine.png" id="4_legpc"]
|
||||
[ext_resource type="Texture2D" uid="uid://c7mrm8uel7r36" path="res://items/permanent_items/backslash.png" id="5_qg660"]
|
||||
[ext_resource type="Texture2D" uid="uid://c7mrm8uel7r36" path="res://items/permanent_items/backslash/backslash.png" id="5_qg660"]
|
||||
[ext_resource type="AudioStream" uid="uid://pdd0sy3p4y0d" path="res://sounds/750240__universfield__coin-drop.mp3" id="6_qg660"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_hvhjo"]
|
||||
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dicx1uk4187dq"
|
||||
path="res://.godot/imported/extrajump.png-5c34a7cf40e9d4d17063d874a102c414.ctex"
|
||||
path="res://.godot/imported/extrajump.png-b4900058bcc784042b34649841ea8810.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://items/permanent_items/extrajump.png"
|
||||
dest_files=["res://.godot/imported/extrajump.png-5c34a7cf40e9d4d17063d874a102c414.ctex"]
|
||||
source_file="res://items/permanent_items/extrajump/extrajump.png"
|
||||
dest_files=["res://.godot/imported/extrajump.png-b4900058bcc784042b34649841ea8810.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://wc7kgtomy6xm"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bnr7cpjuvy6xj" path="res://items/permanent_items/extrajump.gd" id="1_t7gtn"]
|
||||
[ext_resource type="Script" uid="uid://bnr7cpjuvy6xj" path="res://items/permanent_items/extrajump/extrajump.gd" id="1_t7gtn"]
|
||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="2_70c5v"]
|
||||
[ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/ItemShine.png" id="3_hw3fr"]
|
||||
[ext_resource type="Texture2D" uid="uid://dicx1uk4187dq" path="res://items/permanent_items/extrajump.png" id="3_t7gtn"]
|
||||
[ext_resource type="Texture2D" uid="uid://dicx1uk4187dq" path="res://items/permanent_items/extrajump/extrajump.png" id="3_t7gtn"]
|
||||
[ext_resource type="AudioStream" uid="uid://pdd0sy3p4y0d" path="res://sounds/750240__universfield__coin-drop.mp3" id="5_kn13r"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_hw3fr"]
|
||||
|
Before Width: | Height: | Size: 705 B After Width: | Height: | Size: 705 B |
|
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c6pyyfgkhytu5"
|
||||
path="res://.godot/imported/high_jump.png-8bc003388f039950b2397263b61bf2a9.ctex"
|
||||
path="res://.godot/imported/high_jump.png-1048e30a3bfeaa9531008ef81208b49f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://items/permanent_items/high_jump.png"
|
||||
dest_files=["res://.godot/imported/high_jump.png-8bc003388f039950b2397263b61bf2a9.ctex"]
|
||||
source_file="res://items/permanent_items/high_jump/high_jump.png"
|
||||
dest_files=["res://.godot/imported/high_jump.png-1048e30a3bfeaa9531008ef81208b49f.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://bpgo1djj8f1rg"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cq6h2iven3rly" path="res://items/permanent_items/high_jump.gd" id="1_7gixi"]
|
||||
[ext_resource type="Script" uid="uid://cq6h2iven3rly" path="res://items/permanent_items/high_jump/high_jump.gd" id="1_7gixi"]
|
||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="2_s7mjt"]
|
||||
[ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/ItemShine.png" id="3_ui5no"]
|
||||
[ext_resource type="Texture2D" uid="uid://c6pyyfgkhytu5" path="res://items/permanent_items/high_jump.png" id="4_7gixi"]
|
||||
[ext_resource type="Texture2D" uid="uid://c6pyyfgkhytu5" path="res://items/permanent_items/high_jump/high_jump.png" id="4_7gixi"]
|
||||
[ext_resource type="AudioStream" uid="uid://pdd0sy3p4y0d" path="res://sounds/750240__universfield__coin-drop.mp3" id="5_s7mjt"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_bya24"]
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://bwtdls58ajair"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cyql6o6m4xrv3" path="res://items/permanent_items/upslash.gd" id="1_vv4qh"]
|
||||
[ext_resource type="Script" uid="uid://cyql6o6m4xrv3" path="res://items/permanent_items/upslash/upslash.gd" id="1_vv4qh"]
|
||||
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_ayb0v"]
|
||||
[ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/ItemShine.png" id="4_35mg8"]
|
||||
[ext_resource type="Texture2D" uid="uid://c7mrm8uel7r36" path="res://items/permanent_items/backslash.png" id="5_f1n28"]
|
||||
[ext_resource type="Texture2D" uid="uid://c7mrm8uel7r36" path="res://items/permanent_items/backslash/backslash.png" id="5_f1n28"]
|
||||
[ext_resource type="Texture2D" uid="uid://dxcfkdhl4g24c" path="res://items/active_items/updash/updash.png" id="6_4gfq4"]
|
||||
[ext_resource type="AudioStream" uid="uid://pdd0sy3p4y0d" path="res://sounds/750240__universfield__coin-drop.mp3" id="6_5tj4p"]
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=15 format=3 uid="uid://cxo6bq26huau7"]
|
||||
[gd_scene load_steps=14 format=3 uid="uid://cxo6bq26huau7"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cmaovvr15b3qk" path="res://player/player.tscn" id="2_1bvp3"]
|
||||
[ext_resource type="Texture2D" uid="uid://d3fpq76anm4t7" path="res://world/Background Prototype/Background prototype.png" id="3_kek77"]
|
||||
|
|
@ -13,7 +13,6 @@
|
|||
[ext_resource type="PackedScene" uid="uid://ca5ndobertnp4" path="res://water/water.tscn" id="10_4c57u"]
|
||||
[ext_resource type="Script" uid="uid://cpaskpj67pnaj" path="res://enemies/boss/boss_spawner.gd" id="10_efxa6"]
|
||||
[ext_resource type="PackedScene" uid="uid://cpe4s6vsn0ujd" path="res://enemies/boss/boss.tscn" id="11_efxa6"]
|
||||
[ext_resource type="PackedScene" uid="uid://dy17xhg1yrl0o" path="res://items/active_items/horizontal_dash/horizontal_dash.tscn" id="14_w48qg"]
|
||||
|
||||
[node name="main" type="Node2D"]
|
||||
|
||||
|
|
@ -89,9 +88,6 @@ texture = ExtResource("3_kek77")
|
|||
script = ExtResource("10_efxa6")
|
||||
boss = ExtResource("11_efxa6")
|
||||
|
||||
[node name="HorizontalDash" parent="." instance=ExtResource("14_w48qg")]
|
||||
position = Vector2(116, -3150)
|
||||
|
||||
[connection signal="active_item_changed" from="Player" to="UIOverlay/ItemUI" method="_on_player_active_item_changed"]
|
||||
[connection signal="health_changed" from="Player" to="UIOverlay/Healthbar" method="_on_player_health_changed"]
|
||||
[connection signal="max_hp_changed" from="Player" to="UIOverlay/Healthbar" method="_on_player_max_hp_changed"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue