Skip to content

Commit

Permalink
1.8.70-unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
uzkbwza committed Mar 3, 2024
1 parent a8ed3ab commit db1bf2e
Show file tree
Hide file tree
Showing 34 changed files with 551 additions and 231 deletions.
2 changes: 1 addition & 1 deletion Global.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extends Node

signal nag_window()

var VERSION = "1.8.69-steam-unstable"
var VERSION = "1.8.70-steam-unstable"
const RESOLUTION = Vector2(640, 360)

var audio_player
Expand Down
33 changes: 32 additions & 1 deletion Main.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=85 format=2]
[gd_scene load_steps=86 format=2]

[ext_resource path="res://ui/UILayer.gd" type="Script" id=1]
[ext_resource path="res://main.gd" type="Script" id=2]
Expand Down Expand Up @@ -73,6 +73,7 @@
[ext_resource path="res://DebugContainer.gd" type="Script" id=71]
[ext_resource path="res://ui/VelocityLabel.gd" type="Script" id=72]
[ext_resource path="res://sound/ui/outtatime2.wav" type="AudioStream" id=73]
[ext_resource path="res://ui/airoptionbar.png" type="Texture" id=74]

[sub_resource type="ShaderMaterial" id=19]
shader = ExtResource( 50 )
Expand Down Expand Up @@ -519,6 +520,20 @@ margin_bottom = 14.0
mouse_filter = 2
script = ExtResource( 20 )

