Add the Necromancy Curse spell.
加入死灵诅咒法术。
This commit is contained in:
parent
25ad117d6f
commit
a9ab4a687c
|
@ -11,4 +11,8 @@
|
||||||
- id: x3
|
- id: x3
|
||||||
scene_path: res://prefab/magics/x3.tscn
|
scene_path: res://prefab/magics/x3.tscn
|
||||||
icon_path: res://sprites/projectile/x3.png
|
icon_path: res://sprites/projectile/x3.png
|
||||||
|
max_stack_value: 1
|
||||||
|
- id: curse
|
||||||
|
scene_path: res://prefab/magics/curse.tscn
|
||||||
|
icon_path: res://sprites/projectile/x3.png
|
||||||
max_stack_value: 1
|
max_stack_value: 1
|
|
@ -10,4 +10,6 @@ item_x3_desc,使发射器一次射出三颗弹丸。,Make the launcher shoot thr
|
||||||
item_resignation_certificate,离职证明,Resignation certificate,退職証明書です
|
item_resignation_certificate,离职证明,Resignation certificate,退職証明書です
|
||||||
item_resignation_certificate_desc,冷薄荷,感谢您在职时为公司做出的贡献。,"Cold Mint, thank you for your service to the company.",コールドミント、現役時代のご貢献ありがとうございました。
|
item_resignation_certificate_desc,冷薄荷,感谢您在职时为公司做出的贡献。,"Cold Mint, thank you for your service to the company.",コールドミント、現役時代のご貢献ありがとうございました。
|
||||||
item_iron_axe,铁斧子,Iron axe,鉄の斧です
|
item_iron_axe,铁斧子,Iron axe,鉄の斧です
|
||||||
item_iron_axe_desc,铁斧子,Iron axe,鉄の斧です
|
item_iron_axe_desc,铁斧子,Iron axe,鉄の斧です
|
||||||
|
item_curse,死灵诅咒法术,The curse of the Dead,死霊呪いの術
|
||||||
|
item_curse_desc,杀死敌人后在生成死灵敌人。,Spawn Undead enemies after killing them.,敵を殺すと死霊敵が発生します。
|
|
|
@ -33,10 +33,13 @@ radius = 172.29
|
||||||
collision_layer = 64
|
collision_layer = 64
|
||||||
collision_mask = 38
|
collision_mask = 38
|
||||||
script = ExtResource("1_ubaid")
|
script = ExtResource("1_ubaid")
|
||||||
|
InitWeaponRes = null
|
||||||
CharacterName = "character_evil_crow"
|
CharacterName = "character_evil_crow"
|
||||||
CanMutateAfterDeath = false
|
CanMutateAfterDeath = false
|
||||||
|
_initialHp = null
|
||||||
MaxHp = 50
|
MaxHp = 50
|
||||||
CampId = "Mazoku"
|
CampId = "Mazoku"
|
||||||
|
LootListId = null
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
position = Vector2(2, 10)
|
position = Vector2(2, 10)
|
||||||
|
|
|
@ -29,8 +29,12 @@ collision_mask = 162
|
||||||
platform_floor_layers = 4294967042
|
platform_floor_layers = 4294967042
|
||||||
platform_wall_layers = 128
|
platform_wall_layers = 128
|
||||||
script = ExtResource("1_1dlls")
|
script = ExtResource("1_1dlls")
|
||||||
|
CharacterName = null
|
||||||
|
CanMutateAfterDeath = null
|
||||||
|
_initialHp = null
|
||||||
MaxHp = 32
|
MaxHp = 32
|
||||||
CampId = "Default"
|
CampId = "Default"
|
||||||
|
LootListId = null
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
shape = SubResource("CapsuleShape2D_bb8wt")
|
shape = SubResource("CapsuleShape2D_bb8wt")
|
||||||
|
|
|
@ -34,7 +34,10 @@ radius = 172.29
|
||||||
collision_layer = 64
|
collision_layer = 64
|
||||||
collision_mask = 38
|
collision_mask = 38
|
||||||
script = ExtResource("1_ubaid")
|
script = ExtResource("1_ubaid")
|
||||||
|
InitWeaponRes = null
|
||||||
CharacterName = "character_necromancer"
|
CharacterName = "character_necromancer"
|
||||||
|
CanMutateAfterDeath = false
|
||||||
|
_initialHp = null
|
||||||
MaxHp = 50
|
MaxHp = 50
|
||||||
CampId = "Mazoku"
|
CampId = "Mazoku"
|
||||||
LootListId = "test"
|
LootListId = "test"
|
||||||
|
|
|
@ -18,6 +18,9 @@ collision_mask = 34
|
||||||
angular_damp = -1.0
|
angular_damp = -1.0
|
||||||
script = ExtResource("1_nydte")
|
script = ExtResource("1_nydte")
|
||||||
FiringIntervalAsMillisecond = 1000
|
FiringIntervalAsMillisecond = 1000
|
||||||
|
_recoilStrength = null
|
||||||
|
_minContactInjury = null
|
||||||
|
_maxContactInjury = null
|
||||||
|
|
||||||
[node name="DamageArea2D" type="Area2D" parent="."]
|
[node name="DamageArea2D" type="Area2D" parent="."]
|
||||||
collision_layer = 8
|
collision_layer = 8
|
||||||
|
|
50
prefab/magics/curse.tscn
Normal file
50
prefab/magics/curse.tscn
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
[gd_scene load_steps=6 format=3 uid="uid://m3tkjcbrrhfj"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/spell/NodeSpawnOnKillCharacterSpell.cs" id="1_gg5rs"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://cak6chjjsu7wo" path="res://sounds/fire.wav" id="2_83n3c"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://mb5yijtw7sw5" path="res://sprites/projectile/x3.png" id="3_thtsv"]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_3eq4k"]
|
||||||
|
size = Vector2(30, 30)
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_i3lbq"]
|
||||||
|
size = Vector2(30, 31)
|
||||||
|
|
||||||
|
[node name="curse" type="RigidBody2D"]
|
||||||
|
collision_layer = 8
|
||||||
|
collision_mask = 34
|
||||||
|
angular_damp = -1.0
|
||||||
|
script = ExtResource("1_gg5rs")
|
||||||
|
_packedScenePath = "res://prefab/entitys/BlackenedAboriginalWarrior.tscn"
|
||||||
|
_projectilePath = null
|
||||||
|
_minContactInjury = null
|
||||||
|
_maxContactInjury = null
|
||||||
|
|
||||||
|
[node name="DamageArea2D" type="Area2D" parent="."]
|
||||||
|
collision_layer = 8
|
||||||
|
collision_mask = 102
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="DamageArea2D"]
|
||||||
|
shape = SubResource("RectangleShape2D_3eq4k")
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2(0, -0.5)
|
||||||
|
shape = SubResource("RectangleShape2D_i3lbq")
|
||||||
|
|
||||||
|
[node name="Marker2D" type="Marker2D" parent="."]
|
||||||
|
position = Vector2(65, 0)
|
||||||
|
|
||||||
|
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="Marker2D"]
|
||||||
|
stream = ExtResource("2_83n3c")
|
||||||
|
bus = &"SoundEffect"
|
||||||
|
|
||||||
|
[node name="TipLabel" type="Label" parent="."]
|
||||||
|
offset_left = -19.0
|
||||||
|
offset_top = 23.0
|
||||||
|
offset_right = 21.0
|
||||||
|
offset_bottom = 48.0
|
||||||
|
|
||||||
|
[node name="CurseOfTheUndead" type="Sprite2D" parent="."]
|
||||||
|
|
||||||
|
[node name="X3" type="Sprite2D" parent="."]
|
||||||
|
texture = ExtResource("3_thtsv")
|
|
@ -14,6 +14,8 @@ collision_layer = 8
|
||||||
collision_mask = 38
|
collision_mask = 38
|
||||||
script = ExtResource("1_slakl")
|
script = ExtResource("1_slakl")
|
||||||
NumberSlots = 30
|
NumberSlots = 30
|
||||||
|
_minContactInjury = null
|
||||||
|
_maxContactInjury = null
|
||||||
|
|
||||||
[node name="DamageArea2D" type="Area2D" parent="."]
|
[node name="DamageArea2D" type="Area2D" parent="."]
|
||||||
collision_layer = 8
|
collision_layer = 8
|
||||||
|
|
|
@ -89,3 +89,5 @@ texture = ExtResource("3_r2p3x")
|
||||||
|
|
||||||
[node name="RigidBody2D" parent="." instance=ExtResource("4_rean8")]
|
[node name="RigidBody2D" parent="." instance=ExtResource("4_rean8")]
|
||||||
position = Vector2(239, 101)
|
position = Vector2(239, 101)
|
||||||
|
_initialDurability = null
|
||||||
|
_maxDurability = null
|
||||||
|
|
|
@ -55,6 +55,7 @@ shape = SubResource("RectangleShape2D_131jn")
|
||||||
[node name="Marker2D" type="Marker2D" parent="."]
|
[node name="Marker2D" type="Marker2D" parent="."]
|
||||||
position = Vector2(237, 69)
|
position = Vector2(237, 69)
|
||||||
script = ExtResource("2_7q101")
|
script = ExtResource("2_7q101")
|
||||||
|
ResPath = null
|
||||||
metadata/ResPath = "res://prefab/entitys/DelivererOfDarkMagic.tscn"
|
metadata/ResPath = "res://prefab/entitys/DelivererOfDarkMagic.tscn"
|
||||||
|
|
||||||
[node name="NavigationRegion2D" type="NavigationRegion2D" parent="."]
|
[node name="NavigationRegion2D" type="NavigationRegion2D" parent="."]
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
[gd_scene load_steps=8 format=4 uid="uid://du5ldsp613fei"]
|
[gd_scene load_steps=9 format=4 uid="uid://du5ldsp613fei"]
|
||||||
|
|
||||||
[ext_resource type="TileSet" uid="uid://c4wpp12rr44hi" path="res://tileSets/dungeon.tres" id="1_rn2om"]
|
[ext_resource type="TileSet" uid="uid://c4wpp12rr44hi" path="res://tileSets/dungeon.tres" id="1_rn2om"]
|
||||||
[ext_resource type="Script" path="res://scripts/map/PlayerSpawn.cs" id="2_6p8mv"]
|
[ext_resource type="Script" path="res://scripts/map/PlayerSpawn.cs" id="2_6p8mv"]
|
||||||
[ext_resource type="Script" path="res://scripts/map/ItemSpawn.cs" id="3_v1tlc"]
|
[ext_resource type="Script" path="res://scripts/map/ItemSpawn.cs" id="3_v1tlc"]
|
||||||
[ext_resource type="Texture2D" uid="uid://drw45jlmfo0su" path="res://sprites/light/White_100.png" id="5_4pssd"]
|
[ext_resource type="Texture2D" uid="uid://drw45jlmfo0su" path="res://sprites/light/White_100.png" id="5_4pssd"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://djsh4unystlf0" path="res://prefab/furnitures/SpellEditor.tscn" id="5_5u8y1"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_kiih8"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_kiih8"]
|
||||||
size = Vector2(507, 251)
|
size = Vector2(507, 251)
|
||||||
|
@ -64,6 +65,11 @@ position = Vector2(381, 136)
|
||||||
script = ExtResource("3_v1tlc")
|
script = ExtResource("3_v1tlc")
|
||||||
ItemId = "iron_axe"
|
ItemId = "iron_axe"
|
||||||
|
|
||||||
|
[node name="ItemMarker2D6" type="Marker2D" parent="."]
|
||||||
|
position = Vector2(438, 79)
|
||||||
|
script = ExtResource("3_v1tlc")
|
||||||
|
ItemId = "curse"
|
||||||
|
|
||||||
[node name="NavigationRegion2D" type="NavigationRegion2D" parent="."]
|
[node name="NavigationRegion2D" type="NavigationRegion2D" parent="."]
|
||||||
navigation_polygon = SubResource("NavigationPolygon_064c7")
|
navigation_polygon = SubResource("NavigationPolygon_064c7")
|
||||||
|
|
||||||
|
@ -95,3 +101,6 @@ visible = false
|
||||||
position = Vector2(259.5, 128.5)
|
position = Vector2(259.5, 128.5)
|
||||||
scale = Vector2(16.0312, 7.96875)
|
scale = Vector2(16.0312, 7.96875)
|
||||||
texture = ExtResource("5_4pssd")
|
texture = ExtResource("5_4pssd")
|
||||||
|
|
||||||
|
[node name="RigidBody2D" parent="." instance=ExtResource("5_5u8y1")]
|
||||||
|
position = Vector2(106, 147)
|
||||||
|
|
|
@ -18,6 +18,12 @@ collision_layer = 8
|
||||||
collision_mask = 34
|
collision_mask = 34
|
||||||
angular_damp = -1.0
|
angular_damp = -1.0
|
||||||
script = ExtResource("1_snmy1")
|
script = ExtResource("1_snmy1")
|
||||||
|
_maxDamage = null
|
||||||
|
_minDamage = null
|
||||||
|
FiringIntervalAsMillisecond = null
|
||||||
|
_recoilStrength = null
|
||||||
|
_minContactInjury = null
|
||||||
|
_maxContactInjury = null
|
||||||
|
|
||||||
[node name="DamageArea2D" type="Area2D" parent="."]
|
[node name="DamageArea2D" type="Area2D" parent="."]
|
||||||
collision_layer = 8
|
collision_layer = 8
|
||||||
|
|
|
@ -21,6 +21,8 @@ _fireSequentially = true
|
||||||
FiringIntervalAsMillisecond = 300
|
FiringIntervalAsMillisecond = 300
|
||||||
_recoilStrength = 5
|
_recoilStrength = 5
|
||||||
UniqueIcon = ExtResource("3_31iau")
|
UniqueIcon = ExtResource("3_31iau")
|
||||||
|
_minContactInjury = null
|
||||||
|
_maxContactInjury = null
|
||||||
|
|
||||||
[node name="DamageArea2D" type="Area2D" parent="."]
|
[node name="DamageArea2D" type="Area2D" parent="."]
|
||||||
collision_layer = 8
|
collision_layer = 8
|
||||||
|
|
40
scripts/spell/NodeSpawnOnKillCharacterSpell.cs
Normal file
40
scripts/spell/NodeSpawnOnKillCharacterSpell.cs
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
using ColdMint.scripts.debug;
|
||||||
|
using ColdMint.scripts.projectile;
|
||||||
|
using ColdMint.scripts.projectile.decorator;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace ColdMint.scripts.spell;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>Generate a set node spell after killing the character</para>
|
||||||
|
/// <para>杀死角色后生成制定节点法术</para>
|
||||||
|
/// </summary>
|
||||||
|
public partial class NodeSpawnOnKillCharacterSpell : SpellPickAble
|
||||||
|
{
|
||||||
|
[Export]
|
||||||
|
private string? _packedScenePath;
|
||||||
|
private NodeSpawnOnKillCharacterDecorator? _nodeSpawnOnKillCharacterDecorator;
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
base._Ready();
|
||||||
|
if (!string.IsNullOrEmpty(_packedScenePath))
|
||||||
|
{
|
||||||
|
_nodeSpawnOnKillCharacterDecorator = new NodeSpawnOnKillCharacterDecorator
|
||||||
|
{
|
||||||
|
PackedScenePath = _packedScenePath,
|
||||||
|
DefaultParentNode = this
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ModifyProjectile(int index, Projectile projectile, ref Vector2 velocity)
|
||||||
|
{
|
||||||
|
if (_nodeSpawnOnKillCharacterDecorator == null)
|
||||||
|
{
|
||||||
|
LogCat.Log("添加失败");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
LogCat.Log("添加成功");
|
||||||
|
projectile.AddProjectileDecorator(_nodeSpawnOnKillCharacterDecorator);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user