Compare commits
1 Commits
v0.2.55
...
d2a9988fd5
| Author | SHA1 | Date | |
|---|---|---|---|
| d2a9988fd5 |
@@ -83,8 +83,6 @@ jobs:
|
|||||||
|
|
||||||
Export:
|
Export:
|
||||||
runs-on: godot
|
runs-on: godot
|
||||||
env:
|
|
||||||
RUNNER_TOOL_CACHE: /toolcache # Runner Tool Cache
|
|
||||||
needs:
|
needs:
|
||||||
- BumpTag
|
- BumpTag
|
||||||
|
|
||||||
@@ -107,7 +105,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir -v -p build/windows
|
mkdir -v -p build/windows
|
||||||
${{ steps.setup-godot.outputs.godot_bin }} --headless --verbose --export-release "Windows Desktop" build/windows/${{ env.GAME_NAME }}.exe
|
${{ steps.setup-godot.outputs.godot_bin }} --headless --verbose --export-release "Windows Desktop" build/windows/${{ env.GAME_NAME }}.exe
|
||||||
ls -la build/windows
|
|
||||||
|
|
||||||
# - name: Setup Butler
|
# - name: Setup Butler
|
||||||
# shell: bash
|
# shell: bash
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir -v -p build/windows
|
mkdir -v -p build/windows
|
||||||
${{ steps.setup-godot.outputs.godot_bin }} --headless --verbose --build-solutions --export-release "Windows Desktop" build/windows/${{ env.GAME_NAME }}.exe
|
${{ steps.setup-godot.outputs.godot_bin }} --headless --verbose --build-solutions --export-release "Windows Desktop" build/windows/${{ env.GAME_NAME }}.exe
|
||||||
ls -la build/windows
|
|
||||||
zip -r Windows.zip build/windows
|
zip -r Windows.zip build/windows
|
||||||
- name: Upload Windows to itch.io
|
- name: Upload Windows to itch.io
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -80,7 +79,7 @@ jobs:
|
|||||||
mkdir -v -p build/windowsArm
|
mkdir -v -p build/windowsArm
|
||||||
${{ steps.setup-godot.outputs.godot_bin }} --headless --verbose --build-solutions --export-release "Windows ARM" build/windowsArm/${{ env.GAME_NAME }}.exe
|
${{ steps.setup-godot.outputs.godot_bin }} --headless --verbose --build-solutions --export-release "Windows ARM" build/windowsArm/${{ env.GAME_NAME }}.exe
|
||||||
zip -r WindowsArm.zip build/windowsArm
|
zip -r WindowsArm.zip build/windowsArm
|
||||||
- name: Upload Windows ARM to itch.io
|
- name: Upload Windows to itch.io
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
BUTLER_API_KEY: ${{ secrets.BUTLER_TOKEN }}
|
BUTLER_API_KEY: ${{ secrets.BUTLER_TOKEN }}
|
||||||
@@ -95,7 +94,7 @@ jobs:
|
|||||||
mkdir -v -p build/linux
|
mkdir -v -p build/linux
|
||||||
${{ steps.setup-godot.outputs.godot_bin }} --headless --verbose --export-release "Linux/X11" build/linux/${{ env.GAME_NAME }}.x86_64
|
${{ steps.setup-godot.outputs.godot_bin }} --headless --verbose --export-release "Linux/X11" build/linux/${{ env.GAME_NAME }}.x86_64
|
||||||
zip -r Linux.zip build/linux
|
zip -r Linux.zip build/linux
|
||||||
- name: Upload Linux to itch.io
|
- name: Upload Windows to itch.io
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
BUTLER_API_KEY: ${{ secrets.BUTLER_TOKEN }}
|
BUTLER_API_KEY: ${{ secrets.BUTLER_TOKEN }}
|
||||||
@@ -110,7 +109,7 @@ jobs:
|
|||||||
mkdir -v -p build/mac
|
mkdir -v -p build/mac
|
||||||
${{ steps.setup-godot.outputs.godot_bin }} --headless --verbose --export-release "macOS" build/mac/${{ env.GAME_NAME }}.zip
|
${{ steps.setup-godot.outputs.godot_bin }} --headless --verbose --export-release "macOS" build/mac/${{ env.GAME_NAME }}.zip
|
||||||
zip -r Mac.zip build/mac
|
zip -r Mac.zip build/mac
|
||||||
- name: Upload Mac to itch.io
|
- name: Upload Windows to itch.io
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
BUTLER_API_KEY: ${{ secrets.BUTLER_TOKEN }}
|
BUTLER_API_KEY: ${{ secrets.BUTLER_TOKEN }}
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -20,7 +20,6 @@
|
|||||||
*.suo
|
*.suo
|
||||||
*.user
|
*.user
|
||||||
_ReSharper.*
|
_ReSharper.*
|
||||||
*.DotSettings.user
|
|
||||||
bin
|
bin
|
||||||
obj
|
obj
|
||||||
packages
|
packages
|
||||||
|
|||||||
@@ -125,14 +125,27 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="addons\" />
|
<Folder Include="addons\" />
|
||||||
<Folder Include="tests\" />
|
<Folder Include="tests\components\" />
|
||||||
<Folder Include="tools\" />
|
<Folder Include="tests\enemies\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="RustyOptions" Version="0.10.1" />
|
<PackageReference Include="RustyOptions" Version="0.10.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="addons/forge/Forge.props" />
|
<Import Project="addons/forge/Forge.props" />
|
||||||
|
|
||||||
|
<!-- XUnit -->
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Using Include="Xunit" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="xunit.v3.mtp-v2" Version="3.2.2" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- gdUnit4 package dependencies -->
|
<!-- gdUnit4 package dependencies -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
|
||||||
@@ -143,4 +156,5 @@
|
|||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
15
Movement tests.sln.DotSettings.user
Normal file
15
Movement tests.sln.DotSettings.user
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=22FEBE6E_002D769C_002D4716_002DA687_002DA0AC8F3EF84A_002Fd_003Ascenes_002Fd_003Aplayer_005Fcontroller_002Fd_003Ascripts_002Ff_003APlayerController_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAction_00601_002Ecs_002Fl_003AC_0021_003FUsers_003FMinimata_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F7c0f83388bfc4d2c9d09befcec9dd79bc90908_003Fb8_003F4d300c4d_003FAction_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAction_00602_002Ecs_002Fl_003AC_0021_003FUsers_003FMinimata_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F7c0f83388bfc4d2c9d09befcec9dd79bc90908_003F87_003Fded27e2d_003FAction_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEnemy_005FScriptMethods_002Egenerated_002Ecs_002Fl_003AC_0021_003FUsers_003FMinimata_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F8e71dc81611862c01a2cb998a1f327de14747655_003FEnemy_005FScriptMethods_002Egenerated_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANode_002Ecs_002Fl_003AC_0021_003FUsers_003FMinimata_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F716d154fef5cbe863cd637bd32beda6e3cec5f12e8fed2dc5b2d8149a0d558ab_003FNode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANode_002Ecs_002Fl_003AC_0021_003FUsers_003FMinimata_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fdf73a4db74df89d59655c5fb6326406f47fbfa9af1fa81518fe0a07c49d34133_003FNode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASceneTree_002Ecs_002Fl_003AC_0021_003FUsers_003FMinimata_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F8d6960554e939a669841b1ece03d27df4ab42f92bb80be3767eaec8cdaccf84b_003FSceneTree_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
|
||||||
|
|
||||||
|
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=dd9a7ac6_002Dbb9b_002D4001_002Db145_002D15e6509b7e78/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from Solution" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||||
|
<Solution />
|
||||||
|
</SessionState></s:String>
|
||||||
|
<s:String x:Key="/Default/Housekeeping/UnitTestingMru/UnitTestRunner/RunConfigurationFilename/@EntryValue">D:\Godot\Projects\movement-tests\.runsettings</s:String>
|
||||||
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=floorplane/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
using Gamesmiths.Forge.Abilities;
|
|
||||||
using Gamesmiths.Forge.Effects;
|
|
||||||
using Gamesmiths.Forge.Effects.Components;
|
|
||||||
using Gamesmiths.Forge.Effects.Duration;
|
|
||||||
using Gamesmiths.Forge.Effects.Magnitudes;
|
|
||||||
using Gamesmiths.Forge.Effects.Modifiers;
|
|
||||||
using Gamesmiths.Forge.Tags;
|
|
||||||
using Godot;
|
|
||||||
|
|
||||||
namespace Movementtests.forge.abilities;
|
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_animation.png")]
|
|
||||||
public partial class REmpoweredAction(float cost, float cooldown, float manaRegenPause) : Resource
|
|
||||||
{
|
|
||||||
[Export(PropertyHint.Range, "0,100,1,or_greater")]
|
|
||||||
public float Cost { get; set; } = cost;
|
|
||||||
|
|
||||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
|
||||||
public float Cooldown { get; set; } = cooldown;
|
|
||||||
|
|
||||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
|
||||||
public float ManaRegenPause { get; set; } = manaRegenPause;
|
|
||||||
|
|
||||||
public REmpoweredAction() : this(20.0f, 1.0f, 3.0f)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public EffectData CostEffect()
|
|
||||||
{
|
|
||||||
return new(
|
|
||||||
"Empowered Action Mana Cost",
|
|
||||||
new DurationData(DurationType.Instant),
|
|
||||||
new[]
|
|
||||||
{
|
|
||||||
new Modifier(
|
|
||||||
"PlayerAttributeSet.Mana",
|
|
||||||
ModifierOperation.FlatBonus,
|
|
||||||
new ModifierMagnitude(
|
|
||||||
MagnitudeCalculationType.ScalableFloat,
|
|
||||||
new ScalableFloat(-Cost)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public EffectData CooldownEffect(TagsManager tagsManager)
|
|
||||||
{
|
|
||||||
return new(
|
|
||||||
"Empowered Action Cooldown",
|
|
||||||
new DurationData(
|
|
||||||
DurationType.HasDuration,
|
|
||||||
new ModifierMagnitude(
|
|
||||||
MagnitudeCalculationType.ScalableFloat,
|
|
||||||
new ScalableFloat(Cooldown))),
|
|
||||||
effectComponents: new[]
|
|
||||||
{
|
|
||||||
new ModifierTagsEffectComponent(
|
|
||||||
tagsManager.RequestTagContainer(new[] { "cooldown.empoweredAction" })
|
|
||||||
)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public class EmpoweredActionBehavior : IAbilityBehavior
|
|
||||||
{
|
|
||||||
public void OnStarted(AbilityBehaviorContext context)
|
|
||||||
{
|
|
||||||
// Apply costs and cooldowns
|
|
||||||
context.AbilityHandle.CommitAbility();
|
|
||||||
context.InstanceHandle.End();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnEnded(AbilityBehaviorContext context)
|
|
||||||
{
|
|
||||||
// Do any necessary cleanups
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://d0l07gcx1ef18
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
using Gamesmiths.Forge.Effects;
|
|
||||||
using Gamesmiths.Forge.Effects.Duration;
|
|
||||||
using Gamesmiths.Forge.Effects.Magnitudes;
|
|
||||||
using Gamesmiths.Forge.Effects.Modifiers;
|
|
||||||
using Gamesmiths.Forge.Effects.Periodic;
|
|
||||||
using Godot;
|
|
||||||
|
|
||||||
namespace Movementtests.tools.effects;
|
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_liquid.png")]
|
|
||||||
public partial class RManaRegen(float manaRegenRate, float frequency) : Resource
|
|
||||||
{
|
|
||||||
[Export(PropertyHint.Range, "0,100,0.1,or_greater")]
|
|
||||||
public float ManaRegenRate { get; set; } = manaRegenRate;
|
|
||||||
|
|
||||||
[Export(PropertyHint.Range, "0.01,1,0.1,or_greater")]
|
|
||||||
public float Frequency { get; set; } = frequency;
|
|
||||||
|
|
||||||
public RManaRegen() : this(1.0f, 0.1f)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public EffectData ManaRegen()
|
|
||||||
{
|
|
||||||
return new EffectData(
|
|
||||||
"Mana Regen",
|
|
||||||
durationData: new DurationData(
|
|
||||||
DurationType.Infinite
|
|
||||||
),
|
|
||||||
modifiers: [
|
|
||||||
new Modifier(
|
|
||||||
"PlayerAttributeSet.Mana",
|
|
||||||
ModifierOperation.FlatBonus,
|
|
||||||
new ModifierMagnitude(
|
|
||||||
MagnitudeCalculationType.ScalableFloat,
|
|
||||||
new ScalableFloat(ManaRegenRate * Frequency))
|
|
||||||
)
|
|
||||||
],
|
|
||||||
periodicData: new PeriodicData(
|
|
||||||
Period: new ScalableFloat(Frequency),
|
|
||||||
ExecuteOnApplication: true,
|
|
||||||
PeriodInhibitionRemovedPolicy: PeriodInhibitionRemovedPolicy.ResetPeriod
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://di04jvuqp0h7m
|
|
||||||
5
global.json
Normal file
5
global.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"test": {
|
||||||
|
"runner": "Microsoft.Testing.Platform"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -770,10 +770,3 @@ transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, -0.5, 0, 0)
|
|||||||
|
|
||||||
[node name="PlayerFellRespawn" parent="." index="10" unique_id=479136076]
|
[node name="PlayerFellRespawn" parent="." index="10" unique_id=479136076]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 1.5, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 1.5, 0)
|
||||||
|
|
||||||
[node name="OmniLight3D" type="OmniLight3D" parent="." index="13" unique_id=702421172]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5, 25, 4)
|
|
||||||
|
|
||||||
[node name="OmniLight3D2" type="OmniLight3D" parent="." index="14" unique_id=2016820716]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5, 25, -9.5)
|
|
||||||
omni_range = 12.0
|
|
||||||
|
|||||||
@@ -3,10 +3,14 @@ using System;
|
|||||||
using Movementtests.interfaces;
|
using Movementtests.interfaces;
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_heart.png")]
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_heart.png")]
|
||||||
public partial class RHealth(float startingHealth) : Resource
|
public partial class RHealth : Resource
|
||||||
{
|
{
|
||||||
[Export]
|
[Export]
|
||||||
public float StartingHealth { get; set;} = startingHealth;
|
public float StartingHealth { get; set;}
|
||||||
|
|
||||||
public RHealth() : this(100.0f) {}
|
public RHealth() : this(100.0f) {}
|
||||||
|
public RHealth(float startingHealth)
|
||||||
|
{
|
||||||
|
StartingHealth = startingHealth;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Gamesmiths.Forge.Core;
|
|
||||||
using Gamesmiths.Forge.Effects;
|
|
||||||
using Gamesmiths.Forge.Events;
|
|
||||||
using Gamesmiths.Forge.Tags;
|
|
||||||
using Godot;
|
using Godot;
|
||||||
using Movementtests.interfaces;
|
using Movementtests.interfaces;
|
||||||
using Movementtests.scenes.enemies;
|
|
||||||
using Movementtests.scenes.player_controller.scripts;
|
|
||||||
using Movementtests.systems;
|
using Movementtests.systems;
|
||||||
using Movementtests.tools;
|
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_beetle.png")]
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_beetle.png")]
|
||||||
public partial class Enemy : CharacterBody3D,
|
public partial class Enemy : CharacterBody3D,
|
||||||
@@ -20,8 +13,7 @@ public partial class Enemy : CharacterBody3D,
|
|||||||
ISpawnable,
|
ISpawnable,
|
||||||
IKnockbackable,
|
IKnockbackable,
|
||||||
ITargetable,
|
ITargetable,
|
||||||
IStunnable,
|
IStunnable
|
||||||
IForgeEntity
|
|
||||||
{
|
{
|
||||||
// Signals and events
|
// Signals and events
|
||||||
public event Action<IDamageable, DamageRecord> DamageTaken = null!;
|
public event Action<IDamageable, DamageRecord> DamageTaken = null!;
|
||||||
@@ -63,12 +55,6 @@ public partial class Enemy : CharacterBody3D,
|
|||||||
set => CHealth.CurrentHealth = value;
|
set => CHealth.CurrentHealth = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityAttributes Attributes { get; set; } = null!;
|
|
||||||
public EntityTags Tags { get; set; } = null!;
|
|
||||||
public EffectsManager EffectsManager { get; set; } = null!;
|
|
||||||
public EntityAbilities Abilities { get; set; } = null!;
|
|
||||||
public EventManager Events { get; set; } = null!;
|
|
||||||
|
|
||||||
// Private stuff
|
// Private stuff
|
||||||
private Area3D _damageBox = null!;
|
private Area3D _damageBox = null!;
|
||||||
internal Node3D _target = null!;
|
internal Node3D _target = null!;
|
||||||
@@ -85,21 +71,6 @@ public partial class Enemy : CharacterBody3D,
|
|||||||
_damageBox = GetNode<Area3D>("DamageBox");
|
_damageBox = GetNode<Area3D>("DamageBox");
|
||||||
_target = GetNode<Node3D>("CTarget");
|
_target = GetNode<Node3D>("CTarget");
|
||||||
|
|
||||||
// Forge stuff
|
|
||||||
var forgeManager = GetTree().Root.GetNode<ForgeManager>("ForgeManager")!;
|
|
||||||
var baseTags = new TagContainer(
|
|
||||||
forgeManager.TagsManager,
|
|
||||||
[
|
|
||||||
Tag.RequestTag(forgeManager.TagsManager, "character.player"),
|
|
||||||
Tag.RequestTag(forgeManager.TagsManager, "class.warrior")
|
|
||||||
]);
|
|
||||||
|
|
||||||
Attributes = new EntityAttributes(new EnemyAttributeSet());
|
|
||||||
Tags = new EntityTags(baseTags);
|
|
||||||
EffectsManager = new EffectsManager(this, forgeManager.CuesManager);
|
|
||||||
Abilities = new(this);
|
|
||||||
Events = new();
|
|
||||||
|
|
||||||
CDamageable = (GetNode<Node>("CDamageable") as IDamageable)!;
|
CDamageable = (GetNode<Node>("CDamageable") as IDamageable)!;
|
||||||
CMovement = (GetNode<Node>("CMovement") as IMoveable)!;
|
CMovement = (GetNode<Node>("CMovement") as IMoveable)!;
|
||||||
CHealth = (GetNode<Node>("CHealth") as IHealthable)!;
|
CHealth = (GetNode<Node>("CHealth") as IHealthable)!;
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
using Gamesmiths.Forge.Attributes;
|
|
||||||
namespace Movementtests.scenes.enemies;
|
|
||||||
|
|
||||||
public class EnemyAttributeSet : AttributeSet
|
|
||||||
{
|
|
||||||
public EntityAttribute Health { get; }
|
|
||||||
public EntityAttribute Strength { get; }
|
|
||||||
public EntityAttribute Speed { get; }
|
|
||||||
|
|
||||||
public EnemyAttributeSet()
|
|
||||||
{
|
|
||||||
Health = InitializeAttribute(nameof(Health), 100, 0, 150);
|
|
||||||
Strength = InitializeAttribute(nameof(Strength), 10, 0, 99);
|
|
||||||
Speed = InitializeAttribute(nameof(Speed), 5, 0, 10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://nqxdkkg3l7go
|
|
||||||
@@ -5,7 +5,6 @@
|
|||||||
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="2_x835q"]
|
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="2_x835q"]
|
||||||
[ext_resource type="Script" uid="uid://b44cse62qru7j" path="res://scenes/components/knockback/RKnockback.cs" id="3_cb2lu"]
|
[ext_resource type="Script" uid="uid://b44cse62qru7j" path="res://scenes/components/knockback/RKnockback.cs" id="3_cb2lu"]
|
||||||
[ext_resource type="Resource" uid="uid://bl5crtu1gkrtr" path="res://inputs/base_mode/base_mode.tres" id="3_cresl"]
|
[ext_resource type="Resource" uid="uid://bl5crtu1gkrtr" path="res://inputs/base_mode/base_mode.tres" id="3_cresl"]
|
||||||
[ext_resource type="Resource" uid="uid://dtmhtlix2amme" path="res://scenes/player_controller/resources/player_mana_regen.tres" id="3_n24vh"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://c4ikbhojckpnc" path="res://scenes/components/health/CHealth.tscn" id="3_q7bng"]
|
[ext_resource type="PackedScene" uid="uid://c4ikbhojckpnc" path="res://scenes/components/health/CHealth.tscn" id="3_q7bng"]
|
||||||
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://scenes/components/health/RHealth.cs" id="4_abfq8"]
|
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://scenes/components/health/RHealth.cs" id="4_abfq8"]
|
||||||
[ext_resource type="Resource" uid="uid://bjyd801wvverk" path="res://scenes/player_controller/resources/player_health.tres" id="4_m8gvy"]
|
[ext_resource type="Resource" uid="uid://bjyd801wvverk" path="res://scenes/player_controller/resources/player_health.tres" id="4_m8gvy"]
|
||||||
@@ -18,7 +17,6 @@
|
|||||||
[ext_resource type="Resource" uid="uid://t612lts1wi1s" path="res://inputs/base_mode/move_right.tres" id="6_q7bng"]
|
[ext_resource type="Resource" uid="uid://t612lts1wi1s" path="res://inputs/base_mode/move_right.tres" id="6_q7bng"]
|
||||||
[ext_resource type="Script" uid="uid://cwbvxlfvmocc1" path="res://scenes/player_controller/scripts/StairsSystem.cs" id="7_bmt5a"]
|
[ext_resource type="Script" uid="uid://cwbvxlfvmocc1" path="res://scenes/player_controller/scripts/StairsSystem.cs" id="7_bmt5a"]
|
||||||
[ext_resource type="Resource" uid="uid://brswsknpgwal2" path="res://inputs/base_mode/move_front.tres" id="7_m8gvy"]
|
[ext_resource type="Resource" uid="uid://brswsknpgwal2" path="res://inputs/base_mode/move_front.tres" id="7_m8gvy"]
|
||||||
[ext_resource type="Resource" uid="uid://7dpkk5rk3di5" path="res://scenes/player_controller/resources/forge_empowered_action.tres" id="7_qheee"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="7_x835q"]
|
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="7_x835q"]
|
||||||
[ext_resource type="Resource" uid="uid://s1l0n1iitc6m" path="res://inputs/base_mode/move_back.tres" id="8_jb43f"]
|
[ext_resource type="Resource" uid="uid://s1l0n1iitc6m" path="res://inputs/base_mode/move_back.tres" id="8_jb43f"]
|
||||||
[ext_resource type="Resource" uid="uid://j1o5ud0plk4" path="res://inputs/base_mode/aim_release.tres" id="8_lhb11"]
|
[ext_resource type="Resource" uid="uid://j1o5ud0plk4" path="res://inputs/base_mode/aim_release.tres" id="8_lhb11"]
|
||||||
@@ -114,8 +112,6 @@ blend_mode = 1
|
|||||||
[node name="Player" type="CharacterBody3D" unique_id=709076448]
|
[node name="Player" type="CharacterBody3D" unique_id=709076448]
|
||||||
collision_mask = 272
|
collision_mask = 272
|
||||||
script = ExtResource("1_poq2x")
|
script = ExtResource("1_poq2x")
|
||||||
EmpoweredAction = ExtResource("7_qheee")
|
|
||||||
ManaRegen = ExtResource("3_n24vh")
|
|
||||||
AimAssistStrength = 0.3
|
AimAssistStrength = 0.3
|
||||||
AimAssistReductionWhenCloseToTarget = 0.1
|
AimAssistReductionWhenCloseToTarget = 0.1
|
||||||
AimAssistReductionStartDistance = 8.0
|
AimAssistReductionStartDistance = 8.0
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="REmpoweredAction" format=3 uid="uid://7dpkk5rk3di5"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://d0l07gcx1ef18" path="res://forge/abilities/REmpoweredAction.cs" id="1_1rxoq"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_1rxoq")
|
|
||||||
Cost = 50.0
|
|
||||||
Cooldown = 1.0
|
|
||||||
ManaRegenPause = 3.0
|
|
||||||
metadata/_custom_type_script = "uid://d0l07gcx1ef18"
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="RManaRegen" format=3 uid="uid://dtmhtlix2amme"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://di04jvuqp0h7m" path="res://forge/effects/RManaRegen.cs" id="1_ecb1p"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_ecb1p")
|
|
||||||
ManaRegenRate = 20.0
|
|
||||||
Frequency = 0.1
|
|
||||||
metadata/_custom_type_script = "uid://di04jvuqp0h7m"
|
|
||||||
@@ -11,6 +11,7 @@ public class PlayerAttributeSet : AttributeSet
|
|||||||
|
|
||||||
public PlayerAttributeSet()
|
public PlayerAttributeSet()
|
||||||
{
|
{
|
||||||
|
// Initialize the attributes with the current, min and max values.
|
||||||
Health = InitializeAttribute(nameof(Health), 100, 0, 150);
|
Health = InitializeAttribute(nameof(Health), 100, 0, 150);
|
||||||
Mana = InitializeAttribute(nameof(Mana), 100, 0, 100);
|
Mana = InitializeAttribute(nameof(Mana), 100, 0, 100);
|
||||||
Strength = InitializeAttribute(nameof(Strength), 10, 0, 99);
|
Strength = InitializeAttribute(nameof(Strength), 10, 0, 99);
|
||||||
|
|||||||
@@ -1,22 +1,17 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Gamesmiths.Forge.Abilities;
|
|
||||||
using Gamesmiths.Forge.Core;
|
using Gamesmiths.Forge.Core;
|
||||||
using Gamesmiths.Forge.Effects;
|
using Gamesmiths.Forge.Effects;
|
||||||
using Gamesmiths.Forge.Events;
|
using Gamesmiths.Forge.Events;
|
||||||
using Gamesmiths.Forge.Tags;
|
using Gamesmiths.Forge.Tags;
|
||||||
|
|
||||||
using Godot;
|
using Godot;
|
||||||
using GodotStateCharts;
|
using GodotStateCharts;
|
||||||
|
|
||||||
using Movementtests.addons.godot_state_charts.csharp;
|
using Movementtests.addons.godot_state_charts.csharp;
|
||||||
using Movementtests.interfaces;
|
using Movementtests.interfaces;
|
||||||
using Movementtests.systems;
|
using Movementtests.systems;
|
||||||
using Movementtests.player_controller.Scripts;
|
using Movementtests.player_controller.Scripts;
|
||||||
using Movementtests.scenes.player_controller.scripts;
|
using Movementtests.scenes.player_controller.scripts;
|
||||||
using Movementtests.tools;
|
using Movementtests.tools;
|
||||||
using Movementtests.forge.abilities;
|
|
||||||
using Movementtests.tools.effects;
|
|
||||||
using RustyOptions;
|
using RustyOptions;
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_character.png")]
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_character.png")]
|
||||||
@@ -97,12 +92,6 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
[Export] public bool HasSword { get; set; } = true;
|
[Export] public bool HasSword { get; set; } = true;
|
||||||
[Export] public bool HasParry { get; set; } = true;
|
[Export] public bool HasParry { get; set; } = true;
|
||||||
|
|
||||||
// Forge stuff
|
|
||||||
[ExportCategory("Forge")]
|
|
||||||
[ExportGroup("General")]
|
|
||||||
[Export] public REmpoweredAction EmpoweredAction = null!;
|
|
||||||
[Export] public RManaRegen ManaRegen = null!;
|
|
||||||
|
|
||||||
// Combat stuff
|
// Combat stuff
|
||||||
[ExportCategory("Combat")]
|
[ExportCategory("Combat")]
|
||||||
[ExportGroup("General")]
|
[ExportGroup("General")]
|
||||||
@@ -409,9 +398,6 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
private ShapeCast3D _closeEnemyDetector = null!;
|
private ShapeCast3D _closeEnemyDetector = null!;
|
||||||
private RayCast3D _aimAssisRayCast = null!;
|
private RayCast3D _aimAssisRayCast = null!;
|
||||||
private Camera3D _camera = null!;
|
private Camera3D _camera = null!;
|
||||||
|
|
||||||
private AbilityHandle? _empoweredActionHandle;
|
|
||||||
private ActiveEffectHandle? _manaRegenEffectHandle;
|
|
||||||
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
@@ -442,28 +428,12 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
EffectsManager = new EffectsManager(this, forgeManager.CuesManager);
|
EffectsManager = new EffectsManager(this, forgeManager.CuesManager);
|
||||||
Abilities = new(this);
|
Abilities = new(this);
|
||||||
Events = new();
|
Events = new();
|
||||||
|
|
||||||
var empoweredActionData = new AbilityData(
|
|
||||||
name: "Empowered Action",
|
|
||||||
costEffect: EmpoweredAction.CostEffect(),
|
|
||||||
cooldownEffects: [EmpoweredAction.CooldownEffect(forgeManager.TagsManager)],
|
|
||||||
instancingPolicy: AbilityInstancingPolicy.PerEntity,
|
|
||||||
behaviorFactory: () => new EmpoweredActionBehavior());
|
|
||||||
|
|
||||||
// Grant permanently
|
|
||||||
_empoweredActionHandle = Abilities.GrantAbilityPermanently(
|
|
||||||
empoweredActionData,
|
|
||||||
abilityLevel: 1,
|
|
||||||
levelOverridePolicy: LevelComparison.None,
|
|
||||||
sourceEntity: this);
|
|
||||||
|
|
||||||
var manaRegenEffect = new Effect(ManaRegen.ManaRegen(), new EffectOwnership(this, this));
|
|
||||||
_manaRegenEffectHandle = EffectsManager.ApplyEffect(manaRegenEffect);
|
|
||||||
|
|
||||||
var health = Attributes["PlayerAttributeSet.Health"].CurrentValue; // 100
|
var health = Attributes["PlayerAttributeSet.Health"].CurrentValue; // 100
|
||||||
var mana = Attributes["PlayerAttributeSet.Mana"].CurrentValue; // 100
|
var mana = Attributes["PlayerAttributeSet.Mana"].CurrentValue; // 100
|
||||||
var strength = Attributes["PlayerAttributeSet.Strength"].CurrentValue; // 10
|
var strength = Attributes["PlayerAttributeSet.Strength"].CurrentValue; // 10
|
||||||
var speed = Attributes["PlayerAttributeSet.Speed"].CurrentValue; // 5
|
var speed = Attributes["PlayerAttributeSet.Speed"].CurrentValue; // 5
|
||||||
|
GD.Print(health, mana, strength, speed);
|
||||||
|
|
||||||
// DashIndicator = GetNode<TextureRect>("%DashIndicator");
|
// DashIndicator = GetNode<TextureRect>("%DashIndicator");
|
||||||
PowerCooldownIndicator = GetNode<ColorRect>("%DashCooldownIndicator");
|
PowerCooldownIndicator = GetNode<ColorRect>("%DashCooldownIndicator");
|
||||||
@@ -1943,53 +1913,10 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
|
|
||||||
public bool CanPerformEmpoweredAction()
|
public bool CanPerformEmpoweredAction()
|
||||||
{
|
{
|
||||||
if(_empoweredActionHandle == null) return false;
|
|
||||||
var cooldowns = _empoweredActionHandle.GetCooldownData();
|
|
||||||
foreach (var cd in cooldowns)
|
|
||||||
{
|
|
||||||
//GD.Print($"Cooldown remaining: {cd.RemainingTime}");
|
|
||||||
}
|
|
||||||
var costs = _empoweredActionHandle.GetCostData();
|
|
||||||
foreach (var cost in costs)
|
|
||||||
{
|
|
||||||
// Assuming you want to check Mana costs
|
|
||||||
if (cost.Attribute == "PlayerAttributeSet.Mana")
|
|
||||||
{
|
|
||||||
//GD.Print($"Mana Cost: {cost.Cost}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var canActivate = _empoweredActionHandle.CanActivate(out var failures);
|
|
||||||
if (!canActivate)
|
|
||||||
{
|
|
||||||
GD.PrintErr($"Cannot activate empowered action: {failures}");
|
|
||||||
if (failures.HasFlag(AbilityActivationFailures.Cooldown)) GD.PrintErr("In Cooldown");
|
|
||||||
if (failures.HasFlag(AbilityActivationFailures.InsufficientResources)) GD.PrintErr("Not Enough Mana");
|
|
||||||
}
|
|
||||||
return canActivate;
|
|
||||||
return EmpoweredActionsLeft > 0 && TutorialDone;
|
return EmpoweredActionsLeft > 0 && TutorialDone;
|
||||||
}
|
}
|
||||||
public void PerformEmpoweredAction()
|
public void PerformEmpoweredAction()
|
||||||
{
|
{
|
||||||
if(_empoweredActionHandle == null) return;
|
|
||||||
|
|
||||||
var canActivate = _empoweredActionHandle.Activate(out var failures);
|
|
||||||
if (!canActivate)
|
|
||||||
{
|
|
||||||
GD.PrintErr($"Cannot activate empowered action: {failures}");
|
|
||||||
if (failures.HasFlag(AbilityActivationFailures.Cooldown)) GD.PrintErr("In Cooldown");
|
|
||||||
if (failures.HasFlag(AbilityActivationFailures.InsufficientResources)) GD.PrintErr("Not Enough Mana");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GD.Print($"Remaining mana: {Attributes["PlayerAttributeSet.Mana"].CurrentValue}");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Inhibit Mana Regeneration for a while after using an empowered action
|
|
||||||
// TODO: Use Forge events instead of relying on direct referencing
|
|
||||||
_manaRegenEffectHandle!.SetInhibit(true);
|
|
||||||
GetTree().CreateTimer(EmpoweredAction.ManaRegenPause).Timeout += () => {_manaRegenEffectHandle!.SetInhibit(false);};
|
|
||||||
|
|
||||||
_isWallJumpAvailable = true;
|
_isWallJumpAvailable = true;
|
||||||
_canDashAirborne = true;
|
_canDashAirborne = true;
|
||||||
EmpoweredActionsLeft--;
|
EmpoweredActionsLeft--;
|
||||||
@@ -2296,10 +2223,14 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
_spaceState = GetWorld3D().DirectSpaceState;
|
_spaceState = GetWorld3D().DirectSpaceState;
|
||||||
|
|
||||||
if (_currentInputBufferFrames > 0) _currentInputBufferFrames -= 1;
|
if (_currentInputBufferFrames > 0) _currentInputBufferFrames -= 1;
|
||||||
|
|
||||||
// Limit maximum speed
|
// Limit maximum speed
|
||||||
if (Velocity.Length() > AbsoluteMaxSpeed)
|
if (Velocity.Length() > AbsoluteMaxSpeed)
|
||||||
Velocity = Velocity.Normalized() * AbsoluteMaxSpeed;
|
Velocity = Velocity.Normalized() * AbsoluteMaxSpeed;
|
||||||
|
|
||||||
|
// Manage head and camera movement
|
||||||
|
LookAround(delta);
|
||||||
|
|
||||||
// Manage general movement
|
// Manage general movement
|
||||||
Velocity += ComputeKnockback();
|
Velocity += ComputeKnockback();
|
||||||
MoveSlideAndHandleStairs((float) delta);
|
MoveSlideAndHandleStairs((float) delta);
|
||||||
@@ -2307,17 +2238,21 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
// Manage gameplay systems
|
// Manage gameplay systems
|
||||||
MantleSystem.ProcessMantle(_grounded.Active);
|
MantleSystem.ProcessMantle(_grounded.Active);
|
||||||
HandleEnemyTargeting();
|
HandleEnemyTargeting();
|
||||||
}
|
|
||||||
|
|
||||||
public override void _Process(double delta)
|
|
||||||
{
|
|
||||||
// Manage head and camera movement
|
|
||||||
LookAround(delta);
|
|
||||||
|
|
||||||
EffectsManager.UpdateEffects(delta);
|
// Manage dash target and tutorial specific stuff
|
||||||
GD.Print(Attributes["PlayerAttributeSet.Mana"].CurrentValue);
|
// if (WeaponSystem.InHandState.Active && !_aiming.Active && TutorialDone)
|
||||||
|
// {
|
||||||
|
// DashIndicatorMesh.Visible = false;
|
||||||
|
// }
|
||||||
|
// if (!WeaponSystem.InHandState.Active && TutorialDone)
|
||||||
|
// {
|
||||||
|
// DashIndicatorMesh.Visible = true;
|
||||||
|
//
|
||||||
|
// DashIndicatorMeshCylinder.Height = WeaponSystem.GlobalPosition.DistanceTo(GlobalPosition) * 2;
|
||||||
|
// DashIndicatorNode.LookAt(WeaponSystem.GlobalPosition);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
// Hit Management ///////
|
// Hit Management ///////
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
|
|||||||
@@ -13,10 +13,15 @@ public partial class ForgeManager : Node
|
|||||||
"class.warrior",
|
"class.warrior",
|
||||||
"status.stunned",
|
"status.stunned",
|
||||||
"status.burning",
|
"status.burning",
|
||||||
|
"status.enraged",
|
||||||
"status.immune.fire",
|
"status.immune.fire",
|
||||||
"cues.damage.fire",
|
"cues.damage.fire",
|
||||||
"events.combat.damage",
|
"events.combat.damage",
|
||||||
"events.combat.hit",
|
"events.combat.hit",
|
||||||
"cooldown.empoweredAction",
|
"cooldown.fireball"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
public ForgeManager()
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
3
xunit.runner.json
Normal file
3
xunit.runner.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user