balancing

This commit is contained in:
Victor Turgeon 2023-10-11 11:34:37 -04:00
parent 36844903ad
commit c442ccda6f
7 changed files with 29 additions and 18 deletions

View File

@ -86,11 +86,13 @@ alignment = 1
[node name="StatPanel" type="HBoxContainer" parent="UIRoot/ControlPanel"] [node name="StatPanel" type="HBoxContainer" parent="UIRoot/ControlPanel"]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_stretch_ratio = 0.65
mouse_filter = 2 mouse_filter = 2
[node name="Blud" type="Control" parent="UIRoot/ControlPanel/StatPanel"] [node name="Blud" type="Control" parent="UIRoot/ControlPanel/StatPanel"]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_stretch_ratio = 0.75
[node name="HBoxContainer" type="HBoxContainer" parent="UIRoot/ControlPanel/StatPanel/Blud"] [node name="HBoxContainer" type="HBoxContainer" parent="UIRoot/ControlPanel/StatPanel/Blud"]
layout_mode = 1 layout_mode = 1
@ -143,7 +145,7 @@ vertical_alignment = 2
[node name="Middle" type="VBoxContainer" parent="UIRoot/ControlPanel/StatPanel"] [node name="Middle" type="VBoxContainer" parent="UIRoot/ControlPanel/StatPanel"]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_stretch_ratio = 0.8 size_flags_stretch_ratio = 0.5
[node name="Time" type="Control" parent="UIRoot/ControlPanel/StatPanel/Middle"] [node name="Time" type="Control" parent="UIRoot/ControlPanel/StatPanel/Middle"]
layout_mode = 2 layout_mode = 2

View File

@ -13,7 +13,7 @@ func _ready():
return return
var temp : TemplateSpawnable = spawnableScene.instantiate() var temp : TemplateSpawnable = spawnableScene.instantiate()
label.text = str(temp.monsterName) + " (" + str(temp.cost) + ")" label.text = str(temp.monsterName) + "| " + str(temp.cost)
generate_tooltip(temp) generate_tooltip(temp)
temp.queue_free() temp.queue_free()

View File

@ -19,7 +19,7 @@ attackSpeed = 50.0
speed = 4000.0 speed = 4000.0
damage = 1 damage = 1
priority = 1 priority = 1
expReward = 15 expReward = 5
BludGen = 0.5 BludGen = 0.5
cost = 20 cost = 20
minSpawnRange = 10.0 minSpawnRange = 10.0

View File

@ -237,12 +237,12 @@ fill = 1
fill_from = Vector2(0.5, 0.5) fill_from = Vector2(0.5, 0.5)
[node name="NecromancerSpawnable" instance=ExtResource("1_scjiu")] [node name="NecromancerSpawnable" instance=ExtResource("1_scjiu")]
maxHp = 25 maxHp = 50
speed = 2000.0 speed = 2000.0
priority = 10 priority = 10
expReward = 150 expReward = 300
BludGen = 7.0 BludGen = 10.0
cost = 200 cost = 175
canAttack = false canAttack = false
monsterName = "Necromancer" monsterName = "Necromancer"
monsterIcon = SubResource("AtlasTexture_ac0gw") monsterIcon = SubResource("AtlasTexture_ac0gw")

View File

@ -402,12 +402,12 @@ height = 56.0
polygon = PackedVector2Array(3, -25, 3, -25, -7, -18, -8, -7, -7, 11, 0, 16, 7, 15, 12, 7, 10, -5, 8, -16) polygon = PackedVector2Array(3, -25, 3, -25, -7, -18, -8, -7, -7, 11, 0, 16, 7, 15, 12, 7, 10, -5, 8, -16)
[node name="PitFiendSpawnable" instance=ExtResource("1_u8yit")] [node name="PitFiendSpawnable" instance=ExtResource("1_u8yit")]
maxHp = 300 maxHp = 200
attackSpeed = 20.0 attackSpeed = 15.0
speed = 3000.0 speed = 3000.0
damage = 20 damage = 20
priority = 5 priority = 5
expReward = 1250 expReward = 2500
BludGen = 5.0 BludGen = 5.0
cost = 500 cost = 500
monsterName = "Pit Fiend" monsterName = "Pit Fiend"

View File

@ -341,12 +341,12 @@ height = 46.0
polygon = PackedVector2Array(-11, -5, 10, -5, 12, 1, 4, 5, -13, 5, -18, 0) polygon = PackedVector2Array(-11, -5, 10, -5, 12, 1, 4, 5, -13, 5, -18, 0)
[node name="WolfSpawnable" instance=ExtResource("1_t7ryl")] [node name="WolfSpawnable" instance=ExtResource("1_t7ryl")]
maxHp = 14 maxHp = 21
attackSpeed = 70.0 attackSpeed = 70.0
speed = 10000.0 speed = 10000.0
damage = 3 damage = 5
priority = 3 priority = 3
expReward = 75 expReward = 100
BludGen = 0.25 BludGen = 0.25
cost = 50 cost = 50
monsterName = "Wolf" monsterName = "Wolf"

View File

@ -1,6 +1,9 @@
class_name Fabio class_name Fabio
extends CharacterBody2D extends CharacterBody2D
const FREE_EXP_RATE = 12
var freeXpStack = 0
@onready var levelup = [300, 900, 2700, 6500, 14000, 23000, 34000, 48000, 64000] @onready var levelup = [300, 900, 2700, 6500, 14000, 23000, 34000, 48000, 64000]
@onready var is_facing_left: bool = false @onready var is_facing_left: bool = false
@ -96,7 +99,10 @@ func _process(delta):
if !hitanim.is_emitting(): if !hitanim.is_emitting():
anim.modulate.a = 1 anim.modulate.a = 1
if freeXpStack >= 1:
receive_exp(floor(freeXpStack))
freeXpStack -= floor(freeXpStack)
freeXpStack += FREE_EXP_RATE * level * delta
move_and_slide() move_and_slide()
@ -190,23 +196,26 @@ func setLevel(lvl):
lvlsnd.play() lvlsnd.play()
stop_attack() stop_attack()
if level > 2:
damage = 7
if level > 3: if level > 3:
atk = "Attack2" atk = "Attack2"
atkL = atk2l atkL = atk2l
atkR = atk2r atkR = atk2r
damage = 7 damage = 14
if level > 4: if level > 4:
cooldown.wait_time = 1 cooldown.wait_time = 1
if level > 5: if level > 5:
damage = 12 damage = 21
if level > 7: if level > 7:
maxAtks = 2 maxAtks = 2
maxhp += 5 maxhp += 10
hp += 5 * level + 5 hp += 10 * level + 5
if hp > maxhp: if hp > maxhp:
hp = maxhp hp = maxhp