using System.Collections.Generic; using Continentis.MainGame.Rules; using SLSFramework.General; using UnityEngine; namespace Continentis.Mods.Basic.Rules { public class Basic_AttributeRulesCollection : AttributeRulesCollectionBase { public override void ApplyRules_ConvertCoreIntoGeneral(Dictionary core, Dictionary general) { float level = core["Level"]; general["MaximumHealth"] += Mathf.FloorToInt(level * 3); general["MaximumMana"] += Mathf.FloorToInt(level / 2); float strengthOffset = core["Strength"] - 12; general["MaximumStamina"] += Mathf.FloorToInt(strengthOffset / 4); //最大行动点加成 general["OffsetFromStrength"] += Mathf.FloorToInt(strengthOffset / 3); //来自核心属性(力量)的调整值 float agilityOffset = core["Agility"] - 12; general["Speed"] += Mathf.FloorToInt(agilityOffset); //速度加成 general["OffsetFromAgility"] += Mathf.FloorToInt(agilityOffset / 3); //来自核心属性(敏捷)的调整值 float intelligenceOffset = core["Intelligence"] - 12; general["DeckCapacity"] += intelligenceOffset; general["OffsetFromIntelligence"] += Mathf.FloorToInt(intelligenceOffset / 3); //来自核心属性(智力)的调整值 general["ManaRecoverPerAction"] += Mathf.FloorToInt(intelligenceOffset / 6); //每回合恢复魔法值 float physiqueOffset = core["Physique"] - 12; general["MaximumHealth"] += core["Physique"] * 6; //最大生命值加成 general["StaminaRecoverPerAction"] += Mathf.FloorToInt(physiqueOffset / 6); //每回合恢复行动点 general["OffsetFromPhysique"] += Mathf.FloorToInt(physiqueOffset / 3); //来自核心属性(体质)的调整值 float perceptionOffset = core["Perception"] - 12; general["DrawCardAmountPerAction"] += Mathf.FloorToInt(perceptionOffset / 6); //来自核心属性(感知)的每回合额外抽牌数量 general["Awareness"] += perceptionOffset; //增加感知 general["OffsetFromPerception"] += Mathf.FloorToInt(perceptionOffset / 3); //来自核心属性(感知)的调整值 float charismaOffset = core["Charisma"] - 12; general["OffsetFromCharisma"] += Mathf.FloorToInt(charismaOffset / 3); //来自核心属性(魅力)的调整值 } } }