mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-08-25 18:14:55 -05:00
search by min discipline
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -94,6 +94,13 @@ export default class SearchForm extends React.Component {
|
||||
<label>Max Energy: <input type="text" style={{width: '30px'}} ref={(input) => this.energy.max = input} /></label>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<label>Min <img height="16" className="icon" src={"/src/img/icons/disciplines/courage.png"} />: <input type="text" style={{width: '30px'}} ref={(input) => this.stones.courage = input} /></label>
|
||||
<label>Min <img height="16" className="icon" src={"/src/img/icons/disciplines/power.png"} />: <input type="text" style={{width: '30px'}} ref={(input) => this.stones.power = input} /></label>
|
||||
<label>Min <img height="16" className="icon" src={"/src/img/icons/disciplines/wisdom.png"} />: <input type="text" style={{width: '30px'}} ref={(input) => this.stones.wisdom = input} /></label>
|
||||
<label>Min <img height="16" className="icon" src={"/src/img/icons/disciplines/speed.png"} />: <input type="text" style={{width: '30px'}} ref={(input) => this.stones.speed = 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>
|
||||
@@ -264,6 +271,19 @@ export default class SearchForm extends React.Component {
|
||||
creatureResults = creatureResults.find({'gsx$energy': {'$lte': this.energy.max.value}});
|
||||
}
|
||||
|
||||
if (this.stones.courage.value > 0) {
|
||||
creatureResults = creatureResults.find({'gsx$courage': {'$gte': this.stones.courage.value}});
|
||||
}
|
||||
if (this.stones.power.value > 0) {
|
||||
creatureResults = creatureResults.find({'gsx$power': {'$gte': this.stones.power.value}});
|
||||
}
|
||||
if (this.stones.wisdom.value > 0) {
|
||||
creatureResults = creatureResults.find({'gsx$wisdom': {'$gte': this.stones.wisdom.value}});
|
||||
}
|
||||
if (this.stones.speed.value > 0) {
|
||||
creatureResults = creatureResults.find({'gsx$speed': {'$gte': this.stones.speed.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