Browse Source

装备属性设计

toby 1 year ago
parent
commit
c41b19e630

+ 4 - 0
logic/equip-logic/src/main/java/com/iohao/mmo/equip/entity/ElseEquipProperty.java

@@ -23,6 +23,8 @@ import lombok.Data;
 import lombok.experimental.FieldDefaults;
 import org.springframework.data.mongodb.core.mapping.Document;
 
+import java.util.List;
+
 /**
  * 装备额外属性
  * <pre>
@@ -52,6 +54,8 @@ public class ElseEquipProperty {
     int mpMax;
     /** 幸运 */
     int lucky;
+    /** 技能及等级 */
+    List<EquipPropertyItem> skills;
 
     public static ElseEquipProperty resetElseEquipProperty() {
         ElseEquipProperty elseEquipProperty = new ElseEquipProperty();

+ 47 - 0
logic/equip-logic/src/main/java/com/iohao/mmo/equip/entity/EquipEntry.java

@@ -0,0 +1,47 @@
+/*
+ * ioGame
+ * Copyright (C) 2021 - 2023  渔民小镇 (262610965@qq.com、luoyizhu@gmail.com) . All Rights Reserved.
+ * # iohao.com . 渔民小镇
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+package com.iohao.mmo.equip.entity;
+
+import lombok.AccessLevel;
+import lombok.Data;
+import lombok.experimental.FieldDefaults;
+import org.springframework.data.annotation.Id;
+import org.springframework.data.mongodb.core.mapping.Document;
+
+/**
+ * 装备词条
+ *
+ * @author 唐斌
+ * @date 2023-07-26
+ */
+@Data
+@Document
+@FieldDefaults(level = AccessLevel.PRIVATE)
+public class EquipEntry {
+    @Id
+    String id;
+    /** 名称 */
+    String name;
+    /** 描述 */
+    String description;
+    /** 影响属性 */
+    String effectProperty;
+    /** 影响类型:1在装备上加,2在装备上增加百分比,3在全身增加百分比 */
+    int effectType;
+}

+ 65 - 0
logic/equip-logic/src/main/java/com/iohao/mmo/equip/entity/EquipProperty.java

@@ -0,0 +1,65 @@
+/*
+ * ioGame
+ * Copyright (C) 2021 - 2023  渔民小镇 (262610965@qq.com、luoyizhu@gmail.com) . All Rights Reserved.
+ * # iohao.com . 渔民小镇
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+package com.iohao.mmo.equip.entity;
+
+import lombok.AccessLevel;
+import lombok.Data;
+import lombok.experimental.FieldDefaults;
+import org.springframework.data.mongodb.core.mapping.Document;
+
+/**
+ * 装备属性汇总
+ * <pre>
+ *     装备的基本属性
+ * </pre>
+ *
+ * @author 唐斌
+ * @date 2023-07-24
+ */
+@Data
+@Document
+@FieldDefaults(level = AccessLevel.PRIVATE)
+public class EquipProperty {
+    /** 根骨 */
+    int rootBone;
+    /** 精力 */
+    int energy;
+    /** 力量 */
+    int power;
+    /** 智力 */
+    int intelligence;
+    /** 敏捷 */
+    int agile;
+    /** 最大气血 */
+    int hpMax;
+    /** 最大法力 */
+    int mpMax;
+    /** 幸运 */
+    int lucky;
+
+    public static EquipProperty resetElseEquipProperty() {
+        EquipProperty elseEquipProperty = new EquipProperty();
+        elseEquipProperty.constitution = 0;
+        elseEquipProperty.magicPower = 0;
+        elseEquipProperty.power = 0;
+        elseEquipProperty.endurance = 0;
+        elseEquipProperty.agile = 0;
+        return elseEquipProperty;
+    }
+}

+ 43 - 0
logic/equip-logic/src/main/java/com/iohao/mmo/equip/entity/EquipPropertyItem.java

@@ -0,0 +1,43 @@
+/*
+ * ioGame
+ * Copyright (C) 2021 - 2023  渔民小镇 (262610965@qq.com、luoyizhu@gmail.com) . All Rights Reserved.
+ * # iohao.com . 渔民小镇
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+package com.iohao.mmo.equip.entity;
+
+import lombok.AccessLevel;
+import lombok.Data;
+import lombok.experimental.FieldDefaults;
+import org.springframework.data.annotation.Id;
+import org.springframework.data.mongodb.core.mapping.Document;
+
+/**
+ * 元素攻击
+ *
+ * @author 唐斌
+ * @date 2023-07-26
+ */
+@Data
+@Document
+@FieldDefaults(level = AccessLevel.PRIVATE)
+public class EquipPropertyItem {
+    /**对应属性字典 */
+    String itemType;
+    /** 增加数值类型:1增加数字,2增加百分比(小数) */
+    int effectType;
+    /** 增加数值 */
+    int effectValue;
+}

+ 53 - 3
logic/equip-logic/src/main/java/com/iohao/mmo/equip/entity/FixedEquipProperty.java

@@ -24,7 +24,8 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.experimental.FieldDefaults;
 import org.springframework.data.mongodb.core.mapping.Document;
-import java.math.BigDecimal;
+
+import java.util.List;
 
 /**
  * 装备固定属性
@@ -50,6 +51,11 @@ public class FixedEquipProperty {
     /** 法术攻击最大值 */
     int magicAttackMax;
 
+    /** 物理攻击速度 */
+    int physicsAttackSpeed;
+    /** 法术攻击速度 */
+    int magicAttackSpeed;
+
     /** 物理防御 */
     int physicsDefense;
     /** 法术防御 */
@@ -64,8 +70,52 @@ public class FixedEquipProperty {
     /** 法术闪避 */
     int magicDodge;
 
-    /** 生命值百分比 */
-    BigDecimal hpPct;
+    /** 物理致命 */
+    int physicsDeathblow;
+    /** 物理致命效果 */
+    int physicsDeathblowEffect;
+    /** 法术致命 */
+    int magicDeathblow;
+    /** 法术致命效果 */
+    int magicDeathblowEffect;
+
+    /** 抗物理致命 */
+    int physicsDeathblowResist;
+    /** 抗物理致命效果 */
+    int physicsDeathblowEffectResist;
+    /** 抗法术致命 */
+    int magicDeathblowResist;
+    /** 抗法术致命效果 */
+    int magicDeathblowEffectResist;
+
+    /** 受到最终物理伤害 */
+    int finalPhysicsDamage;
+    /** 受到最终法术伤害 */
+    int finalMagicDamage;
+
+    /** 元素攻击 */
+    List<EquipPropertyItem> elementAttack;
+    /** 元素抗性 */
+    List<EquipPropertyItem> elementAttackResist;
+    /** 忽视元素抗性 */
+    List<EquipPropertyItem> elementAttackIgnore;
+
+    /** 破盾 */
+    int breakingShield;
+
+    /** 格挡 */
+    int brock;
+
+    /** 要求等级降低 */
+    int levelReduce;
+
+    /** 对职业伤害 */
+    List<EquipPropertyItem> careerEffect;
+
+    /** 生命值 */
+    int hp;
+    /** 能量值 */
+    int mp;
 
     /** 耐久度 */
     int durability;