mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-03-28 12:34:33 -05:00
unique/loyal #17
This commit is contained in:
parent
31434ed464
commit
feeb52dc01
File diff suppressed because one or more lines are too long
|
|
@ -4,7 +4,7 @@ import API from '../SpreadsheetData';
|
|||
import s from '../../styles/app.style';
|
||||
import {observable} from "mobx";
|
||||
import {observer, inject} from 'mobx-react';
|
||||
import {Rarity} from './_Snippets';
|
||||
import {Rarity, Unique} from './_Snippets';
|
||||
|
||||
@inject((stores, props, context) => props) @observer
|
||||
export default class Attack extends React.Component {
|
||||
|
|
@ -30,6 +30,7 @@ export default class Attack extends React.Component {
|
|||
<br />
|
||||
<div style={{float: 'left', width: 'calc(100% - (100px + 230px))', borderLeft: '1px solid white', paddingLeft: '10px'}} >
|
||||
<span>{attack.gsx$ability}</span><br />
|
||||
<Unique data={{unique: attack.gsx$unique, loyal: attack.gsx$loyal, legendary: attack.gsx$legendary}} /><br />
|
||||
<span className="flavortext">{attack.gsx$flavortext}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import API from '../SpreadsheetData';
|
|||
import s from '../../styles/app.style';
|
||||
import {observable} from "mobx";
|
||||
import {observer, inject} from 'mobx-react';
|
||||
import {Rarity} from './_Snippets';
|
||||
import {Rarity, Unique} from './_Snippets';
|
||||
|
||||
@inject((stores, props, context) => props) @observer
|
||||
export default class Battlegear extends React.Component {
|
||||
|
|
@ -21,6 +21,7 @@ export default class Battlegear extends React.Component {
|
|||
</div>
|
||||
<div style={{float: 'left', width: 'calc(100% - (100px + 230px))', borderLeft: '1px solid white', paddingLeft: '10px'}} >
|
||||
<span>{battlegear.gsx$ability}</span><br />
|
||||
<Unique data={{unique: battlegear.gsx$unique, loyal: battlegear.gsx$loyal, legendary: battlegear.gsx$legendary}} /><br />
|
||||
<span className="flavortext">{battlegear.gsx$flavortext}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import s from '../../styles/app.style';
|
|||
import {observable} from "mobx";
|
||||
import {observer, inject} from 'mobx-react';
|
||||
import processString from 'react-process-string';
|
||||
import {Rarity} from './_Snippets';
|
||||
import {Rarity, Unique} from './_Snippets';
|
||||
|
||||
@inject((stores, props, context) => props) @observer
|
||||
export default class Creature extends React.Component {
|
||||
|
|
@ -55,6 +55,7 @@ export default class Creature extends React.Component {
|
|||
<div style={{float: 'left', width: 'calc(100% - (100px + 230px + 50px))', borderLeft: '1px solid white', paddingLeft: '10px', 'whiteSpace': 'pre-line'}} >
|
||||
<span className="ability">{processString([mugic_counters])(creature.gsx$ability)}</span><br />
|
||||
{brainwashed}
|
||||
<Unique data={{unique: creature.gsx$unique, loyal: creature.gsx$loyal, legendary: creature.gsx$legendary, tribe: creature.gsx$tribe}} /><br />
|
||||
<span className="flavortext">{creature.gsx$flavortext}</span>
|
||||
</div>
|
||||
<br />
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import API from '../SpreadsheetData';
|
|||
import s from '../../styles/app.style';
|
||||
import {observable} from "mobx";
|
||||
import {observer, inject} from 'mobx-react';
|
||||
import {Rarity} from './_Snippets';
|
||||
import {Rarity, Unique} from './_Snippets';
|
||||
|
||||
@inject((stores, props, context) => props) @observer
|
||||
export default class Location extends React.Component {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import API from '../SpreadsheetData';
|
|||
import s from '../../styles/app.style';
|
||||
import {observable} from "mobx";
|
||||
import {observer, inject} from 'mobx-react';
|
||||
import {Rarity} from './_Snippets';
|
||||
import {Rarity, Unique} from './_Snippets';
|
||||
|
||||
@inject((stores, props, context) => props) @observer
|
||||
export default class Attack extends React.Component {
|
||||
|
|
@ -37,6 +37,7 @@ export default class Attack extends React.Component {
|
|||
<br />
|
||||
<div style={{float: 'left', width: 'calc(100% - (100px + 230px))', borderLeft: '1px solid white', paddingLeft: '10px'}} >
|
||||
<span>{mugic.gsx$ability}</span><br />
|
||||
<Unique data={{unique: mugic.gsx$unique, loyal: mugic.gsx$loyal, legendary: mugic.gsx$legendary}} /><br />
|
||||
<span className="flavortext">{mugic.gsx$flavortext}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,3 +11,27 @@ export function Rarity(props) {
|
|||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
export function Unique(props) {
|
||||
let string = "";
|
||||
if (props.data.unique) {
|
||||
string+="Unique, ";
|
||||
}
|
||||
if (props.data.loyal) {
|
||||
string+="Loyal";
|
||||
if (props.data.tribe == 'M\'arrillian') {
|
||||
string +=" - M'arrillian or Minions";
|
||||
}
|
||||
// Battlegear loyality
|
||||
if (props.data.loyal != "1") {
|
||||
string +=" - "+props.data.loyal;
|
||||
}
|
||||
}
|
||||
if (props.data.legendary) {
|
||||
string+="Legendary";
|
||||
}
|
||||
string = string.replace(/,\s+$/, "");
|
||||
return (
|
||||
<span style={{fontWeight: "Bold"}}>{string}</span>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user