2024-10-06 04:04:59 +00:00
|
|
|
using ColdMint.scripts.character;
|
|
|
|
using ColdMint.scripts.damage;
|
2024-10-06 08:10:00 +00:00
|
|
|
using ColdMint.scripts.weapon;
|
2024-10-06 04:04:59 +00:00
|
|
|
using Godot;
|
|
|
|
|
|
|
|
namespace ColdMint.scripts.inventory;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <para>ResignationCertificate</para>
|
|
|
|
/// <para>离职证明</para>
|
|
|
|
/// </summary>
|
2024-10-06 08:10:00 +00:00
|
|
|
public partial class ResignationCertificate : WeaponTemplate
|
2024-10-06 04:04:59 +00:00
|
|
|
{
|
|
|
|
private readonly Damage _damage = new()
|
|
|
|
{
|
|
|
|
MaxDamage = 1,
|
|
|
|
MinDamage = 1,
|
|
|
|
Type = Config.DamageType.Magic
|
|
|
|
};
|
|
|
|
|
2024-10-11 09:22:31 +00:00
|
|
|
public override void LoadResource()
|
2024-10-06 04:04:59 +00:00
|
|
|
{
|
2024-10-11 09:22:31 +00:00
|
|
|
base.LoadResource();
|
2024-10-06 04:04:59 +00:00
|
|
|
_damage.CreateDamage();
|
|
|
|
_damage.Attacker = this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public override int ItemType
|
|
|
|
{
|
|
|
|
get => Config.ItemType.Item;
|
|
|
|
}
|
2024-10-06 08:10:00 +00:00
|
|
|
protected override bool DoFire(Node2D? owner, Vector2 enemyGlobalPosition)
|
2024-10-06 04:04:59 +00:00
|
|
|
{
|
|
|
|
if (Owner is CharacterTemplate characterTemplate)
|
|
|
|
{
|
|
|
|
return characterTemplate.Damage(_damage);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|