The discharge certificate will no longer be deducted.

离职证明不再持续扣血了。
This commit is contained in:
Cold-Mint 2024-10-06 16:10:00 +08:00
parent 02f2fa0d93
commit f313240400
Signed by: Cold-Mint
GPG Key ID: C5A9BF8A98E0CE99
4 changed files with 15 additions and 5 deletions

View File

@ -17,6 +17,7 @@ collision_layer = 8
collision_mask = 34
angular_damp = -1.0
script = ExtResource("1_nydte")
FiringIntervalAsMillisecond = 1000
[node name="DamageArea2D" type="Area2D" parent="."]
collision_layer = 8

View File

@ -1,6 +1,6 @@
using ColdMint.scripts.character;
using ColdMint.scripts.damage;
using ColdMint.scripts.pickable;
using ColdMint.scripts.weapon;
using Godot;
namespace ColdMint.scripts.inventory;
@ -9,13 +9,12 @@ namespace ColdMint.scripts.inventory;
/// <para>ResignationCertificate</para>
/// <para>离职证明</para>
/// </summary>
public partial class ResignationCertificate : PickAbleTemplate
public partial class ResignationCertificate : WeaponTemplate
{
private readonly Damage _damage = new()
{
MaxDamage = 1,
MinDamage = 1,
CriticalStrikeProbability = 100,
Type = Config.DamageType.Magic
};
@ -30,7 +29,7 @@ public partial class ResignationCertificate : PickAbleTemplate
{
get => Config.ItemType.Item;
}
public override bool Use(Node2D? owner, Vector2 targetGlobalPosition)
protected override bool DoFire(Node2D? owner, Vector2 enemyGlobalPosition)
{
if (Owner is CharacterTemplate characterTemplate)
{

View File

@ -57,7 +57,7 @@ public partial class PickAbleTemplate : RigidBody2D, IItem
/// <para>Enabled contact injury</para>
/// <para>启用接触伤害</para>
/// </summary>
public bool EnableContactInjury;
public virtual bool EnableContactInjury { get; set; }
[Export] private int _minContactInjury = 1;
[Export] private int _maxContactInjury = 2;

View File

@ -18,6 +18,16 @@ public partial class SpellPickAble : PickAbleTemplate, ISpell
[Export]
private string? _projectilePath;
/// <summary>
/// <para>Spells do no collision damage</para>
/// <para>法术没有碰撞伤害</para>
/// </summary>
public override bool EnableContactInjury
{
get => false;
set { }
}
private PackedScene? _projectileScene;
public override void _Ready()
{