Add initial implementation of game mechanics and resources management

This commit is contained in:
2025-08-23 00:38:46 +02:00
commit e12acb0238
91 changed files with 2018 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
using System;
using Godot;
namespace ParasiticGod.Scripts.Core.Effects;
[GlobalClass]
public partial class AddResourceEffect : Effect
{
[Export] public ResourceType TargetResource { get; set; }
[Export] public double Value { get; set; }
public override void Execute(GameState state)
{
switch (TargetResource)
{
case ResourceType.Faith:
state.Faith += Value;
break;
case ResourceType.Followers:
state.Followers += (long)Value;
break;
case ResourceType.Corruption:
state.Corruption += Value;
break;
default:
throw new ArgumentOutOfRangeException();
}
}
}