using ColdMint.scripts.pickable;
using ColdMint.scripts.projectile;
using ColdMint.scripts.weapon;
using Godot;
namespace ColdMint.scripts.spell;
///
/// magic
/// 法术
///
///
///For projectile weapons
///用于抛射体武器
///
public partial class SpellPickAble : PickAbleTemplate, ISpell
{
[Export]
private string? _projectilePath;
///
/// Spells do no collision damage
/// 法术没有碰撞伤害
///
public override bool EnableContactInjury
{
get => false;
set { }
}
private PackedScene? _projectileScene;
public override void _Ready()
{
base._Ready();
if (!string.IsNullOrEmpty(_projectilePath))
{
_projectileScene = ResourceLoader.Load(_projectilePath);
}
}
public override int ItemType
{
get => Config.ItemType.Spell;
}
public PackedScene? GetProjectile()
{
return _projectileScene;
}
public virtual void ModifyWeapon(ProjectileWeapon projectileWeapon)
{
}
public virtual void RestoreWeapon(ProjectileWeapon projectileWeapon)
{
}
public virtual void ModifyProjectile(int index, Projectile projectile, ref Vector2 velocity)
{
}
}