Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions scenes/common/ground_markers/line_scanner.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ class_name LineScanner
signal scan_finished(areas: Array)

var areas_scanned := []

var scan_started := false

func scan_line(starting_pos: Vector2, target_pos: Vector2, duration: float):
self.global_position = Vector3(starting_pos.x, 0, starting_pos.y)
self.look_at(Vector3(target_pos.x, 0, target_pos.y))

scan_started = true
var tween : Tween = get_tree().create_tween()
tween.tween_property(self, "global_position",
Vector3(target_pos.x, 0, target_pos.y), duration)\
Expand All @@ -27,10 +28,11 @@ func scan_line(starting_pos: Vector2, target_pos: Vector2, duration: float):
func on_scan_complete():
scan_finished.emit(areas_scanned)
areas_scanned = []

scan_started = false

func _on_area_3d_area_entered(area: Area3D) -> void:
if areas_scanned.has(area):
print("Warning: Scanner scanned an area twice.")
return
areas_scanned.append(area)
if scan_started:
if areas_scanned.has(area):
print("Warning: Scanner scanned an area twice.")
#return
areas_scanned.append(area)
30 changes: 30 additions & 0 deletions scenes/p4/debuffs_select_button.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
extends Button


# Called when the node enters the scene tree for the first time.
func _ready() -> void:
var idx := 1
for i in $PanelContainer/VBoxContainer.get_children():
i.button_pressed = idx in Global.p4_ct_selected_debuffs
i.toggled.connect(_on_box_toggled.bind(idx))
idx += 1
pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass


func _on_toggled(toggled_on: bool) -> void:
$PanelContainer.visible = toggled_on
text = "▲" if toggled_on else "▼"
pass # Replace with function body.


func _on_box_toggled(toggled_on: bool, index:= 0) -> void:
if toggled_on:
Global.p4_ct_selected_debuffs.append(index)
else:
var i = Global.p4_ct_selected_debuffs.find(index)
Global.p4_ct_selected_debuffs.remove_at(i)
6 changes: 2 additions & 4 deletions scenes/p4/enemies/wind_up_ryne.tscn
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
[gd_scene load_steps=9 format=4 uid="uid://genonltkscip"]

[ext_resource type="Texture2D" uid="uid://344rd7r2xvok" path="res://assets/p4/enemies/wind_up_ryne/WindUpRyne_mt_m8300b0001_a_d.png" id="1_64bu5"]
[ext_resource type="Texture2D" uid="uid://igma6sc2xqk3" path="res://assets/p4/enemies/wind_up_ryne/WindUpRyne_mt_m8300b0001_a_e.png" id="2_3jaeb"]
[ext_resource type="Texture2D" uid="uid://c3sxf4orpa3cd" path="res://assets/p4/enemies/wind_up_ryne/WindUpRyne_mt_m8300b0001_a_n.png" id="3_1rpfg"]

[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_1ob04"]
load_path = "res://.godot/imported/WindUpRyne_mt_m8300b0001_a_d.png-4fdfa0c63dc73919627d08632c91af31.s3tc.ctex"

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_dkwrc"]
resource_name = "mt_m8300b0001_a"
transparency = 4
cull_mode = 2
vertex_color_use_as_albedo = true
albedo_texture = SubResource("CompressedTexture2D_1ob04")
albedo_texture = ExtResource("1_64bu5")
metallic = 1.0
roughness = 0.929289
emission_enabled = true
Expand Down
73 changes: 72 additions & 1 deletion scenes/p4/p4_ct_main.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=62 format=4 uid="uid://hg8cllrtgwu6"]
[gd_scene load_steps=64 format=4 uid="uid://hg8cllrtgwu6"]

[ext_resource type="Script" path="res://scenes/p4/p4_ct_main.gd" id="1_haofp"]
[ext_resource type="PackedScene" uid="uid://b23aj0fsxbgap" path="res://scenes/menus/control_menu.tscn" id="2_6cme8"]
Expand Down Expand Up @@ -31,6 +31,7 @@
[ext_resource type="PackedScene" uid="uid://jcbpndkhehjl" path="res://scenes/ui/coords.tscn" id="29_npc0t"]
[ext_resource type="Script" path="res://scenes/ui/role_select_button.gd" id="30_e8rr4"]
[ext_resource type="Script" path="res://scenes/p4/debuff_select_button.gd" id="31_nglhs"]
[ext_resource type="Script" path="res://scenes/p4/debuffs_select_button.gd" id="32_7xsi7"]
[ext_resource type="PackedScene" uid="uid://ce72svh5khi1u" path="res://scenes/ui/sequence_select_button.tscn" id="32_uhmye"]
[ext_resource type="Script" path="res://scenes/ui/spectate_button.gd" id="33_bmb45"]
[ext_resource type="PackedScene" uid="uid://cmakti71sjg46" path="res://scenes/ui/info_box.tscn" id="34_3mqdk"]
Expand Down Expand Up @@ -365,6 +366,9 @@ radius = 5.0
[sub_resource type="BoxMesh" id="BoxMesh_k3jiw"]
size = Vector3(200, 3.7, -0.15)

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_eylhw"]
bg_color = Color(0.176471, 0.176471, 0.176471, 1)

[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_p3ej1"]

[sub_resource type="Sky" id="Sky_3kvju"]
Expand Down Expand Up @@ -619,6 +623,7 @@ popup/item_7/id = 7
script = ExtResource("30_e8rr4")

[node name="DebuffSelectButton" type="OptionButton" parent="Buttons"]
visible = false
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
Expand Down Expand Up @@ -658,6 +663,71 @@ theme_override_font_sizes/font_size = 14
text = "Debuff
"

[node name="DebuffsSelectButton" type="Button" parent="Buttons"]
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -512.0
offset_top = 22.0
offset_right = -355.0
offset_bottom = 53.0
grow_horizontal = 0
focus_mode = 0
toggle_mode = true
button_mask = 3
text = "▼"
script = ExtResource("32_7xsi7")

[node name="Label" type="Label" parent="Buttons/DebuffsSelectButton"]
layout_mode = 0
offset_left = 6.835
offset_top = -19.0
offset_right = 103.835
offset_bottom = 4.0
theme_override_font_sizes/font_size = 14
text = "Debuffs
"

[node name="PanelContainer" type="PanelContainer" parent="Buttons/DebuffsSelectButton"]
visible = false
layout_mode = 1
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_bottom = 186.0
grow_horizontal = 2
grow_vertical = 0
theme_override_styles/panel = SubResource("StyleBoxFlat_eylhw")

[node name="VBoxContainer" type="VBoxContainer" parent="Buttons/DebuffsSelectButton/PanelContainer"]
layout_mode = 2
theme_override_constants/separation = 0

[node name="AeroRed" type="CheckBox" parent="Buttons/DebuffsSelectButton/PanelContainer/VBoxContainer"]
layout_mode = 2
text = "Aero/Red"

[node name="IceRed" type="CheckBox" parent="Buttons/DebuffsSelectButton/PanelContainer/VBoxContainer"]
layout_mode = 2
text = "Ice/Red"

[node name="EruptionBlue" type="CheckBox" parent="Buttons/DebuffsSelectButton/PanelContainer/VBoxContainer"]
layout_mode = 2
text = "Eruption/Blue"

[node name="IceBlue" type="CheckBox" parent="Buttons/DebuffsSelectButton/PanelContainer/VBoxContainer"]
layout_mode = 2
text = "Ice/Blue"

[node name="UnholyBlue" type="CheckBox" parent="Buttons/DebuffsSelectButton/PanelContainer/VBoxContainer"]
layout_mode = 2
text = "Unholy/Blue "

[node name="WaterBlue" type="CheckBox" parent="Buttons/DebuffsSelectButton/PanelContainer/VBoxContainer"]
layout_mode = 2
text = "Water/Blue"

[node name="SequenceSelectButton" parent="Buttons" instance=ExtResource("32_uhmye")]

[node name="SpectateButton" type="CheckButton" parent="Buttons"]
Expand Down Expand Up @@ -811,6 +881,7 @@ light_energy = 0.891
[connection signal="pressed" from="Buttons/MainMenuButton" to="." method="_on_main_menu_button_pressed"]
[connection signal="item_selected" from="Buttons/RoleSelectButton" to="Buttons/RoleSelectButton" method="_on_item_selected"]
[connection signal="item_selected" from="Buttons/DebuffSelectButton" to="Buttons/DebuffSelectButton" method="_on_item_selected"]
[connection signal="toggled" from="Buttons/DebuffsSelectButton" to="Buttons/DebuffsSelectButton" method="_on_toggled"]
[connection signal="pressed" from="Buttons/SpectateButton" to="Buttons/SpectateButton" method="_on_pressed"]
[connection signal="pressed" from="Buttons/AeroPlantCheckButton" to="Buttons/AeroPlantCheckButton" method="_on_pressed"]
[connection signal="pressed" from="Buttons/ForceSpiritCheckButton" to="Buttons/ForceSpiritCheckButton" method="_on_pressed"]
Expand Down
15 changes: 12 additions & 3 deletions scenes/p4/sequences/crystal_time_seq.gd
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func water_hit():
# Fireworks go off.
# Aero's hit + snapshot knockback.
# Blizzards hit.
# Eruption his.
# Eruption hits.
func fireworks():
# Spawn Aero AoE's and snapshot targets with source of kb.
var aero_1_circle: CircleAoe = ground_aoe_controller.spawn_circle(v2(get_char("r_aero_sw").global_position),
Expand Down Expand Up @@ -840,13 +840,22 @@ func na_mur_party_setup() -> void:
var shuffle_list := party.keys()
shuffle_list.shuffle()

## Handle manual debuff selection from user.
#if Global.p4_ct_selected_debuff != 0:
#var player_role_key = get_tree().get_first_node_in_group("player").get_role()
## Remove player index and insert at selected key
#shuffle_list.erase(player_role_key)
## For DPS need to convert 1,2,3 index to 3,2,1
#shuffle_list.insert(Global.p4_ct_selected_debuff - 1, player_role_key)

# Handle manual debuff selection from user.
if Global.p4_ct_selected_debuff != 0:
if not Global.p4_ct_selected_debuffs.is_empty():
var rng_debuff = Global.p4_ct_selected_debuffs.pick_random()
var player_role_key = get_tree().get_first_node_in_group("player").get_role()
# Remove player index and insert at selected key
shuffle_list.erase(player_role_key)
# For DPS need to convert 1,2,3 index to 3,2,1
shuffle_list.insert(Global.p4_ct_selected_debuff - 1, player_role_key)
shuffle_list.insert(rng_debuff - 1, player_role_key)

# Check if red/aero (0, 6) are in prio order, otherwise swap them.
if we_prio.find(shuffle_list[0]) > we_prio.find(shuffle_list[6]):
Expand Down
1 change: 1 addition & 0 deletions scripts/autoload/global.gd
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ var p4_dd_force_spirit := false

# P4 Crystallize Time
var p4_ct_selected_debuff := 0 # [random, red/aero, red/ice, blue/eruption, blue/ice, blue,unholy, blue/water]
var p4_ct_selected_debuffs := []
var p4_ct_force_spirit := false
var p4_ct_hide_bots := false

Expand Down