diff --git a/DungeonShooting_Godot/addons/dungeonShooting_plugin/generator/BuffGenerator.cs b/DungeonShooting_Godot/addons/dungeonShooting_plugin/generator/BuffGenerator.cs index 6ae6634..b55a29a 100644 --- a/DungeonShooting_Godot/addons/dungeonShooting_plugin/generator/BuffGenerator.cs +++ b/DungeonShooting_Godot/addons/dungeonShooting_plugin/generator/BuffGenerator.cs @@ -19,6 +19,7 @@ { try { + var str = ""; var buffInfos = new Dictionary(); var types = typeof(BuffGenerator).Assembly.GetTypes(); //包含[BuffAttribute]特性 @@ -35,6 +36,7 @@ return false; } var buffInfo = new BuffInfo(attribute.BuffName, attribute.Description, type); + str += $"{buffInfo.Name}: {buffInfo.Description}\n"; buffInfos.Add(attribute.BuffName, buffInfo); //判断重写参数情况 //1参数 @@ -78,6 +80,8 @@ } GenerateCode(buffInfos); + GD.Print("-----------------------------"); + GD.Print(str); } catch (Exception e) { diff --git a/DungeonShooting_Godot/excel/ActivityBase.xlsx b/DungeonShooting_Godot/excel/ActivityBase.xlsx index 7915919..46b0ef1 100644 --- a/DungeonShooting_Godot/excel/ActivityBase.xlsx +++ b/DungeonShooting_Godot/excel/ActivityBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/excel/BuffBase.xlsx b/DungeonShooting_Godot/excel/BuffBase.xlsx index 61042ea..8ee5487 100644 --- a/DungeonShooting_Godot/excel/BuffBase.xlsx +++ b/DungeonShooting_Godot/excel/BuffBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/resource/config/ActivityBase.json b/DungeonShooting_Godot/resource/config/ActivityBase.json index 5c54b5a..d4f5913 100644 --- a/DungeonShooting_Godot/resource/config/ActivityBase.json +++ b/DungeonShooting_Godot/resource/config/ActivityBase.json @@ -471,7 +471,7 @@ "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0002.tscn", + "Prefab": "res://prefab/prop/BuffActivity.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0002.png", "ShowInMapEditor": true }, @@ -485,7 +485,7 @@ "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0003.tscn", + "Prefab": "res://prefab/prop/BuffActivity.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0003.png", "ShowInMapEditor": true }, @@ -499,7 +499,7 @@ "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0004.tscn", + "Prefab": "res://prefab/prop/BuffActivity.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0004.png", "ShowInMapEditor": true }, @@ -513,7 +513,7 @@ "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0005.tscn", + "Prefab": "res://prefab/prop/BuffActivity.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0005.png", "ShowInMapEditor": true }, @@ -527,7 +527,7 @@ "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0006.tscn", + "Prefab": "res://prefab/prop/BuffActivity.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0006.png", "ShowInMapEditor": true }, @@ -541,7 +541,7 @@ "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0007.tscn", + "Prefab": "res://prefab/prop/BuffActivity.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0007.png", "ShowInMapEditor": true }, @@ -555,7 +555,7 @@ "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0008.tscn", + "Prefab": "res://prefab/prop/BuffActivity.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0008.png", "ShowInMapEditor": true }, @@ -569,7 +569,7 @@ "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0009.tscn", + "Prefab": "res://prefab/prop/BuffActivity.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0009.png", "ShowInMapEditor": true }, @@ -597,7 +597,7 @@ "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0011.tscn", + "Prefab": "res://prefab/prop/BuffActivity.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0011.png", "ShowInMapEditor": true }, @@ -611,7 +611,7 @@ "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0012.tscn", + "Prefab": "res://prefab/prop/BuffActivity.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0012.png", "ShowInMapEditor": true }, @@ -625,7 +625,7 @@ "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0013.tscn", + "Prefab": "res://prefab/prop/BuffActivity.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0013.png", "ShowInMapEditor": true }, @@ -639,7 +639,7 @@ "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/prop/buff/BuffProp0014.tscn", + "Prefab": "res://prefab/prop/BuffActivity.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0014.png", "ShowInMapEditor": true }, diff --git a/DungeonShooting_Godot/resource/config/BuffBase.json b/DungeonShooting_Godot/resource/config/BuffBase.json index ef68898..5300f1f 100644 --- a/DungeonShooting_Godot/resource/config/BuffBase.json +++ b/DungeonShooting_Godot/resource/config/BuffBase.json @@ -11,6 +11,100 @@ } }, { + "Id": "0002", + "Remark": "\u5FC3\u4E4B\u5BB9\u5668", + "__Activity": "prop0002", + "IsActivity": false, + "Buff": { + "MaxHp": [ + 2 + ] + } + }, + { + "Id": "0003", + "Remark": "\u62A4\u76FE", + "__Activity": "prop0003", + "IsActivity": false, + "Buff": { + "MaxShield": [ + 1 + ] + } + }, + { + "Id": "0004", + "Remark": "\u62A4\u76FE\u8BA1\u65F6\u5668", + "__Activity": "prop0004", + "IsActivity": false, + "Buff": { + "ShieldRecoveryTime": [ + 2.5 + ] + } + }, + { + "Id": "0005", + "Remark": "\u6740\u4F24\u5F39", + "__Activity": "prop0005", + "IsActivity": false, + "Buff": { + "Damage": [ + 2, + 0.2 + ] + } + }, + { + "Id": "0006", + "Remark": "\u7EA2\u5B9D\u77F3\u6212\u6307", + "__Activity": "prop0006", + "IsActivity": false, + "Buff": { + "WoundedInvincibleTime": [ + 2 + ] + } + }, + { + "Id": "0007", + "Remark": "\u5907\u7528\u62A4\u76FE", + "__Activity": "prop0007", + "IsActivity": false, + "Buff": { + "OffsetInjury": [ + 0.15 + ] + } + }, + { + "Id": "0008", + "Remark": "\u773C\u955C", + "__Activity": "prop0008", + "IsActivity": false, + "Buff": { + "Scattering": [ + 0.5 + ] + } + }, + { + "Id": "0009", + "Remark": "\u9AD8\u901F\u5B50\u5F39", + "__Activity": "prop0009", + "IsActivity": false, + "Buff": { + "BulletSpeed": [ + 2, + 0.25 + ], + "BulletDistance": [ + 2, + 0.25 + ] + } + }, + { "Id": "0010", "Remark": "\u5206\u88C2\u5B50\u5F39", "__Activity": "prop0010", @@ -37,5 +131,49 @@ 0.05 ] } + }, + { + "Id": "0011", + "Remark": "\u5F39\u5C04\u5B50\u5F39", + "__Activity": "prop0011", + "IsActivity": false, + "Buff": { + "BulletBounceCount": [ + 2 + ] + } + }, + { + "Id": "0012", + "Remark": "\u7A7F\u900F\u5B50\u5F39", + "__Activity": "prop0012", + "IsActivity": false, + "Buff": { + "BulletPenetration": [ + 1 + ] + } + }, + { + "Id": "0013", + "Remark": "\u6B66\u5668\u80CC\u5305", + "__Activity": "prop0013", + "IsActivity": false, + "Buff": { + "WeaponCapacity": [ + 1 + ] + } + }, + { + "Id": "0014", + "Remark": "\u9053\u5177\u80CC\u5305", + "__Activity": "prop0014", + "IsActivity": false, + "Buff": { + "ActivePropsCapacity": [ + 1 + ] + } } ] \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs index 2b8c676..9b341a7 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject.cs @@ -477,7 +477,14 @@ else { SpriteFrames spriteFrames = AnimatedSprite.SpriteFrames; - spriteFrames.SetFrame("default", 0, texture); + if (spriteFrames.GetFrameCount("default") > 0) + { + spriteFrames.SetFrame("default", 0, texture); + } + else + { + spriteFrames.AddFrame("default", texture); + } } AnimatedSprite.Play("default"); diff --git a/DungeonShooting_Godot/src/game/buff/fragment/Buff_BulletDistance.cs b/DungeonShooting_Godot/src/game/buff/fragment/Buff_BulletDistance.cs index 1fce770..b394049 100644 --- a/DungeonShooting_Godot/src/game/buff/fragment/Buff_BulletDistance.cs +++ b/DungeonShooting_Godot/src/game/buff/fragment/Buff_BulletDistance.cs @@ -1,5 +1,8 @@ -[Buff("BulletDistance", "子弹射程 buff, 参数‘1’为射程增加类型: 1:具体射程, 2:百分比射程(小数), 参数‘2’为子弹增加的射程值")] +[Buff("BulletDistance", + "子弹射程 buff, " + + "参数‘1’为射程增加类型: 1:具体射程, 2:百分比射程(小数), " + + "参数‘2’为子弹增加的射程值")] public class Buff_BulletDistance : BuffFragment { private int _type; diff --git a/DungeonShooting_Godot/src/game/buff/fragment/Buff_BulletRepel.cs b/DungeonShooting_Godot/src/game/buff/fragment/Buff_BulletRepel.cs index 82ca434..51e7ca7 100644 --- a/DungeonShooting_Godot/src/game/buff/fragment/Buff_BulletRepel.cs +++ b/DungeonShooting_Godot/src/game/buff/fragment/Buff_BulletRepel.cs @@ -3,8 +3,8 @@ [Buff("BulletRepel", "子弹击退 buff, " + - "参数‘1’为击退增加类型: 1:具体击退值, " + - "2:百分比击退值(小数), 参数‘2’为子弹增加的击退值")] + "参数‘1’为击退增加类型: 1:具体击退值, 2:百分比击退值(小数), " + + "参数‘2’为子弹增加的击退值")] public class Buff_BulletRepel : BuffFragment { private int _type; @@ -61,7 +61,7 @@ } else { - repel.Value = Mathf.Max(0, repel.Value - Mathf.FloorToInt(repel.Value * _value)); + repel.Value = Mathf.Max(0, repel.Value + Mathf.FloorToInt(repel.Value * _value)); } } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/fragment/Buff_Damage.cs b/DungeonShooting_Godot/src/game/buff/fragment/Buff_Damage.cs index f12a8d2..e5eb3c6 100644 --- a/DungeonShooting_Godot/src/game/buff/fragment/Buff_Damage.cs +++ b/DungeonShooting_Godot/src/game/buff/fragment/Buff_Damage.cs @@ -53,7 +53,7 @@ } else { - refValue.Value = Mathf.Max(1, refValue.Value - Mathf.FloorToInt(refValue.Value * _value)); + refValue.Value = Mathf.Max(1, refValue.Value + Mathf.FloorToInt(refValue.Value * _value)); } } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/fragment/Buff_Scattering.cs b/DungeonShooting_Godot/src/game/buff/fragment/Buff_Scattering.cs index bf0eaa0..00fdc81 100644 --- a/DungeonShooting_Godot/src/game/buff/fragment/Buff_Scattering.cs +++ b/DungeonShooting_Godot/src/game/buff/fragment/Buff_Scattering.cs @@ -1,4 +1,6 @@ +using Godot; + [Buff("Scattering", "提高武器精准度buff, 参数‘1’为提升的精准度百分比值(小数)")] public class Buff_Scattering : BuffFragment { @@ -23,11 +25,11 @@ private void CalcStartScatteringEvent(float originValue, RefValue refValue) { - refValue.Value -= refValue.Value * _value; + refValue.Value = Mathf.Max(0, refValue.Value - refValue.Value * _value); } private void CalcFinalScatteringEvent(float originValue, RefValue refValue) { - refValue.Value -= refValue.Value * _value; + refValue.Value = Mathf.Max(0, refValue.Value - refValue.Value * _value); } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/buff/fragment/Buff_ShieldRecoveryTime.cs b/DungeonShooting_Godot/src/game/buff/fragment/Buff_ShieldRecoveryTime.cs index 18d2b69..a70d11a 100644 --- a/DungeonShooting_Godot/src/game/buff/fragment/Buff_ShieldRecoveryTime.cs +++ b/DungeonShooting_Godot/src/game/buff/fragment/Buff_ShieldRecoveryTime.cs @@ -1,5 +1,5 @@ -[Buff("ShieldRecoveryTime", "单格护盾恢复时间, 参数‘1’单位: 秒")] +[Buff("ShieldRecoveryTime", "单格护盾减少的恢复时间, 参数‘1’单位: 秒")] public class Buff_ShieldRecoveryTime : BuffFragment { private float _time;