Skip to content

Commit

Permalink
1.8.66-unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
uzkbwza committed Jan 26, 2024
1 parent 9da8230 commit bd55567
Show file tree
Hide file tree
Showing 38 changed files with 19,069 additions and 335 deletions.
18,575 changes: 18,575 additions & 0 deletions atlas.png.json

Large diffs are not rendered by default.

31 changes: 28 additions & 3 deletions characters/BaseChar.gd
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ var queued_data = null
var queued_extra = null
var buffered_input = {}
var last_input = {}
var previous_input = {}
var use_buffer = false

var hit_out_of_brace = false
Expand Down Expand Up @@ -696,6 +697,7 @@ func meter_gain_modified(amount):
return amount

func gain_super_meter(amount,stale_amount = "1.0"):

if amount == null:
return

Expand All @@ -720,6 +722,19 @@ func gain_super_meter(amount,stale_amount = "1.0"):
unlock_achievement("ACH_ULTIMATE_POWER", true)
break


func drain_super_meter(amount):
if infinite_resources:
return
super_meter -= amount
if super_meter < 0:
if supers_available > 0:
super_meter += MAX_SUPER_METER
supers_available -= 1
else:
super_meter = 0


func spawn_object(projectile: PackedScene, pos_x: int, pos_y: int, relative=true, data=null, local=true):
var obj = .spawn_object(projectile, pos_x, pos_y, relative, data, local)
# if obj is BaseProjectile:
Expand All @@ -728,7 +743,7 @@ func spawn_object(projectile: PackedScene, pos_x: int, pos_y: int, relative=true

func combo_stale_meter(meter: int):
var staling = get_combo_stale(combo_count)
return fixed.round(fixed.mul(fixed.mul(str(meter), staling), METER_GAIN_MODIFIER))
return fixed.round(fixed.mul(fixed.mul(str(meter), staling), METER_GAIN_MODIFIER if current_tick > 0 else "1.0"))

func update_data():
data = get_data()
Expand Down Expand Up @@ -1259,6 +1274,7 @@ func block_hitbox(hitbox, force_parry=false, force_block=false, ignore_guard_bre
var input_timing = current_state().data["Melee Parry Timing"].count + (blocked_hitbox_plus_frames - opponent.blocked_hitbox_plus_frames)
# print(input_timing)
var parry_timing = 0
state_interruptable = false

if not projectile:
if current_state() is GroundedParryState:
Expand Down Expand Up @@ -1319,14 +1335,14 @@ func block_hitbox(hitbox, force_parry=false, force_block=false, ignore_guard_bre
if perfect_parry:
parried_last_state = true
last_parry_tick = current_tick
if !hitbox.block_punishable:
if !hitbox.block_punishable and !projectile:
parry_combo = true
else:
blocked_last_hit = true
blocked_last_turn = true

start_throw_invulnerability()
if !projectile and !perfect_parry and !last_turn_block and initiative:
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()):
hitbox.damage_proration = Utils.int_max(GUARD_BREAK_SCALING, hitbox.damage_proration)
hit_by(hitbox, true)
Expand All @@ -1347,6 +1363,7 @@ func block_hitbox(hitbox, force_parry=false, force_block=false, ignore_guard_bre
if !current_state() is GroundedParryState:
opponent.current_state().feinting = false


parried = true

hitlag_ticks = 0
Expand Down Expand Up @@ -1461,6 +1478,7 @@ func block_hitbox(hitbox, force_parry=false, force_block=false, ignore_guard_bre
host.on_got_blocked()
if host.has_method("on_got_blocked_by"):
host.on_got_blocked_by(self)
on_blocked_something()
else:
if not projectile:
gain_super_meter(parry_meter)
Expand All @@ -1481,6 +1499,8 @@ func block_hitbox(hitbox, force_parry=false, force_block=false, ignore_guard_bre
play_sound("Parry")
emit_signal("parried")

func on_blocked_something():
pass

func set_block_stun(total_plus_frames, block_hitlag=null):
# blockstun_ticks = 0
Expand Down Expand Up @@ -1836,6 +1856,7 @@ func tick_before():
"data": queued_data,
"extra": queued_extra,
}
previous_input = last_input.duplicate(true)
feinted_last = feinting
var pressed_feint = false
if refresh_prediction:
Expand All @@ -1861,6 +1882,7 @@ func tick_before():
process_extra(queued_extra)
pressed_feint = feinting
if queued_action:
process_action(queued_action)
turn_frames = 0
opponent.turn_frames = 0
turn_start_effects()
Expand Down Expand Up @@ -1923,6 +1945,9 @@ func tick_before():
was_my_turn = false
lowest_tick = current_state().current_real_tick

func process_action(queued_action):
pass

func touching_which_wall():
var col_box = get_collision_box()
var vel = get_vel()
Expand Down
23 changes: 9 additions & 14 deletions characters/BaseChar.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ change_stance_to = "Normal"
initiative_effect = true
particle_location = Vector2( 13, -11 )
parry_type = 1
disable_aerial_movement = true

[node name="ParryAir" type="Node2D" parent="StateMachine" index="6"]
script = ExtResource( 68 )
Expand Down Expand Up @@ -1881,14 +1882,14 @@ custom_colors/font_color = Color( 1, 0.2, 0.239216, 1 )
text = "QUITTER"
align = 1

[node name="ActionableLabel" type="Label" parent="." index="8"]
[node name="ActionableLabel" type="Label" parent="." index="9"]
visible = false
anchor_left = 0.5
anchor_right = 0.5
margin_left = -44.0
margin_top = -40.0
margin_right = 44.0
margin_bottom = -26.0
margin_bottom = -20.0
theme = ExtResource( 47 )
custom_constants/line_spacing = -2
text = "Ready
Expand All @@ -1898,7 +1899,7 @@ __meta__ = {
"_edit_lock_": true
}

[node name="BlockFrameLabel" type="Label" parent="." index="9"]
[node name="BlockFrameLabel" type="Label" parent="." index="10"]
visible = false
anchor_left = 0.5
anchor_right = 0.5
Expand All @@ -1911,26 +1912,20 @@ custom_colors/font_color = Color( 0.113725, 0.552941, 0.960784, 1 )
custom_constants/line_spacing = -2
text = "parry @ xf "
align = 1
__meta__ = {
"_edit_lock_": true
}

[node name="HitFrameLabel" type="Label" parent="." index="10"]
[node name="HitFrameLabel" type="Label" parent="." index="11"]
visible = false
anchor_left = 0.5
anchor_right = 0.5
margin_left = -44.0
margin_top = -49.0
margin_right = 44.0
margin_bottom = -38.0
margin_left = -43.0
margin_top = -12.0
margin_right = 45.0
margin_bottom = -1.0
theme = ExtResource( 47 )
custom_colors/font_color = Color( 1, 0.2, 0.239216, 1 )
custom_constants/line_spacing = -2
text = "hit @ xf "
align = 1
__meta__ = {
"_edit_lock_": true
}

[node name="EmoteLabel" type="RichTextLabel" parent="." index="12"]
margin_left = -141.0
Expand Down
8 changes: 8 additions & 0 deletions characters/mutant/Beast.gd
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ func stop_rebirth_fx():
rebirth_particle_effect.stop_emitting()
rebirth_particle_effect.hide()

func process_action(action):
.process_action(action)
if state_machine.states_map.has(action) and state_machine.states_map[action].has_hitboxes and previous_input and previous_input.action == "AirDash":
can_air_dash = true

func process_extra(extra):
juked_this_turn = false
.process_extra(extra)
Expand Down Expand Up @@ -179,6 +184,9 @@ func tick():
if juke_dir_x == "0" and juke_dir_y == "0":
reset_momentum()

if penalty_ticks > 0:
juke_pips = 0

if is_in_hurt_state(false) or "Knockdown" in current_state().state_name:
juke_ticks = 0
up_juke_ticks = 0
Expand Down
15 changes: 8 additions & 7 deletions characters/mutant/Mutant.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -2116,9 +2116,9 @@ projectile_pos_x = 16
projectile_pos_y = -24
force_same_direction_as_previous_state = true
throw_positions = {
ExtResource( 160 ): {
"x": 37,
"y": -1
ExtResource( 166 ): {
"x": -8,
"y": -17
},
ExtResource( 171 ): {
"x": 15,
Expand All @@ -2132,9 +2132,9 @@ ExtResource( 169 ): {
"x": 16,
"y": -7
},
ExtResource( 166 ): {
"x": -8,
"y": -17
ExtResource( 160 ): {
"x": 37,
"y": -1
}
}
interruptible_on_opponent_turn = true
Expand All @@ -2147,7 +2147,7 @@ release_frame = 24
use_start_throw_pos = false
use_release_throw_pos = false
hitstun_ticks = 10
knockback = "16"
knockback = "20"
dir_y = "0.5"
knockdown = false
knockdown_extends_hitstun = false
Expand Down Expand Up @@ -3252,6 +3252,7 @@ __meta__ = {
title = "Slop Dash"
button_texture = ExtResource( 293 )
air_type = 2
self_interruptable = false
interrupt_from_string = "Aerial
Grounded
AerialMovement
Expand Down
2 changes: 1 addition & 1 deletion characters/mutant/states/SlopDash.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ extends "res://characters/states/AirDash.gd"
const force_air_juke = true

func _enter():
host.can_air_dash = false
# started_in_air = true
# if host.is_grounded():
# host.set_grounded(false)
# host.move_directly(0, -1)
host.can_air_dash = false

func _frame_0():
if host.is_grounded():
Expand Down
19 changes: 17 additions & 2 deletions characters/robo/Robot.gd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const START_LOIC_METER: int = 500
const LOIC_GAIN = 5
const LOIC_GAIN_NO_ARMOR = 5
const MAGNET_TICKS = 100
const MAGNET_STRENGTH = "2"
const MAGNET_STRENGTH = "1.6"
const MAGNET_BOMB_STRENGTH = "1.6"
const COMBO_MAGNET_STRENGTH = "1.0"
const MAGNET_MAX_STRENGTH = "2.0"
Expand All @@ -37,6 +37,7 @@ const NEUTRAL_MAGNET_MODIFIER_MAX = "2.75"
const MAGNET_VISUAL_ARC_SIZE = 20000
const ARMOR_STARTUP_TICKS = 3
const WC_EXTRA_ARMOR_STARTUP_TICKS = 2
const MAGNETIZE_OPPONENT_BLOCKED_MOD = "0.75"

const FLY_GRAV = "0.05"
const FLY_MAX_FALL_SPEED = "100.0"
Expand Down Expand Up @@ -69,6 +70,8 @@ var armor_startup_ticks = 0
var used_earthquake_grab = false
var started_magnet_in_initiative = false
var force_fly = false
var magnetize_opponent = false
var magnetize_opponent_blocked = false

var drive_cancel = false
var buffer_drive_cancel = false
Expand Down Expand Up @@ -194,6 +197,16 @@ func big_landing_effect():
camera.bump(Vector2.UP, 10, 20 / 60.0)

func magnetize():
if magnetize_opponent:
var dir = get_opponent_dir_vec()
var strength = MAGNET_STRENGTH
if magnetize_opponent_blocked:
strength = fixed.mul(strength, MAGNETIZE_OPPONENT_BLOCKED_MOD)
var force = fixed.vec_mul(dir.x, dir.y, fixed.mul(strength, "-1"))
if fixed.round(distance_to(opponent)) < MAGNET_MIN_BOMB_DIST:
if (MAGNET_TICKS - magnet_ticks_left) > MAGNET_MIN_TICKS:
magnet_ticks_left = 1
opponent.apply_force(force.x, force.y if opponent.is_grounded() else "0")
var obj = obj_from_name(grenade_object)
if obj:
var dir = get_object_dir_vec(obj)
Expand All @@ -202,10 +215,10 @@ func magnetize():
if (MAGNET_TICKS - magnet_ticks_left) > MAGNET_MIN_TICKS:
magnet_ticks_left = 1
obj.apply_force(force.x, force.y)
pass
else:
magnet_ticks_left = 1


func add_armor_pip():
if armor_pips < MAX_ARMOR_PIPS:
spawn_particle_effect_relative(preload("res://characters/robo/ShieldEffect.tscn"), Vector2(0, -16))
Expand Down Expand Up @@ -250,6 +263,8 @@ func tick():
magnet_ticks_left -= 1
else:
stop_magnet_fx()
magnetize_opponent = false
magnetize_opponent_blocked = false
pass
if landed_move:
if not (current_state() is CharacterHurtState):
Expand Down
Loading

0 comments on commit bd55567

Please sign in to comment.