[node name="ProgressBar" type="TextureProgress" parent="HudLayer/HudLayer/AirMovementDisplay/P1AirMovementLabel/P1AirMovementDisplay"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 2.0
margin_bottom = -2.0
value = 29.0
texture_progress = ExtResource( 74 )
fill_mode = 1
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3

[node name="Padding" type="Control" parent="HudLayer/HudLayer/AirMovementDisplay"]
margin_left = 53.0
margin_right = 441.0
Expand Down Expand Up @@ -549,6 +564,19 @@ mouse_filter = 2
script = ExtResource( 20 )
player_id = 2

[node name="ProgressBar" type="TextureProgress" parent="HudLayer/HudLayer/AirMovementDisplay/P2AirMovementLabel/P2AirMovementDisplay"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 2.0
margin_bottom = -2.0
value = 29.0
texture_progress = ExtResource( 74 )
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3

[node name="FeintDisplay" type="HBoxContainer" parent="HudLayer/HudLayer"]
anchor_left = 0.5
anchor_right = 0.5
Expand Down Expand Up @@ -2149,6 +2177,9 @@ margin_left = 2.0
margin_top = 2.0
margin_right = 157.0
margin_bottom = 204.0
__meta__ = {
"_edit_lock_": true
}

[node name="RoadmapButton" type="Button" parent="UILayer/MainMenu/RoadmapContainer"]
unique_name_in_owner = true
Expand Down
33 changes: 28 additions & 5 deletions characters/BaseChar.gd
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ const PENALTY_MIN_DISPLAY = 50
const PENALTY_TICKS = 120

export var num_air_movements = 2
export var use_air_option_bar = false
export var air_option_bar_max = 100
export var air_option_bar = 0

export(Texture) var character_portrait
export(Texture) var character_portrait2
Expand Down Expand Up @@ -457,6 +460,7 @@ func init(pos=null):
supers_available = MAX_SUPERS
super_meter = MAX_SUPER_METER
last_pos = get_pos()
refresh_air_movements()


func is_ivy():
Expand Down Expand Up @@ -567,7 +571,7 @@ func can_unlock_achievements():
func _ready():
sprite.animation = "Wait"
state_variables.append_array(
["current_di", "current_nudge", "got_blocked", "blocked_last_turn", "burst_cancel_combo", "in_blockstring", "knockback_taken_modifier", "block_used_air_movement", "last_parry_tick", "grounded_last_frame", "wakeup_throw_immunity_ticks", "sadness_immunity_ticks", "blockstun_ticks", "guard_broken_this_turn", "counterhit_this_turn", "feint_parriable", "brace_enabled", "turn_frames", "last_turn_block", "parry_chip_divisor", "parry_knockback_divisor", "feinted_last", "hit_out_of_brace", "brace_effect_applied_yet", "braced_attack", "blocked_hitbox_plus_frames", "visible_combo_count", "melee_attack_combo_scaling_applied", "projectile_hit_cancelling", "used_buffer", "max_di_scaling", "min_di_scaling", "last_input", "penalty_buffer", "buffered_input", "use_buffer", "was_my_turn", "combo_supers", "penalty_ticks", "can_nudge", "buffer_moved_backward", "wall_slams", "moved_backward", "moved_forward", "buffer_moved_forward", "used_air_dodge", "refresh_prediction", "clipping_wall", "has_hyper_armor", "hit_during_armor", "colliding_with_opponent", "clashing", "last_pos", "penalty", "hitstun_decay_combo_count", "touching_wall", "feinting", "feints", "lowest_tick", "is_color_active", "blocked_last_hit", "combo_proration", "state_changed","nudge_amount", "initiative_effect", "reverse_state", "combo_moves_used", "parried_last_state", "initiative", "last_vel", "last_aerial_vel", "trail_hp", "always_perfect_parry", "parried", "got_parried", "parried_this_frame", "grounded_hits_taken", "on_the_ground", "hitlag_applied", "combo_damage", "burst_enabled", "di_enabled", "turbo_mode", "infinite_resources", "one_hit_ko", "dummy_interruptable", "air_movements_left", "super_meter", "supers_available", "parried", "parried_hitboxes", "burst_meter", "bursts_available"]
["current_di", "current_nudge", "got_blocked", "air_option_bar", "air_option_bar_max", "blocked_last_turn", "burst_cancel_combo", "in_blockstring", "knockback_taken_modifier", "block_used_air_movement", "last_parry_tick", "grounded_last_frame", "wakeup_throw_immunity_ticks", "sadness_immunity_ticks", "blockstun_ticks", "guard_broken_this_turn", "counterhit_this_turn", "feint_parriable", "brace_enabled", "turn_frames", "last_turn_block", "parry_chip_divisor", "parry_knockback_divisor", "feinted_last", "hit_out_of_brace", "brace_effect_applied_yet", "braced_attack", "blocked_hitbox_plus_frames", "visible_combo_count", "melee_attack_combo_scaling_applied", "projectile_hit_cancelling", "used_buffer", "max_di_scaling", "min_di_scaling", "last_input", "penalty_buffer", "buffered_input", "use_buffer", "was_my_turn", "combo_supers", "penalty_ticks", "can_nudge", "buffer_moved_backward", "wall_slams", "moved_backward", "moved_forward", "buffer_moved_forward", "used_air_dodge", "refresh_prediction", "clipping_wall", "has_hyper_armor", "hit_during_armor", "colliding_with_opponent", "clashing", "last_pos", "penalty", "hitstun_decay_combo_count", "touching_wall", "feinting", "feints", "lowest_tick", "is_color_active", "blocked_last_hit", "combo_proration", "state_changed","nudge_amount", "initiative_effect", "reverse_state", "combo_moves_used", "parried_last_state", "initiative", "last_vel", "last_aerial_vel", "trail_hp", "always_perfect_parry", "parried", "got_parried", "parried_this_frame", "grounded_hits_taken", "on_the_ground", "hitlag_applied", "combo_damage", "burst_enabled", "di_enabled", "turbo_mode", "infinite_resources", "one_hit_ko", "dummy_interruptable", "air_movements_left", "super_meter", "supers_available", "parried", "parried_hitboxes", "burst_meter", "bursts_available"]
)
add_to_group("Fighter")
connect("got_hit", self, "on_got_hit")
Expand Down Expand Up @@ -947,12 +951,14 @@ func increment_opponent_combo(hitbox):
var host = objs_map[hitbox.host]
var projectile = !host.is_in_group("Fighter")
var will_scale = hitbox.scale_combo or opponent.combo_count == 0
var old_count = opponent.combo_count

if hitbox.increment_combo:
opponent.incr_combo(will_scale, projectile, projectile and hitbox.scale_combo, hitbox.combo_scaling_amount)

if opponent.combo_count <= 1:
opponent.combo_proration = hitbox.damage_proration
if opponent.combo_count == 1 and old_count == 0 and opponent.air_movements_left < opponent.num_air_movements:
opponent.air_movements_left += 1

func apply_hitlag(hitbox):
hitlag_ticks = (hitbox.victim_hitlag) + (COUNTER_HIT_ADDITIONAL_HITLAG_FRAMES if hitbox.counter_hit else 0)
Expand Down Expand Up @@ -1343,7 +1349,7 @@ func block_hitbox(hitbox, force_parry=false, force_block=false, ignore_guard_bre

start_throw_invulnerability()
if !projectile and !perfect_parry and !last_turn_block and initiative:
if hitbox.guard_break and !ignore_guard_break and (!current_state().get_whiffed_block()):
if hitbox.guard_break and !ignore_guard_break and (!current_state().get_whiffed_block()) and opponent.can_guard_break():
hitbox.damage_proration = Utils.int_max(GUARD_BREAK_SCALING, hitbox.damage_proration)
hit_by(hitbox, true)
if current_state().get("guard_broken") != null:
Expand Down Expand Up @@ -1639,6 +1645,9 @@ func get_di_scaling(brace=true):
total = fixed.mul(total, di_modifier)
return total

func can_guard_break():
return true

func get_scaled_di(di):
var scaling = get_di_scaling()
var result = xy_to_dir(di.x, di.y, scaling)
Expand Down Expand Up @@ -1694,7 +1703,7 @@ func use_air_movement():
air_movements_left -= 1

func refresh_air_movements():
air_movements_left = num_air_movements
air_movements_left = Utils.int_max(num_air_movements - 1, 1) if combo_count == 0 else num_air_movements

func refresh_feints():
feints = num_feints
Expand Down Expand Up @@ -1918,7 +1927,8 @@ func tick_before():
queued_data = current_state().data
elif current_state_name in HOLD_FORCE_STATES and current_state().interruptible_on_opponent_turn:
queued_action = HOLD_FORCE_STATES[current_state_name]
elif (was_my_turn or (current_state().interruptible_on_opponent_turn and current_state().next_state_on_hold_on_opponent_turn) or (current_state().hit_fighter and combo_count == 0)) and !feinting and current_state().next_state_on_hold:
elif (was_my_turn or (current_state().interruptible_on_opponent_turn and current_state().next_state_on_hold_on_opponent_turn) \
or (current_state().hit_fighter and combo_count == 0)) and !feinting and current_state().next_state_on_hold:
queued_action = current_state().fallback_state
if feinted_last:
feint_parriable = true
Expand Down Expand Up @@ -2302,6 +2312,19 @@ func on_action_selected(action, data, extra):
action = "Forfeit"
emit_signal("action_selected", action, data, extra)


func drain_air_option_bar(amount):
if infinite_resources:
return
air_option_bar -= amount
if air_option_bar < 0:
air_option_bar = 0

func gain_air_option_bar(amount):
air_option_bar += amount
if air_option_bar > air_option_bar_max:
air_option_bar = air_option_bar_max

func get_state_hash():
var pos = get_pos()
var vel = get_vel()
Expand Down
3 changes: 3 additions & 0 deletions characters/BaseChar.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ gravity = "0.5"
max_air_speed = "13"
max_fall_speed = "8"
num_air_movements = 2
use_air_option_bar = false
air_option_bar_max = 100
air_option_bar = 0
character_portrait = ExtResource( 2 )
character_portrait2 = null
player_info_scene = ExtResource( 39 )
Expand Down
2 changes: 2 additions & 0 deletions characters/mutant/Beast.gd
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ func init(pos=null):
func _on_hit_something(obj, hitbox):
._on_hit_something(obj, hitbox)
# if !juked_this_turn:
if obj.is_in_group("Fighter"):
start_projectile_invulnerability()
add_juke_pips(1)

func on_got_blocked():
Expand Down
20 changes: 10 additions & 10 deletions characters/mutant/Mutant.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -2143,25 +2143,25 @@ projectile_pos_x = 16
projectile_pos_y = -24
force_same_direction_as_previous_state = true
throw_positions = {
ExtResource( 166 ): {
"x": -8,
"y": -17
ExtResource( 160 ): {
"x": 37,
"y": -1
},
ExtResource( 171 ): {
"x": 15,
"y": -10
},
ExtResource( 173 ): {
"x": 9,
"y": -11
},
ExtResource( 169 ): {
"x": 16,
"y": -7
},
ExtResource( 160 ): {
"x": 37,
"y": -1
ExtResource( 173 ): {
"x": 9,
"y": -11
},
ExtResource( 166 ): {
"x": -8,
"y": -17
}
}
interruptible_on_opponent_turn = true
Expand Down
2 changes: 1 addition & 1 deletion characters/mutant/states/WallTrick.gd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func _enter():
"x": 1,
"y": 0,
}
fallback_state = "WallTrickFollowup" if data.y == 0 else "WallTrickFollowup2" if data.x == 1 else "WallTrickFollowup3"
fallback_state = "WallTrickFollowup" if data.y == 0 else "WallTrickFollowup2" if Utils.int_abs(data.x) == 1 else "WallTrickFollowup3"
down = data.y == 1 and data.x == 0

func _tick():
Expand Down
12 changes: 10 additions & 2 deletions characters/robo/RoboExtra.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ var current_dir = null
var jump_selected

onready var bounce = $"%Bounce"
onready var loic = $"%LOIC"



func _ready():
$"%FlyDir".connect("data_changed", self, "emit_signal", ["data_changed"])
Expand All @@ -16,15 +19,17 @@ func _ready():
$"%PullEnabled".connect("pressed", $"%ArmorEnabled", "set_pressed_no_signal", [false])
$"%ArmorEnabled".connect("pressed", $"%PullEnabled", "set_pressed_no_signal", [false])
$"%DriveCancel".connect("pressed", self, "emit_signal", ["data_changed"])
loic.connect("data_changed", self, "emit_signal", ["data_changed"])

func get_extra():
current_dir = $"%FlyDir".get_dir()
return {
"fly_dir": $"%FlyDir".get_data() if visible else fighter.flying_dir,
"fly_dir": $"%FlyDir".get_data() if $"%FlyDir".is_visible_in_tree() else fighter.flying_dir,
"fly_enabled": $"%FlyEnabled".pressed,
"armor_enabled": $"%ArmorEnabled".pressed,
"nade_activated": $"%NadeActive".pressed and $"%NadeActive".visible,
"pull_enabled": $"%PullEnabled".pressed and $"%PullEnabled".visible,
"loic_dir": loic.get_data(),
"drive_cancel": drive_pressed() if fighter.stance != "Drive" else !drive_pressed(),
"bounce": bounce.get_data()
}
Expand Down Expand Up @@ -77,6 +82,7 @@ func update_selected_move(move_state):
func show_options():
$"%FlyDir".hide()
bounce.hide()
loic.hide()
$"%FlyEnabled".hide()
$"%ArmorEnabled".hide()
$"%NadeActive".hide()
Expand All @@ -98,7 +104,7 @@ func show_options():
$"%FlyDir".hide()
$"%FlyEnabled".hide()
else:
if fighter.air_movements_left > 0:
if fighter.air_option_bar > 0:
$"%FlyDir".show()
$"%FlyEnabled".show()
$"%FlyEnabled".set_pressed_no_signal(fighter.fly_ticks_left > 0)
Expand All @@ -114,6 +120,8 @@ func show_options():
$"%FlyEnabled".set_pressed_no_signal(false)
$"%FlyEnabled".disabled = true
$"%FlyDir".hide()
if fighter.orbital_strike_out:
loic.show()

func reset():
if fighter.flying_dir:
Expand Down
26 changes: 19 additions & 7 deletions characters/robo/RoboExtra.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,47 @@ margin_right = 52.0
margin_bottom = 360.0
alignment = 2

[node name="FlyDir" parent="VBoxContainer" index="0" instance=ExtResource( 3 )]
[node name="LOIC" parent="VBoxContainer" index="0" instance=ExtResource( 3 )]
unique_name_in_owner = true
margin_top = 232.0
margin_bottom = 258.0
NW = false
N = false
NE = false
SW = false
S = false
SE = false

[node name="FlyDir" parent="VBoxContainer" index="1" instance=ExtResource( 3 )]
unique_name_in_owner = true
margin_top = 259.0
margin_bottom = 321.0
alignment = 1

[node name="FlyEnabled" type="CheckButton" parent="VBoxContainer" index="1"]
[node name="FlyEnabled" type="CheckButton" parent="VBoxContainer" index="2"]
unique_name_in_owner = true
margin_top = 322.0
margin_right = 52.0
margin_bottom = 334.0
text = "Fly"

[node name="ArmorEnabled" type="CheckButton" parent="VBoxContainer" index="2"]
[node name="ArmorEnabled" type="CheckButton" parent="VBoxContainer" index="3"]
unique_name_in_owner = true
margin_top = 335.0
margin_right = 52.0
margin_bottom = 347.0
size_flags_vertical = 0
text = "Armor"

[node name="NadeActive" type="CheckButton" parent="VBoxContainer" index="3"]
[node name="NadeActive" type="CheckButton" parent="VBoxContainer" index="4"]
unique_name_in_owner = true
margin_top = 348.0
margin_right = 52.0
margin_bottom = 360.0
size_flags_vertical = 0
text = "Bomb"

[node name="PullEnabled" type="CheckButton" parent="VBoxContainer" index="4"]
[node name="PullEnabled" type="CheckButton" parent="VBoxContainer" index="5"]
unique_name_in_owner = true
visible = false
margin_top = 348.0
Expand All @@ -53,7 +64,7 @@ margin_bottom = 360.0
size_flags_vertical = 0
text = "Pull"

[node name="DriveCancel" type="CheckButton" parent="VBoxContainer" index="5"]
[node name="DriveCancel" type="CheckButton" parent="VBoxContainer" index="6"]
unique_name_in_owner = true
visible = false
margin_top = 348.0
Expand All @@ -64,12 +75,13 @@ text = "Drive"

[node name="VBoxContainer2" type="VBoxContainer" parent="." index="1"]
margin_left = 53.0
margin_right = 113.0
margin_right = 53.0
margin_bottom = 360.0
alignment = 2

[node name="Bounce" parent="VBoxContainer2" index="0" instance=ExtResource( 5 )]
unique_name_in_owner = true
visible = false
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 294.0
Expand Down
Loading

0 comments on commit db1bf2e

Please sign in to comment.