mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-08-21 16:14:37 -05:00
energy range search
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -29,6 +29,7 @@ export default class SearchForm extends React.Component {
|
||||
this.sets = {};
|
||||
this.gender = {};
|
||||
this.mc = {};
|
||||
this.energy = {};
|
||||
};
|
||||
|
||||
render() {
|
||||
@@ -88,6 +89,11 @@ export default class SearchForm extends React.Component {
|
||||
<label>Max Mugic Counters: <input type="text" style={{width: '20px'}} ref={(input) => this.mc.max = input} /></label>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<label>Min Energy: <input type="text" style={{width: '30px'}} ref={(input) => this.energy.min = input} /></label>
|
||||
<label>Max Energy: <input type="text" style={{width: '30px'}} ref={(input) => this.energy.max = input} /></label>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<label><input type="checkbox" ref={(input) => this.stones.unique = input}/>Unique</label>
|
||||
<label><input type="checkbox" ref={(input) => this.stones.loyal = input}/>loyal</label>
|
||||
@@ -251,6 +257,13 @@ export default class SearchForm extends React.Component {
|
||||
creatureResults = creatureResults.find({'gsx$mugicability': {'$lte': this.mc.max.value}});
|
||||
}
|
||||
|
||||
if (this.energy.min.value > 0) {
|
||||
creatureResults = creatureResults.find({'gsx$energy': {'$gte': this.energy.min.value}});
|
||||
}
|
||||
if (this.energy.max.value > 0 && this.energy.max.value >= this.energy.min.value) {
|
||||
creatureResults = creatureResults.find({'gsx$energy': {'$lte': this.energy.max.value}});
|
||||
}
|
||||
|
||||
if (this.stones.unique.checked) {
|
||||
creatureResults = creatureResults.find({'gsx$unique': {'$gt': 0}});
|
||||
attackResults = attackResults.find({'gsx$unique': {'$gt': 0}});
|
||||
|
||||
Reference in New Issue
Block a user