diff --git a/.circleci/config.yml b/.circleci/config.yml index 70e287c..252c4cc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,5 +19,4 @@ jobs: - node_modules key: dependencies-{{ checksum "package.json" }} - run: echo "REACT_APP_SENTRY_DSN=${SENTRY_DSN}" >> .env - - run: echo "REACT_APP_VERSION=$npm_package_version" >> .env - run: yarn deploy diff --git a/.env.example b/.env.example index 2508129..a593178 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1 @@ REACT_APP_SENTRY_DSN=YOUR_SENTRY_DSN -REACT_APP_VERSION=$npm_package_version diff --git a/public/index.html b/public/index.html index 9495170..5790cb8 100644 --- a/public/index.html +++ b/public/index.html @@ -1,26 +1,27 @@ - - - - - - - - - + + + + + + + - - - - ROSIM - RO 素質模擬器 - - - -
- - + + diff --git a/src/components/About.jsx b/src/components/About.jsx index c04b6d6..13fb1d1 100644 --- a/src/components/About.jsx +++ b/src/components/About.jsx @@ -1,9 +1,9 @@ -/* eslint react/no-unknown-property: 0 */ import React from 'react'; import PropTypes from 'prop-types'; import ReactMarkdown from 'react-markdown'; import { Row, Col } from 'antd'; +import { version } from '../../package.json'; import { Card } from './Layouts/CardLayout'; const link = ({ href, children }) => ( @@ -21,7 +21,9 @@ const renderers = { link }; const aboutWebsite = ` 為何會有此模擬器請參考[巴哈原文](https://forum.gamer.com.tw/C.php?bsn=4212&snA=416122&tnum=7),總之這是一個在過年沒 RO 玩之下的產物。 -只要我還沒離開 RO 這款遊戲,就會慢慢更新此模擬器,讓功能趨近於完整。 +~~只要我還沒離開 RO 這款遊戲,就會慢慢更新此模擬器,讓功能趨近於完整。~~ + +雖然已經退坑了,不過還是會慢慢更新。 如果有任何建議歡迎加入 Discord 討論,或是透過巴哈私訊我。 @@ -30,8 +32,7 @@ const aboutWebsite = ` 若有能力也歡迎發 Pull Request 或是 Issue 討論。 ### 改版訊息 -當前版本: **${process.env.REACT_APP_VERSION}** - +當前版本: **${version}** 完整改版訊息請參閱 [Github Releases](https://github.com/jigsawye/rosim/releases)。 @@ -41,6 +42,7 @@ const aboutWebsite = ` - 感謝 [川_@](https://home.gamer.com.tw/homeindex.php?owner=hsin0604) 的建議及錯誤回報 - 感謝 [琉璃廣](https://home.gamer.com.tw/homeindex.php?owner=rorigo) 的公式分享 - 感謝 [白龍](https://home.gamer.com.tw/homeindex.php?owner=k99999532) 的說明文字授權 +- 感謝 [琥雨心](https://home.gamer.com.tw/homeindex.php?owner=d790012) 的建議及錯誤回報 ### 資料來源 - [iRO Wiki](https://irowiki.org/wiki/Main_Page) @@ -64,6 +66,7 @@ const About = () => ( src="https://discordapp.com/widget?id=416465528442454026&theme=dark" width="100%" height="500" + // eslint-disable-next-line react/no-unknown-property allowtransparency="true" frameBorder="0" /> diff --git a/src/utils/aspd.js b/src/utils/aspd.js index ce2b518..542398a 100644 --- a/src/utils/aspd.js +++ b/src/utils/aspd.js @@ -59,17 +59,22 @@ export default (job, agi, dex, aspd) => { : lefthandBaseAspd; const agiModifier = getAgiModifier(hasLefthandWeapon, weaponId); const aspdPenalty = getAspdPenalty(hasLefthandWeapon, baseAspd); - - const additionalEquipMod = additionalMod.reduce((acc, curr) => acc + additionalEquipModTable[curr], 0); + const additionalEquipMod = additionalMod.reduce( + (acc, curr) => acc + additionalEquipModTable[curr], + 0 + ); const aspdA = baseAspd + lefthandPenalty + - Math.sqrt(agi * agiModifier + ((dex * 11) / 60) * aspdPenalty); + Math.sqrt(agi * agiModifier + (dex * 11) / 60) * aspdPenalty; + const aspdB = 200 - (200 - aspdA) * (1 - aspdModifier / 100); + const finalAspd = 195 - (195 - aspdB) * (1 - (equipMod + additionalEquipMod) / 100) + equipFixed; + return floor(finalAspd, 2); }; diff --git a/src/utils/formatOldData.js b/src/utils/formatOldData.js index f683f97..7333405 100644 --- a/src/utils/formatOldData.js +++ b/src/utils/formatOldData.js @@ -30,6 +30,7 @@ export default (state, { payload }) => { equipMod: defaultTo(aspd.equltmentsAddition, aspd.equipMod), skillMod: defaultTo(aspd.skillsAddition, aspd.skillMod), potionMod: defaultTo(aspd.potionAddition, aspd.potionMod), + additionalMod: defaultTo(aspd.additionalMod, []), }; state.skills = skills; };