Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Turn Counter #342

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/global_const.js
Original file line number Diff line number Diff line change
Expand Up @@ -1943,8 +1943,7 @@ var skillAmounts = {
},
"darkOpusElementATK": {
//per turn increase, maximum 10 turns
//"L": [0.0055, 0.0060, 0.0065, 0.0070, 0.0075, 0.0080, 0.0085, 0.0090, 0.0095, 0.0100, 0.0105, 0.0110, 0.0115, 0.0120, 0.0125, 0.0130, 0.0135, 0.0140, 0.0145, 0.0150],
"L": [0.055, 0.060, 0.065, 0.070, 0.075, 0.080, 0.085, 0.090, 0.095, 0.100, 0.105, 0.110, 0.115, 0.120, 0.125, 0.130, 0.135, 0.140, 0.145, 0.150],
"L": [0.0055, 0.0060, 0.0065, 0.0070, 0.0075, 0.0080, 0.0085, 0.0090, 0.0095, 0.0100, 0.0105, 0.0110, 0.0115, 0.0120, 0.0125, 0.0130, 0.0135, 0.0140, 0.0145, 0.0150],
}
};

Expand Down
6 changes: 4 additions & 2 deletions src/global_logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,8 @@ module.exports.calcBasedOneSummon = function (summonind, prof, buff, totals) {
elementCoeff += buff["element"];
elementCoeff += totals[key]["elementBuff"];
elementCoeff += totals[key]["elementBuffBoostBuff"];
elementCoeff += totals[key]["opusnormalElement"] * totalSummon["zeus"];
elementCoeff += totals[key]["opusmagnaElement"] * totalSummon["magna"];
elementCoeff += totals[key]["opusnormalElement"] * totalSummon["zeus"] * (Math.min(10, Math.max(0, buff["turn"])));
elementCoeff += totals[key]["opusmagnaElement"] * totalSummon["magna"] * (Math.min(10, Math.max(0, buff["turn"])));
elementCoeff += 0.01 * totals[key]["shinTenNoInori"][0] * totals[key]["shinTenNoInori"][1]; //[0]: amount. [1]: stacks number
elementCoeff += 0.01 * totals[key]["LB"].Element;

Expand Down Expand Up @@ -1495,6 +1495,7 @@ module.exports.getTotalBuff = function (prof) {
supplementalDamageBuff: 0,
//enemyBuffCount: 0,
enemyDebuffCount: 0,
turn: 0,
retsujitsuNoRakuen: false,
};

Expand Down Expand Up @@ -1531,6 +1532,7 @@ module.exports.getTotalBuff = function (prof) {
totalBuff["criticalBuff"] = prof.criticalBuff != undefined ? prof.criticalBuff : [];
totalBuff["supplementalDamageBuff"] += parseInt(prof.supplementalDamageBuff);

totalBuff["turn"] = parseInt(prof.turn);
totalBuff["retsujitsuNoRakuen"] = prof.retsujitsuNoRakuen;

return totalBuff;
Expand Down
10 changes: 10 additions & 0 deletions src/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ var Profile = CreateClass({
personalCriticalBuffCount: 0,
retsujitsuNoRakuen: false,
shiToAiNoSekai: false,
turn: 1,
};
},
switchBufflist: function (e) {
Expand Down Expand Up @@ -949,6 +950,15 @@ var Profile = CreateClass({
</td>
</tr>

<TextWithTooltip tooltip={intl.translate("ターン説明", locale)} id={"tooltip-turn-detail"}>
<tr>
<th className="bg-primary">{intl.translate("ターン", locale)}</th>
<td><FormControl type="number" min="0" step ="1" max="999" value={this.state.turn}
onBlur={this.handleOnBlur} onChange={this.handleEvent.bind(this, "turn")}/>
</td>
</tr>
</TextWithTooltip>

<TextWithTooltip tooltip={intl.translate("敵防御固有値説明", locale)} id={"tooltip-enemy-defense-detail"}>
<tr>
<th className="bg-primary">{intl.translate("敵防御固有値", locale)}</th>
Expand Down
10 changes: 6 additions & 4 deletions src/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,8 @@ var ResultList = CreateClass({

var addPercent = (value) => intl.translate("percent", locale).replace("{}", value === undefined ? "0" : value);

var turnStr = intl.translate("ターン", locale) + ": " + prof.turn;

// Create buff info line
var buffInfo = [];
buffInfo.push(intl.translate("通常バフ", locale) + addPercent(prof.normalBuff));
Expand Down Expand Up @@ -660,7 +662,7 @@ var ResultList = CreateClass({
<hr style={{"margin": "10px 0px"}}/>
<div className="charainfo">
{charaInfo}
<div>{intl.translate("パーティ全体バフ", locale)}: {buffInfoStr}</div>
<div>{turnStr + " | "}{intl.translate("パーティ全体バフ", locale)}: {buffInfoStr}</div>
<div>{getElementColorLabel(prof.enemyElement, locale)} {intl.translate("敵", locale)} ({enemyInfoStr})</div>
</div>
<table className="table table-bordered">
Expand Down Expand Up @@ -694,7 +696,7 @@ var ResultList = CreateClass({
<Modal.Title>{intl.translate("背水渾身グラフ", locale)}</Modal.Title>
<div className="charainfo" style={{"float": "left"}}>
{charaInfo}
<div>{intl.translate("パーティ全体バフ", locale)}: {buffInfoStr}</div>
<div>{turnStr + " | "}{intl.translate("パーティ全体バフ", locale)}: {buffInfoStr}</div>
<div>{getElementColorLabel(prof.enemyElement, locale)} {intl.translate("敵", locale)} ({enemyInfoStr})</div>
</div>
<ButtonGroup block vertical>
Expand Down Expand Up @@ -864,7 +866,7 @@ var ResultList = CreateClass({
<hr style={{"margin": "10px 0px 5px 0px"}}/>
<div className="charainfo" style={{"float": "left"}}>
{charaInfo}
<div>{intl.translate("パーティ全体バフ", locale)}: {buffInfoStr}</div>
<div>{turnStr + " | "}{intl.translate("パーティ全体バフ", locale)}: {buffInfoStr}</div>
<div>{getElementColorLabel(prof.enemyElement, locale)} {intl.translate("敵", locale)} ({enemyInfoStr})</div>
</div>
<div style={{"textAlign": "right", "float": "right"}}>
Expand Down Expand Up @@ -903,7 +905,7 @@ var ResultList = CreateClass({
<Modal.Title>{intl.translate("背水渾身グラフ", locale)}</Modal.Title>
<div className="charainfo" style={{"float": "left"}}>
{charaInfo}
<div>{intl.translate("パーティ全体バフ", locale)}: {buffInfoStr}</div>
<div>{turnStr + " | "}{intl.translate("パーティ全体バフ", locale)}: {buffInfoStr}</div>
<div>{getElementColorLabel(prof.enemyElement, locale)} {intl.translate("敵", locale)} ({enemyInfoStr})</div>
</div>
<div style={{"float": "right"}}>
Expand Down
10 changes: 10 additions & 0 deletions src/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,16 @@ var multiLangData = {
"ja": "もっともっと詳しく計算したい方向けの項目です。",
"zh": "适合想要进行更加详细的计算的人。",
},
"ターン": {
"en": "Turn",
"ja": "想定ターン",
"zh": "想定ターン",
},
"ターン説明": {
"en": "Turn Number (affects various weapon skill/support ability/etc)",
"ja": "何ターン目を想定するか入力して下さい。(隆盛等の一部スキルやサポアビ等に影響)",
"zh": "ターン",
},
"敵防御固有値": {
"en": "Enemy Innate DEF",
"ja": "敵防御固有値",
Expand Down