public static ActorStat CreateBattleStat(ActorStatType type, string name, int baseScore) { return(new ActorStat() { name = name, actorStatType = type, tmpIconText = battleStatTMPIcons[type], currentScore = baseScore, baseScore = baseScore, }); }
public void InitializeBar(ActorStat statInfo) { battleStatType = statInfo.actorStatType; barStyle = battleBarStyles[(int)battleStatType]; ratioText.color = barStyle.textNormalColor; barBG.color = barStyle.baseColor; fullBar.color = barStyle.fullColor; nameplate.text = statInfo.name + " " + statInfo.tmpIconText; battleStatInfo = statInfo; UpdateState(); }
static void Postfix(ActorInstance __instance, Team ___m_Team, ref float __result, ActorStatType actorStatType) { if (__instance.ActorName.Length == 0 || __result <= 0) { return; } if (actorStatType == ActorStatType.CRIT_CHANCE) { float newResult = __result * 2f; logger.LogInfo($"{__instance.ActorName} crit chance: {__result} -> {newResult}"); __result = newResult; } else if (actorStatType == ActorStatType.DEATHS_DOOR_CHANCE) { float newResult = __result * 2f; logger.LogInfo($"{__instance.ActorName} death's door chance: {__result} -> {newResult}"); __result = newResult; } }
public ActorStat GetStat(ActorStatType statType) { return(battleStats[statType]); }