Files
Continentis/Assets/CoreMods/Basic/Rules/Basic_AttributeRulesCollection.cs

40 lines
2.6 KiB
C#
Raw Normal View History

2025-10-03 00:02:43 -04:00
using System.Collections.Generic;
using Continentis.MainGame.Rules;
using SoulliesFramework.General;
using UnityEngine;
namespace Continentis.Mods.Basic.Rules
{
public class Basic_AttributeRulesCollection : AttributeRulesCollectionBase
{
public override void ApplyRules_ConvertCoreIntoGeneral(Dictionary<string, float> core, Dictionary<string, float> general)
{
float strengthOffset = core["Strength"] - 12;
general["MaximumStamina"] += Mathf.FloorToInt(strengthOffset / 4); //最大行动点加成
general["PhysicsDamageDealtOffsetFromStrength"] += Mathf.FloorToInt(strengthOffset / 3); //来自核心属性(力量)的物理伤害加成
float agilityOffset = core["Agility"] - 12;
general["Speed"] += Mathf.FloorToInt(agilityOffset); //速度加成
general["PhysicsDamageDealtOffsetFromAgility"] += Mathf.FloorToInt(agilityOffset / 3); //来自核心属性(敏捷)的物理伤害加成
general["DefenseGainOffsetFromAgility"] += Mathf.FloorToInt(agilityOffset / 3); //来自核心属性(敏捷)额外防御力加成
float intelligenceOffset = core["Intelligence"] - 12;
general["DeckCapacity"] += intelligenceOffset;
general["MaximumMana"] += Mathf.FloorToInt(intelligenceOffset / 4); //最大魔法值加成
general["MagicDamageDealtOffsetFromIntelligence"] += 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["DefenseGainOffsetFromPhysique"] += Mathf.FloorToInt(physiqueOffset / 3); //来自核心属性(体质)额外防御力加成
float perceptionOffset = core["Perception"] - 12;
general["DrawCardAmountPerAction"] += Mathf.FloorToInt(perceptionOffset / 6); //来自核心属性(感知)的每回合额外抽牌数量
general["Awareness"] += perceptionOffset; //增加感知/反制敌人【诡计】牌的概率
float charismaOffset = core["Charisma"] - 12;
general["MagicDamageDealtOffsetFromCharisma"] += Mathf.FloorToInt(charismaOffset / 3); //来自核心属性(魅力)的魔法伤害加成
}
}
}