forked from team-sg/hero-mark-2
adjusted famira balancing
This commit is contained in:
parent
7240402776
commit
9e8abe19ef
19 changed files with 128 additions and 41 deletions
|
@ -5,9 +5,16 @@ const SmallExplosion = preload("res://objects/enemy/boss/2600_small_explosion.ts
|
|||
export var direction: Vector2 = Vector2.LEFT
|
||||
export var speed: float = 50.0
|
||||
export var damage: float = 0.0
|
||||
onready var sprite = $AnimatedSprite
|
||||
var lifetime = 0
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
position += direction * speed * delta
|
||||
lifetime += 1
|
||||
if lifetime < 10:
|
||||
var r = rand_range(0,5)
|
||||
sprite.position.y += sin(Game.time * 20)
|
||||
print(lifetime)
|
||||
|
||||
func _exit_tree() -> void:
|
||||
var explosion = SmallExplosion.instance()
|
||||
|
|
|
@ -5,16 +5,17 @@ signal died()
|
|||
signal health_changed(amount)
|
||||
|
||||
|
||||
export var push_speed: float = 60.0
|
||||
export var chase_speed: float = 40.0
|
||||
export var breath_dps: float = 50.0
|
||||
export var push_speed: float = 30.0
|
||||
export var chase_speed: float = 50.0
|
||||
export var breath_dps: float = 20.0
|
||||
export var breath_knockback: float = 16.0
|
||||
export var punch_damage: float = 10.0
|
||||
export var punch_knockback: float = 8.0
|
||||
export var punch_damage: float = 8.0
|
||||
export var punch_knockback: float = 40.0
|
||||
export var hurting: bool = false
|
||||
export var hp: float = 100.0
|
||||
export var sg2083_beam_dps: float = 10.0
|
||||
export var sg2083_path: NodePath
|
||||
export var defense: float = 0.6
|
||||
|
||||
|
||||
onready var animation_player: AnimationPlayer = $"%AnimationPlayer"
|
||||
|
@ -22,7 +23,7 @@ onready var state_chart: StateChart = $StateChart
|
|||
onready var in_range_cast: RayCast2D = $InRangeCast
|
||||
onready var out_range_cast: RayCast2D = $OutRangeCast
|
||||
onready var shoot_range_cast: RayCast2D = $ShootRangeCast
|
||||
|
||||
onready var grumble = $Grumble
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
var sg2083 := get_node(sg2083_path)
|
||||
|
@ -35,6 +36,8 @@ func _physics_process(delta: float) -> void:
|
|||
state_chart.send_event("out_of_range")
|
||||
elif in_range_cast.is_colliding():
|
||||
state_chart.send_event("in_range")
|
||||
if fmod(Game.time, 15.0) == 0.0:
|
||||
Audio.play_sound(Audio.a_grumble,Audio.ac_boss)
|
||||
|
||||
|
||||
func start_push() -> void:
|
||||
|
@ -48,7 +51,7 @@ func stop_push() -> void:
|
|||
func hurt(amount: float) -> void:
|
||||
if hp <= 0.0:
|
||||
return
|
||||
hp -= amount
|
||||
hp -= amount * defense
|
||||
hp = max(hp, 0.0)
|
||||
emit_signal("health_changed", hp)
|
||||
if hp <= 0.0:
|
||||
|
@ -64,6 +67,7 @@ func _attack() -> void:
|
|||
|
||||
|
||||
func _on_Roar_state_entered() -> void:
|
||||
|
||||
animation_player.play("roar", 0.25)
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=53 format=2]
|
||||
[gd_scene load_steps=54 format=2]
|
||||
|
||||
[ext_resource path="res://objects/enemy/boss/famira.gd" type="Script" id=1]
|
||||
[ext_resource path="res://shaders/scale3x.gdshader" type="Shader" id=2]
|
||||
|
@ -26,6 +26,7 @@
|
|||
[ext_resource path="res://graphics/enemy/boss/fami_parts/head_lower.png" type="Texture" id=24]
|
||||
[ext_resource path="res://graphics/enemy/boss/fami_parts/head_upper.png" type="Texture" id=25]
|
||||
[ext_resource path="res://graphics/enemy/boss/fami_parts/eye.png" type="Texture" id=26]
|
||||
[ext_resource path="res://audio/sounds/fami_grumble.ogg" type="AudioStream" id=27]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=11]
|
||||
extents = Vector2( 28, 64 )
|
||||
|
@ -3999,25 +4000,25 @@ collision_mask = 128
|
|||
monitorable = false
|
||||
|
||||
[node name="Body" type="CollisionShape2D" parent="Hitbox"]
|
||||
position = Vector2( 0.00461769, -23.9291 )
|
||||
rotation = -0.0114693
|
||||
position = Vector2( 0.00459766, -23.9291 )
|
||||
rotation = -0.0114701
|
||||
shape = SubResource( 13 )
|
||||
|
||||
[node name="Brain" type="CollisionShape2D" parent="Hitbox"]
|
||||
position = Vector2( 11.5072, -96.7914 )
|
||||
position = Vector2( 11.5069, -96.7914 )
|
||||
rotation = 2.48158
|
||||
z_index = 100
|
||||
shape = SubResource( 14 )
|
||||
|
||||
[node name="LowerJaw" type="CollisionShape2D" parent="Hitbox"]
|
||||
position = Vector2( -21.3082, -76.1166 )
|
||||
rotation = 1.66396
|
||||
position = Vector2( -21.3083, -76.1164 )
|
||||
rotation = 1.66395
|
||||
z_index = 100
|
||||
shape = SubResource( 15 )
|
||||
|
||||
[node name="UpperJaw" type="CollisionShape2D" parent="Hitbox"]
|
||||
position = Vector2( -21.8181, -103.259 )
|
||||
rotation = -1.66238
|
||||
position = Vector2( -21.8184, -103.259 )
|
||||
rotation = -1.66239
|
||||
z_index = 100
|
||||
shape = SubResource( 16 )
|
||||
|
||||
|
@ -4132,6 +4133,9 @@ collision_mask = 4
|
|||
collide_with_areas = true
|
||||
collide_with_bodies = false
|
||||
|
||||
[node name="Grumble" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( 27 )
|
||||
|
||||
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|
||||
[connection signal="body_entered" from="Hitbox" to="." method="_on_Hitbox_body_entered"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Roar" to="." method="_on_Roar_state_entered" flags=3]
|
||||
|
|
|
@ -19,10 +19,10 @@ export var shot_speed: float = 50.0
|
|||
export var move_speed: float = 30.0
|
||||
export var safe_from_breath: bool = false
|
||||
export var make_explosions: bool = false
|
||||
export var bullet_damage: float = 1.0
|
||||
export var bullet_energy: float = 5.0
|
||||
export var beam_energy: float = 50.0
|
||||
export var duck_energy: float = 10.0
|
||||
export var bullet_damage: float = 0.2
|
||||
export var bullet_energy: float = 0.0
|
||||
export var beam_energy: float = 75.0
|
||||
export var duck_energy: float = 0.15
|
||||
export var explosion_rect: Rect2
|
||||
export var famira_path: NodePath
|
||||
|
||||
|
@ -43,7 +43,6 @@ func _physics_process(delta: float) -> void:
|
|||
return
|
||||
State.STAND:
|
||||
if Input.is_action_pressed("move_down") and energy >= duck_energy:
|
||||
set_energy(energy - duck_energy)
|
||||
state = State.DUCK
|
||||
anims.play("Duck")
|
||||
elif Input.is_action_pressed("move_right"):
|
||||
|
@ -55,6 +54,8 @@ func _physics_process(delta: float) -> void:
|
|||
State.DUCK:
|
||||
if not Input.is_action_pressed("move_down") and anims.current_animation.empty():
|
||||
anims.play("UnDuck")
|
||||
energy -= duck_energy
|
||||
|
||||
State.FORWARD:
|
||||
move_and_slide(Vector2(move_speed, 0.0))
|
||||
State.BACK:
|
||||
|
@ -87,7 +88,7 @@ func land(duck: bool) -> void:
|
|||
|
||||
func shoot() -> void:
|
||||
set_energy(energy - bullet_energy)
|
||||
Audio.play_sound(Audio.a_bullet_barrage,Audio.ac_collectible)
|
||||
Audio.play_sound(Audio.a_vulcan,Audio.ac_menu)
|
||||
for pos in bullet_positions.get_children():
|
||||
var bullet = Bullet.instance()
|
||||
bullet.global_position = pos.global_position
|
||||
|
|
|
@ -1610,7 +1610,7 @@ update_scale = false
|
|||
|
||||
[node name="KneeBack" type="Sprite" parent="Axle"]
|
||||
modulate = Color( 0.74902, 0.74902, 0.74902, 1 )
|
||||
position = Vector2( 6.25088, 28.1233 )
|
||||
position = Vector2( 6.25089, 28.1233 )
|
||||
scale = Vector2( 1, -1 )
|
||||
z_index = -1
|
||||
texture = ExtResource( 8 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue