Compare commits

...

8 Commits

Author SHA1 Message Date
HumanoidSandvichDispenser 97cdf26751
Merge branch 'master' into wip 2024-09-16 12:31:16 -07:00
HumanoidSandvichDispenser cbbaf08a6f
Modify UI 2024-09-16 12:24:53 -07:00
HumanoidSandvichDispenser f5444dd55f
Add wait/delay for Doc to exit when attacking 2024-09-16 12:23:32 -07:00
HumanoidSandvichDispenser abf6316146
Update lighting effects 2024-09-16 12:23:14 -07:00
HumanoidSandvichDispenser b3b0281b5e
Add Sword effects and self knockback 2024-09-16 12:22:30 -07:00
HumanoidSandvichDispenser 358b933195
Redesign Arena 2024-09-16 12:17:18 -07:00
HumanoidSandvichDispenser 12767e3c70
Merge branch 'wip' into master (#42)
* Implement igniting bow arrows

* Add bow alt-fire ability
2024-07-06 22:51:09 -07:00
HumanoidSandvichDispenser f0ac72b919
Redesign Arena tilemap (#41)
* Add new tileset

* Change tilemap
2024-06-24 16:07:15 -07:00
16 changed files with 397 additions and 270 deletions

View File

@ -17,3 +17,9 @@ I can write english pretty good but since It is not my mothertounge I will make
The dark room was clouded with smoke as the 1st lieutenant entered the room. He walked slowly , trying to avoid the big clouds, towards the black desk where a man in black cape was sitting and enjoying his last cigar.
=> END
~ wall_writing
"Life's not fair. Get a grip." -- Doc, The Two Time
=> END

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://xgy5gihyxgih"
path="res://.godot/imported/fire-32x32.png-6317a2b0efbef8c9d4ff90f6384746c6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Sprites/Misc/fire-32x32.png"
dest_files=["res://.godot/imported/fire-32x32.png-6317a2b0efbef8c9d4ff90f6384746c6.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -804,14 +804,8 @@ script = ExtResource("8_r8ejq")
Hotbar = []
Items = []
[node name="DocLance" parent="Inventory" node_paths=PackedStringArray("Hitbox", "AnimationPlayer", "ParryParticles", "StateMachine", "Anchor", "HandAnchor") instance=ExtResource("24_2es2r")]
[node name="DocLance" parent="Inventory" instance=ExtResource("24_2es2r")]
unique_name_in_owner = true
Hitbox = NodePath("Hitbox")
AnimationPlayer = NodePath("AnimationPlayer")
ParryParticles = NodePath("Anchor/Node2D/Sprite2D/ParryParticles")
StateMachine = NodePath("State")
Anchor = NodePath("Anchor")
HandAnchor = NodePath("Anchor/Node2D/Sprite2D/Hand")
[node name="InteractionTrigger" parent="." instance=ExtResource("33_08dyq")]

View File

@ -27,7 +27,6 @@
[ext_resource type="Script" path="res://BoundingBoxes/InteractionRay.cs" id="13_hs3u1"]
[ext_resource type="Script" path="res://State/Character/PlayerHealState.cs" id="13_t103m"]
[ext_resource type="Script" path="res://State/Character/PlayerMaxLevelState.cs" id="14_1sn10"]
[ext_resource type="Texture2D" uid="uid://d1ukste16yq6v" path="res://Assets/Sprites/Particles/player-light.png" id="15_3hahh"]
[ext_resource type="Script" path="res://Utils/DamageTime.cs" id="15_4xl06"]
[ext_resource type="AudioStream" uid="uid://st8qgqiygy5a" path="res://Assets/Sounds/electricity.wav" id="15_61bua"]
[ext_resource type="PackedScene" uid="uid://ce0ph4wk0ylra" path="res://UI/TargetTracer.tscn" id="22_hxi53"]
@ -39,6 +38,7 @@
[ext_resource type="Resource" uid="uid://cl7jvdu2lnv2d" path="res://Items/Weapons/Sword.tres" id="33_3qyfl"]
[ext_resource type="Resource" uid="uid://cjsh0dcgbfn77" path="res://Items/Weapons/Bow.tres" id="34_70ron"]
[ext_resource type="Resource" uid="uid://iqe6rgnb3jur" path="res://Items/Weapons/Pugio.tres" id="35_4pap1"]
[ext_resource type="Texture2D" uid="uid://coarr28adgo1u" path="res://Assets/Sprites/Particles/point-light.png" id="38_6udj8"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_h78y7"]
shader = ExtResource("2_ngsgt")
@ -871,12 +871,12 @@ script = ExtResource("13_hs3u1")
[node name="PointLight2D" type="PointLight2D" parent="."]
position = Vector2(0, -4)
blend_mode = 2
energy = 0.2
shadow_enabled = true
shadow_filter = 2
shadow_filter_smooth = 3.0
texture = ExtResource("15_3hahh")
height = 10.0
texture = ExtResource("38_6udj8")
texture_scale = 0.5
[node name="DamageTime" type="Node" parent="."]
script = ExtResource("15_4xl06")

View File

@ -84,9 +84,7 @@ texture = ExtResource("2_cwgtj")
color = Color(1, 0.811765, 0.537255, 1)
energy = 1.2
blend_mode = 2
shadow_enabled = true
shadow_filter_smooth = 3.0
shadow_item_cull_mask = 8
texture = ExtResource("2_hotvd")
offset = Vector2(0, 2)
texture_scale = 0.25

View File

@ -206,6 +206,11 @@ public partial class Sword : Weapon, IParryable
this);
}
}
if (Hitbox.Hits.Count > 0)
{
Character.ApplyImpulse(-Character.Target.Normalized() * Knockback);
}
}
public void AttemptParry(Weapon otherWeapon)

View File

@ -103,6 +103,18 @@ tracks/5/keys = {
"update": 1,
"values": [true]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("SwingSprite:position")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
[sub_resource type="Animation" id="Animation_ameas"]
resource_name = "anticipate"
@ -173,7 +185,7 @@ tracks/0/path = NodePath("Anchor:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.15, 0.35),
"times": PackedFloat32Array(0, 0.1, 0.35),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [-1.5708, 1.5708, 1.5708]
@ -209,10 +221,10 @@ tracks/3/path = NodePath("Anchor/Node2D:rotation")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 0.15),
"transitions": PackedFloat32Array(1, 1),
"times": PackedFloat32Array(0.1),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0.0, 2.35619]
"values": [2.35619]
}
tracks/4/type = "method"
tracks/4/imported = false
@ -235,10 +247,34 @@ tracks/5/path = NodePath("Anchor/Node2D/Sprite2D:visible")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0, 0.35),
"transitions": PackedFloat32Array(1, 1),
"times": PackedFloat32Array(0, 0.1, 0.35),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [true, false]
"values": [false, true, false]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("SwingSprite:modulate")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0, 0.2, 0.35),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Color(2, 2, 2, 1), Color(2, 2, 2, 1), Color(2, 2, 2, 0)]
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("SwingSprite:position")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0, 0.2, 0.35),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(0, 0), Vector2(2, 0)]
}
[sub_resource type="Animation" id="Animation_pclfs"]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -15,24 +15,39 @@ public partial class DocExitState : NPCState
private double _currentDuration = 0;
private bool _hasPlayedExitAnim = false;
private bool _previouslyCouldAttack = false;
public override NPCState Enter(IState<NPCState> previousState)
{
_currentDuration = Duration;
TelegraphAnimationPlayer.Play("exit_out");
NPC.ShouldMove = false;
_hasPlayedExitAnim = false;
return null;
}
public override void Exit(IState<NPCState> nextState)
{
NPC.CanAttack = _previouslyCouldAttack;
}
public override NPCState Process(double delta)
{
if ((_currentDuration -= delta) <= 0)
if (!NPC.Inventory.IsUsingItem)
{
return TelegraphState;
if (!_hasPlayedExitAnim)
{
_hasPlayedExitAnim = true;
_previouslyCouldAttack = NPC.CanAttack;
NPC.CanAttack = false;
TelegraphAnimationPlayer.Play("exit_out");
}
if ((_currentDuration -= delta) <= 0)
{
return TelegraphState;
}
}
return null;
}

View File

@ -33,8 +33,19 @@ public partial class DocTelegraphState : NPCState
do
{
float randX = GD.RandRange(-112, 112);
float randY = GD.RandRange(-112, 112);
float randX = GD.RandRange(32, 112);
float randY = GD.RandRange(32, 112);
if (GD.Randi() % 2 == 0)
{
randX = -randX;
}
if (GD.Randi() % 2 == 0)
{
randY = -randY;
}
randVec = new Vector2(randX, randY);
}
while (randVec.DistanceSquaredTo(player.GlobalPosition) < 9216);

View File

@ -113,9 +113,8 @@ layout_mode = 2
theme_override_constants/margin_top = 16
theme_override_constants/margin_right = 16
[node name="Hotbar" parent="SubViewportContainer/UIViewport/MainUILayer/Main/Top/Right" node_paths=PackedStringArray("_slots") instance=ExtResource("5_mmp18")]
[node name="Hotbar" parent="SubViewportContainer/UIViewport/MainUILayer/Main/Top/Right" instance=ExtResource("5_mmp18")]
layout_mode = 2
_slots = [NodePath("InventorySlot"), NodePath("InventorySlot2"), NodePath("InventorySlot3")]
[node name="BoxContainer" type="HBoxContainer" parent="SubViewportContainer/UIViewport/MainUILayer/Main"]
layout_mode = 1
@ -128,17 +127,15 @@ grow_horizontal = 0
grow_vertical = 2
alignment = 2
[node name="ShopMenu" parent="SubViewportContainer/UIViewport/MainUILayer/Main/BoxContainer" node_paths=PackedStringArray("_inventoryGrid") instance=ExtResource("8_ep3ae")]
[node name="ShopMenu" parent="SubViewportContainer/UIViewport/MainUILayer/Main/BoxContainer" instance=ExtResource("8_ep3ae")]
unique_name_in_owner = true
visible = false
layout_mode = 2
_inventoryGrid = NodePath("PanelContainer/VBoxContainer/ScrollContainer/InventoryGrid")
[node name="InventoryMenu" parent="SubViewportContainer/UIViewport/MainUILayer/Main/BoxContainer" node_paths=PackedStringArray("_inventoryGrid") instance=ExtResource("10_5m8qa")]
[node name="InventoryMenu" parent="SubViewportContainer/UIViewport/MainUILayer/Main/BoxContainer" instance=ExtResource("10_5m8qa")]
unique_name_in_owner = true
visible = false
layout_mode = 2
_inventoryGrid = NodePath("PanelContainer/VBoxContainer/ScrollContainer/InventoryGrid")
[node name="Bottom" type="HBoxContainer" parent="SubViewportContainer/UIViewport/MainUILayer/Main"]
layout_mode = 1

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=15 format=3 uid="uid://cyggkyqosjk36"]
[ext_resource type="StyleBox" path="res://UI/Themes/Panel.tres" id="1_2ffty"]
[ext_resource type="StyleBox" uid="uid://bqhotx2ogucye" path="res://UI/Themes/Panel.tres" id="1_2ffty"]
[ext_resource type="Script" path="res://UI/Inventory/ShopMenu.cs" id="1_8c1y7"]
[ext_resource type="Shader" path="res://Shaders/WipeXY.gdshader" id="2_jqery"]
[ext_resource type="FontFile" uid="uid://cgwa8bjiyv534" path="res://Assets/Fonts/alagard.ttf" id="3_aj4jx"]

View File

@ -1,11 +1,11 @@
[gd_resource type="Theme" load_steps=11 format=3 uid="uid://cksjbu3vrup5"]
[ext_resource type="FontFile" uid="uid://6bvgjbmqovau" path="res://Assets/Fonts/calamity/calamity.ttf" id="1_334fe"]
[ext_resource type="StyleBox" path="res://UI/Themes/InventorySlotButtonFocus.tres" id="2_3w5h1"]
[ext_resource type="StyleBox" uid="uid://nvb4etac7ee2" path="res://UI/Themes/InventorySlotButtonFocus.tres" id="2_3w5h1"]
[ext_resource type="Texture2D" uid="uid://b16461tjso0j7" path="res://Assets/Sprites/UI/hotbar-inactive.png" id="2_6sv27"]
[ext_resource type="StyleBox" path="res://UI/Themes/Panel.tres" id="2_jlgx8"]
[ext_resource type="StyleBox" path="res://UI/Themes/InventorySlotButtonNormal.tres" id="3_nuiio"]
[ext_resource type="StyleBox" path="res://UI/Themes/InventorySlotButtonPressed.tres" id="4_mllnb"]
[ext_resource type="StyleBox" uid="uid://bqhotx2ogucye" path="res://UI/Themes/Panel.tres" id="2_jlgx8"]
[ext_resource type="StyleBox" uid="uid://cfqp0ycwvwx7c" path="res://UI/Themes/InventorySlotButtonNormal.tres" id="3_nuiio"]
[ext_resource type="StyleBox" uid="uid://pqtn0115bqtp" path="res://UI/Themes/InventorySlotButtonPressed.tres" id="4_mllnb"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_wk5ww"]
content_margin_left = 4.0