Skip to content

Commit

Permalink
Add Over Masterys (EXLB) (MotocalDevelopers#214)
Browse files Browse the repository at this point in the history
* Add Over Mastery (EXLB)
  • Loading branch information
エッケザックス authored May 31, 2019
1 parent 902d0ab commit e274644
Show file tree
Hide file tree
Showing 6 changed files with 468 additions and 13 deletions.
112 changes: 109 additions & 3 deletions src/chara.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ var Chara = CreateClass({
isConsideredInAverage: true,
openBufflist: false,
openLBlist: false,
openEXLBlist: false,
normalBuff: 0,
elementBuff: 0,
otherBuff: 0,
Expand All @@ -297,6 +298,15 @@ var Chara = CreateClass({
LBCritical2: "none",
LBCritical3: "none",
LBCritical4: "none",
EXLBATK: 0,
EXLBHP: 0,
EXLBOugiDamage: 0,
EXLBOugiDamageLimit: 0,
EXLBCritical: 0,
EXLBHaisui: 0,
EXLBKonshin: 0,
EXLBDA: 0,
EXLBTA: 0,
};
},
componentDidMount: function () {
Expand Down Expand Up @@ -419,6 +429,9 @@ var Chara = CreateClass({
switchLBlist: function (e) {
this.setState({openLBlist: !(this.state.openLBlist)})
},
switchEXLBlist: function (e) {
this.setState({openEXLBlist: !(this.state.openEXLBlist)})
},
render: function () {
var locale = this.props.locale;

Expand Down Expand Up @@ -511,9 +524,9 @@ var Chara = CreateClass({
</tr>
<tr>
<th className="bg-primary">{intl.translate("奥義倍率", locale)}</th>
<td><InputGroup><FormControl type="number" min="0" step="0.5" max="20" value={this.state.ougiRatio}
onBlur={this.handleOnBlur} onChange={this.handleEvent.bind(this, "ougiRatio")}/><InputGroup.Addon>%</InputGroup.Addon>
</InputGroup></td>
<td><FormControl type="number" min="0" step="0.5" max="20" value={this.state.ougiRatio}
onBlur={this.handleOnBlur} onChange={this.handleEvent.bind(this, "ougiRatio")}/>
</td>
</tr>
<tr>
<th className="bg-primary">{intl.translate("サポアビ", locale)}1</th>
Expand Down Expand Up @@ -699,6 +712,99 @@ var Chara = CreateClass({
</tr>
]
: null}

<tr>
<th className="bg-primary">
<Button onClick={this.switchEXLBlist}>{intl.translate("指輪", locale)}</Button>
</th>
<td></td>
</tr>
{this.state.openEXLBlist ?
[
<tr key="EXLBATK">
<th className="bg-primary">{intl.translate("攻撃力", locale)}</th>
<td>
<FormControl componentClass="select" value={this.state.EXLBATK}
onChange={this.handleSelectEvent.bind(this, "EXLBATK")}>
{selector.EXlimitBonusAttackList}
</FormControl>
</td>
</tr>,
<tr key="EXLBHP">
<th className="bg-primary">HP</th>
<td>
<FormControl componentClass="select" value={this.state.EXLBHP}
onChange={this.handleSelectEvent.bind(this, "EXLBHP")}>
{selector.EXlimitBonusHPList}
</FormControl>
</td>
</tr>,
<tr key="EXLBOugiDamage">
<th className="bg-primary">{intl.translate("奥義ダメージ", locale)}</th>
<td><InputGroup>
<FormControl componentClass="select" value={this.state.EXLBOugiDamage}
onChange={this.handleSelectEvent.bind(this, "EXLBOugiDamage")}>
{selector.EXlimitBonusOugiDamageList}
</FormControl>
<InputGroup.Addon>%</InputGroup.Addon></InputGroup></td>
</tr>,
<tr key="EXLBOugiDamageLimit">
<th className="bg-primary">{intl.translate("奥義ダメージ上限", locale)}</th>
<td><InputGroup>
<FormControl componentClass="select" value={this.state.EXLBOugiDamageLimit}
onChange={this.handleSelectEvent.bind(this, "EXLBOugiDamageLimit")}>
{selector.EXlimitBonusOugiDamageLimitList}
</FormControl>
<InputGroup.Addon>%</InputGroup.Addon></InputGroup></td>
</tr>,
<tr key="EXLBCritical">
<th className="bg-primary">{intl.translate("クリティカル確率", locale)}</th>
<td><InputGroup>
<FormControl componentClass="select" value={this.state.EXLBCritical}
onChange={this.handleSelectEvent.bind(this, "EXLBCritical")}>
{selector.EXlimitBonusCriticalList}
</FormControl>
<InputGroup.Addon>%</InputGroup.Addon></InputGroup></td>
</tr>,
<tr key="EXLBHaisui">
<th className="bg-primary">{intl.translate("背水", locale)}</th>
<td>
<FormControl componentClass="select" value={this.state.EXLBHaisui}
onChange={this.handleSelectEvent.bind(this, "EXLBHaisui")}>
{selector.EXlimitBonusHaisuiList}
</FormControl>
</td>
</tr>,
<tr key="EXLBKonshin">
<th className="bg-primary">{intl.translate("渾身", locale)}</th>
<td>
<FormControl componentClass="select" value={this.state.EXLBKonshin}
onChange={this.handleSelectEvent.bind(this, "EXLBKonshin")}>
{selector.EXlimitBonusKonshinList}
</FormControl>
</td>
</tr>,
<tr key="EXLBDA">
<th className="bg-primary">{intl.translate("DA", locale)}</th>
<td><InputGroup>
<FormControl componentClass="select" value={this.state.EXLBDA}
onChange={this.handleSelectEvent.bind(this, "EXLBDA")}>
{selector.EXlimitBonusDAList}
</FormControl>
<InputGroup.Addon>%</InputGroup.Addon></InputGroup></td>
</tr>,
<tr key="EXLBTA">
<th className="bg-primary">{intl.translate("TA", locale)}</th>
<td><InputGroup>
<FormControl componentClass="select" value={this.state.EXLBTA}
onChange={this.handleSelectEvent.bind(this, "EXLBTA")}>
{selector.EXlimitBonusTAList}
</FormControl>
<InputGroup.Addon>%</InputGroup.Addon></InputGroup></td>
</tr>
]
: null}

</tbody>
</table>
<ButtonGroup style={{"width": "100%"}}>
Expand Down
43 changes: 42 additions & 1 deletion src/global_const.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,17 @@ var limitBonusCriticalList = {
},
};

// Chara EX limitBonus
var EXlimitBonusAttackList = [0, 300, 600, 900, 1200, 1500, 1800, 2100, 2400, 2700, 3000];
var EXlimitBonusHPList = [0, 150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
var EXlimitBonusOugiDamageList = [0, 10, 12, 14, 16, 18, 20, 22, 24, 27, 30];
var EXlimitBonusOugiDamageLimitList = [0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
var EXlimitBonusCriticalList = [0, 10, 12, 14, 16, 18, 20, 22, 24, 27, 30];
var EXlimitBonusHaisuiList = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var EXlimitBonusKonshinList = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var EXlimitBonusDAList = [0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
var EXlimitBonusTAList = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

var enemyDefenseType = {
10.0: { "name": "敵防御10.0" },
10.5: { "name": "敵防御10.5" },
Expand Down Expand Up @@ -2212,7 +2223,7 @@ module.exports.selector.skilllevel20Limit = Object.keys(skillLevelList20Limit).m
return <option value={skillLevelList20Limit[opt]} key={opt}>{opt}</option>
});

// Limit Bonus Selectors
// Chara Limit Bonus Selectors
module.exports.selector.limitBonusAttackList = limitBonusAttackList.map(function (opt) {
return <option value={opt} key={opt}>{opt}</option>;
});
Expand All @@ -2232,6 +2243,36 @@ module.exports.selector.limitBonusCriticalList = Object.keys(limitBonusCriticalL
return <option value={opt} key={opt}>{limitBonusCriticalList[opt].name}</option>
});

// Chara EX Limit Bonus Selectors
module.exports.selector.EXlimitBonusAttackList = EXlimitBonusAttackList.map(function (opt) {
return <option value={opt} key={opt}>{opt}</option>;
});
module.exports.selector.EXlimitBonusHPList = EXlimitBonusHPList.map(function (opt) {
return <option value={opt} key={opt}>{opt}</option>;
});
module.exports.selector.EXlimitBonusOugiDamageList = EXlimitBonusOugiDamageList.map(function (opt) {
return <option value={opt} key={opt}>{opt}</option>;
});
module.exports.selector.EXlimitBonusOugiDamageLimitList = EXlimitBonusOugiDamageLimitList.map(function (opt) {
return <option value={opt} key={opt}>{opt}</option>;
});
module.exports.selector.EXlimitBonusCriticalList = EXlimitBonusCriticalList.map(function (opt) {
return <option value={opt} key={opt}>{opt}</option>;
});
module.exports.selector.EXlimitBonusHaisuiList = EXlimitBonusHaisuiList.map(function (opt) {
return <option value={opt} key={opt}>{opt}</option>;
});
module.exports.selector.EXlimitBonusKonshinList = EXlimitBonusKonshinList.map(function (opt) {
return <option value={opt} key={opt}>{opt}</option>;
});
module.exports.selector.EXlimitBonusDAList = EXlimitBonusDAList.map(function (opt) {
return <option value={opt} key={opt}>{opt}</option>;
});
module.exports.selector.EXlimitBonusTAList = EXlimitBonusTAList.map(function (opt) {
return <option value={opt} key={opt}>{opt}</option>;
});


module.exports.selector.ja.supported_chartsortkeys = Object.keys(supportedChartSortkeys).map(function (opt) {
return <option value={opt} key={opt}>{supportedChartSortkeys[opt]}</option>
});
Expand Down
Loading

0 comments on commit e274644

Please sign in to comment.