Skip to content

Commit

Permalink
Merge pull request #12 from jigsawye/1.7.1
Browse files Browse the repository at this point in the history
1.7.1
  • Loading branch information
jigsawye authored Jul 21, 2018
2 parents a6fc12c + be3b47a commit 319b7a1
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 36 deletions.
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
REACT_APP_SENTRY_DSN=YOUR_SENTRY_DSN
REACT_APP_VERSION=$npm_package_version
58 changes: 31 additions & 27 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-57230871-4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-57230871-4');
</script>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--

<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-57230871-4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());

gtag('config', 'UA-57230871-4');
</script>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<!--
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Expand All @@ -29,14 +30,16 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>ROSIM - RO 素質模擬器</title>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
<title>ROSIM - RO 素質模擬器</title>
<meta name="description" content="用於試算仙境傳說 RO 素質、能力、攻速等等的模擬器。">
</head>

<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand All @@ -46,5 +49,6 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</body>

</html>
11 changes: 7 additions & 4 deletions src/components/About.jsx
Original file line number Diff line number Diff line change
@@ -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 }) => (
Expand All @@ -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 討論,或是透過巴哈私訊我。
Expand All @@ -30,8 +32,7 @@ const aboutWebsite = `
若有能力也歡迎發 Pull Request 或是 Issue 討論。
### 改版訊息
當前版本: **${process.env.REACT_APP_VERSION}**
當前版本: **${version}**
完整改版訊息請參閱 [Github Releases](https://github.com/jigsawye/rosim/releases)。
Expand All @@ -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)
Expand All @@ -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"
/>
Expand Down
11 changes: 8 additions & 3 deletions src/utils/aspd.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
1 change: 1 addition & 0 deletions src/utils/formatOldData.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

0 comments on commit 319b7a1

Please sign in to comment.