TestCombatHeroConfig.cs 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. using System.Collections.Generic;
  2. using Excel2Json;
  3. using Fort23.UTool;
  4. using GameLogic.Hero;
  5. using UnityEngine;
  6. namespace GameLogic.CombatScenesTool
  7. {
  8. public class TestCombatHeroConfig : MonoBehaviour
  9. {
  10. [System.Serializable]
  11. public class TestHeroInfoConfig
  12. {
  13. public int heroID;
  14. [Header("等级")] public int level;
  15. [Header("额外生命")] public int hp;
  16. [Header("额外攻击力")] public int att;
  17. [Header("额外防御")] public int def;
  18. [Header("金")] public int jing;
  19. [Header("木")] public int mu;
  20. [Header("水")] public int shui;
  21. [Header("火")] public int huo;
  22. [Header("土")] public int tu;
  23. [Header("测试功法(skill ID)")] public List<int> skill;
  24. [Header("测试场景功法等级")] public int skillLevel=1;
  25. [Header("测试场景功法星级")] public int skillStart=1;
  26. [Header("测试法宝 法宝ID")] public List<int> magicWeaponId;
  27. public void CopyToCombatHeroInfo(CombatHeroInfo combatHeroInfo)
  28. {
  29. combatHeroInfo.InitMonster(heroID, level);
  30. // int[] skill = combatHeroInfo.modelConfig.skillID;
  31. if (magicWeaponId != null && magicWeaponId.Count > 0)
  32. {
  33. int fbLevel = ((level - 1) / 10) + 1;
  34. if (fbLevel <= 0)
  35. {
  36. fbLevel = 1;
  37. }
  38. combatHeroInfo.MagicWeaponID.Clear();
  39. for (int i = 0; i < magicWeaponId.Count; i++)
  40. {
  41. FaBaoInfo faBaoInfo = new FaBaoInfo(magicWeaponId[i], fbLevel);
  42. combatHeroInfo.MagicWeaponID.Add(faBaoInfo);
  43. }
  44. }
  45. if (skill.Count > 0)
  46. {
  47. combatHeroInfo.unLockSkills.Clear();
  48. for (int i = 0; i < skill.Count; i++)
  49. {
  50. SkillInfo skillInfo = new SkillInfo(skill[i], skillLevel,skillStart);
  51. skillInfo.index = i;
  52. combatHeroInfo.unLockSkills.Add(skillInfo);
  53. }
  54. }
  55. combatHeroInfo.hp.Value += (hp);
  56. combatHeroInfo.attack.Value += (att);
  57. }
  58. }
  59. public TestHeroInfoConfig[] myHeroInfo;
  60. public List<TestHeroInfoConfig> enemyHeroInfo = new List<TestHeroInfoConfig>();
  61. }
  62. }